From 24128ac28d782f8522ec4c72988f54dc45eea998 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 16 Jan 2019 11:07:58 +0100 Subject: [PATCH 001/183] TODO security broken with Multicompany --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 6db383ed515..d84c52068cc 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -85,7 +85,7 @@ if ($user->societe_id > 0) $socid = $user->societe_id; $feature2='user'; if ($user->id == $id) { $feature2=''; $canreaduser=1; } // A user can always read its own card -if (! $canreaduser) { +if (! $canreaduser) { // TODO security broken with Multicompany $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); } From 45a7e0356236705c516e8098112cca0c7a2566ca Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 16 Jan 2019 19:13:21 +0100 Subject: [PATCH 002/183] FIX a user can always read its own card --- htdocs/core/lib/security.lib.php | 4 +++- htdocs/user/card.php | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index d12ee339909..d8193f8067e 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -181,7 +181,7 @@ function dol_verifyHash($chain, $hash, $type='0') */ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $objcanvas=null, $isdraft=0) { - global $db, $conf; + global $db, $conf, $user; global $hookmanager; //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename,$feature2,$dbt_socfield,$dbt_select"); @@ -253,6 +253,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu $tmpreadok=1; foreach($feature2 as $subfeature) { + if ($subfeature == 'user' && $user->id == $objectid) continue; // A user can always read its own card if (! empty($subfeature) && empty($user->rights->$feature->$subfeature->lire) && empty($user->rights->$feature->$subfeature->read)) { $tmpreadok=0; } else if (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $tmpreadok=0; } else { $tmpreadok=1; break; } // Break is to bypass second test if the first is ok @@ -262,6 +263,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu $readok=0; // All tests are ko (we manage here the and, the or will be managed later using $nbko). $nbko++; } + var_dump($readok); } else if (! empty($feature) && ($feature!='user' && $feature!='usergroup')) // This is for old permissions { diff --git a/htdocs/user/card.php b/htdocs/user/card.php index d84c52068cc..19e85962038 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -83,11 +83,8 @@ if ($id) $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2='user'; -if ($user->id == $id) { $feature2=''; $canreaduser=1; } // A user can always read its own card -if (! $canreaduser) { // TODO security broken with Multicompany - $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); -} +$result = restrictedArea($user, 'user', $id, 'user&user', $feature2); if ($user->id <> $id && ! $canreaduser) accessforbidden(); From c4b9bdd569ccb6eaaf564c2c978e12985f5ac48c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 16 Jan 2019 19:15:02 +0100 Subject: [PATCH 003/183] FIX remove var_dump --- htdocs/core/lib/security.lib.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index d8193f8067e..12d0e4d08d0 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -263,7 +263,6 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu $readok=0; // All tests are ko (we manage here the and, the or will be managed later using $nbko). $nbko++; } - var_dump($readok); } else if (! empty($feature) && ($feature!='user' && $feature!='usergroup')) // This is for old permissions { From ffeeb782b0b655d79766c460cafe7c11366ab0e0 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 16 Jan 2019 19:25:19 +0100 Subject: [PATCH 004/183] FIX check is moved to restrictedArea() function --- htdocs/user/agenda_extsites.php | 5 +---- htdocs/user/clicktodial.php | 5 +---- htdocs/user/document.php | 7 +++---- htdocs/user/info.php | 5 +---- htdocs/user/ldap.php | 2 +- htdocs/user/note.php | 2 +- htdocs/user/param_ihm.php | 6 +----- htdocs/user/perms.php | 5 ----- 8 files changed, 9 insertions(+), 28 deletions(-) diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 2d94711aae8..541cf455a03 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -57,10 +57,7 @@ $object->getrights(); $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); -if ($user->id == $id) // A user can always read its own card -{ - $feature2=''; -} + $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // If user is not user that read and no permission to read other users, we stop diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index a6c43e2dc62..ce5491f5e20 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -35,10 +35,7 @@ $id=GETPOST('id','int'); $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); -if ($user->id == $id) // A user can always read its own card -{ - $feature2=''; -} + $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 2c41c1bf922..fd30172135d 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -66,10 +66,9 @@ if ($id) $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2='user'; -if ($user->id == $id) { $feature2=''; $canreaduser=1; } // A user can always read its own card -if (!$canreaduser) { - $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); -} + +$result = restrictedArea($user, 'user', $id, 'user&user', $feature2); + if ($user->id <> $id && ! $canreaduser) accessforbidden(); // Get parameters diff --git a/htdocs/user/info.php b/htdocs/user/info.php index 3cecf94543b..c1db0455628 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -43,10 +43,7 @@ if ($id > 0 || ! empty($ref)) $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); -if ($user->id == $id) // A user can always read its own card -{ - $feature2=''; -} + $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // If user is not user that read and no permission to read other users, we stop diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 6b8d0b2502e..dcd47e5283f 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -37,7 +37,7 @@ $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'userldap'; $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); -if ($user->id == $id) $feature2=''; // A user can always read its own card + $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); $object = new User($db); diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 87a6785615e..7ca91200734 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -45,7 +45,7 @@ if (($object->id != $user->id) && (! $user->rights->user->user->lire)) accessfor $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); -if ($user->id == $id) $feature2=''; // A user can always read its own card + $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 9e1ef7b9444..0d9e81b95e6 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -48,11 +48,7 @@ if ($id) $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); -if ($user->id == $id) // A user can always read its own card -{ - $feature2=''; - $canreaduser=1; -} + $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); if ($user->id <> $id && ! $canreaduser) accessforbidden(); diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 574aa44f89d..c1b2e6da717 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -58,11 +58,6 @@ if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $socid=0; if (isset($user->societe_id) && $user->societe_id > 0) $socid = $user->societe_id; $feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); -if ($user->id == $id && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->user->self_advance->readperms)) // A user can always read its own card if not advanced perms enabled, or if he has advanced perms -{ - $feature2=''; - $canreaduser=1; -} $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); if ($user->id <> $id && ! $canreaduser) accessforbidden(); From f7703235c7a85f32a80f74739af94def9462ad3a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 16 Jan 2019 19:39:57 +0100 Subject: [PATCH 005/183] FIX broken feature (better check) --- htdocs/user/perms.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index c1b2e6da717..721d95cdec3 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -58,6 +58,10 @@ if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $socid=0; if (isset($user->societe_id) && $user->societe_id > 0) $socid = $user->societe_id; $feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); +if ($user->id == $id && (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->user->self_advance->readperms))) // A user can always read its own card if not advanced perms enabled, or if he has advanced perms +{ + accessforbidden(); +} $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); if ($user->id <> $id && ! $canreaduser) accessforbidden(); From f20dd8019426c164af8d210692445c830aca28c4 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:20:36 +0100 Subject: [PATCH 006/183] FIX: better thirparty support --- htdocs/don/card.php | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 6a63074166c..d2a43b41813 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015-2016 Alexandre Spangaro - * Copyright (C) 2018 Thibault FOUCART + * Copyright (C) 2018-2019 Thibault FOUCART * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -107,8 +107,8 @@ if ($action == 'update') $object->amount = price2num(GETPOST("amount",'alpha')); $object->town = GETPOST("town",'alpha'); $object->zip = GETPOST("zipcode",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST("email",'alpha'); + $object->country_id = GETPOST('country_id', 'int'); + $object->email = GETPOST("email",'alpha'); $object->date = $donation_date; $object->public = GETPOST("public",'alpha'); $object->fk_project = GETPOST("fk_project",'alpha'); @@ -154,6 +154,7 @@ if ($action == 'add') if (! $error) { + $object->fk_soc = GETPOST("fk_soc",'int'); $object->firstname = GETPOST("firstname",'alpha'); $object->lastname = GETPOST("lastname",'alpha'); $object->societe = GETPOST("societe",'alpha'); @@ -161,8 +162,8 @@ if ($action == 'add') $object->amount = price2num(GETPOST("amount",'alpha')); $object->zip = GETPOST("zipcode",'alpha'); $object->town = GETPOST("town",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST("email",'alpha'); + $object->country_id = GETPOST('country_id', 'int'); + $object->email = GETPOST("email",'alpha'); $object->date = $donation_date; $object->note_private= GETPOST("note_private",'none'); $object->note_public = GETPOST("note_public",'none'); @@ -516,7 +517,7 @@ if (! empty($id) && $action == 'edit') // Amount if ($object->statut == 0) { - print "".''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->currency).''; + print "".''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->currency).''; } else { @@ -530,6 +531,14 @@ if (! empty($id) && $action == 'edit') print ""; print "\n"; +if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES) ) { + + $company=new Societe($db); + $result=$company->fetch($object->fk_soc); + + print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; + +} else { $langs->load("companies"); print ''.$langs->trans("Company").''; print ''.$langs->trans("Lastname").''; @@ -537,10 +546,10 @@ if (! empty($id) && $action == 'edit') print ''.$langs->trans("Address").''; print ''; - // Zip / Town - print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; + // Zip / Town + print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6); - print ' '; + print ' '; print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id')); print ''; @@ -551,7 +560,7 @@ if (! empty($id) && $action == 'edit') print ''; print "".''.$langs->trans("EMail").''; - +} // Payment mode print "".$langs->trans("PaymentMode")."\n"; if ($object->modepaymentid) $selected = $object->modepaymentid; @@ -683,11 +692,22 @@ if (! empty($id) && $action != 'edit') print ''.$langs->trans("PublicDonation").''; print yn($object->public); print ''; + +if ($object->fk_soc) { + + $company=new Societe($db); + $result=$company->fetch($object->fk_soc); + + print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; + +} else { print ''.$langs->trans("Company").''.$object->societe.''; print ''.$langs->trans("Lastname").''.$object->lastname.''; print ''.$langs->trans("Firstname").''.$object->firstname.''; +} + // Payment mode print "".$langs->trans("PaymentMode").""; $form->form_modes_reglement(null, $object->modepaymentid,'none'); From c7bedbe7dc8eca76a73e2d0681eb1ca7a573baa8 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:22:33 +0100 Subject: [PATCH 007/183] Update for thirdparty support --- htdocs/don/class/don.class.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index c3941059e64..7c8feaa8a15 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -1,10 +1,11 @@ - * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2009 Regis Houssin * Copyright (C) 2014 Florian Henry * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent + * Copyright (C) 2019 Thibault FOUCART * * 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 @@ -366,6 +367,7 @@ class Don extends CommonObject $sql.= ", entity"; $sql.= ", amount"; $sql.= ", fk_payment"; + $sql.= ", fk_soc"; $sql.= ", firstname"; $sql.= ", lastname"; $sql.= ", societe"; @@ -388,6 +390,7 @@ class Don extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".price2num($this->amount); $sql.= ", ".($this->modepaymentid?$this->modepaymentid:"null"); + $sql.= ", '".$this->fk_soc."'"; $sql.= ", '".$this->db->escape($this->firstname)."'"; $sql.= ", '".$this->db->escape($this->lastname)."'"; $sql.= ", '".$this->db->escape($this->societe)."'"; @@ -489,7 +492,7 @@ class Don extends CommonObject $sql .= ",address='".$this->db->escape($this->address)."'"; $sql .= ",zip='".$this->db->escape($this->zip)."'"; $sql .= ",town='".$this->db->escape($this->town)."'"; - $sql .= ",fk_country = ".$this->country_id; + $sql .= ",fk_country = ".($this->country_id > 0 ? $this->country_id : '0'); $sql .= ",public=".$this->public; $sql .= ",fk_projet=".($this->fk_project>0?$this->fk_project:'null'); $sql .= ",note_private=".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL"); @@ -636,7 +639,7 @@ class Don extends CommonObject global $conf; $sql = "SELECT d.rowid, d.datec, d.date_valid, d.tms as datem, d.datedon,"; - $sql.= " d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.zip, d.town, "; + $sql.= " d.fk_soc,d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.zip, d.town, "; $sql.= " d.fk_country, d.country as country_olddata, d.public, d.amount, d.fk_payment, d.paid, d.note_private, d.note_public, d.email, d.phone, "; $sql.= " d.phone_mobile, d.fk_projet as fk_project, d.model_pdf,"; $sql.= " p.ref as project_ref,"; @@ -670,6 +673,7 @@ class Don extends CommonObject $this->date_valid = $this->db->jdate($obj->date_valid); $this->datem = $this->db->jdate($obj->datem); $this->date = $this->db->jdate($obj->datedon); + $this->fk_soc = $obj->fk_soc; $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; $this->societe = $obj->societe; @@ -682,7 +686,7 @@ class Don extends CommonObject $this->country_code = $obj->country_code; $this->country = $obj->country; $this->country_olddata= $obj->country_olddata; // deprecated - $this->email = $obj->email; + $this->email = $obj->email; $this->phone = $obj->phone; $this->phone_mobile = $obj->phone_mobile; $this->project = $obj->project_ref; @@ -692,7 +696,7 @@ class Don extends CommonObject $this->modepaymentid = $obj->fk_payment; $this->modepaymentcode = $obj->payment_code; $this->modepayment = $obj->payment_label; - $this->paid = $obj->paid; + $this->paid = $obj->paid; $this->amount = $obj->amount; $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; From 754714abf7d177720b9e26ef7c179a7151262b86 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:23:59 +0100 Subject: [PATCH 008/183] Update llx_don.sql --- htdocs/install/mysql/tables/llx_don.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql index 82728861fc6..4cb081045ee 100644 --- a/htdocs/install/mysql/tables/llx_don.sql +++ b/htdocs/install/mysql/tables/llx_don.sql @@ -31,6 +31,7 @@ create table llx_don amount double(24,8) DEFAULT 0, fk_payment integer, -- Id of payment mode paid smallint default 0 NOT NULL, + fk_soc integer NULL, firstname varchar(50), lastname varchar(50), societe varchar(50), @@ -38,7 +39,7 @@ create table llx_don zip varchar(30), town varchar(50), country varchar(50), -- Deprecated - Replace with fk_country - fk_country integer NOT NULL, + fk_country integer NOT NULL, email varchar(255), phone varchar(24), phone_mobile varchar(24), From 5232024de94e08672bd572094aba801e161f6750 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:26:12 +0100 Subject: [PATCH 009/183] ADD thirdparty support --- htdocs/don/list.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 47408fe4bb5..3203d1fd47f 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2019 Thibault FOUCART * * 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 @@ -85,7 +86,7 @@ llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:M $donationstatic=new Don($db); // Genere requete de liste des dons -$sql = "SELECT d.rowid, d.datedon, d.firstname, d.lastname, d.societe,"; +$sql = "SELECT d.rowid, d.datedon, d.fk_soc, d.firstname, d.lastname, d.societe,"; $sql.= " d.amount, d.fk_statut as statut, "; $sql.= " p.rowid as pid, p.ref, p.title, p.public"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p"; From af03f108a12883c8273adcdc0550ca865b220075 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:28:09 +0100 Subject: [PATCH 010/183] Update card.php --- htdocs/don/card.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index d2a43b41813..034e045bb46 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -107,8 +107,8 @@ if ($action == 'update') $object->amount = price2num(GETPOST("amount",'alpha')); $object->town = GETPOST("town",'alpha'); $object->zip = GETPOST("zipcode",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST("email",'alpha'); + $object->country_id = GETPOST('country_id', 'int'); + $object->email = GETPOST("email",'alpha'); $object->date = $donation_date; $object->public = GETPOST("public",'alpha'); $object->fk_project = GETPOST("fk_project",'alpha'); @@ -117,7 +117,7 @@ if ($action == 'update') $object->modepaymentid = GETPOST('modepayment','int'); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); if ($ret < 0) $error++; if ($object->update($user) > 0) @@ -162,9 +162,9 @@ if ($action == 'add') $object->amount = price2num(GETPOST("amount",'alpha')); $object->zip = GETPOST("zipcode",'alpha'); $object->town = GETPOST("town",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST("email",'alpha'); - $object->date = $donation_date; + $object->country_id = GETPOST('country_id', 'int'); + $object->email = GETPOST('email', 'int'); + $object->date = $donation_date; $object->note_private= GETPOST("note_private",'none'); $object->note_public = GETPOST("note_public",'none'); $object->public = GETPOST("public",'alpha'); From 09567ebaafca3175126e86401728cd5faf8a33f6 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 11:28:29 +0100 Subject: [PATCH 011/183] Update card.php --- htdocs/don/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 034e045bb46..a55ebe5e2e8 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -154,7 +154,7 @@ if ($action == 'add') if (! $error) { - $object->fk_soc = GETPOST("fk_soc",'int'); + $object->fk_soc = GETPOST("fk_soc",'int'); $object->firstname = GETPOST("firstname",'alpha'); $object->lastname = GETPOST("lastname",'alpha'); $object->societe = GETPOST("societe",'alpha'); From 4b447d779916b87877d2230947f003d7d420b94f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 14:13:55 +0100 Subject: [PATCH 012/183] Update card.php --- htdocs/don/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index a55ebe5e2e8..9e7fd3e5c9e 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -537,7 +537,7 @@ if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->globa $result=$company->fetch($object->fk_soc); print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; - + } else { $langs->load("companies"); print ''.$langs->trans("Company").''; @@ -699,7 +699,7 @@ if ($object->fk_soc) { $result=$company->fetch($object->fk_soc); print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; - + } else { print ''.$langs->trans("Company").''.$object->societe.''; From 89e348515a11eb8dce1f4b4c5388b5ecf4a7545e Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 14:14:38 +0100 Subject: [PATCH 013/183] Update don.class.php --- htdocs/don/class/don.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 7c8feaa8a15..1d649b1bd76 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -367,7 +367,7 @@ class Don extends CommonObject $sql.= ", entity"; $sql.= ", amount"; $sql.= ", fk_payment"; - $sql.= ", fk_soc"; + $sql.= ", fk_soc"; $sql.= ", firstname"; $sql.= ", lastname"; $sql.= ", societe"; @@ -390,7 +390,7 @@ class Don extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".price2num($this->amount); $sql.= ", ".($this->modepaymentid?$this->modepaymentid:"null"); - $sql.= ", '".$this->fk_soc."'"; + $sql.= ", '".$this->fk_soc."'"; $sql.= ", '".$this->db->escape($this->firstname)."'"; $sql.= ", '".$this->db->escape($this->lastname)."'"; $sql.= ", '".$this->db->escape($this->societe)."'"; @@ -673,7 +673,7 @@ class Don extends CommonObject $this->date_valid = $this->db->jdate($obj->date_valid); $this->datem = $this->db->jdate($obj->datem); $this->date = $this->db->jdate($obj->datedon); - $this->fk_soc = $obj->fk_soc; + $this->fk_soc = $obj->fk_soc; $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; $this->societe = $obj->societe; From 8fcdb3bb6d2a0d05be6ca13a31bc2f904a975344 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 16:30:28 +0100 Subject: [PATCH 014/183] Update card.php --- htdocs/don/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 9e7fd3e5c9e..146c8efaa6b 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -539,6 +539,7 @@ if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->globa print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; } else { + $langs->load("companies"); print ''.$langs->trans("Company").''; print ''.$langs->trans("Lastname").''; From d961ae3225161196334514a5852a4a2efd15bf52 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 16:31:26 +0100 Subject: [PATCH 015/183] Update card.php --- htdocs/don/card.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 146c8efaa6b..e71574acc23 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -537,7 +537,6 @@ if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->globa $result=$company->fetch($object->fk_soc); print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; - } else { $langs->load("companies"); @@ -700,13 +699,11 @@ if ($object->fk_soc) { $result=$company->fetch($object->fk_soc); print ''.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).''; - } else { print ''.$langs->trans("Company").''.$object->societe.''; print ''.$langs->trans("Lastname").''.$object->lastname.''; print ''.$langs->trans("Firstname").''.$object->firstname.''; - } // Payment mode From c2c238ec248af07f552a25d092c40c1fed6bf686 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 16:32:13 +0100 Subject: [PATCH 016/183] Update don.class.php --- htdocs/don/class/don.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 1d649b1bd76..2f720281b4f 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -367,7 +367,7 @@ class Don extends CommonObject $sql.= ", entity"; $sql.= ", amount"; $sql.= ", fk_payment"; - $sql.= ", fk_soc"; + $sql.= ", fk_soc"; $sql.= ", firstname"; $sql.= ", lastname"; $sql.= ", societe"; @@ -673,7 +673,7 @@ class Don extends CommonObject $this->date_valid = $this->db->jdate($obj->date_valid); $this->datem = $this->db->jdate($obj->datem); $this->date = $this->db->jdate($obj->datedon); - $this->fk_soc = $obj->fk_soc; + $this->fk_soc = $obj->fk_soc; $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; $this->societe = $obj->societe; From e74bccca211951fcaab650c34a67cb2f980a1e3a Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 18 Jan 2019 17:51:42 +0100 Subject: [PATCH 017/183] Update don.class.php --- htdocs/don/class/don.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 2f720281b4f..0f3a1879638 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -390,7 +390,7 @@ class Don extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".price2num($this->amount); $sql.= ", ".($this->modepaymentid?$this->modepaymentid:"null"); - $sql.= ", '".$this->fk_soc."'"; + $sql.= ", '".$this->db->escape($this->fk_soc)."'"; $sql.= ", '".$this->db->escape($this->firstname)."'"; $sql.= ", '".$this->db->escape($this->lastname)."'"; $sql.= ", '".$this->db->escape($this->societe)."'"; From a3153889b8e416b64c1a716276e652d61aee6a2f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 19 Jan 2019 11:31:40 +0100 Subject: [PATCH 018/183] fix --- htdocs/don/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index e71574acc23..f412eac3e63 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -163,7 +163,7 @@ if ($action == 'add') $object->zip = GETPOST("zipcode",'alpha'); $object->town = GETPOST("town",'alpha'); $object->country_id = GETPOST('country_id', 'int'); - $object->email = GETPOST('email', 'int'); + $object->email = GETPOST('email', 'alpha'); $object->date = $donation_date; $object->note_private= GETPOST("note_private",'none'); $object->note_public = GETPOST("note_public",'none'); From d5b66eeffb285d6470d3a393df6fff529242c0df Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 19 Jan 2019 18:12:48 +0100 Subject: [PATCH 019/183] FIX $user is already in parameters --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 12d0e4d08d0..1641a0ff300 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -181,7 +181,7 @@ function dol_verifyHash($chain, $hash, $type='0') */ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $objcanvas=null, $isdraft=0) { - global $db, $conf, $user; + global $db, $conf; global $hookmanager; //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename,$feature2,$dbt_socfield,$dbt_select"); From 13586ff3d8ea23b03ad1a311dd60d90cb98c34f7 Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 20 Jan 2019 15:24:38 +0100 Subject: [PATCH 020/183] typo on my previus patch MainAccountForSupplierssNotDefined -> MainAccountForSuppliersNotDefined --- htdocs/accountancy/journal/purchasesjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 28d4916884f..7df2b491fc5 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -879,7 +879,7 @@ if (empty($action) || $action == 'view') { $accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER); if (($accountoshow == "") || $accountoshow == 'NotDefined') { - print ''.$langs->trans("MainAccountForSupplierssNotDefined").''; + print ''.$langs->trans("MainAccountForSuppliersNotDefined").''; } else print $accountoshow; print ''; From df5aa330221445ca2bec5842b88e99e7d97e9bdf Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 20 Jan 2019 15:25:24 +0100 Subject: [PATCH 021/183] =?UTF-8?q?add=20html=5Fentity=5Fdecode=20on=20fie?= =?UTF-8?q?lds=20for=20export=20process=20(for=20example=20´=20->=20?= =?UTF-8?q?=C3=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/accountancy/journal/bankjournal.php | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 40fca78ab3b..0a80dc85ef9 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -8,7 +8,8 @@ * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2017-2018 Frédéric France - * Copyright (C) 2018 Ferran Marcet + * Copyright (C) 2018 Ferran Marcet + * Copyright (C) 2018 Eric Seigne * * 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 @@ -785,17 +786,17 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; // CSV header line - print '"' . $langs->trans("BankId").'"' . $sep; - print '"' . $langs->trans("Date") . '"' . $sep; - print '"' . $langs->trans("PaymentMode") . '"' . $sep; - print '"' . $langs->trans("AccountAccounting") . '"' . $sep; - print '"' . $langs->trans("LedgerAccount") . '"' . $sep; - print '"' . $langs->trans("SubledgerAccount") . '"' . $sep; - print '"' . $langs->trans("Label"). '"' . $sep; - print '"' . $langs->trans("Debit") . '"' . $sep; - print '"' . $langs->trans("Credit") . '"' . $sep; - print '"' . $langs->trans("Journal") . '"' . $sep; - print '"' . $langs->trans("Note") . '"' . $sep; + print '"' . html_entity_decode($langs->trans("BankId")).'"' . $sep; + print '"' . html_entity_decode($langs->trans("Date")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("PaymentMode")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("AccountAccounting")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("LedgerAccount")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("SubledgerAccount")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("Label")). '"' . $sep; + print '"' . html_entity_decode($langs->trans("Debit")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("Credit")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("Journal")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("Note")) . '"' . $sep; print "\n"; From 88efc830fec77abb639fa0ab28b4ca5f515b6123 Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 20 Jan 2019 15:25:53 +0100 Subject: [PATCH 022/183] re enable export for expensereportsjournal --- .../journal/expensereportsjournal.php | 156 ++++++------------ 1 file changed, 55 insertions(+), 101 deletions(-) diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 3147339601c..e97ea615651 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -7,6 +7,7 @@ * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018 Eric Seigne * * 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 @@ -425,115 +426,68 @@ $form = new Form($db); $userstatic = new User($db); // Export -/*if ($action == 'exportcsv') { // ISO and not UTF8 ! +if ($action == 'exportcsv') { // ISO and not UTF8 ! $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; $filename = 'journal'; $type_export = 'journal'; include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; - // Model Cegid Expert Export - if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) { - $sep = ";"; + // CSV header line + print '"' . $langs->trans("Date") . '"' . $sep; + print '"' . html_entity_decode($langs->trans("Piece")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("AccountAccounting")) . '"' . $sep; + // print '"' . html_entity_decode($langs->trans("SubledgerAccount")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("LabelOperation")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("Debit")) . '"' . $sep; + print '"' . html_entity_decode($langs->trans("Credit")) . '"' . $sep; + print "\n"; - foreach ( $taber as $key => $val ) { - $date = dol_print_date($val["date"], '%d%m%Y'); - - // Fees - foreach ( $tabht[$key] as $k => $mt ) { - $userstatic->id = $tabuser[$key]['id']; - $userstatic->name = $tabuser[$key]['name']; - $userstatic->client = $tabuser[$key]['code_client']; - - if ($mt) { - print $date . $sep; - print $journal . $sep; - print length_accountg(html_entity_decode($k)) . $sep; - print $sep; - print ($mt < 0 ? 'C' : 'D') . $sep; - print ($mt <= 0 ? price(- $mt) : $mt) . $sep; - print dol_trunc($val["comments"], 32) . $sep; - print $val["ref"]; - print "\n"; - } - } - - // VAT - foreach ( $tabtva[$key] as $k => $mt ) { - if ($mt) { - print $date . $sep; - print $journal . $sep; - print length_accountg(html_entity_decode($k)) . $sep; - print $sep; - print ($mt < 0 ? 'C' : 'D') . $sep; - print ($mt <= 0 ? price(- $mt) : $mt) . $sep; - print $langs->trans("VAT") . $sep; - print $val["ref"]; - print "\n"; - } - } - - foreach ( $tabttc[$key] as $k => $mt ) { - print $date . $sep; - print $journal . $sep; - print length_accountg($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) . $sep; - print length_accounta(html_entity_decode($k)) . $sep; - print ($mt < 0 ? 'D' : 'C') . $sep; - print ($mt <= 0 ? price(- $mt) : $mt) . $sep; - print $userstatic->name . $sep; - print $val["ref"]; - print "\n"; - } - } - } elseif ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) { - // Model Classic Export - foreach ( $taber as $key => $val ) { - $date = dol_print_date($val["date"], 'day'); - - $userstatic->id = $tabuser[$key]['id']; - $userstatic->name = $tabuser[$key]['name']; - - // Fees - foreach ( $tabht[$key] as $k => $mt ) { - $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch(null, $k, true); - if ($mt) { - print '"' . $date . '"' . $sep; - print '"' . $val["ref"] . '"' . $sep; - print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; - print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; - print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; - print "\n"; - } - } - // VAT - foreach ( $tabtva[$key] as $k => $mt ) { - if ($mt) { - print '"' . $date . '"' . $sep; - print '"' . $val["ref"] . '"' . $sep; - print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($langs->trans("VAT")) . '"' . $sep; - print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; - print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; - print "\n"; - } - } - - // Third party - foreach ( $tabttc[$key] as $k => $mt ) { - print '"' . $date . '"' . $sep; - print '"' . $val["ref"] . '"' . $sep; - print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($userstatic->name) . '"' . $sep; - print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; - print '"' . ($mt >= 0 ? price($mt) : '') . '"'; - } - print "\n"; - } + foreach ( $taber as $key => $val ) { + $date = dol_print_date($val["date"], 'day'); + + $userstatic->id = $tabuser[$key]['id']; + $userstatic->name = $tabuser[$key]['name']; + + // Fees + foreach ( $tabht[$key] as $k => $mt ) { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch(null, $k, true); + if ($mt) { + print '"' . $date . '"' . $sep; + print '"' . $val["ref"] . '"' . $sep; + print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; + print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; + print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; + print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; + print "\n"; + } + } + // VAT + foreach ( $tabtva[$key] as $k => $mt ) { + if ($mt) { + print '"' . $date . '"' . $sep; + print '"' . $val["ref"] . '"' . $sep; + print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; + print '"' . dol_trunc($langs->trans("VAT")) . '"' . $sep; + print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; + print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; + print "\n"; + } + } + + // Third party + foreach ( $tabttc[$key] as $k => $mt ) { + print '"' . $date . '"' . $sep; + print '"' . $val["ref"] . '"' . $sep; + print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; + print '"' . dol_trunc($userstatic->name) . '"' . $sep; + print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; + print '"' . ($mt >= 0 ? price($mt) : '') . '"'; + } + print "\n"; } } -*/ if (empty($action) || $action == 'view') { @@ -560,6 +514,7 @@ if (empty($action) || $action == 'view') { print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); } print '
'; + print ''; if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') { print ''; } @@ -567,7 +522,6 @@ if (empty($action) || $action == 'view') { if ($in_bookkeeping == 'notyet') print ''; else print '' . $langs->trans("WriteBookKeeping") . ''; } - //print ''; print '
'; // TODO Avoid using js. We can use a direct link with $param From 71f7aa9503173a5bd8b7a1e57eef549fee26014f Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 20 Jan 2019 20:55:59 +0100 Subject: [PATCH 023/183] use transnoentitiesnoconv instead of html_entity_decode --- htdocs/accountancy/journal/bankjournal.php | 22 +++++++++---------- .../journal/expensereportsjournal.php | 13 +++++------ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 0a80dc85ef9..24bf2097b67 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -786,17 +786,17 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; // CSV header line - print '"' . html_entity_decode($langs->trans("BankId")).'"' . $sep; - print '"' . html_entity_decode($langs->trans("Date")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("PaymentMode")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("AccountAccounting")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("LedgerAccount")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("SubledgerAccount")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("Label")). '"' . $sep; - print '"' . html_entity_decode($langs->trans("Debit")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("Credit")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("Journal")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("Note")) . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("BankId").'"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Date") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("PaymentMode") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("AccountAccounting") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("LedgerAccount") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("SubledgerAccount") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Label"). '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Debit") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Credit") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Journal") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Note") . '"' . $sep; print "\n"; diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index e97ea615651..5749cc9c2b6 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -434,13 +434,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; // CSV header line - print '"' . $langs->trans("Date") . '"' . $sep; - print '"' . html_entity_decode($langs->trans("Piece")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("AccountAccounting")) . '"' . $sep; - // print '"' . html_entity_decode($langs->trans("SubledgerAccount")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("LabelOperation")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("Debit")) . '"' . $sep; - print '"' . html_entity_decode($langs->trans("Credit")) . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Date") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Piece") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("AccountAccounting") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("LabelOperation") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Debit") . '"' . $sep; + print '"' . $langs->transnoentitiesnoconv("Credit") . '"' . $sep; print "\n"; foreach ( $taber as $key => $val ) { From fdb1e1145c6755eb76f5be17407688a64bbede2d Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 20 Jan 2019 20:58:52 +0100 Subject: [PATCH 024/183] add if ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL --- htdocs/accountancy/journal/expensereportsjournal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 5749cc9c2b6..ae4e703db76 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -513,7 +513,8 @@ if (empty($action) || $action == 'view') { print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); } print '
'; - print ''; + + if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print ''; if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') { print ''; } From a5cbef7aec3f4f80a77baeb5b71ecbffea55d6ff Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Mon, 21 Jan 2019 11:51:54 +0100 Subject: [PATCH 025/183] new show in blod invoice amount where we came from for payment --- htdocs/compta/paiement.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 51435433aa4..bca1fa8f835 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -622,15 +622,16 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $multicurrency_remaintopay=price2num($invoice->multicurrency_total_ttc - $multicurrency_payment - $multicurrency_creditnotes - $multicurrency_deposits,'MT'); } - print ''; - print ''; + print ''; + + print ''; print $invoice->getNomUrl(1,''); if($objp->socid != $facture->thirdparty->id) print ' - '.$soc->getNomUrl(1).' '; print "\n"; // Date - print ''.dol_print_date($db->jdate($objp->df),'day')."\n"; + print ''.dol_print_date($db->jdate($objp->df),'day')."\n"; // Date Max Payment if ($objp->dlr > 0 ) @@ -700,7 +701,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } // Price - print ''.price($sign * $objp->total_ttc).''; + print 'id==$facid)?' style="font-weight: bold" ':'').'>'.price($sign * $objp->total_ttc).''; // Received or paid back print ''.price($sign * $paiement); From 406f26b9d2a8c27904ac36be4c4b4ba2edd0b9be Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 21 Jan 2019 16:48:14 +0100 Subject: [PATCH 026/183] FIX JSON.parse not needeed and missing simple quote escaping --- htdocs/takepos/takepos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 44da2914fe8..145e560940a 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -58,7 +58,7 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); $categorie = new Categorie($db); $categories = $categorie->get_full_arbo('product'); ?> -var categories = JSON.parse( '' ); +var categories = ; var currentcat; var pageproducts=0; var pagecategories=0; From 0a36a487c461878f5f167aaf89bee39004568375 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 21 Jan 2019 18:43:12 +0100 Subject: [PATCH 027/183] FIX remove unused option --- htdocs/takepos/takepos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 145e560940a..c8033351913 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -58,7 +58,7 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); $categorie = new Categorie($db); $categories = $categorie->get_full_arbo('product'); ?> -var categories = ; +var categories = ; var currentcat; var pageproducts=0; var pagecategories=0; From 4d2231a6a2fb6f1c52f520181e0b3e2d9d3a1dfe Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 21 Jan 2019 23:53:17 +0100 Subject: [PATCH 028/183] Fix double < --- htdocs/don/class/don.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 0f3a1879638..248c2c29aba 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -1,4 +1,4 @@ -< * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2009 Regis Houssin From 8d877fd289b207a4d124fc2634c401e754dfb8fe Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 22 Jan 2019 11:37:23 +0100 Subject: [PATCH 029/183] update with html5 compliant code --- htdocs/admin/agenda_extsites.php | 2 +- htdocs/admin/agenda_other.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 236483f5ed4..66f18308931 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -196,7 +196,7 @@ print "".$langs->trans("Parameter").""; print "".$langs->trans("Name").""; print "".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)'; print "".$form->textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).''; -print ''.$langs->trans("Color").''; +print ''.$langs->trans("Color").''; print ""; $i=1; diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 2a370cdf580..72097057149 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -331,7 +331,7 @@ print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; +print ''."\n"; print ''."\n"; // Manual or automatic @@ -339,7 +339,7 @@ print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; @@ -367,7 +367,7 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) print ''."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; } @@ -376,7 +376,7 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; @@ -385,7 +385,7 @@ print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; From 7a7a7e7aa9ac2f9a91b7e07369fcc5e5b646653c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 22 Jan 2019 11:40:53 +0100 Subject: [PATCH 030/183] update with html5 compliant code --- htdocs/admin/agenda_reminder.php | 8 ++++---- htdocs/admin/chequereceipts.php | 2 +- htdocs/admin/commande.php | 6 +++--- htdocs/admin/company.php | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 269880236cb..856d6f19668 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -186,7 +186,7 @@ print '
'.$langs->trans("Parameters").' '.$langs->trans("Value").''.$langs->trans("Value").'
'.$langs->trans("AGENDA_USE_EVENT_TYPE").' '."\n"; +print ''."\n"; //print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) { @@ -355,7 +355,7 @@ print '
'.$langs->trans("AGENDA_DEFAULT_VIEW").' '."\n"; +print ''."\n"; $tmplist=array(''=>' ', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser")); print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW); print '
'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").' '."\n"; + print ''."\n"; $formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1); print '
'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").' '."\n"; +print ''."\n"; $formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1); print '
'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").' '."\n"; +print ''."\n"; $formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_FILTER_STATUS, 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100'); print '
'."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; +print ''."\n"; print ''."\n"; @@ -196,7 +196,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) print ''."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; print ''."\n"; print ''."\n"; - print '\n"; print '
'.$langs->trans("Parameters").' '.$langs->trans("Value").''.$langs->trans("Value").'
'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).' '."\n"; + print ''."\n"; if (empty($conf->global->AGENDA_REMINDER_EMAIL)) { print ''.img_picto($langs->trans('Disabled'),'switch_off').''; @@ -213,7 +213,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) print '
'.$langs->trans('AGENDA_REMINDER_BROWSER').' '."\n"; + print ''."\n"; if (empty($conf->global->AGENDA_REMINDER_BROWSER)) { print ''.img_picto($langs->trans('Disabled'),'switch_off').''; @@ -225,7 +225,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) print '
'.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').' '."\n"; + print ''."\n"; if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) { print ''.img_picto($langs->trans('Disabled'),'switch_off').''; diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index f85018c03b8..013b140ee60 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -267,7 +267,7 @@ else $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes'); print $doleditor->Create(); } -print ''; +print ''; print ''; print "
'; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index d4d7b789974..2360c1f7b6e 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -556,7 +556,7 @@ else $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes'); print $doleditor->Create(); } -print ''; +print ''; print ''; print "\n"; print ''; @@ -570,7 +570,7 @@ print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftOrders"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; print ''; -print ''; +print ''; print ''; print "\n"; print ''; @@ -674,7 +674,7 @@ print "\n"; print ''; print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'
'; -print ''; +print ''; print "\n"; print ''; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 15af65fbb8d..f0a0cde4c92 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -602,7 +602,7 @@ if ($action == 'edit' || $action == 'updateedit') print ''; print ''; print ''; - print ''; + print ''; print "\n"; @@ -635,7 +635,7 @@ if ($action == 'edit' || $action == 'updateedit') print '
'.$langs->trans("VATManagement").''.$langs->trans("Description").'  
'; print ''; print ''; - print ''; + print ''; print "\n"; // Note: When option is not set, it must not appears as set on on, because there is no default value for this option @@ -678,7 +678,7 @@ if ($action == 'edit' || $action == 'updateedit') print '
'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).''.$langs->trans("Description").'  
'; print ''; print ''; - print ''; + print ''; print "\n"; @@ -1040,7 +1040,7 @@ else print '
'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).''.$langs->trans("Description").'  
'; print ''; print ''; - print ''; + print ''; print "\n"; @@ -1077,7 +1077,7 @@ else print '
'.$langs->trans("VATManagement").''.$langs->trans("Description").'  
'; print ''; print ''; - print ''; + print ''; print "\n"; @@ -1131,7 +1131,7 @@ else print '
'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).''.$langs->trans("Description").'  
'; print ''; print ''; - print ''; + print ''; print "\n"; From 05b33c149c4a960507d70bafe84fa8e739bb44a7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 22 Jan 2019 11:46:12 +0100 Subject: [PATCH 031/183] update with html5 compliant code --- htdocs/admin/emailcollector_card.php | 8 ++++---- htdocs/admin/emailcollector_list.php | 2 +- htdocs/admin/expensereport_ik.php | 2 +- htdocs/admin/expensereport_rules.php | 2 +- htdocs/admin/external_rss.php | 2 +- htdocs/admin/facture.php | 12 +++++------ htdocs/admin/fichinter.php | 12 +++++------ htdocs/admin/geoipmaxmind.php | 2 +- htdocs/admin/ldap_contacts.php | 30 ++++++++++++++-------------- 9 files changed, 36 insertions(+), 36 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index eaef18c9543..b165f60b21c 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -449,7 +449,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; - print ''; + print ''; print ''; // List filters foreach($object->filters as $rulefilter) @@ -462,7 +462,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print $langs->trans($arrayoftypes[$rulefilter['type']]); print ''; print ''; - print ''; @@ -492,7 +492,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print $form->textwithpicto('', $htmltext); print ''; print ''; - print ''; + print ''; print ''; // List operations $nboflines = count($object->actions); @@ -509,7 +509,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print $langs->trans($arrayoftypes[$ruleaction['type']]); print ''; print ''; - print ''; diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 7e72a5ce003..f388cea8b55 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -503,7 +503,7 @@ if (isset($totalarray['pos'])) while ($i < $totalarray['nbfield']) { $i++; - if (! empty($totalarray['pos'][$i])) print ''; + if (! empty($totalarray['pos'][$i])) print ''; else { if ($i == 1) diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php index d3937a98ba7..0f01fa7a750 100644 --- a/htdocs/admin/expensereport_ik.php +++ b/htdocs/admin/expensereport_ik.php @@ -154,7 +154,7 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) echo ''; // Action - echo ''; echo ''; echo ''; - echo ''; + echo ''; echo ''; echo '
'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).''.$langs->trans("Description").'  
'; print ''; print '
'.$rulefilter['rulevalue'].''; + print ''; //print $rulefilterobj->getLibStatut(3); print ' '.img_delete().''; print '
'.$ruleaction['actionparam'].''; + print ''; //print $ruleactionobj->getLibStatut(3); print ' '.img_delete().''; print ''.price($totalarray['val'][$totalarray['pos'][$i]]).''.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans('expenseReportPrintExample', price($range->ik->offset + 5 * $range->ik->coef)).''; + echo ''; if ($range->range_active == 1) { if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 7b2baf0ed94..8594d060951 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -187,7 +187,7 @@ if ($action != 'edit') echo ''.$form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0).''.$conf->currency.''.$form->selectyesno('restrictive', 0, 1).'
'; diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 048d002a3b7..c289c64b217 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -259,7 +259,7 @@ if ($resql) print ""; print "".$langs->trans("RSS")." ".($i+1).""; - print ''; + print ''; print "trans("Modify")."\">"; print "   "; print "trans("Delete")."\">"; diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 683453023b9..fe78e5aa5b6 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -619,7 +619,7 @@ if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf print ''; print ''.$langs->trans("Type").''; print ''.$langs->trans("Name").''; - print ''; + print ''; print "\n"; $listtype=array( @@ -662,7 +662,7 @@ print ''; print ''; print ''; print $langs->trans("PaymentMode").''; -print ''; +print ''; print "\n"; print ''; @@ -762,7 +762,7 @@ print ''; print $langs->trans("ForceInvoiceDate"); print ''; print $form->selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1); -print ''; +print ''; print ''; print "\n"; print ''; @@ -789,7 +789,7 @@ else $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes'); print $doleditor->Create(); } -print ''; +print ''; print ''; print "\n"; print ''; @@ -802,7 +802,7 @@ print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftBill"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; print ''; -print ''; +print ''; print ''; print "\n"; print ''; @@ -842,7 +842,7 @@ print "\n"; print ''; print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'
'; -print ''; +print ''; print "\n"; print ''; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 7fd349363e1..9a259fd3c0d 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -554,7 +554,7 @@ else $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes'); print $doleditor->Create(); } -print ''; +print ''; print ''; print "\n"; print ''; @@ -567,7 +567,7 @@ print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; print ''; -print ''; +print ''; print ''; print "\n"; print ''; @@ -581,7 +581,7 @@ print 'global->FICHINTER_PRINT_PRODUCTS) print 'checked '; print '/>'; -print ''; +print ''; print ''; print "\n"; print ''; @@ -596,7 +596,7 @@ print ''; print ''; print 'global->FICHINTER_USE_SERVICE_DURATION?' checked':'') . '>'; print ''; -print ''; +print ''; print ''; print ''; print ''; @@ -612,7 +612,7 @@ print ''; print ''; print 'global->FICHINTER_WITHOUT_DURATION?' checked':'') . '>'; print ''; -print ''; +print ''; print ''; print ''; print ''; @@ -628,7 +628,7 @@ print ''; print ''; print 'global->FICHINTER_DATE_WITHOUT_HOUR?' checked':'') . '>'; print ''; -print ''; +print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index 47c51069299..98ab10a988e 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -102,7 +102,7 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print "\n"; print ''; diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index f5f5f868801..cb4972e84b3 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -143,105 +143,105 @@ print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("PathToGeoIPMaxmindCountryDataFile").'
'; print ''; print ''; print ''; -print ''; +print ''; print "\n"; // Common name print ''; -print '"; +print '"; print ''; // Name print ''; -print '"; +print '"; print ''; // Firstname print ''; -print '"; +print '"; print ''; // Company print ''; -print '"; +print '"; print ''; // Mail print ''; -print '"; +print '"; print ''; // Phone pro print ''; -print '"; +print '"; print ''; // Phone home print ''; -print '"; +print '"; print ''; // Mobile print ''; -print '"; +print '"; print ''; // Skype print ''; -print '"; +print '"; print ''; // Fax print ''; -print '"; +print '"; print ''; // Address print ''; -print '"; +print '"; print ''; // ZIP print ''; -print '"; +print '"; print ''; // TOWN print ''; -print '"; +print '"; print ''; // COUNTRY print ''; -print '"; +print '"; print ''; print '
'.$langs->trans("LDAPDolibarrMapping").''.$langs->trans("LDAPLdapMapping").''.$langs->trans("LDAPNamingAttribute").''.$langs->trans("LDAPNamingAttribute").'
'.$langs->trans("LDAPFieldFullname").''; print ''; print ''.$langs->trans("LDAPFieldFullnameExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_FULLNAME?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_FULLNAME?' checked':'').">
'.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_NAME?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_NAME?' checked':'').">
'.$langs->trans("LDAPFieldFirstName").''; print ''; print ''.$langs->trans("LDAPFieldFirstNameExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME?' checked':'').">
'.$langs->trans("LDAPFieldCompany").''; print ''; print ''.$langs->trans("LDAPFieldCompanyExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_COMPANY?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_COMPANY?' checked':'').">
'.$langs->trans("LDAPFieldMail").''; print ''; print ''.$langs->trans("LDAPFieldMailExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_MAIL?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_MAIL?' checked':'').">
'.$langs->trans("LDAPFieldPhone").''; print ''; print ''.$langs->trans("LDAPFieldPhoneExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_PHONE?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_PHONE?' checked':'').">
'.$langs->trans("LDAPFieldHomePhone").''; print ''; print ''.$langs->trans("LDAPFieldHomePhoneExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE?' checked':'').">
'.$langs->trans("LDAPFieldMobile").''; print ''; print ''.$langs->trans("LDAPFieldMobileExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_MOBILE?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_MOBILE?' checked':'').">
'.$langs->trans("LDAPFieldSkype").''; print ''; print ''.$langs->trans("LDAPFieldSkypeExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_SKYPE?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_SKYPE?' checked':'').">
'.$langs->trans("LDAPFieldFax").''; print ''; print ''.$langs->trans("LDAPFieldFaxExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_FAX?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_FAX?' checked':'').">
'.$langs->trans("LDAPFieldAddress").''; print ''; print ''.$langs->trans("LDAPFieldAddressExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_ADDRESS?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_ADDRESS?' checked':'').">
'.$langs->trans("LDAPFieldZip").''; print ''; print ''.$langs->trans("LDAPFieldZipExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_ZIP?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_ZIP?' checked':'').">
'.$langs->trans("LDAPFieldTown").''; print ''; print ''.$langs->trans("LDAPFieldTownExample").'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_TOWN?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_TOWN?' checked':'').">
'.$langs->trans("LDAPFieldCountry").''; print ''; print ' global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_COUNTRY?' checked':'').">global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_COUNTRY?' checked':'').">
'; From a609c113838babe1d7fa5fe5f5c623f4c9b0f3f5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 22 Jan 2019 11:48:15 +0100 Subject: [PATCH 032/183] update with html5 compliant code --- htdocs/admin/ldap_groups.php | 10 +++--- htdocs/admin/ldap_members.php | 56 ++++++++++++++--------------- htdocs/admin/ldap_members_types.php | 8 ++--- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 247ecfb28aa..43f66147123 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -135,7 +135,7 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print "\n"; // Filtre @@ -144,7 +144,7 @@ print "\n"; print ''; -print '"; +print '"; print ''; // Name @@ -152,7 +152,7 @@ print ''; print ''; -print '"; +print '"; print ''; */ @@ -160,14 +160,14 @@ print ''; print ''; -print '"; +print '"; print ''; // User group print ''; -print '"; +print '"; print ''; print '
'.$langs->trans("LDAPDolibarrMapping").''.$langs->trans("LDAPLdapMapping").''.$langs->trans("LDAPNamingAttribute").''.$langs->trans("LDAPNamingAttribute").'
'.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldCommonNameExample").'global->LDAP_KEY_GROUPS && $conf->global->LDAP_KEY_GROUPS==$conf->global->LDAP_GROUP_FIELD_FULLNAME)?' checked':'').">global->LDAP_KEY_GROUPS && $conf->global->LDAP_KEY_GROUPS==$conf->global->LDAP_GROUP_FIELD_FULLNAME)?' checked':'').">
'.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").'global->LDAP_KEY_GROUPS==$conf->global->LDAP_GROUP_FIELD_NAME?' checked':'').">global->LDAP_KEY_GROUPS==$conf->global->LDAP_GROUP_FIELD_NAME?' checked':'').">
'.$langs->trans("LDAPFieldDescription").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").'global->LDAP_KEY_GROUPS && $conf->global->LDAP_KEY_GROUPS==$conf->global->LDAP_GROUP_FIELD_DESCRIPTION)?' checked':'').">global->LDAP_KEY_GROUPS && $conf->global->LDAP_KEY_GROUPS==$conf->global->LDAP_GROUP_FIELD_DESCRIPTION)?' checked':'').">
'.$langs->trans("LDAPFieldGroupMembers").''; print ''; print ''.$langs->trans("LDAPFieldGroupMembersExample").'global->LDAP_KEY_GROUPS && $conf->global->LDAP_KEY_GROUPS==$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS)?' checked':'').">global->LDAP_KEY_GROUPS && $conf->global->LDAP_KEY_GROUPS==$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS)?' checked':'').">
'; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 818ec5aaff6..48d2aace5d7 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -167,7 +167,7 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print "\n"; // Filtre @@ -176,63 +176,63 @@ print "\n"; print ''; -print '"; +print '"; print ''; // Name print ''; -print '"; +print '"; print ''; // Firstname print ''; -print ''; +print ''; print ''; // Login unix print ''; -print '"; +print '"; print ''; // Login samba print ''; -print '"; +print '"; print ''; // Password not crypted print ''; -print ''; +print ''; print ''; // Password crypted print ''; -print ''; +print ''; print ''; // Mail print ''; -print '"; +print '"; print ''; // Phone pro print ''; -print ''; +print ''; print ''; // Phone perso @@ -240,77 +240,77 @@ print ''; print ''; -print ''; +print ''; print ''; // Mobile print ''; -print ''; +print ''; print ''; // Skype print ''; -print ''; +print ''; print ''; // Fax print ''; -print ''; +print ''; print ''; // Company print ''; -print ''; +print ''; print ''; // Address print ''; -print ''; +print ''; print ''; // ZIP print ''; -print ''; +print ''; print ''; // TOWN print ''; -print ''; +print ''; print ''; // COUNTRY print ''; -print ''; +print ''; print ''; // Description print ''; -print ''; +print ''; print ''; // Public Note print ''; -print ''; +print ''; print ''; // Birthday @@ -318,14 +318,14 @@ print ''; print ''; -print ''; +print ''; print ''; // Status print ''; -print ''; +print ''; print ''; // First subscription date @@ -333,35 +333,35 @@ print ''; print ''; -print ''; +print ''; print ''; // First subscription amount print ''; -print ''; +print ''; print ''; // Last subscription date print ''; -print ''; +print ''; print ''; // Last subscription amount print ''; -print ''; +print ''; print ''; // End last subscriptions print ''; -print ''; +print ''; print ''; print '
'.$langs->trans("LDAPDolibarrMapping").''.$langs->trans("LDAPLdapMapping").''.$langs->trans("LDAPNamingAttribute").''.$langs->trans("LDAPNamingAttribute").'
'.$langs->trans("LDAPFieldFullname").''; print ''; print ''.$langs->trans("LDAPFieldFullnameExample").'global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_FULLNAME)?' checked':'').">global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_FULLNAME)?' checked':'').">
'.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").'global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_NAME)?' checked':'').">global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_NAME)?' checked':'').">
'.$langs->trans("LDAPFieldFirstName").''; print ''; print ''.$langs->trans("LDAPFieldFirstNameExample").'  
'.$langs->trans("LDAPFieldLoginUnix").''; print ''; print ''.$langs->trans("LDAPFieldLoginExample").'global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_LOGIN)?' checked':'').">global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_LOGIN)?' checked':'').">
'.$langs->trans("LDAPFieldLoginSamba").''; print ''; print ''.$langs->trans("LDAPFieldLoginSambaExample").'global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_LOGIN_SAMBA)?' checked':'').">global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_LOGIN_SAMBA)?' checked':'').">
'.$langs->trans("LDAPFieldPasswordNotCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").'  
'.$langs->trans("LDAPFieldPasswordCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").'  
'.$langs->trans("LDAPFieldMail").''; print ''; print ''.$langs->trans("LDAPFieldMailExample").'global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_MAIL)?' checked':'').">global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS==$conf->global->LDAP_MEMBER_FIELD_MAIL)?' checked':'').">
'.$langs->trans("LDAPFieldPhone").''; print ''; print ''.$langs->trans("LDAPFieldPhoneExample").'  
'.$langs->trans("LDAPFieldHomePhone").''; print ''; print ''.$langs->trans("LDAPFieldHomePhoneExample").'  
'.$langs->trans("LDAPFieldMobile").''; print ''; print ''.$langs->trans("LDAPFieldMobileExample").'  
'.$langs->trans("LDAPFieldSkype").''; print ''; print ''.$langs->trans("LDAPFieldSkypeExample").'  
'.$langs->trans("LDAPFieldFax").''; print ''; print ''.$langs->trans("LDAPFieldFaxExample").'  
'.$langs->trans("LDAPFieldCompany").''; print ''; print ''.$langs->trans("LDAPFieldCompanyExample").'  
'.$langs->trans("LDAPFieldAddress").''; print ''; print ''.$langs->trans("LDAPFieldAddressExample").'  
'.$langs->trans("LDAPFieldZip").''; print ''; print ''.$langs->trans("LDAPFieldZipExample").'  
'.$langs->trans("LDAPFieldTown").''; print ''; print ''.$langs->trans("LDAPFieldTownExample").'  
'.$langs->trans("LDAPFieldCountry").''; print ''; print '   
'.$langs->trans("LDAPFieldDescription").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").'  
'.$langs->trans("LDAPFieldNotePublic").''; print ''; print ''.$langs->trans("LDAPFieldNotePublicExample").'  
'.$langs->trans("LDAPFieldBirthdate").''; print ''; print '   
'.$langs->trans("LDAPFieldStatus").''; print ''; print '   
'.$langs->trans("LDAPFieldFirstSubscriptionDate").''; print ''; print '   
'.$langs->trans("LDAPFieldFirstSubscriptionAmount").''; print ''; print '   
'.$langs->trans("LDAPFieldLastSubscriptionDate").''; print ''; print '   
'.$langs->trans("LDAPFieldLastSubscriptionAmount").''; print ''; print '   
'.$langs->trans("LDAPFieldEndLastSubscription").''; print ''; print '   
'; diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php index 912d4ee3ea9..b07bf0b1484 100644 --- a/htdocs/admin/ldap_members_types.php +++ b/htdocs/admin/ldap_members_types.php @@ -134,7 +134,7 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print "\n"; // Filtre @@ -143,21 +143,21 @@ print "\n"; print ''; -print '"; +print '"; print ''; // Description print ''; -print '"; +print '"; print ''; // User group print ''; -print '"; +print '"; print ''; print '
'.$langs->trans("LDAPDolibarrMapping").''.$langs->trans("LDAPLdapMapping").''.$langs->trans("LDAPNamingAttribute").''.$langs->trans("LDAPNamingAttribute").'
'.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldCommonNameExample").'global->LDAP_KEY_MEMBERS_TYPES && $conf->global->LDAP_KEY_MEMBERS_TYPES==$conf->global->LDAP_MEMBER_TYPE_FIELD_FULLNAME)?' checked':'').">global->LDAP_KEY_MEMBERS_TYPES && $conf->global->LDAP_KEY_MEMBERS_TYPES==$conf->global->LDAP_MEMBER_TYPE_FIELD_FULLNAME)?' checked':'').">
'.$langs->trans("LDAPFieldDescription").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").'global->LDAP_KEY_MEMBERS_TYPES && $conf->global->LDAP_KEY_MEMBER_TYPES==$conf->global->LDAP_MEMBER_TYPE_FIELD_DESCRIPTION)?' checked':'').">global->LDAP_KEY_MEMBERS_TYPES && $conf->global->LDAP_KEY_MEMBER_TYPES==$conf->global->LDAP_MEMBER_TYPE_FIELD_DESCRIPTION)?' checked':'').">
'.$langs->trans("LDAPFieldGroupMembers").''; print ''; print ''.$langs->trans("LDAPFieldGroupMembersExample").'global->LDAP_KEY_MEMBERS_TYPES && $conf->global->LDAP_KEY_MEMBERS_TYPES==$conf->global->LDAP_MEMBER_TYPE_FIELD_GROUPMEMBERS)?' checked':'').">global->LDAP_KEY_MEMBERS_TYPES && $conf->global->LDAP_KEY_MEMBERS_TYPES==$conf->global->LDAP_MEMBER_TYPE_FIELD_GROUPMEMBERS)?' checked':'').">
'; From a75ecc08322adf53bf02b4bc6e7f351021dbc9fc Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 22 Jan 2019 11:51:03 +0100 Subject: [PATCH 033/183] update with html5 compliant code --- htdocs/admin/ldap_users.php | 42 +++++++++++------------ htdocs/admin/limits.php | 8 ++--- htdocs/admin/livraison.php | 2 +- htdocs/admin/mails_senderprofile_list.php | 2 +- htdocs/admin/mails_templates.php | 2 +- htdocs/admin/multicurrency.php | 18 +++++----- 6 files changed, 37 insertions(+), 37 deletions(-) diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index 934fcf8e03e..124bec14f6d 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -158,147 +158,147 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print "\n"; // Common name print ''; -print '"; +print '"; print ''; // Name print ''; -print '"; +print '"; print ''; // Firstname print ''; -print '"; +print '"; print ''; // Login unix print ''; -print '"; +print '"; print ''; // Login samba print ''; -print '"; +print '"; print ''; // Password not crypted print ''; -print ''; +print ''; print ''; // Password crypted print ''; -print ''; +print ''; print ''; // Mail print ''; -print '"; +print '"; print ''; // Phone print ''; -print '"; +print '"; print ''; // Mobile print ''; -print '"; +print '"; print ''; // Skype print ''; -print '"; +print '"; print ''; // Fax print ''; -print '"; +print '"; print ''; // Company print ''; -print ''; +print ''; print ''; // Address print ''; -print ''; +print ''; print ''; // ZIP print ''; -print ''; +print ''; print ''; // TOWN print ''; -print ''; +print ''; print ''; // COUNTRY print ''; -print ''; +print ''; print ''; // Title print ''; -print ''; +print ''; print ''; // Note print ''; -print ''; +print ''; print ''; // Sid print ''; -print '"; +print '"; print ''; print '
'.$langs->trans("LDAPDolibarrMapping").''.$langs->trans("LDAPLdapMapping").''.$langs->trans("LDAPNamingAttribute").''.$langs->trans("LDAPNamingAttribute").'
'.$langs->trans("LDAPFieldFullname").''; print ''; print ''.$langs->trans("LDAPFieldFullnameExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_FULLNAME)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_FULLNAME)?' checked':'').">
'.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_NAME)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_NAME)?' checked':'').">
'.$langs->trans("LDAPFieldFirstName").''; print ''; print ''.$langs->trans("LDAPFieldFirstNameExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_FIRSTNAME)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_FIRSTNAME)?' checked':'').">
'.$langs->trans("LDAPFieldLoginUnix").''; print ''; print ''.$langs->trans("LDAPFieldLoginExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_LOGIN)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_LOGIN)?' checked':'').">
'.$langs->trans("LDAPFieldLoginSamba").''; print ''; print ''.$langs->trans("LDAPFieldLoginSambaExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_LOGIN_SAMBA)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_LOGIN_SAMBA)?' checked':'').">
'.$langs->trans("LDAPFieldPasswordNotCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").'  
'.$langs->trans("LDAPFieldPasswordCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").'  
'.$langs->trans("LDAPFieldMail").''; print ''; print ''.$langs->trans("LDAPFieldMailExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_MAIL)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_MAIL)?' checked':'').">
'.$langs->trans("LDAPFieldPhone").''; print ''; print ''.$langs->trans("LDAPFieldPhoneExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_PHONE)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_PHONE)?' checked':'').">
'.$langs->trans("LDAPFieldMobile").''; print ''; print ''.$langs->trans("LDAPFieldMobileExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_MOBILE)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_MOBILE)?' checked':'').">
'.$langs->trans("LDAPFieldSkype").''; print ''; print ''.$langs->trans("LDAPFieldSkypeExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_SKYPE)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_SKYPE)?' checked':'').">
'.$langs->trans("LDAPFieldFax").''; print ''; print ''.$langs->trans("LDAPFieldFaxExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_FAX)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_FAX)?' checked':'').">
'.$langs->trans("LDAPFieldCompany").''; print ''; print ''.$langs->trans("LDAPFieldCompanyExample").'  
'.$langs->trans("LDAPFieldAddress").''; print ''; print ''.$langs->trans("LDAPFieldAddressExample").'  
'.$langs->trans("LDAPFieldZip").''; print ''; print ''.$langs->trans("LDAPFieldZipExample").'  
'.$langs->trans("LDAPFieldTown").''; print ''; print ''.$langs->trans("LDAPFieldTownExample").'  
'.$langs->trans("LDAPFieldCountry").''; print ''; print '   
'.$langs->trans("LDAPFieldTitle").''; print ''; print ''.$langs->trans("LDAPFieldTitleExample").'  
'.$langs->trans("Note").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").'  
'.$langs->trans("LDAPFieldSid").''; print ''; print ''.$langs->trans("LDAPFieldSidExample").'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_SID)?' checked':'').">global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_SID)?' checked':'').">
'; diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 6342f731347..ad41d7bd945 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -139,20 +139,20 @@ else print ''; print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); - print ''.$conf->global->MAIN_MAX_DECIMALS_UNIT.''; + print ''.$conf->global->MAIN_MAX_DECIMALS_UNIT.''; print ''; print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); - print ''.$conf->global->MAIN_MAX_DECIMALS_TOT.''; + print ''.$conf->global->MAIN_MAX_DECIMALS_TOT.''; - print ''.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").''.$conf->global->MAIN_MAX_DECIMALS_SHOWN.''; + print ''.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").''.$conf->global->MAIN_MAX_DECIMALS_SHOWN.''; print ''; print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); - print ''.$conf->global->MAIN_ROUNDING_RULE_TOT.''; + print ''.$conf->global->MAIN_ROUNDING_RULE_TOT.''; print ''; diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index bc82d03d8d7..a7c38a95e1f 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -471,7 +471,7 @@ else $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes'); print $doleditor->Create(); } -print ''; +print ''; print ''; print "\n"; print ''; diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index bbfc2ee2363..12703d5d38a 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -462,7 +462,7 @@ if (isset($totalarray['pos'])) while ($i < $totalarray['nbfield']) { $i++; - if (! empty($totalarray['pos'][$i])) print ''.price($totalarray['val'][$totalarray['pos'][$i]]).''; + if (! empty($totalarray['pos'][$i])) print ''.price($totalarray['val'][$totalarray['pos'][$i]]).''; else { if ($i == 1) diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 289a3ecd081..da31a794374 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -525,7 +525,7 @@ if (empty($reshook)) } } -print ''; +print ''; print ''; print ""; diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 0a64145e9a4..fbf6603d139 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -193,7 +193,7 @@ print ''; print ''; print ''.$langs->transnoentitiesnoconv("multicurrency_buyPriceInCurrency").''; -print ''; +print ''; print '
'; print ''; print ''; @@ -207,7 +207,7 @@ print ''; print ''; print ''.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").''; -print ''; +print ''; print ''; print ''; print ''; @@ -229,7 +229,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print ''; print ''.$form->textwithpicto($langs->trans("CurrencyLayerAccount"), $langs->trans("CurrencyLayerAccount_help_to_synchronize")).''."\n"; - print ''; + print ''; print ''; print ''; print ''; @@ -240,7 +240,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print ''; print ''.$langs->transnoentitiesnoconv("multicurrency_appId").''; - print ''; + print ''; print ''; print ''; print ''; @@ -252,7 +252,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print ''; print ''.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").''; - print ''; + print ''; print ''; print ''; print ''; @@ -263,7 +263,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print ''; print ''.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").''; - print ''; + print ''; print ''; print ''; print ''; @@ -289,7 +289,7 @@ print ''; print ''; print ''; print ''.$form->selectCurrency('', 'code').''; -print ''; +print ''; print ''; print ''; print ' '; @@ -300,7 +300,7 @@ print '
'; print ''; print ''.$conf->currency.$form->textwithpicto(' ', $langs->trans("BaseCurrency")).''; -print '1'; +print '1'; print ''; foreach ($TCurrency as &$currency) @@ -309,7 +309,7 @@ foreach ($TCurrency as &$currency) print ''; print ''.$currency->code.' - '.$currency->name.''; - print ''; + print ''; print '
'; print ''; print ''; From 0a45d87f4afb46df11e405d8411a379877ad426c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 22 Jan 2019 11:56:09 +0100 Subject: [PATCH 034/183] update with html5 compliant code --- htdocs/admin/notification.php | 2 +- htdocs/admin/payment.php | 2 +- htdocs/admin/prelevement.php | 6 +++--- htdocs/admin/propal.php | 12 ++++++------ htdocs/admin/proxy.php | 14 +++++++------- htdocs/admin/resource.php | 2 +- htdocs/admin/security_file.php | 2 +- htdocs/admin/security_other.php | 10 +++++----- htdocs/admin/stock.php | 4 ++-- htdocs/admin/supplier_invoice.php | 4 ++-- htdocs/admin/supplier_order.php | 6 +++--- htdocs/admin/supplier_proposal.php | 6 +++--- htdocs/admin/syslog.php | 2 +- htdocs/admin/translation.php | 2 +- 14 files changed, 37 insertions(+), 37 deletions(-) diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 92ba0bec200..af2aed5a744 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -151,7 +151,7 @@ print ''; print ''.$langs->trans("Label").''; /*print ''.$langs->trans("Code").''; print ''.$langs->trans("Label").'';*/ -//print ''.$langs->trans("NbOfTargetedContacts").''; +//print ''.$langs->trans("NbOfTargetedContacts").''; print "\n"; // Load array of available notifications diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index 816ab8344ce..f01794c6c17 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -247,7 +247,7 @@ print ''; print $langs->trans("PaymentOnDifferentThirdBills"); print ''; print $form->selectyesno("FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$conf->global->FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS,1); -print ''; +print ''; print "\n"; print ''; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index a56e8ad6def..e0caadc9677 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -495,7 +495,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print ''; print ''.$langs->trans("User").''; print ''.$langs->trans("Value").''; - print ''.$langs->trans("Action").''; + print ''.$langs->trans("Action").''; print "\n"; print ''; @@ -506,7 +506,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print $form->selectarray('action',$actions);// select_dolusers(0,'user',0); print ''; - print ''; + print ''; // List of current notifications for objet_type='withdraw' $sql = "SELECT u.lastname, u.firstname,"; @@ -532,7 +532,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print ''.dolGetFirstLastname($obj->firstname,$obj->lastname).''; $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); print ''.$label.''; - print 'rowid.'">'.img_delete().''; + print 'rowid.'">'.img_delete().''; print ''; $i++; } diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index cf860cd64ba..beb63b8eb0c 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -522,7 +522,7 @@ print ""; print ''; print ''.$langs->trans("DefaultProposalDurationValidity").''; print ''."global->PROPALE_VALIDITY_DURATION."\">"; -print ''; +print ''; print ''; print ''; @@ -534,7 +534,7 @@ print ''; print $langs->trans("UseCustomerContactAsPropalRecipientIfExist"); print ''; print $form->selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1); -print ''; +print ''; print ''; print "\n"; print ''; @@ -562,7 +562,7 @@ else $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes'); print $doleditor->Create(); } -print ''; +print ''; print ''; print "\n"; print ''; @@ -575,7 +575,7 @@ print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; print ''; -print ''; +print ''; print ''; print "\n"; print ''; @@ -585,7 +585,7 @@ if ($conf->banque->enabled) { print ''; - print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").' '; + print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").' '; if (! empty($conf->use_javascript_ajax)) { print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL'); @@ -644,7 +644,7 @@ print "\n"; print ''; print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'
'; -print ''; +print ''; print "\n"; print ''; diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 9490a291729..5a4581e7e83 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -132,7 +132,7 @@ print "\n"; print ''; -print ''.$langs->trans("ConnectionTimeout").''; +print ''.$langs->trans("ConnectionTimeout").''; print ''; print ''; print 'global->MAIN_USE_CONNECT_TIMEOUT).'">'; @@ -142,7 +142,7 @@ print ''; print ''; -print ''.$langs->trans("ResponseTimeout").''; +print ''.$langs->trans("ResponseTimeout").''; print ''; print ''; print ''; @@ -152,7 +152,7 @@ print ''; print ''; -print ''.$langs->trans("MAIN_PROXY_USE").''; +print ''.$langs->trans("MAIN_PROXY_USE").''; print ''; print ''; print $form->selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); @@ -161,7 +161,7 @@ print ''; print ''; -print ''.$langs->trans("MAIN_PROXY_HOST").''; +print ''.$langs->trans("MAIN_PROXY_HOST").''; print ''; print ''; print ''; @@ -170,7 +170,7 @@ print ''; print ''; -print ''.$langs->trans("MAIN_PROXY_PORT").''; +print ''.$langs->trans("MAIN_PROXY_PORT").''; print ''; print ''; print ''; @@ -179,7 +179,7 @@ print ''; print ''; -print ''.$langs->trans("MAIN_PROXY_USER").''; +print ''.$langs->trans("MAIN_PROXY_USER").''; print ''; print ''; print ''; @@ -188,7 +188,7 @@ print ''; print ''; -print ''.$langs->trans("MAIN_PROXY_PASS").''; +print ''.$langs->trans("MAIN_PROXY_PASS").''; print ''; print ''; print ''; diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php index 566e57e587b..c70d8c08a91 100644 --- a/htdocs/admin/resource.php +++ b/htdocs/admin/resource.php @@ -103,7 +103,7 @@ else ); print $form->selectarray("activate_RESOURCE_USE_SEARCH_TO_SELECT",$arrval,$conf->global->RESOURCE_USE_SEARCH_TO_SELECT); print ''; - print ''; + print ''; print ''; print ''; } diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index 87e0d6dd941..f551aafaaff 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -126,7 +126,7 @@ print ''; print ''; -print ''.$langs->trans("UMask").''; +print ''.$langs->trans("UMask").''; print $form->textwithpicto('',$langs->trans("UMaskExplanation")); print ''; print ''; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index b1e4f745560..e26fcf900be 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -109,13 +109,13 @@ dol_fiche_head($head, 'misc', $langs->trans("Security"), -1); print ''; print ''; print ''; -print ''; +print ''; print ''; // Enable Captcha code print ''; print ''; -print ''; // Enable advanced perms print ''; print ''; -print '\n"; $sessiontimeout=ini_get("session.gc_maxlifetime"); if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=$sessiontimeout; print ''; -print ''; print ''; $sessiontimeout=ini_get("session.gc_maxlifetime"); if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE=""; print ''; -print ''; print ''; print ''; - print ''; print ''; - print '\n"; @@ -514,7 +514,7 @@ print "\n"; print '\n"; print '
'.$langs->trans("Parameters").''.$langs->trans("Status").''.$langs->trans("Status").'
'.$langs->trans("UseCaptchaCode").''; +print ''; if (function_exists("imagecreatefrompng")) { if (! empty($conf->use_javascript_ajax)) @@ -144,7 +144,7 @@ print '
'.$langs->trans("UseAdvancedPerms").''; +print ''; if (! empty($conf->use_javascript_ajax)) { print ajax_constantonoff('MAIN_USE_ADVANCED_PERMS'); @@ -179,7 +179,7 @@ print "
'.$langs->trans("SessionTimeOut").''; +print ''.$langs->trans("SessionTimeOut").''; print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print ''; @@ -191,7 +191,7 @@ print '
'.$langs->trans("MAIN_APPLICATION_TITLE").''; +print ''.$langs->trans("MAIN_APPLICATION_TITLE").''; print ''; print ' '; diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 7a60d234405..f358d3310da 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -454,7 +454,7 @@ if (! empty($conf->fournisseur->enabled) && !empty($conf->global->STOCK_CALCULAT print '
'.$langs->trans("UseDispatchStatus").''; + print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('SUPPLIER_ORDER_USE_DISPATCH_STATUS'); } else { @@ -522,7 +522,7 @@ if ($conf->global->PRODUIT_SOUSPRODUITS) print '
'.$langs->trans("IndependantSubProductStock").''; + print ''; print "
"; print ''; print ""; diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 45d588fb031..c3c25c9e4e6 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -491,7 +491,7 @@ else $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes'); print $doleditor->Create(); } -print '
'; +print ''; print ''; print "
'; print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'
'; -print '
'; +print ''; print "
'; diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 88cb18d5d80..b23e821b31e 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -503,7 +503,7 @@ $var=false; print $langs->trans("IfSetToYesDontForgetPermission"); print ''; print ''; - print ''; + print ''; print ''; print "\n"; @@ -560,7 +560,7 @@ else $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes'); print $doleditor->Create(); } -print ''; +print ''; print ''; print "\n"; @@ -584,7 +584,7 @@ print "\n"; print ''; print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'
'; -print ''; +print ''; print "\n"; print ''; diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 056982c4d08..1756974379c 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -517,7 +517,7 @@ else $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes'); print $doleditor->Create(); } -print ''; +print ''; print ''; print "\n"; print ''; @@ -530,7 +530,7 @@ print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; print ''; -print ''; +print ''; print ''; print "\n"; print ''; @@ -539,7 +539,7 @@ if ($conf->banque->enabled) { print ''; - print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '; + print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '; if (! empty($conf->use_javascript_ajax)) { print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL'); diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index a3cceda40da..0eaa7161d5e 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -275,7 +275,7 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print "\n"; print ''; diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 6b893a4a78b..37b6bb5cc52 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -520,7 +520,7 @@ if ($mode == 'searchkey') if ($i > ($offset + $limit)) break; print ''; $out.=''; $out.=''; - $out.=''; - $out.=''; + $out.=''; + $out.=''; $out.=''."\n"; $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename'); if (is_array($tmpfilelist2) && count($tmpfilelist2)) @@ -1097,8 +1097,8 @@ class Setup extends DolibarrApi $out.='' . "\n"; $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); $totalsize += $size; - $out.='' . "\n"; - $out.='' . "\n"; + $out.='' . "\n"; + $out.='' . "\n"; $out.="\n"; } $out.=''; @@ -1106,8 +1106,8 @@ class Setup extends DolibarrApi $out.='' . "\n"; $out.='' . "\n"; $out.='' . "\n"; - $out.='' . "\n"; - $out.='' . "\n"; + $out.='' . "\n"; + $out.='' . "\n"; $out.="\n"; } else @@ -1130,8 +1130,8 @@ class Setup extends DolibarrApi $out.=''; $out.=''; $out.=''; - $out.=''; - $out.=''; + $out.=''; + $out.=''; $out.=''."\n"; $tmpfilelist3 = dol_sort_array($file_list['added'], 'filename'); if (is_array($tmpfilelist3) && count($tmpfilelist3)) @@ -1147,8 +1147,8 @@ class Setup extends DolibarrApi $out.='' . "\n"; $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); $totalsize += $size; - $out.='' . "\n"; - $out.='' . "\n"; + $out.='' . "\n"; + $out.='' . "\n"; $out.="\n"; } $out.=''; @@ -1156,8 +1156,8 @@ class Setup extends DolibarrApi $out.='' . "\n"; $out.='' . "\n"; $out.='' . "\n"; - $out.='' . "\n"; - $out.='' . "\n"; + $out.='' . "\n"; + $out.='' . "\n"; $out.="\n"; } else diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index cb0a8cca7b2..fa1ef9f2760 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -469,7 +469,7 @@ if (isset($totalarray['pos'])) while ($i < $totalarray['nbfield']) { $i++; - if (! empty($totalarray['pos'][$i])) print ''; + if (! empty($totalarray['pos'][$i])) print ''; else { if ($i == 1) diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index b8a282430cc..861bbd2130e 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -299,9 +299,9 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ''; if ($user->rights->asset->write) - print ''; + print ''; else - print ''; + print ''; print ""; $i++; } From 4c281f4ff33846879d80066687d518565782fdb9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 22 Jan 2019 13:56:14 +0100 Subject: [PATCH 037/183] update with html5 compliant code --- htdocs/blockedlog/admin/blockedlog_list.php | 2 +- htdocs/bookmarks/list.php | 2 +- htdocs/categories/index.php | 2 +- htdocs/categories/viewcat.php | 16 ++++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 49a4daa3b3f..7ce4ef04303 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -498,7 +498,7 @@ if (is_array($blocks)) print ''.$object_link.''; // Amount - print ''; + print ''; // Details link print ''; diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index cca978d748b..e26b38c2513 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -179,7 +179,7 @@ if ($resql) print '"; // Position - print '"; + print '"; // Actions print ''; if ($action != 'editconditions' && ! empty($object->brouillon) && $usercancreate) - print ''; + print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("SyslogLevel").'
'.$langcode.''.$key.''; print dol_escape_htmltag($val); - print ''; + print ''; if (! empty($newlangfileonly->tab_translate[$key])) { if ($val != $newlangfileonly->tab_translate[$key]) From 9227d9fe9b795c6a86865efb5c5b80d872c3d5ac Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Tue, 22 Jan 2019 12:42:02 +0100 Subject: [PATCH 035/183] Show product dimensions in product list tooltip. --- htdocs/product/class/product.class.php | 21 ++++++++++++++++----- htdocs/product/list.php | 16 +++++++++++++++- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index bbdc1d456ee..04917e80418 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3736,14 +3736,25 @@ class Product extends CommonObject $label .= '
' . $langs->trans('ProductLabel') . ': ' . $this->label; } - if ($this->type == Product::TYPE_PRODUCT) { - if ($this->weight) { $label.="
".$langs->trans("Weight").': '.$this->weight.' '.measuring_units_string($this->weight_units, "weight"); + if ($this->type == Product::TYPE_PRODUCT) + { + if ($this->weight) { + $label.="
".$langs->trans("Weight").': '.$this->weight.' '.measuring_units_string($this->weight_units,"weight"); } - if ($this->length) { $label.="
".$langs->trans("Length").': '.$this->length.' '.measuring_units_string($this->length_units, 'length'); + if ($this->length) { + $label.="
".$langs->trans("Length").': '.$this->length.' '.measuring_units_string($this->length_units,'size'); } - if ($this->surface) { $label.="
".$langs->trans("Surface").': '.$this->surface.' '.measuring_units_string($this->surface_units, 'surface'); + if ($this->width) { + $label.="
".$langs->trans("Width").': '.$this->width.' '.measuring_units_string($this->width_units,'size'); } - if ($this->volume) { $label.="
".$langs->trans("Volume").': '.$this->volume.' '.measuring_units_string($this->volume_units, 'volume'); + if ($this->height) { + $label.="
".$langs->trans("Height").': '.$this->height.' '.measuring_units_string($this->height_units,'size'); + } + if ($this->surface) { + $label.="
".$langs->trans("Surface").': '.$this->surface.' '.measuring_units_string($this->surface_units,'surface'); + } + if ($this->volume) { + $label.="
".$langs->trans("Volume").': '.$this->volume.' '.measuring_units_string($this->volume_units,'volume'); } } diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 5047ba16100..ca3691edd83 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -266,6 +266,7 @@ $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p $sql.= ' p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,'; $sql.= ' p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy,'; $sql.= ' p.datec as date_creation, p.tms as date_update, p.pmp,'; +$sql.= ' p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units,'; $sql.= ' MIN(pfp.unitprice) as minsellprice'; if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && ! $show_childproducts )) { $sql .= ', pac.rowid prod_comb_id'; @@ -326,7 +327,8 @@ $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // No $sql.=$hookmanager->resPrint; $sql.= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type,"; $sql.= " p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,"; -$sql.= ' p.datec, p.tms, p.entity, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.pmp'; +$sql.= ' p.datec, p.tms, p.entity, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.pmp,'; +$sql.= ' p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units'; if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && ! $show_childproducts )) { $sql .= ', pac.rowid'; @@ -710,6 +712,18 @@ if ($resql) $product_static->accountancy_code_sell_export = $obj->accountancy_code_sell_export; $product_static->accountancy_code_sell_intra = $obj->accountancy_code_sell_intra; $product_static->accountancy_code_buy = $obj->accountancy_code_buy; + $product_static->length = $obj->length; + $product_static->length_units = $obj->length_units; + $product_static->width = $obj->width; + $product_static->width_units = $obj->width_units; + $product_static->height = $obj->height; + $product_static->height_units = $obj->height_units; + $product_static->weight = $obj->weight; + $product_static->weight_units = $obj->weight_units; + $product_static->volume = $obj->volume; + $product_static->volume_units = $obj->volume_units; + $product_static->surface = $obj->surface; + $product_static->surface_units = $obj->surface_units; if ((! empty($conf->stock->enabled) && $user->rights->stock->lire && $search_type != 1) || ! empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) // To optimize call of load_stock { From cf62d285d916c39d6aa58b5e3f34a5dd18262a2a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 22 Jan 2019 13:54:04 +0100 Subject: [PATCH 036/183] update with html5 compliant code --- htdocs/api/class/api_setup.class.php | 24 ++++++++++++------------ htdocs/asset/list.php | 2 +- htdocs/asset/type.php | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 39c1f8d6db6..498abb61a7b 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1080,8 +1080,8 @@ class Setup extends DolibarrApi $out.='
' . $langs->trans("Filename") . '' . $langs->trans("ExpectedChecksum") . '' . $langs->trans("CurrentChecksum") . '' . $langs->trans("Size") . '' . $langs->trans("DateModification") . '' . $langs->trans("Size") . '' . $langs->trans("DateModification") . '
'.$file['md5'].''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']),'dayhour').''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']),'dayhour').'
'.$langs->trans("Total").''.dol_print_size($totalsize).''.dol_print_size($totalsize).'
' . $langs->trans("Filename") . '' . $langs->trans("ExpectedChecksum") . '' . $langs->trans("CurrentChecksum") . '' . $langs->trans("Size") . '' . $langs->trans("DateModification") . '' . $langs->trans("Size") . '' . $langs->trans("DateModification") . '
'.$file['md5'].''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']),'dayhour').''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']),'dayhour').'
'.$langs->trans("Total").''.dol_print_size($totalsize).''.dol_print_size($totalsize).'
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.price($totalarray['val'][$totalarray['pos'][$i]]).'rowid.'">'.img_edit().'rowid.'">'.img_edit().'  
'.price($block->amounts).''.price($block->amounts).''.img_info($langs->trans('ShowDetails')).''.dol_print_date($db->jdate($obj->dateb),'day')."'.$obj->position."'.$obj->position."'; diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index b7e99e50ca0..273a23f5b1e 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -178,7 +178,7 @@ foreach($fulltree as $key => $val) //print_barre_liste('', 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, 0, '', 0, $newcardbutton, '', 0, 1, 1); print ''; -print ''; if ($action != 'editecheance' && ! empty($object->brouillon) && $usercancreate) - print ''; + print ''; print '
'.$langs->trans("Categories").''; +print '
'.$langs->trans("Categories").''; if (! empty($conf->use_javascript_ajax)) { print ''; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 2092c6c52c5..37bf6ed60a3 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -278,7 +278,7 @@ else { print "
"; print "\n"; - print "\n"; print '\n"; // Link to delete from category - print '\n"; // Link to delete from category - print '\n"; // Link to delete from category - print '\n"; print '\n"; // Link to delete from category - print '\n"; // Link to delete from category - print '\n"; print '\n"; // Link to delete from category - print '\n"; print '\n"; // Link to delete from category - print ''; print ''; print ''; - print ''; + print ''; $num = $db->num_rows($result); if ($num > 0) @@ -178,7 +178,7 @@ if ($result) print ''; print ''; $mailstatic=new Mailing($db); - print ''; + print ''; print ''; $i++; } diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 9605f413435..c6ba6781423 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2046,7 +2046,7 @@ if ($action == 'create') print $langs->trans('Date'); print ''; if ($action != 'editdate' && ! empty($object->brouillon) && $usercancreate) - print ''; + print ''; print '
".$langs->trans("SubCats").''; + print "
".$langs->trans("SubCats").''; if ($user->rights->categorie->creer) { print ""; @@ -366,7 +366,7 @@ if ($type == Categorie::TYPE_PRODUCT) print "'.$prod->label."'; + print ''; $permission=0; if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; @@ -413,7 +413,7 @@ if ($type == Categorie::TYPE_SUPPLIER) print $soc->getNomUrl(1); print "'; + print ''; $permission=0; if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; @@ -466,7 +466,7 @@ if($type == Categorie::TYPE_CUSTOMER) print $soc->getNomUrl(1); print "'; + print ''; $permission=0; if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; @@ -519,7 +519,7 @@ if ($type == Categorie::TYPE_MEMBER) print ''.$member->lastname."'.$member->firstname."'; + print ''; $permission=0; if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; @@ -569,7 +569,7 @@ if ($type == Categorie::TYPE_CONTACT) print $contact->getNomUrl(1,'category'); print "'; + print ''; $permission=0; if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; @@ -621,7 +621,7 @@ if ($type == Categorie::TYPE_ACCOUNT) print ''.$account->bank."'.$account->number."'; + print ''; $permission=0; if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; @@ -672,7 +672,7 @@ if ($type == Categorie::TYPE_PROJECT) print ''.$project->ref."'.$project->title."'; + print ''; $permission=0; if ($type == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer); if ($type == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer; From 4668052f95fec60e5812f25ee2300ed9c4773b99 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 22 Jan 2019 14:04:33 +0100 Subject: [PATCH 038/183] update with html5 compliant code --- htdocs/comm/mailing/cibles.php | 2 +- htdocs/comm/mailing/index.php | 6 ++-- htdocs/comm/propal/card.php | 26 +++++++------- htdocs/comm/propal/index.php | 16 ++++----- htdocs/comm/propal/list.php | 16 ++++----- htdocs/comm/propal/stats/index.php | 36 +++++++++---------- .../comm/propal/tpl/linkedobjectblock.tpl.php | 6 ++-- 7 files changed, 54 insertions(+), 54 deletions(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 84c1f5954b9..ac23177652f 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -602,7 +602,7 @@ if ($object->fetch($id) >= 0) } // Search Icon - print ''; + print ''; if ($obj->statut == 0) // Not sent yet { if ($user->rights->mailing->creer && $allowaddtarget) { diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index cb062e00777..0c98800b3ea 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -118,7 +118,7 @@ if (is_resource($handle)) while ($i < $num ) { $obj = $db->fetch_object($result); - print ''.img_object('',$mailmodule->picto).' '.$obj->label.''.$obj->nb.''; + print ''.img_object('',$mailmodule->picto).' '.$obj->label.''.$obj->nb.''; $i++; } @@ -161,7 +161,7 @@ if ($result) print ''.$langs->trans("LastMailings",$limit).''.$langs->trans("DateCreation").''.$langs->trans("NbOfEMails").''.$langs->trans("AllEMailings").'
'.$langs->trans("AllEMailings").'
'.dol_print_date($db->jdate($obj->date_creat),'day').''.($obj->nbemail?$obj->nbemail:"0").''.$mailstatic->LibStatut($obj->statut,5).''.$mailstatic->LibStatut($obj->statut,5).'
id . '">' . img_edit($langs->trans('SetDate'), 1) . 'id . '">' . img_edit($langs->trans('SetDate'), 1) . '
'; print '
'; if (! empty($object->brouillon) && $action == 'editdate' && $usercancreate) { @@ -2072,7 +2072,7 @@ if ($action == 'create') print $langs->trans('DateEndPropal'); print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . '
'; print '
'; if (! empty($object->brouillon) && $action == 'editecheance' && $usercancreate) { @@ -2100,7 +2100,7 @@ if ($action == 'create') print $langs->trans('PaymentConditionsShort'); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . '
'; print ''; if (! empty($object->brouillon) && $action == 'editconditions' && $usercancreate) { @@ -2128,7 +2128,7 @@ if ($action == 'create') print ' (' . $langs->trans('AfterOrder') . ')'; print ''; if ($action != 'editavailability' && ! empty($object->brouillon) && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . ''; print ''; print ''; if (! empty($object->brouillon) && $action == 'editavailability' && $usercancreate) { @@ -2147,7 +2147,7 @@ if ($action == 'create') print $langs->trans('SendingMethod'); print ''; if ($action != 'editshippingmethod' && $usercancreate) - print 'id.'">'.img_edit($langs->trans('SetShippingMode'),1).''; + print 'id.'">'.img_edit($langs->trans('SetShippingMode'),1).''; print ''; print ''; if ($action == 'editshippingmethod' && $usercancreate) { @@ -2165,7 +2165,7 @@ if ($action == 'create') print $langs->trans('Source'); print ''; if ($action != 'editdemandreason' && ! empty($object->brouillon) && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . ''; print ''; print ''; if (! empty($object->brouillon) && $action == 'editdemandreason' && $usercancreate) { @@ -2183,7 +2183,7 @@ if ($action == 'create') print $langs->trans('PaymentMode'); print ''; if ($action != 'editmode' && ! empty($object->brouillon) && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . ''; print ''; print ''; if (! empty($object->brouillon) && $action == 'editmode' && $usercancreate) { @@ -2203,7 +2203,7 @@ if ($action == 'create') print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print ''; if ($action != 'editmulticurrencycode' && ! empty($object->brouillon) && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; print ''; print ''; if (! empty($object->brouillon) && $action == 'editmulticurrencycode' && $usercancreate) { @@ -2220,7 +2220,7 @@ if ($action == 'create') print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); print ''; if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; print ''; print ''; if (! empty($object->brouillon) && ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') && $usercancreate) { @@ -2244,7 +2244,7 @@ if ($action == 'create') // Outstanding Bill print ''; print $langs->trans('OutstandingBill'); - print ''; + print ''; print price($soc->get_OutstandingBill()) . ' / '; print price($soc->outstanding_limit, 0, $langs, 1, - 1, - 1, $conf->currency); print ''; @@ -2259,7 +2259,7 @@ if ($action == 'create') print $langs->trans('BankAccount'); print ''; if ($action != 'editbankaccount' && $usercancreate) - print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).''; + print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).''; print ''; print ''; if ($action == 'editbankaccount') { @@ -2293,7 +2293,7 @@ if ($action == 'create') print ''; print '
'; print $langs->trans('IncotermLabel'); - print ''; + print ''; if ($usercancreate) print ''.img_edit().''; else print ' '; print '
'; @@ -2370,7 +2370,7 @@ if ($action == 'create') print ''; // Statut - //print '' . $langs->trans('Status') . '' . $object->getLibStatut(4) . ''; + //print '' . $langs->trans('Status') . '' . $object->getLibStatut(4) . ''; print ''; diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index f39f9efc54a..b96a95d8e64 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -123,7 +123,7 @@ if ($resql) print ''; print ''.$propalstatic->LibStatut($status,0).''; - print ''.(isset($vals[$status])?$vals[$status]:0).''; + print ''.(isset($vals[$status])?$vals[$status]:0).''; print "\n"; } } @@ -144,8 +144,8 @@ if ($resql) print ''; } //if ($totalinprocess != $total) - //print ''.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')'.$totalinprocess.''; - print ''.$langs->trans("Total").''.$total.''; + //print ''.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')'.$totalinprocess.''; + print ''.$langs->trans("Total").''.$total.''; print "
"; } else @@ -260,7 +260,7 @@ if ($resql) print ' '; print ''; - print ''; + print ''; $filename=dol_sanitizeFileName($obj->ref); $filedir=$conf->propal->multidir_output[$obj->entity] . '/' . dol_sanitizeFileName($obj->ref); $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; @@ -276,7 +276,7 @@ if ($resql) print ''.$companystatic->getNomUrl(1,'customer').''; print ''.dol_print_date($db->jdate($obj->datec),'day').''; - print ''.$propalstatic->LibStatut($obj->fk_statut,5).''; + print ''.$propalstatic->LibStatut($obj->fk_statut,5).''; print ''; $i++; } @@ -355,9 +355,9 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) $companystatic->canvas=$obj->canvas; print ''.$companystatic->getNomUrl(1,'customer',44).''."\n"; - print ''; + print ''; print dol_print_date($db->jdate($obj->dp),'day').''."\n"; - print ''.price($obj->total_ttc).''; + print ''.price($obj->total_ttc).''; print ''.$propalstatic->LibStatut($obj->fk_statut,3).''."\n"; print ''."\n"; $i++; @@ -441,7 +441,7 @@ if (! empty($conf->propal->enabled)) print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).''; - print ''.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).''; + print ''.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).''; print ''; $i++; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 2d3917a0d47..61fa1d548d7 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -890,7 +890,7 @@ if ($resql) // Amount HT if (! empty($arrayfields['p.total_ht']['checked'])) { - print ''.price($obj->total_ht)."\n"; + print ''.price($obj->total_ht)."\n"; if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield']; $totalarray['totalht'] += $obj->total_ht; @@ -898,7 +898,7 @@ if ($resql) // Amount VAT if (! empty($arrayfields['p.total_vat']['checked'])) { - print ''.price($obj->total_vat)."\n"; + print ''.price($obj->total_vat)."\n"; if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; $totalarray['totalvat'] += $obj->total_vat; @@ -906,7 +906,7 @@ if ($resql) // Amount TTC if (! empty($arrayfields['p.total_ttc']['checked'])) { - print ''.price($obj->total_ttc)."\n"; + print ''.price($obj->total_ttc)."\n"; if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; $totalarray['totalttc'] += $obj->total_ttc; @@ -995,7 +995,7 @@ if ($resql) // Status if (! empty($arrayfields['p.fk_statut']['checked'])) { - print ''.$objectstatic->LibStatut($obj->fk_statut,5).''; + print ''.$objectstatic->LibStatut($obj->fk_statut,5).''; if (! $i) $totalarray['nbfield']++; } // Action column @@ -1033,14 +1033,14 @@ if ($resql) if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").''; else print ''.$langs->trans("Totalforthispage").''; } - elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).''; - elseif ($totalarray['totalvatfield'] == $i) print ''.price($totalarray['totalvat']).''; - elseif ($totalarray['totalttcfield'] == $i) print ''.price($totalarray['totalttc']).''; + elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).''; + elseif ($totalarray['totalvatfield'] == $i) print ''.price($totalarray['totalvat']).''; + elseif ($totalarray['totalttcfield'] == $i) print ''.price($totalarray['totalttc']).''; elseif ($totalarray['totalizable']) { $printed = false; foreach ($totalarray['totalizable'] as $totalizable) { if ($totalizable['pos']==$i && ! $printed) { - print ''.price($totalizable['total']).''; + print ''.price($totalizable['total']).''; $printed = true; } } diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 5c54baf7360..29afd62d780 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -280,12 +280,12 @@ print '
'; print ''; print ''; print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; print ''; $oldyear=0; @@ -298,22 +298,22 @@ foreach ($data as $val) print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; } print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; $oldyear=$year; } diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index 0d8c2064010..118bc3fbd37 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -82,9 +82,9 @@ if (count($linkedObjectBlock) > 1) - - - + + + Date: Tue, 22 Jan 2019 14:09:14 +0100 Subject: [PATCH 039/183] update with html5 compliant code --- htdocs/comm/card.php | 88 +++++++++++++++++----------------- htdocs/comm/prospect/index.php | 4 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index a9167c43c32..916143b896a 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -322,7 +322,7 @@ if ($object->id > 0) print '
'.$langs->trans("Year").''.$langs->trans("NbOfProposals").'%'.$langs->trans("AmountTotal").'%'.$langs->trans("AmountAverage").'%'.$langs->trans("NbOfProposals").'%'.$langs->trans("AmountTotal").'%'.$langs->trans("AmountAverage").'%
0?'&userid='.$userid:'').'">'.$oldyear.'000000
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).''.price(price2num($val['total'],'MT'),1).''.round($val['total_diff']).''.price(price2num($val['avg'],'MT'),1).''.round($val['avg_diff']).''.$val['nb'].''.round($val['nb_diff']).''.price(price2num($val['total'],'MT'),1).''.round($val['total_diff']).''.price(price2num($val['avg'],'MT'),1).''.round($val['avg_diff']).'
'; + if (($action != 'editconditions') && $user->rights->societe->creer) print ''; print '
'; print $langs->trans('PaymentConditions'); print ''; - if (($action != 'editconditions') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).'id.'">'.img_edit($langs->trans('SetConditions'),1).'
'; print ''; if ($action == 'editconditions') @@ -341,7 +341,7 @@ if ($object->id > 0) print ''; + if (($action != 'editmode') && $user->rights->societe->creer) print ''; print '
'; print $langs->trans('PaymentMode'); print ''; - if (($action != 'editmode') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetMode'),1).'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; print ''; if ($action == 'editmode') @@ -362,7 +362,7 @@ if ($object->id > 0) print ''; + if (($action != 'editbankaccount') && $user->rights->societe->creer) print ''; print '
'; print $langs->trans('PaymentBankAccount'); print ''; - if (($action != 'editbankaccount') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; print ''; if ($action == 'editbankaccount') @@ -381,7 +381,7 @@ if ($object->id > 0) print ''; print '
'; print $langs->trans("CustomerRelativeDiscountShort"); - print ''; + print ''; if ($user->rights->societe->creer && !$user->societe_id > 0) { print ''.img_edit($langs->trans("Modify")).''; @@ -395,7 +395,7 @@ if ($object->id > 0) print ''; print '
'; print $langs->trans("CustomerAbsoluteDiscountShort"); - print ''; + print ''; if ($user->rights->societe->creer && !$user->societe_id > 0) { print ''.img_edit($langs->trans("Modify")).''; @@ -447,7 +447,7 @@ if ($object->id > 0) print '
'; print '
'; print $langs->trans("PriceLevel"); - print ''; + print ''; if ($user->rights->societe->creer) { print ''.img_edit($langs->trans("Modify")).''; @@ -467,7 +467,7 @@ if ($object->id > 0) print ''; + if (($action != 'editshipping') && $user->rights->societe->creer) print ''; print '
'; print $langs->trans('SendingMethod'); print ''; - if (($action != 'editshipping') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetMode'),1).'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; print '
'; if ($action == 'editshipping') @@ -535,7 +535,7 @@ if ($object->id > 0) print ''; + if ($action != 'editlevel' && $user->rights->societe->creer) print ''; print '
'; print $langs->trans('ProspectLevel'); print ''; - if ($action != 'editlevel' && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('Modify'),1).'id.'">'.img_edit($langs->trans('Modify'),1).'
'; print '
'; if ($action == 'editlevel') @@ -691,8 +691,8 @@ if ($object->id > 0) print ''; print ''; - print '
'; - print ''; + print ''; print ''; } @@ -714,9 +714,9 @@ if ($object->id > 0) if ( ($db->jdate($objp->datelimite) < ($now - $conf->propal->cloture->warning_delay)) && $objp->fk_statut == 1 ) { print " ".img_warning(); } - print '\n"; - print ''; - print ''; + print '\n"; + print ''; + print ''; $i++; } $db->free($resql); @@ -776,10 +776,10 @@ if ($object->id > 0) print '
'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').''; + print ''; print '
'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').'
'.dol_print_date($db->jdate($objp->dp),'day')."'.price($objp->total_ht).''.$propal_static->LibStatut($objp->fk_statut,5).'
'.dol_print_date($db->jdate($objp->dp),'day')."'.price($objp->total_ht).''.$propal_static->LibStatut($objp->fk_statut,5).'
'; print ''; - print '
'; - print ''; - //if($num2 > 0) print ''; - //else print ''; + print ''; print ''; } @@ -800,9 +800,9 @@ if ($object->id > 0) print ''; print '\n"; - print ''; - print ''; + print '\n"; + print ''; + print ''; $i++; } $db->free($resql); @@ -852,8 +852,8 @@ if ($object->id > 0) print '
'.$langs->trans("LastCustomerOrders",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').''.img_picto($langs->trans("CreateInvoiceForThisCustomer"),'object_bill').''.img_picto($langs->trans("NoOrdersToInvoice"),'object_bill').''; + print ''; + //if($num2 > 0) print ''; + //else print ''; print '
'.$langs->trans("LastCustomerOrders",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').''.img_picto($langs->trans("CreateInvoiceForThisCustomer"),'object_bill').''.img_picto($langs->trans("NoOrdersToInvoice"),'object_bill').'
'; print $commande_static->getNomUrl(1); - print ''.dol_print_date($db->jdate($objp->dc),'day')."'.price($objp->total_ht).''.$commande_static->LibStatut($objp->fk_statut,$objp->facture,5).'
'.dol_print_date($db->jdate($objp->dc),'day')."'.price($objp->total_ht).''.$commande_static->LibStatut($objp->fk_statut,$objp->facture,5).'
'; print ''; - print ''; - print ''; print ''; - print ''; + print ''; print ''; $i++; } @@ -369,7 +369,7 @@ if (! empty($conf->commande->enabled)) print ' '; print ''; - print ''; - print ''; + print ''; print ''; $i++; @@ -451,7 +451,7 @@ if (! empty($conf->commande->enabled)) print ' '; print ''; - print ''; - print ''; + print ''; print ''; $i++; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 739e3699133..178f68ddd05 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1025,7 +1025,7 @@ if ($resql) // Amount HT if (! empty($arrayfields['c.total_ht']['checked'])) { - print '\n"; + print '\n"; if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield']; $totalarray['totalht'] += $obj->total_ht; @@ -1033,7 +1033,7 @@ if ($resql) // Amount VAT if (! empty($arrayfields['c.total_vat']['checked'])) { - print '\n"; + print '\n"; if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; $totalarray['totalvat'] += $obj->total_tva; @@ -1041,7 +1041,7 @@ if ($resql) // Amount TTC if (! empty($arrayfields['c.total_ttc']['checked'])) { - print '\n"; + print '\n"; if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; $totalarray['totalttc'] += $obj->total_ttc; @@ -1072,7 +1072,7 @@ if ($resql) // Status if (! empty($arrayfields['c.fk_statut']['checked'])) { - print ''; + print ''; if (! $i) $totalarray['nbfield']++; } // Billed @@ -1118,9 +1118,9 @@ if ($resql) if ($num < $limit && empty($offset)) print ''; else print ''; } - elseif ($totalarray['totalhtfield'] == $i) print ''; - elseif ($totalarray['totalvatfield'] == $i) print ''; - elseif ($totalarray['totalttcfield'] == $i) print ''; + elseif ($totalarray['totalhtfield'] == $i) print ''; + elseif ($totalarray['totalvatfield'] == $i) print ''; + elseif ($totalarray['totalttcfield'] == $i) print ''; else print ''; } print ''; diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 6fc778fb064..a57430f7ee8 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -306,12 +306,12 @@ print '
'; print '
'; - print ''; + print ''; print ''; } @@ -871,9 +871,9 @@ if ($object->id > 0) print $sendingstatic->getNomUrl(1); print ''; if ($objp->date_creation > 0) { - print ''; + print ''; } else { - print ''; + print ''; } print ''; @@ -917,8 +917,8 @@ if ($object->id > 0) print ''; print ''; print ''; } @@ -939,8 +939,8 @@ if ($object->id > 0) print $contrat->getNomUrl(1,12); print "\n"; print '\n"; - print '\n"; - print '\n"; + print '\n"; + print '\n"; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; $i = 0 ; $num = $db->num_rows($resql); @@ -163,7 +163,7 @@ if ($_socid > 0) print ''; $userstatic->id=$obj->uid; $userstatic->lastname=$obj->login; - print ''; + print ''; print ''; $i++; } diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index fe002f81a97..1d3aa865460 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -434,9 +434,9 @@ if ($socid > 0) print ''; // Need 120+ for format with AM/PM print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; @@ -487,9 +487,9 @@ if ($socid > 0) print ''; } print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; @@ -573,9 +573,9 @@ if ($socid > 0) print ''; // Need 120+ for format with AM/PM print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; @@ -626,9 +626,9 @@ if ($socid > 0) print ''; } print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; @@ -746,9 +746,9 @@ if ($socid > 0) print ''; // Need 120+ for format with AM/PM print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; @@ -820,9 +820,9 @@ if ($socid > 0) print ''; } print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; @@ -900,9 +900,9 @@ if ($socid > 0) print ''; // Need 120+ for format with AM/PM print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; @@ -974,9 +974,9 @@ if ($socid > 0) print ''; } print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; From 624d17c96a52d99c5c35bf40811571ae254f5ed1 Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Wed, 23 Jan 2019 17:32:49 +0100 Subject: [PATCH 055/183] Fix missing no trigger arg --- htdocs/compta/sociales/class/chargesociales.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 3a69cdca4f7..da8f7c8f250 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -280,7 +280,7 @@ class ChargeSociales extends CommonObject * @param User $user Utilisateur qui modifie * @return int <0 si erreur, >0 si ok */ - function update($user) + function update($user, $notrigger=0) { $error=0; $this->db->begin(); From 540e6d6f79db3d60b6b1ab36b2c1f418ab034d7a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 23 Jan 2019 17:34:30 +0100 Subject: [PATCH 056/183] update with html5 compliant code --- htdocs/commande/customer.php | 2 +- htdocs/commande/index.php | 16 ++++----- htdocs/commande/list.php | 14 ++++---- htdocs/commande/stats/index.php | 36 +++++++++---------- htdocs/commande/tpl/linkedobjectblock.tpl.php | 6 ++-- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index ff9cb2c37fb..575c7985e3a 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -175,7 +175,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print "\n"; $i++; } diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index a87c4d868bf..5c88a0597d0 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -145,7 +145,7 @@ if ($resql) { print ''; print ''; - print ''; @@ -153,7 +153,7 @@ if ($resql) } } //if ($totalinprocess != $total) - print ''; + print ''; print "
'.$langs->trans("LastSendings",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllSendings").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').''; + print ''; print '
'.$langs->trans("LastSendings",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllSendings").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').'
'.dol_print_date($db->jdate($objp->date_creation),'day').''.dol_print_date($db->jdate($objp->date_creation),'day').'!!!!!!' . $sendingstatic->LibStatut($objp->statut, 5) . '
'; - print ''; - //print ''; + print ''; + //print ''; print '
'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllContracts").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').''.$langs->trans("AllContracts").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').'
'.dol_trunc($objp->refsup,12)."'.dol_print_date($db->jdate($objp->dc),'day')."'.dol_print_date($db->jdate($objp->dcon),'day')."'.dol_print_date($db->jdate($objp->dc),'day')."'.dol_print_date($db->jdate($objp->dcon),'day')." '; print $contrat->getLibStatut(4); @@ -986,8 +986,8 @@ if ($object->id > 0) print ''; print ''; - print ''; - print ''."\n"; if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) { - print ''; + print ''; } else { - print ''; + print ''; } print ''."\n"; print ''."\n"; @@ -866,7 +866,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) } else if ($total>0) { - print '"; + print '"; } print "
'; - print ''; + print ''; print ''; } @@ -1002,8 +1002,8 @@ if ($object->id > 0) print ''; print ''."\n"; - //print ''."\n"; - print ''."\n"; + //print ''."\n"; + print ''."\n"; print ''."\n"; print ''; @@ -1059,7 +1059,7 @@ if ($object->id > 0) print '
'.$langs->trans("LastInterventions",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllInterventions").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').''; + print ''; print '
'.$langs->trans("LastInterventions",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllInterventions").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').'
'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.''.dol_print_date($db->jdate($objp->startdate)).''.convertSecondToTime($objp->duration).''.dol_print_date($db->jdate($objp->startdate)).''.convertSecondToTime($objp->duration).''.$fichinter_static->getLibStatut(5).'
'; print ''; - print ''; print ''; From ad54a2b8af7d23aa80cb5984c886a9423b6d6067 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Jan 2019 15:06:28 +0100 Subject: [PATCH 050/183] Fix website edit of virtualhost --- htdocs/langs/en_US/errors.lang | 1 + htdocs/website/index.php | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index cb183d12ce2..a2d0c8c31cf 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -215,6 +215,7 @@ ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container %sloadLangs(array("admin","other","website")); +$langs->loadLangs(array("admin","other","website","errors")); if (! $user->rights->website->read) accessforbidden(); @@ -280,6 +280,12 @@ if ($action == 'addsite') { $db->begin(); + if (GETPOST('virtualhost','alpha') && ! preg_match('/^http/',GETPOST('virtualhost','alpha'))) + { + $error++; + setEventMessages($langs->trans('ErrorURLMustStartWithHttp', $langs->transnoentitiesnoconv("VirtualHost")), null, 'errors'); + } + if (! $error && ! GETPOST('WEBSITE_REF','alpha')) { $error++; @@ -353,6 +359,7 @@ if ($action == 'addcontainer') if (! preg_match('/^http/', $urltograb)) { $error++; + $langs->load("errors"); setEventMessages('Error URL must start with http:// or https://', null, 'errors'); $action = 'createcontainer'; } @@ -872,7 +879,7 @@ if ($action == 'updatecss') if (GETPOST('virtualhost','alpha') && ! preg_match('/^http/',GETPOST('virtualhost','alpha'))) { $error++; - setEventMessages('Error URL must start with http:// or https://', null, 'errors'); + setEventMessages($langs->trans('ErrorURLMustStartWithHttp', $langs->transnoentitiesnoconv("VirtualHost")), null, 'errors'); $action='editcss'; } @@ -1825,11 +1832,11 @@ if (! GETPOST('hide_websitemenu')) $htmltext = ''; if (empty($object->fk_default_home)) { - $htmltext.= ''.$langs->trans("YouMustDefineTheHomePage").'

'; + $htmltext.= '
'.$langs->trans("YouMustDefineTheHomePage").'

'; } - if (empty($virtualurl)) + elseif (empty($virtualurl)) { - $htmltext.= ''.$langs->trans("VirtualHostUrlNotDefined").'

'; + $htmltext.= '
'.$langs->trans("VirtualHostUrlNotDefined").'

'; } else { @@ -2150,7 +2157,7 @@ if (! GETPOST('hide_websitemenu')) newurl=jQuery("#previewsiteurl").val(); if (! newurl.startsWith("http")) { - alert(\''.dol_escape_js($langs->trans("ExternalURLMustStartWithHttp")).'\'); + alert(\''.dol_escape_js($langs->trans("ErrorURLMustStartWithHttp")).'\'); return false; } @@ -2412,7 +2419,7 @@ if ($action == 'createsite') print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, 'virtualhosttooltip'); print '
'; From 84e1f92acd2eddc186c0d06b0e909863d0c0bd78 Mon Sep 17 00:00:00 2001 From: gauthier Date: Wed, 23 Jan 2019 15:09:57 +0100 Subject: [PATCH 051/183] FIX : when we add a payment on an invoice which already has payments with credit note or deposit amount, and then we get an excess received, discount amount must be $total_paiements + $total_creditnote_and_deposit - $object->total_ttc; --- htdocs/compta/facture/card.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 8541581fb49..5e736df5855 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -725,20 +725,31 @@ if (empty($reshook)) { // If we're on a standard invoice, we have to get excess received to create a discount in TTC without VAT + // Total payments $sql = 'SELECT SUM(pf.amount) as total_paiements'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id'; $sql.= ' WHERE pf.fk_facture = '.$object->id; $sql.= ' AND pf.fk_paiement = p.rowid'; $sql.= ' AND p.entity IN (' . getEntity('facture').')'; - $resql = $db->query($sql); if (! $resql) dol_print_error($db); $res = $db->fetch_object($resql); $total_paiements = $res->total_paiements; - $discount->amount_ht = $discount->amount_ttc = $total_paiements - $object->total_ttc; + // Total credit note and deposit + $total_creditnote_and_deposit = 0; + $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; + $sql .= " re.description, re.fk_facture_source"; + $sql .= " FROM " . MAIN_DB_PREFIX . "societe_remise_except as re"; + $sql .= " WHERE fk_facture = " . $object->id; + $resql = $db->query($sql); + if (!empty($resql)) { + while ($obj = $db->fetch_object($resql)) $total_creditnote_and_deposit += $obj->amount_ttc; + } else dol_print_error($db); + + $discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc; $discount->amount_tva = 0; $discount->tva_tx = 0; From 278b3e0b087d2099a79ece12a70288806fe9b11b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Jan 2019 15:30:54 +0100 Subject: [PATCH 052/183] Fix css --- htdocs/theme/eldy/style.css.php | 1 + htdocs/website/index.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index ea24aaf20b0..6b92e346ce4 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -3917,6 +3917,7 @@ tr.visible { display: inline-block; padding-left: 10px; vertical-align: middle; + line-height: 28px; } .websitetools { float: right; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 0dfb13aa9a8..31fc81280c2 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1818,14 +1818,14 @@ if (! GETPOST('hide_websitemenu')) // Toolbar for websites - print '
'; + print '
'; if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone') { $urlext=$virtualurl; $urlint=$urlwithroot.'/public/website/index.php?website='.$websitekey; - print '
'; + print '
'; $linktotestonwebserver = ''; $linktotestonwebserver.= $langs->trans("TestDeployOnWeb", $virtualurl).' '.img_picto('','object_globe'); $linktotestonwebserver.= ''; @@ -1856,7 +1856,7 @@ if (! GETPOST('hide_websitemenu')) $htmltext.='
'; $htmltext.=$langs->trans("YouCanAlsoTestWithPHPS", $dataroot); } - print $form->textwithpicto($linktotestonwebserver, $htmltext, 1, 'none', '', 0, 2, 'helpvirtualhost'); + print $form->textwithpicto($linktotestonwebserver, $htmltext, 1, 'none', 'valignmiddle', 0, 2, 'helpvirtualhost'); print '
'; } From 1c51716997f2c3cb09ffa2b7feea4c770289c41f Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Wed, 23 Jan 2019 17:02:20 +0100 Subject: [PATCH 053/183] Fix missing trigger --- .../sociales/class/chargesociales.class.php | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 61728562d2e..3a69cdca4f7 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -282,6 +282,7 @@ class ChargeSociales extends CommonObject */ function update($user) { + $error=0; $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales"; @@ -295,17 +296,40 @@ class ChargeSociales extends CommonObject dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql=$this->db->query($sql); - if ($resql) + + if (! $resql) { + $error++; $this->errors[]="Error ".$this->db->lasterror(); + } + + if (! $error) + { + if (! $notrigger) + { + // Call trigger + $result=$this->call_trigger('SOCIALCHARGES_MODIFY',$user); + if ($result < 0) $error++; + // End call triggers + } + } + + // Commit or rollback + if ($error) + { + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; + } + else { $this->db->commit(); return 1; } - else - { - $this->error=$this->db->error(); - $this->db->rollback(); - return -1; - } + + } /** From 6625dac8d7798162d0e36f0bfab73cbfc52e19d8 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 23 Jan 2019 17:28:02 +0100 Subject: [PATCH 054/183] update with html5 compliant code --- htdocs/comm/index.php | 40 ++++++++++++++++---------------- htdocs/comm/multiprix.php | 4 ++-- htdocs/comm/remx.php | 48 +++++++++++++++++++-------------------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 81685f3fda8..4a943a921ce 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -193,7 +193,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) if ($total>0) { - print '
"; + print '"; } } else @@ -272,7 +272,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos } if ($total>0) { - print '"; + print '"; } } else @@ -348,7 +348,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) print ''; } else { - print ''; + print ''; } $i++; $total += $obj->total_ttc; @@ -356,7 +356,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) if ($total>0) { - print '"; + print '"; } } else @@ -435,7 +435,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande print ''; } else { - print ''; + print ''; } $i++; $total += $obj->total_ttc; @@ -443,7 +443,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande if ($total>0) { - print '"; + print '"; } } else @@ -500,7 +500,7 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) else if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max); else print $langs->trans("BoxTitleLastModifiedCustomers",$max); print ''; - print ''; + print ''; print ''; if ($num) { @@ -515,10 +515,10 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) $companystatic->canvas=$objp->canvas; print ''; print ''; - print '"; - print '"; + print '"; print ''; $i++; } @@ -560,7 +560,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->societe->lire) print '
'; + print ''; print ''; } @@ -1086,26 +1086,26 @@ if ($object->id > 0) print ''; if ($objp->frequency && $objp->date_last_gen > 0) { - print ''; + print ''; } else { if ($objp->dc > 0) { - print ''; + print ''; } else { - print ''; + print ''; } } - print ''; if (! empty($conf->global->MAIN_SHOW_PRICE_WITH_TAX_IN_SUMMARIES)) { - print ''; } @@ -1164,8 +1164,8 @@ if ($object->id > 0) print '
'.$langs->trans("LatestCustomerTemplateInvoices",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllCustomerTemplateInvoices").' '.$num.''; print '
'.$langs->trans("LatestCustomerTemplateInvoices",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllCustomerTemplateInvoices").' '.$num.'
'.dol_print_date($db->jdate($objp->date_last_gen),'day').''.dol_print_date($db->jdate($objp->date_last_gen),'day').''.dol_print_date($db->jdate($objp->dc),'day').''.dol_print_date($db->jdate($objp->dc),'day').'!!!!!!'; + print ''; print price($objp->total_ht); print ''; + print ''; print price($objp->total_ttc); print '
'; print ''; - print '"; $i++; From 8104b7fa2d47cf3a5a2af44945c0183956eaa9e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Jan 2019 15:40:51 +0100 Subject: [PATCH 040/183] look and feel v10 --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1056a0e0236..91b2b7bdfdb 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1527,7 +1527,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r { $accounted = $object->getVentilExportCompta(); $langs->load("accountancy"); - $morehtmlstatus.='
'.($accounted > 0 ? $langs->trans("Accounted") : $langs->trans("NotYetAccounted")); + $morehtmlstatus.='
'.($accounted > 0 ? $langs->trans("Accounted") : ''.$langs->trans("NotYetAccounted").''); } } From 51bdf5f9490d87cc49f433e0d3566c8c71684b45 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Jan 2019 16:06:20 +0100 Subject: [PATCH 041/183] Fix trans --- htdocs/core/modules/modSociete.class.php | 2 +- htdocs/langs/en_US/admin.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 3623e857270..e8150348c0c 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -631,7 +631,7 @@ class modSociete extends DolibarrModules $this->import_examplevalues_array[$r] = array(//field order as per structure of table llx_socpeople 's.datec' => 'formatted as ' . dol_print_date(dol_now(), '%Y-%m-%d'), 's.fk_soc' => 'Third Party name eg. TPBigCompany', - 's.civility' => 'honorific eg: MR...matches field "code" in table "' . MAIN_DB_PREFIX . 'c_civility"', + 's.civility' => 'Title of civility eg: MR...matches field "code" in table "' . MAIN_DB_PREFIX . 'c_civility"', 's.lastname' => "lastname or label", 's.firstname' => 'John', 's.address' => '61 Jump street', diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 3540f3f9567..ace642363b9 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -895,7 +895,7 @@ DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries DictionaryCurrency=Currencies -DictionaryCivility=Honorifics +DictionaryCivility=Title of civility DictionaryActions=Types of agenda events DictionarySocialContributions=Types of social or fiscal taxes DictionaryVAT=VAT Rates or Sales Tax Rates From ccbec3d29fb297a0fde1c62de014fb5a96419330 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Jan 2019 16:27:23 +0100 Subject: [PATCH 042/183] Fix typo --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index ace642363b9..77b5894b709 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1758,7 +1758,7 @@ TitleExampleForMajorRelease=Example of message you can use to announce this majo TitleExampleForMaintenanceRelease=Example of message you can use to announce this maintenance release (feel free to use it on your web sites) ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read ChangeLog for complete list of changes. ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. -MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but ia useful only if your prices for each level are relative to first level. You can ignore this page in most cases. +MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables From eefa57bf6b0fbe29dd01cd8a7f4d0d0c05f42482 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Jan 2019 18:15:47 +0100 Subject: [PATCH 043/183] Sync transifex --- htdocs/langs/fr_FR/accountancy.lang | 4 +- htdocs/langs/fr_FR/admin.lang | 227 +++++++++++++------------- htdocs/langs/fr_FR/bills.lang | 24 +-- htdocs/langs/fr_FR/blockedlog.lang | 18 +- htdocs/langs/fr_FR/commercial.lang | 6 +- htdocs/langs/fr_FR/companies.lang | 2 +- htdocs/langs/fr_FR/compta.lang | 10 +- htdocs/langs/fr_FR/deliveries.lang | 1 + htdocs/langs/fr_FR/donations.lang | 2 +- htdocs/langs/fr_FR/errors.lang | 12 +- htdocs/langs/fr_FR/exports.lang | 2 +- htdocs/langs/fr_FR/holiday.lang | 4 +- htdocs/langs/fr_FR/install.lang | 64 ++++---- htdocs/langs/fr_FR/mails.lang | 10 +- htdocs/langs/fr_FR/main.lang | 28 ++-- htdocs/langs/fr_FR/members.lang | 9 +- htdocs/langs/fr_FR/modulebuilder.lang | 14 +- htdocs/langs/fr_FR/multicurrency.lang | 4 +- htdocs/langs/fr_FR/opensurvey.lang | 2 +- htdocs/langs/fr_FR/orders.lang | 2 +- htdocs/langs/fr_FR/other.lang | 6 +- htdocs/langs/fr_FR/paybox.lang | 2 +- htdocs/langs/fr_FR/paypal.lang | 6 +- htdocs/langs/fr_FR/printing.lang | 6 +- htdocs/langs/fr_FR/products.lang | 10 +- htdocs/langs/fr_FR/projects.lang | 4 +- htdocs/langs/fr_FR/salaries.lang | 6 +- htdocs/langs/fr_FR/stocks.lang | 24 +-- htdocs/langs/fr_FR/stripe.lang | 9 +- htdocs/langs/fr_FR/users.lang | 2 +- htdocs/langs/fr_FR/website.lang | 4 +- 31 files changed, 265 insertions(+), 259 deletions(-) diff --git a/htdocs/langs/fr_FR/accountancy.lang b/htdocs/langs/fr_FR/accountancy.lang index 62263b0597d..0e461de4fa5 100644 --- a/htdocs/langs/fr_FR/accountancy.lang +++ b/htdocs/langs/fr_FR/accountancy.lang @@ -203,7 +203,7 @@ PaymentsNotLinkedToProduct=Paiement non lié à un produit / service Pcgtype=Groupe de comptes comptables Pcgsubtype=Sous-groupe de comptes comptables -PcgtypeDesc=Les groupes et sous-groupes de comptes sont utilisés comme critères de filtre et de regroupement prédéfinis pour certains rapports de comptabilité. Par exemple, «REVENU» ou «CHARGES» sont utilisés en tant que groupes pour la comptabilité des produits afin de générer le rapport dépenses / revenus. +PcgtypeDesc=Les groupes et sous-groupes de comptes sont utilisés comme critères de filtre et de regroupement prédéfinis pour certains rapports de comptabilité. Par exemple, «INCOME» ou «EXPENSE» sont utilisés en tant que groupes pour la comptabilité afin de générer le rapport dépenses / revenus. TotalVente=Total chiffre affaires hors taxe TotalMarge=Total marge @@ -268,7 +268,7 @@ Modelcsv_quadratus=Export vers Quadratus QuadraCompta Modelcsv_ebp=Export vers EBP Modelcsv_cogilog=Export vers Cogilog Modelcsv_agiris=Export vers Agiris -Modelcsv_configurable=Export CSV Configurable +Modelcsv_configurable=Export configurable Modelcsv_FEC=Exportation FEC (Art. L47 A) (Test) ChartofaccountsId=Id plan comptable diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index fba0fdd7152..4b7cb82e4d4 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -55,7 +55,7 @@ UploadNewTemplate=Télécharger un / des nouveau(x) modèle(s) FormToTestFileUploadForm=Formulaire de test d'envoi de fichier (selon options choisies) IfModuleEnabled=Rem: oui est effectif uniquement si le module %s est activé RemoveLock=Effacer le fichier %s s'il existe afin d'autoriser l'outil de mise à jour. -RestoreLock=Replacer un fichier %s en ne donnant que les droits de lecture sur ce fichier afin d'interdire à nouveau les mises à jour. +RestoreLock=Replacer un fichier %s, en ne donnant que les droits de lecture sur ce fichier, afin d'interdire à nouveau les mises à jour. SecuritySetup=Configuration de la sécurité SecurityFilesDesc=Définissez ici les options de sécurité des téléchargements de fichiers ErrorModuleRequirePHPVersion=Erreur, ce module requiert une version %s ou supérieure de PHP @@ -147,7 +147,7 @@ PurgeAreaDesc=Cette page vous permet d'effacer tous les fichiers construits ou s PurgeDeleteLogFile=Effacer les fichiers de traces de debug, incluant %s défini dans le module 'Journaux et traces' (pas de risque de perte de données) PurgeDeleteTemporaryFiles=Effacer tous les fichiers temporaires (pas de risque de perte de données) PurgeDeleteTemporaryFilesShort=Effacer les fichiers temporaires -PurgeDeleteAllFilesInDocumentsDir=Effacer tous les fichiers du répertoire %s. Les fichiers temporaires mais aussi les fichiers « dumps » de sauvegarde de base de données, les fichiers joints aux éléments (tiers, factures, ...) ou fichiers stockés dans le module GED seront irrémédiablement effacés. +PurgeDeleteAllFilesInDocumentsDir=Effacer tous les fichiers du répertoire %s.
Les fichiers temporaires mais aussi les fichiers «dumps» de sauvegarde de base de données, les fichiers joints aux éléments (tiers, factures, ...) ou fichiers stockés dans le module GED seront irrémédiablement effacés. PurgeRunNow=Lancer la purge maintenant PurgeNothingToDelete=Aucun dossier ou fichier à supprimer. PurgeNDirectoriesDeleted=%s fichiers ou répertoires supprimés. @@ -165,7 +165,7 @@ NoBackupFileAvailable=Aucun fichier de sauvegarde disponible. ExportMethod=Méthode d'exportation ImportMethod=Méthode d'importation ToBuildBackupFileClickHere=Pour générer un fichier de sauvegarde, cliquez ici. -ImportMySqlDesc=Pour importer une sauvegarde, il faut utiliser la commande mysql suivante en ligne de commande: +ImportMySqlDesc=Pour importer un fichier de sauvegarde MySQL, vous pouvez utilisez la commande mysql en ligne de commande.
Par exemple: ImportPostgreSqlDesc=Pour importer une sauvegarde, il faut utiliser la commande pg_restore en ligne suivante: ImportMySqlCommand=%s %s < monfichiersauvegarde.sql ImportPostgreSqlCommand=%s %s monfichiersauvegarde.sql @@ -225,8 +225,8 @@ Required=Requis UsedOnlyWithTypeOption=Utilisé par certaines options de l'agenda uniquement Security=Sécurité Passwords=Mots de passe -DoNotStoreClearPassword=Ne pas stocker de mots de passe en clair dans la base (Activation recommandée) -MainDbPasswordFileConfEncrypted=Chiffrer le mot de passe de la base dans le fichier conf.php (Activation recommandée) +DoNotStoreClearPassword=Chiffrer les mots de passe stockés dans la base de données (PAS en texte brut). Il est fortement recommandé d'activer cette option. +MainDbPasswordFileConfEncrypted=Chiffrer le mot de passe de la base dans le fichier conf.php . Il est fortement recommandé d'activer cette option. InstrucToEncodePass=Pour avoir le mot de passe de la base encodé dans le fichier de configuration conf.php, remplacer dans ce fichier la ligne
$dolibarr_main_db_pass="...";
par
$dolibarr_main_db_pass="crypted:%s"; InstrucToClearPass=Pour avoir le mot de passe de la base décodé (en clair) dans le fichier de configuration conf.php, remplacer dans ce fichier la ligne
$dolibarr_main_db_pass="crypted:...";
par
$dolibarr_main_db_pass="%s"; ProtectAndEncryptPdfFiles=Protection des PDF générés. Activation NON recommandée (rend inopérante la génération de PDF de masse) @@ -288,9 +288,9 @@ MAIN_SMS_SENDMODE=Méthode d'envoi des SMS MAIN_MAIL_SMS_FROM=Numéro de téléphone par défaut pour envoi Sms MAIN_MAIL_DEFAULT_FROMTYPE=Expéditeur par défaut des e-mails pour les envois manuels (e-mail utilisateur ou de la société) UserEmail=Email utilisateur -CompanyEmail=Email institution +CompanyEmail=Email organization FeatureNotAvailableOnLinux=Fonctionnalité non disponible sous systèmes Unix. Tester votre sendmail localement. -SubmitTranslation=Si la traduction de cette langue est incomplète ou si vous trouvez des erreurs, vous pouvez corriger cela en éditant les fichiers dans le répertoire langs/%s et soumettre votre changement sur www.transifex.com/dolibarr-association/dolibarr/ +SubmitTranslation=Si la traduction de cette langue est incomplète ou si vous trouvez des erreurs, vous pouvez corriger cela en éditant les fichiers dans le répertoire langs/%s et soumettre vos changements sur www.transifex.com/dolibarr-association/dolibarr/ SubmitTranslationENUS=Si la traduction pour cette langue est incomplète ou si vous trouvez des erreurs, vous pouvez les corriger en éditant les fichiers dans le répertoire langs/%s et soumettre les modifications sur le forum dolibarr.org/forum ou pour les développeurs sur github.com/Dolibarr/dolibarr. ModuleSetup=Configuration du module ModulesSetup=Configuration Modules/Application @@ -310,7 +310,7 @@ ModuleFamilyInterface=Interfaces avec des systèmes externes MenuHandlers=Gestionnaires de menu MenuAdmin=Édition menu DoNotUseInProduction=Ne pas utiliser en production -ThisIsProcessToFollow=Voici la procédure à suivre : +ThisIsProcessToFollow=Procédure de mise à jour: ThisIsAlternativeProcessToFollow=Voici une procédure de configuration alternative StepNb=Étape %s FindPackageFromWebSite=Rechercher le paquet qui répond à votre besoin (par exemple sur le site web %s). @@ -347,7 +347,7 @@ ErrorCantUseRazIfNoYearInMask=Erreur, ne peut utiliser l'option @ pour remettre ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Erreur, ne peut utiliser l'option @ si la séquence {yy}{mm} ou {yyyy}{mm} n'est pas dans le masque. UMask=Masque des nouveaux fichiers sous Unix/Linux/BSD/Mac. UMaskExplanation=Ce paramètre permet de définir les droits des fichiers créés sur le serveur par Dolibarr (lors d'envois par exemple).
Ce doit être la valeur octale (par exemple 0666 signifie lecture/écriture pour tous).
Ce paramètre n'a aucun effet sur un serveur Windows. -SeeWikiForAllTeam=Voir le wiki pour le détail de tous les acteurs et leur organisation +SeeWikiForAllTeam=Voir le wiki pour le détail de tous les contributeurs et leur organisation UseACacheDelay= Délai de mise en cache de l'export en secondes (0 ou vide pour aucun cache) DisableLinkToHelpCenter=Cacher le lien «Besoin d'aide ou d'assistance» sur la page de connexion DisableLinkToHelp=Cacher le lien vers l'aide en ligne %s @@ -376,15 +376,15 @@ ModuleMustBeEnabledFirst=Le module %s doit être activé pour utiliser ce SecurityToken=Clé de sécurisation des URLs NoSmsEngine=Aucun gestionnaire d'envoi de SMS n'est disponible. Les gestionnaires d'envois SMS ne sont pas installés en standard, car dépendent d'un fournisseur externe, mais vous pourrez en trouver depuis la plateforme %s PDF=PDF -PDFDesc=Vous pouvez définir ici des options globales sur la génération des PDF +PDFDesc=Options globales sur la génération des PDF PDFAddressForging=Règles de fabrication des zones adresses HideAnyVATInformationOnPDF=Masquer toutes les informations relatives à la Taxe de vente / TVA sur les PDF générés PDFRulesForSalesTax=Règles pour la taxe de vente / TVA PDFLocaltax=Règles pour %s -HideLocalTaxOnPDF=Cacher le taux de %s dans la colonne taxe des PDF -HideDescOnPDF=Cacher la description des produits sur les PDF générés -HideRefOnPDF=Cacher la référence des produits sur les PDF générés -HideDetailsOnPDF=Cacher les détails des lignes de produits sur les PDF générés +HideLocalTaxOnPDF=Cacher le taux de %s dans la colonne Taxe +HideDescOnPDF=Cacher la description des produits +HideRefOnPDF=Cacher la référence des produits +HideDetailsOnPDF=Cacher les détails des lignes de produits PlaceCustomerAddressToIsoLocation=Utiliser la position standard française (La Poste) pour la position de l'adresse client Library=Bibliothèque UrlGenerationParameters=Sécurisation des URLs @@ -449,10 +449,10 @@ ShowDetailsInPDFPageFoot=Ajout de plus d'informations dans le pied de page de vo NoDetails=Pas plus de détails dans le pied-de-page DisplayCompanyInfo=Afficher l'adresse de la société DisplayCompanyManagers=Afficher le nom des responsables -DisplayCompanyInfoAndManagers=Afficher l'adresse du tiers et le nom de son responsable +DisplayCompanyInfoAndManagers=Afficher l'adresse de la société et le nom des responsables EnableAndSetupModuleCron=Si vous voulez avoir cette facture récurrente générée automatiquement, le module *%s* doit être activé et correctement configuré. Dans le cas contraire, la création des factures doit être effectuée manuellement à partir de ce modèle avec le bouton *Créer*. Notez que même si vous avez activé la création automatique, vous pouvez toujours lancer, en toute sécurité, la création manuelle. En effet, il n'est pas possible de créer plusieurs factures sur une même période. ModuleCompanyCodeCustomerAquarium=%s suivi d'un code client tiers pour un code comptable client -ModuleCompanyCodeSupplierAquarium=%s suivi du code d'un fournisseur tiers pour un code comptable fournisseur +ModuleCompanyCodeSupplierAquarium=%s suivi du code fournisseur tiers pour le code comptable fournisseur ModuleCompanyCodePanicum=Retourne un code comptable vide ModuleCompanyCodeDigitaria=Renvoie un code comptable composé suivant le code tiers. Le code est composé du caractère 'C' en première position suivi des 5 premiers caractères du code tiers. Use3StepsApproval=Par défaut, les commandes fournisseurs nécessitent d'être créées et approuvées en deux étapes/utilisateurs (une étape/utilisateur pour créer et une étape/utilisateur pour approuver. Si un utilisateur à les deux permissions, ces deux actions sont effectuées en une seule fois). Cette option ajoute la nécessité d'une approbation par une troisième étape/utilisateur, si le montant de la commande est supérieur au montant d'une valeur définie (soit 3 étapes nécessaire: 1 =Validation, 2=Première approbation et 3=seconde approbation si le montant l'exige).
Laissez le champ vide si une seule approbation (2 étapes) sont suffisantes, placez une valeur très faibe (0.1) si une deuxième approbation (3 étapes) est toujours exigée. @@ -477,7 +477,7 @@ WatermarkOnDraftExpenseReports=Filigrane sur les notes de frais AttachMainDocByDefault=Définissez cette valeur sur 1 si vous souhaitez joindre le document principal au courrier électronique par défaut (si applicable) FilesAttachedToEmail=Joindre le fichier SendEmailsReminders=Envoyer des alertes agenda par e-mails -davDescription=Ajout un composant pour devenir un serveur DAV +davDescription=Ajout d'un composant pour devenir un serveur DAV DAVSetup=Configuration du module DAV DAV_ALLOW_PUBLIC_DIR=Activer le répertoire public (répertoire WebDav sans login requis) DAV_ALLOW_PUBLIC_DIRTooltip=Le répertoire public WebDav est un répertoire WebDAV auquel tout le monde peut accéder (en lecture et en écriture), sans avoir besoin d'avoir/utiliser un compte de connexion/mot de passe existant. @@ -513,7 +513,7 @@ Module50Desc=Gestion des produits Module51Name=Publipostage Module51Desc=Administration et envoi de courriers papiers en masse Module52Name=Stock -Module52Desc=Gestion des stocks de produits +Module52Desc=Gestion des stocks (produits uniquement) Module53Name=Services Module53Desc=Gestion des services Module54Name=Contrats/Abonnements @@ -537,7 +537,7 @@ Module80Desc=Gestion des expéditions et réceptions clients Module85Name=Banques et caisses Module85Desc=Gestion des comptes financiers de type comptes bancaires, postaux ou caisses liquide Module100Name=Site externe -Module100Desc=Ajoute un site web externe dans les menus Dolibarr et l'affiche dans un cadre Dolibarr +Module100Desc=Ajoute un lien vers un site web externe dans le menu principal. Le site Web est affiché dans une frame de l'application. Module105Name=Mailman and SPIP Module105Desc=Interface vers Mailman ou SPIP pour le module Adhérent Module200Name=LDAP @@ -560,12 +560,12 @@ Module410Name=Webcalendar Module410Desc=Interface avec le calendrier Webcalendar Module500Name=Taxes et dépenses spéciales Module500Desc=Gestion des dépenses autres (Impôts TVA, charges fiscales ou sociales, dividendes, ...) -Module510Name=Règlement des salaires +Module510Name=Salaires Module510Desc=Enregistrer et suivre le paiement des salaires des employés -Module520Name=Emprunt +Module520Name=Emprunts Module520Desc=Gestion des emprunts -Module600Name=Notifications d'événements métiers -Module600Desc=Envoi de notifications par e-mails (déclenchées par des événements métiers) aux utilisateurs (configuration faite sur chaque fiche utilisateur), contacts de tiers (configuration faite sur chaque fiche tiers) ou vers des adresses e-mails spécifiques. +Module600Name=Notifications +Module600Desc=Envoi de notifications par e-mails déclenchées par des événements métiers: par utilisateur (configuration faite sur chaque fiche utilisateur), par contact de tiers (configuration faite sur chaque fiche tiers) ou vers des adresses e-mails spécifiques. Module600Long=Notez que ce module est dédié à l'envoi d'e-mails en temps réel lorsqu'un événement métier dédié se produit. Si vous cherchez une fonctionnalité pour envoyer des rappels par email de vos événements agenda, allez dans la configuration du module Agenda. Module610Name=Variantes de produits Module610Desc=Création de variantes de produits (couleur, taille, etc.) @@ -588,7 +588,7 @@ Module2200Desc=Active l'usage d'expressions mathématiques Module2300Name=Travaux planifiés Module2300Desc=Gestion des travaux planifiées (alias cron ou table chrono) Module2400Name=Événements/Agenda -Module2400Desc=Gestion des événements. Laissez l'application tracer automatiquement les événements pour des besoin de suivi ou enregistrer manuellement les événements ou rendez-vous dans l'agenda. Ceci est le module le plus important pour une bonne Gestion de la Relation Client ou Fournisseur. +Module2400Desc=Gestion des événements. Laissez l'application tracer automatiquement les événements pour des besoins de suivi ou enregistrer manuellement des événements ou rendez-vous dans l'agenda. Ceci est le module le plus important pour une bonne Gestion de la Relation Client ou Fournisseur. Module2500Name=GED Module2500Desc=Gestion de documents (GED). Stockage automatic des documents générés ou stockés. Fonction de partage. Module2600Name=API/Web services (serveur SOAP) @@ -622,12 +622,14 @@ Module40000Name=Multi-devise Module40000Desc=Utiliser des devises alternatives dans les prix et les documents Module50000Name=PayBox Module50000Desc=Module permettant d'offrir une page de paiement en ligne par carte de crédit avec PayBox. Ceci peut être utilisé par les clients pour faire des paiements de montants libre ou pour des paiements d'un objet particulier de Dolibarr (facture, commande, ...) -Module50100Name=Point de vente -Module50100Desc=Module Caisse enregistreuse - Point de vente (POS) -Module50150Name=Point de vente (tactile) -Module50150Desc=Module de caisse enregistreuse. Point De Vente (POS en anglais) à écran tactile. +Module50100Name=PdV SimplePOS +Module50100Desc=Point de vente - Caisse enregistreuse SimplePOS (PdV simple) +Module50150Name=PdV TakePOS +Module50150Desc=Module de caisse enregistreuse TakePOS. Point De Vente (POS en anglais) à écran tactile. Module50200Name=Paypal Module50200Desc=Module permettant d'offrir une page de paiement en ligne par carte de crédit avec PayBox. Ceci peut être utilisé par les clients pour faire des paiements de montants libre ou pour des paiements d'un objet particulier de Dolibarr (facture, commande, ...) +Module50300Name=Stripe +Module50300Desc=Offrez aux clients une page de paiement en ligne Stripe (cartes de crédit/débit). Ceci peut être utilisé pour permettre à vos clients d'effectuer des paiements libres ou liés à un objet Dolibarr spécifique (facture, commande, etc.). Module50400Name=Comptabilité (avancée) Module50400Desc=Gestion de la comptabilité (double partie, comptabilité général et auxiliaire). Export du grand livre dans différent formats de logiciels comptables. Module54000Name=PrintIPP @@ -705,7 +707,7 @@ Permission122=Créer/modifier les tiers (sociétés) liés à l'utilisateur Permission125=Supprimer les tiers (sociétés) liés à l'utilisateur Permission126=Exporter les tiers (sociétés) Permission141=Consulter tous les projets et tâches (y compris privés dont je ne suis pas contact) -Permission142=Créer/modifier tous les projets et tâches (y compris privés dont vous n'êtes pas contact) +Permission142=Créer/modifier tous les projets et tâches (y compris projets privés dont je ne suis pas contact) Permission144=Supprimer les projets et tâches (y compris privés dont je ne suis pas contact) Permission146=Consulter les fournisseurs Permission147=Consulter les stats @@ -730,7 +732,7 @@ Permission182=Créer/modifier les commandes fournisseurs Permission183=Valider les commandes fournisseurs Permission184=Approuver les commandes fournisseurs Permission185=Commander ou annuler les commandes fournisseurs -Permission186=Accuser réception des commandes fournisseurs +Permission186=Réceptionner les commandes fournisseurs Permission187=Clôturer les commandes fournisseurs Permission188=Annuler les commandes fournisseurs Permission192=Créer des lignes @@ -765,7 +767,7 @@ PermissionAdvanced253=Créer/modifier les utilisateurs internes/externes et leur Permission254=Créer/modifier les utilisateurs externes seulement Permission255=Modifier le mot de passe des autres utilisateurs Permission256=Supprimer ou désactiver les autres utilisateurs -Permission262=Etendre l'accès à tous les tiers (pas seulement ceux dont l'utilisateur est enregistré en tant que commercial).
Non effectif pour les utilisateurs externes (toujours limités à eux-mêmes sur les propositions commerciales, commandes, factures, contrats, etc).
Non effectif sur les projets (seules s'appliquent les permissions propres au module projets, et les règles de visibilité et d'assignation des tâches) +Permission262=Étendre l'accès à tous les tiers (pas seulement ceux dont l'utilisateur est enregistré en tant que commercial).
Non effectif pour les utilisateurs externes (toujours limités à eux-mêmes sur les propositions commerciales, commandes, factures, contrats, etc).
Non effectif sur les projets (seules s'appliquent les permissions propres au module projet, et les règles de visibilité et d'assignation du projet) Permission271=Consulter le chiffre d'affaires Permission272=Consulter les factures Permission273=Émettre les factures @@ -831,23 +833,23 @@ Permission1102=Créer/modifier les bons de livraison Permission1104=Valider les bons de livraison Permission1109=Supprimer les bons de livraison Permission1181=Consulter les fournisseurs -Permission1182=Consulter les commandes fournisseur -Permission1183=Créer les commandes fournisseur -Permission1184=Valider les commandes fournisseur -Permission1185=Approuver les commandes fournisseur +Permission1182=Consulter les commandes fournisseurs +Permission1183=Créer/modifier les commandes fournisseurs +Permission1184=Valider les commandes fournisseurs +Permission1185=Approuver les commandes fournisseurs Permission1186=Commander les commandes fournisseur -Permission1187=Accuser réception des commandes fournisseur +Permission1187=Réceptionner les commandes fournisseurs Permission1188=Supprimer les commandes fournisseur Permission1190=Approuver les commandes fournisseur (second niveau) Permission1201=Récupérer le résultat d'un export Permission1202=Créer/modifier un export Permission1231=Consulter les factures fournisseur -Permission1232=Créer des factures fournisseur +Permission1232=Créer les factures fournisseur Permission1233=Valider les factures fournisseur Permission1234=Supprimer les factures fournisseur Permission1235=Envoyer les factures fournisseur par email -Permission1236=Exporter les factures fournisseurs, attributs et règlements -Permission1237=Exporter les commande fournisseurs, attributs +Permission1236=Exporter les factures fournisseur, attributs et règlements +Permission1237=Exporter les commandes fournisseurs et attributs Permission1251=Lancer des importations en masse dans la base (chargement de données) Permission1321=Exporter les factures clients, attributs et règlements Permission1322=Rouvrir une facture payée @@ -918,7 +920,7 @@ DictionaryAccountancysystem=Modèles de plan comptable DictionaryAccountancyJournal=Journaux comptables DictionaryEMailTemplates=Modèles des courriels DictionaryUnits=Unités -DictionaryProspectStatus=Statuts de prospection +DictionaryProspectStatus=Statut prospect DictionaryHolidayTypes=Type de congés DictionaryOpportunityStatus=Statut d'opportunités pour les affaires/projets DictionaryExpenseTaxCat=Note de frais - catégories de déplacement @@ -1012,7 +1014,7 @@ MessageLogin=Message page de connexion LoginPage=Page de connexion BackgroundImageLogin=Image de fond PermanentLeftSearchForm=Zone de recherche permanente du menu de gauche -DefaultLanguage=Langue à utiliser par défaut (code langue) +DefaultLanguage=Langue par défaut EnableMultilangInterface=Activer l'interface multi-langue EnableShowLogo=Afficher le logo dans le menu gauche CompanyInfo=Société/Organisation @@ -1033,21 +1035,21 @@ ShowBugTrackLink=Afficher lien "%s" Alerts=Alertes DelaysOfToleranceBeforeWarning=Délais avant affichage de l'avertissement alerte retard DelaysOfToleranceDesc=Cet écran permet de définir les délais de tolérance après lesquels une alerte sera signalée à l'écran par le pictogramme %s sur chaque élément en retard. -Delays_MAIN_DELAY_ACTIONS_TODO=Tolérance de retard avant alerte (en jours) sur les évènements planifiées (évènements de l'agenda) et pas encore réalisés -Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Tolérance de retard (en jours) avant alerte pour les projets non clos à temps -Delays_MAIN_DELAY_TASKS_TODO=Tolérance de retard (en jours) avant alerte sur les tâches planifiées (tâches de projets) pas encore réalisées -Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Tolérance de retard avant alerte (en jours) sur commandes clients non traitées -Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Tolérance de retard avant alerte (en jours) sur les commandes fournisseurs non traitées -Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Tolérance de retard avant alerte (en jours) sur propales à cloturer -Delays_MAIN_DELAY_PROPALS_TO_BILL=Tolérance de retard avant alerte (en jours) sur propales non facturées -Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Tolérance de retard avant alerte (en jours) sur services à activer -Delays_MAIN_DELAY_RUNNING_SERVICES=Tolérance de retard avant alerte (en jours) sur services expirés -Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Tolérance de retard avant alerte (en jours) sur factures fournisseurs impayées -Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Tolérance de retard avant alerte (en jours) sur factures fournisseurs impayées -Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire -Delays_MAIN_DELAY_MEMBERS=Tolérance de retard avant alerte (en jours) sur cotisations adhérents en retard -Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Tolérance de retard avant alerte (en jours) sur chèques à déposer -Delays_MAIN_DELAY_EXPENSEREPORTS=Tolérance de retard avant alerte (en jours) sur les notes de frais à approuver +Delays_MAIN_DELAY_ACTIONS_TODO=Événements planifiés (événements de l'agenda) non terminés +Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Projet non fermé à temps +Delays_MAIN_DELAY_TASKS_TODO=Tâche planifiée (tâches de projet) non terminée +Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Commande non traitée +Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Commande fournisseur non traité +Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Proposition non fermée +Delays_MAIN_DELAY_PROPALS_TO_BILL=Proposition non facturée +Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Service à activer +Delays_MAIN_DELAY_RUNNING_SERVICES=Service expiré +Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Facture fournisseur impayée +Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Facture client impayée +Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Rapprochement bancaire en attente +Delays_MAIN_DELAY_MEMBERS=Cotisations adhérents en retard +Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Dépôt de chèque non effectué +Delays_MAIN_DELAY_EXPENSEREPORTS=Note de frais à approuver SetupDescription1=L'espace configuration permet de réaliser le paramétrage initial afin de pouvoir commencer à utiliser l'application. SetupDescription2=Les deux étapes obligatoires sont les deux premières entrées dans le menu de configuration, soit SetupDescription3=%s -> %s
Paramètres pour personnaliser le comportement par défaut du logiciel (comportement lié au pays par exemple). @@ -1066,7 +1068,7 @@ BrowserName=Nom du navigateur BrowserOS=OS du navigateur ListOfSecurityEvents=Liste des événements de sécurité Dolibarr SecurityEventsPurged=Evenement de sécurité purgés -LogEventDesc=Vous pouvez activer ici, l'historique des événements d'audit de sécurité. Cet historique est consultable par les administrateurs dans le menu %s - %s. Attention, cette fonctionnalité peut générer un gros volume de données. +LogEventDesc=Vous pouvez activer ici l'historique des événements d'audit de sécurité. Cet historique est consultable par les administrateurs dans le menu %s - %s. Attention, cette fonctionnalité peut générer un gros volume de données. AreaForAdminOnly=Les paramètres d'installation ne peuvent être remplis que par les utilisateurs administrateurs uniquement. SystemInfoDesc=Les informations systèmes sont des informations techniques diverses accessibles en lecture seule aux administrateurs uniquement. SystemAreaForAdminOnly=Cet espace n'est accessible qu'aux utilisateurs de type administrateur. Aucune permission Dolibarr ne permet d'étendre le cercle des utilisateurs autorisés à cet espace. @@ -1084,15 +1086,15 @@ TriggerDisabledByName=Déclencheurs de ce fichier désactivés par le suffix TriggerDisabledAsModuleDisabled=Déclencheurs de ce fichier désactivés car le module %s n'est pas actif. TriggerAlwaysActive=Déclencheurs de ce fichier toujours actifs, quels que soient les modules Dolibarr activés. TriggerActiveAsModuleActive=Déclencheurs de ce fichier actifs car le module %s est actif. -GeneratedPasswordDesc=Definissez ici quelle règle vous voulez utiliser pour générer les mots de passe quand vous demandez à fabriquer un nouveau mot de passe +GeneratedPasswordDesc=Définissez ici quelle règle vous voulez utiliser pour générer les mots de passe quand vous demandez à générer un nouveau mot de passe DictionaryDesc=Définissez ici les données de référence. Vous pouvez compléter/modifier les données prédéfinies avec les vôtres. -ConstDesc=Cette page vous permet d'éditer tous les autres paramètres indisponibles dans les pages précédentes. Ceux-là sont principalement des paramètres réservés aux développeurs et pour le dépannage avancé. Consultez ici la liste des options. +ConstDesc=Cette page vous permet d'éditer (surcharger) tous les autres paramètres indisponibles dans les pages précédentes. Ce sont principalement des paramètres réservés aux développeurs et pour du dépannage avancé. Consultez ici la liste des options. MiscellaneousDesc=Définissez ici les autres paramètres en rapport avec la sécurité. LimitsSetup=Configuration des limites et précisions LimitsDesc=Vous pouvez définir ici les limites, précisions et optimisations utilisées par Dolibarr MAIN_MAX_DECIMALS_UNIT=Nombre de décimales maximum pour les prix unitaires MAIN_MAX_DECIMALS_TOT=Nombre de décimales maximum pour les prix totaux -MAIN_MAX_DECIMALS_SHOWN=Nombre de décimales maximum pour les montant affichés à l'écran (Mettre ... après ce nombre max si vous voulez voir ... quand le nombre est tronqué à l'affichage écran) +MAIN_MAX_DECIMALS_SHOWN=Nombre de décimales maximum pour les montants affichés à l'écran (Mettre ... après ce nombre max (exemple "2...") si vous voulez voir "..." quand le nombre est tronqué à l'affichage écran) MAIN_ROUNDING_RULE_TOT=Pas de la plage d'arrondi (pour les pays où l'arrondi se fait sur autre chose que la base 10. Par exemple, mettre 0,05 si l'arrondi se fait par pas de 0,05) UnitPriceOfProduct=Prix unitaire HT d'un produit TotalPriceAfterRounding=Prix total (HT/TVA/TTC) après arrondis @@ -1100,18 +1102,18 @@ ParameterActiveForNextInputOnly=Paramètre effectif pour les prochaines saisies NoEventOrNoAuditSetup=Aucun événement d'audit de sécurité n'a été enregistré. Ceci peut être normal si l'audit n'a pas été activé dans "Configuration - Sécurité - Evénements de sécurité". NoEventFoundWithCriteria=Aucun événement d'audit de sécurité trouvé avec ces critères de recherche. SeeLocalSendMailSetup=Voir la configuration locale de sendmail -BackupDesc=Pour réaliser une sauvegarde complète de Dolibarr, vous devez : -BackupDesc2=Sauvegardez le contenu du répertoire document (%s) qui contient tous les fichiers envoyés et générés (Par conséquent il contient également les fichiers dump générés à l'étape 1). -BackupDesc3=Sauvez le contenu de votre base de données (%s) dans un fichier « dump ». Pour cela vous pouvez utiliser l'assistant ci-dessous. +BackupDesc=Une sauvegarde complète d'une installation Dolibarr nécessite deux étapes. +BackupDesc2=Sauvegardez le contenu du répertoire document (%s) qui contient tous les fichiers envoyés et générés. Par conséquent il contient également les fichiers dump générés à l'étape 1. +BackupDesc3=Sauvez le contenu de votre base de données (%s) dans un fichier "dump". Pour cela vous pouvez utiliser l'assistant ci-dessous. BackupDescX=Le répertoire archivé devra être placé en lieu sûr. BackupDescY=Le fichier « dump » généré devra être placé en lieu sûr. BackupPHPWarning=La sauvegarde n'est pas garantie avec cette méthode. Il est recommandé d'utiliser la méthode précédente. -RestoreDesc=Pour restaurer une sauvegarde de Dolibarr, vous devez : -RestoreDesc2=Restaurez le fichier archive (fichier zip par exemple) du répertoire documents en extrayant l'arborescence dans le répertoire documents d'une nouvelle installation de Dolibarr ou dans le répertoire documents de cette installation (%s). -RestoreDesc3=Restaurez les données, depuis le fichier « dump » de sauvegarde, dans la base de données d'une nouvelle installation de Dolibarr ou de cette instance en cours (%s). Attention, une fois la restauration faite, il faudra utiliser un identifiant/mot de passe administrateur existant à l'époque de la sauvegarde pour se connecter. Pour restaurer la base dans l'installation actuelle, vous pouvez utiliser l'assistant suivant. +RestoreDesc=Pour restaurer une sauvegarde Dolibarr, deux étapes sont nécessaires. +RestoreDesc2=Restaurez le fichier archive (fichier zip par exemple) du répertoire "documents" en extrayant son contenu dans le répertoire documents d'une nouvelle installation de Dolibarr ou dans le répertoire documents de cette installation (%s). +RestoreDesc3=Restaurez les données, depuis le fichier "dump" de sauvegarde, dans la base de données d'une nouvelle installation de Dolibarr ou de cette instance en cours (%s). Attention, une fois la restauration faite, il faudra utiliser un identifiant/mot de passe administrateur existant à l'époque de la sauvegarde pour se connecter. Pour restaurer la base dans l'installation actuelle, vous pouvez utiliser l'assistant suivant. RestoreMySQL=Importation MySQL ForcedToByAModule= Cette règle est forcée à %s par un des modules activés -PreviousDumpFiles=Fichiers de sauvegarde de base de données générés +PreviousDumpFiles=Fichiers de sauvegarde de base de données existant WeekStartOnDay=Premier jour de la semaine RunningUpdateProcessMayBeRequired=Le lancement du processus de mise à jour semble requis (La version des programmes %s diffère de la version de la base %s) YouMustRunCommandFromCommandLineAfterLoginToUser=Vous devez exécuter la commande sous un terminal après vous être identifié avec le compte %s ou ajouter -W à la fin de la commande pour fournir le mot de passe de %s. @@ -1119,7 +1121,7 @@ YourPHPDoesNotHaveSSLSupport=Fonctions SSL non présentes dans votre PHP DownloadMoreSkins=Plus de thèmes à télécharger SimpleNumRefModelDesc=Renvoie le numéro sous la forme %syymm-nnnn où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0. ShowProfIdInAddress=Afficher l'identifiant professionnel dans les adresses sur les documents -ShowVATIntaInAddress=Cacher l'identifiant de TVA Intracommunautaire dans les adresses sur les documents. +ShowVATIntaInAddress=Cacher le numéro de TVA Intracommunautaire dans les adresses sur les documents. TranslationUncomplete=Traduction partielle MAIN_DISABLE_METEO=Désactiver la vue météo MeteoStdMod=Mode standard @@ -1135,7 +1137,7 @@ MAIN_PROXY_HOST=Nom/Adresse du serveur proxy mandataire MAIN_PROXY_PORT=Port du serveur proxy mandataire MAIN_PROXY_USER=Identifiant pour passer le serveur proxy mandataire MAIN_PROXY_PASS=Mot de passe pour passer le serveur proxy mandataire -DefineHereComplementaryAttributes=Définissez ici la liste des attributs supplémentaires, non disponibles en standard, et que vous voulez voir gérer sur les %s. +DefineHereComplementaryAttributes=Définissez ici la liste des attributs supplémentaires que vous voulez gérer sur les %s. ExtraFields=Attributs supplémentaires ExtraFieldsLines=Attributs supplémentaires (lignes) ExtraFieldsLinesRec=Attributs supplémentaires (ligne de factures modèles) @@ -1160,7 +1162,7 @@ SendmailOptionMayHurtBuggedMTA=La fonction permettant d’envoyer des e-mails à TranslationSetup=Configuration de la traduction TranslationKeySearch=Rechercher une traduction TranslationOverwriteKey=Ajouter une traduction -TranslationDesc=Pour sélectionner la langue d'affichage de l'environnement :
* Au niveau global: menu Accueil - Configuration - Affichage
* Configuration au niveau de l'utilisateur: Utilisez l'onglet Interface utilisateur de la fiche utilisateur (Accès a la fiche de l'utilisateur depuis l'identifiant dans l'angle supérieur droit de l'écran). +TranslationDesc=Pour sélectionner la langue d'affichage :
* Au niveau sytème/global: menu Accueil - Configuration - Affichage
* Par utilisateur: Utilisez l'onglet Interface utilisateur de la fiche utilisateur (Accès à la fiche de l'utilisateur depuis l'identifiant dans l'angle supérieur droit de l'écran). TranslationOverwriteDesc=Vous pouvez aussi écraser des valeurs en complétant/corrigeant le tableau suivant. Choisissez votre code de langue depuis la liste déroulante "%s", choisissez le code trouvé dans le fichier lang dans le champ "%s", et dans "%s" la nouvelle valeur que vous souhaitez utiliser comme nouvelle traduction. TranslationOverwriteDesc2=Vous pouvez utilisez l'autre onglet pour vous aider à trouver la clé de traduction à utiliser TranslationString=Traduction @@ -1173,7 +1175,7 @@ TotalNumberOfActivatedModules=Modules activés : %s / %s YouMustEnableOneModule=Vous devez activer au moins une fonctionnalité ClassNotFoundIntoPathWarning=La classe %s n'a pas été trouvée dans le chemin PHP YesInSummer=Oui en été -OnlyFollowingModulesAreOpenedToExternalUsers=Remarque, seuls les modules suivants sont ouverts aux utilisateurs externes (quelles qu'en soient les permissions de ces utilisateurs) et seulement si les permissions leur ont été données: +OnlyFollowingModulesAreOpenedToExternalUsers=Remarque, seuls les modules suivants sont ouverts aux utilisateurs externes (quelles qu'en soient les permissions de ces utilisateurs) et seulement si les permissions leur ont été données:
SuhosinSessionEncrypt=Stockage des sessions chiffrées par Suhosin ConditionIsCurrently=La condition est actuellement %s YouUseBestDriver=Vous utilisez le driver %s qui est le driver recommandé actuellement. @@ -1182,7 +1184,7 @@ NbOfProductIsLowerThanNoPb=Vous avez uniquement %s produits / services dans la b SearchOptim=Optimisation des recherches YouHaveXProductUseSearchOptim=Vous avez des produits %s dans la base de données. Vous devez ajouter la constante PRODUCT_DONOTSEARCH_ANYWHERE à 1 dans Home-Setup-Other. Limitez la recherche au début des chaînes, ce qui permet à la base de données d'utiliser des index et vous devez obtenir une réponse immédiate. BrowserIsOK=Vous utilisez le navigateur Web %s. Ce navigateur est correct pour la sécurité et la performance. -BrowserIsKO=Vous utilisez le navigateur Web %s. Ce navigateur est connu pour être un mauvais choix pour la sécurité, la performance et la fiabilité. Nous vous recommandons d'utiliser Firefox, Chrome, Opera ou Safari. +BrowserIsKO=Vous utilisez le navigateur %s. Ce navigateur est déconseillé pour des raisons de sécurité, performance et qualité des pages restituées. Nous vous recommandons d'utiliser Firefox, Chrome, Opera ou Safari. XDebugInstalled=XDebug est chargé. XCacheInstalled=XCache est chargé. AddRefInList=Afficher les références client/fournisseur dans les listes (listes déroulantes ou à autocomplétion) et les libellés des liens clicables.
Les tiers apparaîtront alors sous la forme "CC12345 - SC45678 - La big company coorp", au lieu de "La big company coorp". @@ -1206,11 +1208,11 @@ UserMailRequired=Email requis pour créer un nouvel utilisateur HRMSetup=Configuration du module GRH ##### Company setup ##### CompanySetup=Configuration du module Tiers -CompanyCodeChecker=Options pour la génération automatique de codes client / fournisseur +CompanyCodeChecker=Modèle de génération et contrôle des codes tiers (client ou fournisseur) AccountCodeManager=Options pour la génération automatique de codes comptable client ou fournisseur -NotificationsDesc=Les notifications activent l'envoi d'e-mails automatiques pour certains événements de Dolibarr. L'envoi de ces e-mails automatiques est défini selon : -NotificationsDescUser=* par utilisateurs, utilisateur par utilisateur. -NotificationsDescContact=* par tiers de contacts (clients ou fournisseur), contact par contact. +NotificationsDesc=Les notifications activent l'envoi d'e-mails automatiques pour certains événements de Dolibarr. L'envoi de ces e-mails automatiques peut-être défini : +NotificationsDescUser=* par utilisateur, pour chaque utilisateur +NotificationsDescContact=* par contacts de tiers (clients ou fournisseur), pour chaque contact NotificationsDescGlobal=* ou en définissant des emails cibles fixes sur la page de configuration du module. ModelModules=Modèle de documents DocumentModelOdt=Génération depuis des modèles OpenDocument (Fichier .ODT ou .ODS LibreOffice, KOffice, TextEdit…) @@ -1359,8 +1361,8 @@ LDAPSynchroKO=Échec du test de synchronisation LDAPSynchroKOMayBePermissions=Échec du test de synchronisation. Vérifier que la connexion au serveur est correctement configurée et permet les mises à jour LDAP LDAPTCPConnectOK=Connexion TCP au serveur LDAP réussie (Serveur=%s, Port=%s) LDAPTCPConnectKO=Connexion TCP au serveur LDAP échouée (Serveur=%s, Port=%s) -LDAPBindOK=Connexion / Authentification réussie sur le serveur LDAP (Serveur = %s, Port = %s, Admin = %s, Mot de passe = %s) -LDAPBindKO=La connexion / l'authentification au serveur LDAP a échoué (serveur = %s, port = %s, administrateur = %s, mot de passe = %s) +LDAPBindOK=Connection/Authentification au serveur LDAP réussie (Serveur=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindKO=Connexion/Authentification au serveur LDAP échouée (Serveur=%s, Port=%s, Admin=%s, Password=%s) LDAPSetupForVersion3=Serveur LDAP configuré en version 3 LDAPSetupForVersion2=Serveur LDAP configuré en version 2 LDAPDolibarrMapping=Mapping Dolibarr @@ -1422,21 +1424,21 @@ LDAPDescMembersTypes=Cette page permet de définir le nom des attributs de l'arb LDAPDescValues=Les valeurs exemples sont adaptées à OpenLDAP avec les schémas suivant chargés: core.schema, cosine.schema, inetorgperson.schema). Si vous utilisez les valeurs suggérées et OpenLDAP, modifiez votre fichier de configuration LDAP slapd.conf pour avoir tous ces schémas actifs. ForANonAnonymousAccess=Pour un accès authentifié (pour accès en écriture par exemple) PerfDolibarr=Rapport de configuration/optimisation sur la performance -YouMayFindPerfAdviceHere=Cette page fournit des vérifications ou des conseils relatifs aux performances. -NotInstalled=Non installé, votre serveur n'est donc pas ralenti. +YouMayFindPerfAdviceHere=Sur cette page vous trouverez quelques indicateurs ou conseils pour optimiser la performance. +NotInstalled=Non installé, aussi votre serveur n'est pas ralentit par cela. ApplicativeCache=Cache applicatif MemcachedNotAvailable=Aucun cache applicatif trouvé. Vous pouvez accélérer les performances de Dolibarr en installant un serveur de cache Memcached et un module de cache applicatif exploitant ce serveur.
Plus d'info sur la page http://wiki.dolibarr.org/index.php/Module_MemCached. Notez que de nombreux hébergeurs low-cost ne fournissent pas de tels serveurs de cache dans leur infrastructure. MemcachedModuleAvailableButNotSetup=Le module memcached pour le cache applicatif a été trouvé mais la configuration de ce module n'est pas complète. MemcachedAvailableAndSetup=Le module memcached dédié à l'utilisation du serveur de cache memcached est activé. OPCodeCache=Cache OPCode -NoOPCodeCacheFound=Aucun cache OPCode trouvé. Peut-être utilisez-vous un cache OPCode autre que XCache ou eAccelerator (bon) ou n’avez-vous pas un cache OPCode (très mauvais). +NoOPCodeCacheFound=Pas de cache OPCode trouvé. Peut-être utilisez-vous un cache OPCode différent de XCache ou eAccelerator (bien), peut-être n'avez vous pas du tout de cache OPCode (très mauvais). HTTPCacheStaticResources=Cache HTTP des ressources statiques (css, img, javascript) FilesOfTypeCached=Fichiers de type %s mis en cache par le serveur HTTP FilesOfTypeNotCached=Fichiers de type %s non mis en cache par le serveur HTTP FilesOfTypeCompressed=Fichiers de type %s compressé par le serveur HTTP FilesOfTypeNotCompressed=Fichiers de type %s non compressé par le serveur HTTP CacheByServer=Cache par le serveur -CacheByServerDesc=Par exemple, en utilisant la directive Apache "ExpiresByType image / gif A2592000" +CacheByServerDesc=Par exemple, en utilisant la directive Apache "ExpiresByType image/gif A2592000" CacheByClient=Cache par le navigateur CompressionOfResources=Compression des réponses HTTP CompressionOfResourcesDesc=Par exemple, en utilisant la directive Apache "AddOutputFilterByType DEFLATE" @@ -1452,10 +1454,10 @@ ProductSetup=Configuration du module Produits ServiceSetup=Configuration du module Services ProductServiceSetup=Configuration des modules Produits et Services NumberOfProductShowInSelect=Nombre maximum de produits dans les listes déroulantes (0=aucune limite) -ViewProductDescInFormAbility=Afficher les descriptions de produits dans des formulaires (sinon, comme info-bulle contextuelle) +ViewProductDescInFormAbility=Afficher les descriptions de produits dans les formulaires (sinon, comme info-bulle contextuelle) MergePropalProductCard=Ajoute dans l'onglet Fichiers joints des produits/services, une option pour fusionner le document PDF du produit au PDF des propositions Azur si le produit/services est inclut dans la proposition. -ViewProductDescInThirdpartyLanguageAbility=Afficher les descriptions de produits dans la langue du tiers -UseSearchToSelectProductTooltip=De même, si vous avez un grand nombre de produits (> 100 000), vous pouvez augmenter la vitesse en définissant une constante PRODUCT_DONOTSEARCH_ANYWHERE sur 1 dans Configuration-> Autre. La recherche sera alors limitée au début de la chaîne. +ViewProductDescInThirdpartyLanguageAbility=Visualisation des descriptions de produits dans la langue du tiers +UseSearchToSelectProductTooltip=Si vous avez un nombre important de produits (>100 000), vous pourrez améliorer les performances en positionnant la constante PRODUCT_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limité au début des chaines. UseSearchToSelectProduct=Attendre que vous ayez appuyé sur une touche avant de charger le contenu de la liste déroulante des produits (Cela peut augmenter les performances si vous avez un grand nombre de produits, mais cela est moins convivial) SetDefaultBarcodeTypeProducts=Type de code-barre utilisé par défaut pour les produits SetDefaultBarcodeTypeThirdParties=Type de code-barre utilisé par défaut pour les tiers @@ -1497,7 +1499,7 @@ GenbarcodeLocation=Outil de génération de code-barres en ligne de commande (ut BarcodeInternalEngine=Moteur interne BarCodeNumberManager=Gestionnaire pour la génération automatique de numéro de code-barre ##### Prelevements ##### -WithdrawalsSetup=Configuration du module prélèvement +WithdrawalsSetup=Configuration du module Prélèvement ##### ExternalRSS ##### ExternalRSSSetup=Configuration des imports de flux RSS NewRSS=Syndication d'un nouveau flux RSS @@ -1509,7 +1511,7 @@ MailingEMailFrom=Email émetteur (From) des emails envoyés par Emailing MailingEMailError=Email retour (Errors-to) pour les réponses lors des envois par Emailing en erreur MailingDelay=Temps d'attente, en seconde, avant d'envoyer le prochain message ##### Notification ##### -NotificationSetup=Configuration du module notification par email +NotificationSetup=Configuration du module Notification par email NotificationEMailFrom=Adresse émettrice (From) des emails envoyés lors des notifications FixedEmailTarget=Email fixe cible destinataires ##### Sendings ##### @@ -1534,13 +1536,13 @@ FCKeditorForMailing= Création/édition WYSIWIG des emailings (Outils->Emailings FCKeditorForUserSignature=Création/édition WYSIWIG de la signature des utilisateurs FCKeditorForMail=Création/édition WYSIWIG tous les emails (sauf Outils->Emailings) ##### OSCommerce 1 ##### -OSCommerceErrorConnectOkButWrongDatabase=La connexion a réussi, mais la base de données ne semble pas être une base de données OSCommerce (la clé %s n’a pas été trouvée dans le tableau %s). +OSCommerceErrorConnectOkButWrongDatabase=La connexion a réussi mais la base ne semble pas être une base OSCommerce (clé %s non trouvée dans la table %s). OSCommerceTestOk=La connexion au serveur '%s' sur la base '%s' par l'utilisateur '%s' a réussi. OSCommerceTestKo1=La connexion au serveur '%s' a réussi mais la base de données '%s' n'a pas pu être atteinte. OSCommerceTestKo2=La connexion au serveur '%s' par l'utilisateur '%s' à échoué. ##### Stock ##### StockSetup=Configuration du module Stock / Entrepôt -IfYouUsePointOfSaleCheckModule=Si vous utilisez le module de point de vente (PDV) fourni par défaut ou un module externe, cette configuration peut être ignorée par votre module de PDV. La plupart des modules de PDV sont conçus par défaut pour créer une facture immédiatement et réduire le stock quelles que soient les options proposées. Donc, si vous avez besoin ou non d'une réduction de stock lors de l'enregistrement d'une vente depuis votre point de vente, vérifiez également la configuration de votre module de point de vente. +IfYouUsePointOfSaleCheckModule=Si vous utilisez un module Point de Vente (module POS fourni par défaut ou un autre module externe), cette configuration peut être ignoré par votre module point de vente. La plupart de modules Point de Vente sont conçus pour créer immédiatement une facture et de réduire les stocks par défaut quelles que soient les options ici. Donc, si vous avez besoin ou non d'avoir une diminution du stock lors de l'enregistrement d'une vente dans votre Point de Vente, vérifiez également la configuration de votre module POS. ##### Menu ##### MenuDeleted=Menu supprimé Menus=Menus @@ -1595,9 +1597,9 @@ AgendaSetup=Configuration du module actions et agenda PasswordTogetVCalExport=Clé pour autoriser le lien d'exportation PastDelayVCalExport=Ne pas exporter les événements de plus de AGENDA_USE_EVENT_TYPE=Utiliser les types d'événements (gérés dans le menu Configuration -> Dictionnaires -> Type d'événements de l'agenda) -AGENDA_USE_EVENT_TYPE_DEFAULT=Définir automatiquement cette valeur par défaut pour le type d'événement dans le formulaire de création d'événement -AGENDA_DEFAULT_FILTER_TYPE=Définir automatiquement ce type d'événement dans le filtre de recherche de la vue agenda -AGENDA_DEFAULT_FILTER_STATUS=Définir automatiquement cet état pour les événements dans le filtre de recherche de la vue agenda +AGENDA_USE_EVENT_TYPE_DEFAULT=Configurez automatiquement cette valeur par défaut pour le type d'événement dans le formulaire de création d'événement. +AGENDA_DEFAULT_FILTER_TYPE=Positionner automatiquement ce type d'événement dans le filtre de recherche de la vue agenda +AGENDA_DEFAULT_FILTER_STATUS=Positionner automatiquement ce statut d'événement dans le filtre de recherche de la vue agenda AGENDA_DEFAULT_VIEW=Quel onglet voulez-vous voir ouvrir par défaut quand on choisit le menu Agenda AGENDA_REMINDER_EMAIL=Activer le rappel d'événement par e-mail (l'option de rappel / délai peut être défini pour chaque événement). Remarque: Le module %s doit être activé et configuré correctement pour que le rappel soit envoyé à la bonne fréquence. AGENDA_REMINDER_BROWSER=Activer le rappel d'événement sur le navigateur de l'utilisateur (lorsque la date de l'événement est atteinte, chaque utilisateur peut le refuser à partir de la question de confirmation du navigateur) @@ -1609,18 +1611,18 @@ ClickToDialUrlDesc=URL appelée quand un clic sur l'icône téléphone est fait. ClickToDialDesc=Ce module permet de rendre les numéros de téléphone cliquables. Un clic sur cette icône appellera votre téléphone à composer le numéro de téléphone. Cela peut être utilisé pour appeler un système de centre d'appels de Dolibarr qui peut appeler le numéro de téléphone d'un système SIP, par exemple. ClickToDialUseTelLink=Utiliser un lien «Tel.» sur les numéros de téléphone ClickToDialUseTelLinkDesc=Utilisez cette méthode si vos utilisateurs ont un softphone ou une interface de logiciel installé sur un même ordinateur que le navigateur, et a appelé lorsque vous cliquez sur un lien dans votre navigateur qui commencent par "tel:". Si vous avez besoin d'une solution de serveur complet (pas besoin d'installation locale du logiciel), vous devez définir ceci à "Non" et remplir le champ suivant. -##### Point Of Sales (CashDesk) ##### -CashDesk=Caisse enregistreuse +##### Point Of Sale (CashDesk) ##### +CashDesk=Point de Vente CashDeskSetup=Configuration du module Point de vente/caisse enregistreuse CashDeskThirdPartyForSell=Tiers générique à utiliser par défaut pour les ventes CashDeskBankAccountForSell=Compte par défaut à utiliser pour l'encaissement en liquide CashDeskBankAccountForCheque= Compte par défaut à utiliser pour l'encaissement en chèque CashDeskBankAccountForCB= Compte par défaut à utiliser pour l'encaissement en carte de crédit -CashDeskDoNotDecreaseStock=Désactiver la réduction de stock lorsqu'une vente est effectuée à partir du point de vente (si "non", une réduction de stock est effectuée pour chaque vente effectuée à partir du point de vente, quelle que soit l'option définie dans le module Stock). +CashDeskDoNotDecreaseStock=Désactiver la réduction de stocks systématique lorsque une vente se fait à partir du Point de Vente (si «non», la réduction du stock est faite pour chaque vente faite depuis le POS, quelquesoit l'option de changement de stock définit dans le module Stock). CashDeskIdWareHouse=Forcer et restreindre l'emplacement/entrepôt à utiliser pour la réduction de stock -StockDecreaseForPointOfSaleDisabled=Diminution du stock du point de vente désactivé +StockDecreaseForPointOfSaleDisabled=Réduction de stock lors de l'utilisation du Point de Vente désactivée StockDecreaseForPointOfSaleDisabledbyBatch=La décrémentation de stock depuis ce module Point de Vente n'est pas encore compatible avec la gestion des numéros de lots/série. -CashDeskYouDidNotDisableStockDecease=Vous n'avez pas désactivé la réduction de stock lors d'une vente depuis le point de vente. Par conséquent, un entrepôt est nécessaire. +CashDeskYouDidNotDisableStockDecease=Vous n'avez pas désactivé la réduction de stock lors d'une vente depuis le Point de vente. Par conséquent, un entrepôt est nécessaire. ##### Bookmark ##### BookmarkSetup=Configuration du module Marque-pages BookmarkDesc=Ce module vous permet de gérer des liens et raccourcis. Il permet aussi d'ajouter n'importe quelle page de Dolibarr ou lien web dans le menu d'accès rapide sur la gauche. @@ -1706,12 +1708,12 @@ GoOntoContactCardToAddMore=Rendez-vous sur l'onglet "Notifications" d'un tiers p Threshold=Seuil BackupDumpWizard=Assistant de génération d'un fichier de sauvegarde de la base de données SomethingMakeInstallFromWebNotPossible=L'installation de module externe est impossible depuis l'interface web pour la raison suivante : -SomethingMakeInstallFromWebNotPossible2=Pour cette raison, le processus de mise à jour décrit ici est uniquement une série de manipulations que seul un utilisateur ayant des droits privilégiés peut faire +SomethingMakeInstallFromWebNotPossible2=Pour cette raison, le processus de mise à jour décrit ici est une processus manuel que seul un utilisateur ayant des droits privilégiés peut réaliser. InstallModuleFromWebHasBeenDisabledByFile=L'installation de module externe depuis l'application a été désactivé par l'administrator. Vous devez lui demander de supprimer le fichier %s pour permettre cette fonctionnalité. ConfFileMustContainCustom=Installer ou créer un module externe à partir de l'application nécessite de sauvegarder les fichiers du module dans le répertoire %s. Pour que ce répertoire soit reconnu par Dolibarr, vous devez paramétrer le fichier de configuration conf/conf.php en ajoutant les 2 lignes suivantes :
$dolibarr_main_url_root_alt='/custom'
$dolibarr_main_document_root_alt='%s/custom'; HighlightLinesOnMouseHover=Mettre en surbrillance les lignes de la table lorsque la souris passe au-dessus HighlightLinesColor=Couleur de la ligne de surbrillance lorsque la souris passe au-dessus (laisser vide pour ne pas mettre en surbrillance) -HighlightLinesChecked=Couleur de la ligne de surbrillance lorsque la souris passe au-dessus (laisser vide pour ne pas mettre en surbrillance) +HighlightLinesChecked=Couleur de la ligne cochée dans les listes (laisser vide pour ne pas mettre en surbrillance) TextTitleColor=Couleur du texte du titre de la page LinkColor=Couleur des liens PressF5AfterChangingThis=Appuyez sur la touche CTRL+F5 ou videz le cache de votre navigateur après avoir modifié cette valeur pour que le changement soit effectif @@ -1732,7 +1734,7 @@ ColorFormat=La couleur RVB au format HEX est, par exemple: FF0000 PositionIntoComboList=Position de la ligne dans des listes déroulantes SellTaxRate=Taux de TVA RecuperableOnly=Oui pour une TVA "Non Perçue mais Récupérable" dédiée à certains pays comme la France. Gardez la valeur à "Non" dans tous les autres cas. -UrlTrackingDesc=Si le fournisseur ou le service de transport offrent une page ou un site Web pour vérifier l'état de votre envoi, vous pouvez l'entrer ici. Vous pouvez utiliser la clé {TRACKID} dans les paramètres d'URL afin que le système la remplace par la valeur du numéro de suivi entré sur la fiche d'expédition. +UrlTrackingDesc=Si le fournisseur ou le service de transport offrent une page ou un site Web pour vérifier l'état de l'expédition, vous pouvez l'entrer ici. Vous pouvez utiliser la clé {TRACKID} dans les paramètres d'URL afin que le système la remplace par la valeur du numéro de suivi entré sur la fiche d'expédition. OpportunityPercent=Lorsque vous créez une opportunité, vous pouvez ďéfinir un montant estimatif de projet/affaire. Selon le statut de l'opportunité, ce montant peut être multiplié par ce taux pour évaluer le montant probable que vos opportunités sont susceptibles de générer. La valeur est un pourcentage (entre 0 et 100). TemplateForElement=Cet enregistrement modèle est dédié à quel élément TypeOfTemplate=Type de modèle @@ -1763,7 +1765,7 @@ TitleExampleForMajorRelease=Exemple de message que vous pouvez utiliser pour ann TitleExampleForMaintenanceRelease=Exemple de message que vous pouvez utiliser pour annonce une nouvelle version de maintenance (n'hésitez pas à l'utilisez pour vos propres news) ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s est disponible. La version %s est une version majeure avec de nouvelles fonctionnalités pour les utilisateurs et les développeurs. Vous pouvez la télécharger à partir de la zone de téléchargement du portail https://www.dolibarr.org (sous-répertoire "Versions stables"). Vous pouvez lire le ChangeLog pour la liste complète des changements. ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s est disponible. La version %s est une version de maintenance, aussi elle ne contient que des correctifs de bugs. Nous recommandons à toute personne utilisant une version plus ancienne de migrer vers celle-ci. En tant que version de maintenance, aucune nouvelle fonctionnalité n'est ajoutée, ni modification de format de données. Vous pouvez télécharger cette version à partir de la zone de téléchargement du portail https://www.dolibarr.org (sous-répertoire "Versions stables"). Vous pouvez lire le ChangeLog pour la liste complète des changements. -MultiPriceRuleDesc=Quand l'option « Plusieurs niveaux de prix par produit/service» est activée, vous pouvez définir différents prix (un par niveau de prix) pour chaque produits. Pour sauver du temps, vous pouvez entrer ici une règle pour avoir un prix pour chaque niveau calculé automatiquement. Cette page est ici pour sauver du temps et peut être utile si vos prix pour chaque niveaux sont relatif au premier niveau. Vous pouvez ignorer cette page dans la plupart des cas +MultiPriceRuleDesc=Quand l'option "Plusieurs niveaux de prix par produit/service" est activée, vous pouvez définir différents prix (un par niveau de prix) pour chaque produits. Pour gagner du temps, vous pouvez entrer ici une règle pour avoir un prix pour chaque niveau calculé automatiquement. Cette page est destiné à vous faire gagner du temps mais n'est utile que si vos prix pour chaque niveaux sont relatif au premier niveau. Vous pouvez ignorer cette page dans la plupart des cas. ModelModulesProduct=Modèles des documents de produits ToGenerateCodeDefineAutomaticRuleFirst=Pour pouvoir générer automatiquement des codes, vous devez d'abord définir un gestionnaire de numérotation pour définir automatiquement les numéros du code-barre. SeeSubstitutionVars=Voir * note pour la liste des variables de substitutions possibles @@ -1786,9 +1788,9 @@ AddOtherPagesOrServices=Ajout d'autres pages ou services AddModels=Ajout de modèles de document ou de numérotation AddSubstitutions=Ajout de valeurs de substitution DetectionNotPossible=Détection impossible -UrlToGetKeyToUseAPIs=Url pour que le jeton utilise l'API (une fois le jeton reçu, il est enregistré dans la table des utilisateurs de la base de données et doit être fourni à chaque appel d'API) +UrlToGetKeyToUseAPIs=Url pour obtenir le jeton pour utiliser l'API (une fois le jeton reçu, il est enregistré dans la table des utilisateurs de la base de données et doit être fourni à chaque appel d'API) ListOfAvailableAPIs=Liste des APIs disponibles -activateModuleDependNotSatisfied=Le module "%s" dépend du module "%s" manquant. Le module "%1$s" risque donc de ne pas fonctionner correctement. Veuillez installer le module "%2$s" ou désactiver le module "%1$s" si vous souhaitez être à l'abri de toute surprise. +activateModuleDependNotSatisfied=Le module "%s" dépend du module "%s" qui est manquant, aussi le module "%1$s" peut ne pas fonctionner correctement. Merci d'installer le module "%2$s" ou désactiver le module "%1$s" si vous ne souhaitez pas avoir de mauvaise surprise CommandIsNotInsideAllowedCommands=La commande que vous essayez d'exécuter ne figure pas dans la liste des commandes autorisées définies dans le paramètre $dolibarr_main_restrict_os_commands du fichier conf.php . LandingPage=Page cible SamePriceAlsoForSharedCompanies=Si vous utilisez un module multi-société, avec le choix «prix unique», le prix sera aussi le même pour toutes les sociétés si les produits sont partagés entre les environnements @@ -1805,12 +1807,12 @@ MAIN_PDF_MARGIN_TOP=Marge haute sur les PDF MAIN_PDF_MARGIN_BOTTOM=Marge bas sur les PDF NothingToSetup=Aucune configuration particulière n'est requise pour ce module. SetToYesIfGroupIsComputationOfOtherGroups=Réglez ceci sur Oui si ce groupe est un calcul d'autres groupes -EnterCalculationRuleIfPreviousFieldIsYes=Entrez la règle de calcul si le champ précédent était défini sur Oui (par exemple, 'CODEGRP1 + CODEGRP2') +EnterCalculationRuleIfPreviousFieldIsYes=Entrez la règle de calcul si le champ précédent a été défini sur Oui (par exemple, 'CODEGRP1 + CODEGRP2') SeveralLangugeVariatFound=Plusieurs variantes de langue trouvées COMPANY_AQUARIUM_REMOVE_SPECIAL=Supprimer les caractères spéciaux COMPANY_AQUARIUM_CLEAN_REGEX=Filtre Regex pour nettoyer la valeur (COMPANY_AQUARIUM_CLEAN_REGEX) GDPRContact=Responsable de la protection des données (DPO ou contact RGPD) -GDPRContactDesc=Si vous stockez des données sur des entreprises / citoyens européens, vous pouvez enregistrer ici le contact responsable du règlement général sur la protection des données. +GDPRContactDesc=Si vous stockez des données sur des entreprises / citoyens européens, vous pouvez stocker ici le contact responsable du RGPD. HelpOnTooltip=Texte d'aide à afficher dans l'info-bulle HelpOnTooltipDesc=Mettez du texte ou une clé de traduction ici pour que le texte apparaisse dans une info-bulle lorsque ce champ apparaît dans un formulaire YouCanDeleteFileOnServerWith=Vous pouvez supprimer ce fichier sur le serveur avec la ligne de commande:
%s @@ -1819,14 +1821,14 @@ SocialNetworkSetup=Configuration du module Réseaux Sociaux EnableFeatureFor=Activer les fonctionnalités pour %s VATIsUsedIsOff=Remarque: l'option d'utilisation de la taxe de vente ou de la TVA a été définie sur Désactivée dans le menu %s - %s, aussi la taxe de vente ou la TVA utilisée sera toujours égale à 0 pour les ventes. SwapSenderAndRecipientOnPDF=Échanger adresses expéditeurs et destinataires sur le PDF -FeatureSupportedOnTextFieldsOnly=Attention, fonctionnalité prise en charge sur les champs de texte uniquement +FeatureSupportedOnTextFieldsOnly=Attention, fonctionnalité prise en charge sur les champs de texte uniquement. De plus, un paramètre d'URL action=create ou action=edit doit être défini OU le nom de la page doit se terminer par 'new.php' pour déclencher cette fonctionnalité. EmailCollector=Collecteur de courrier électronique EmailCollectorDescription=Ajoute un travail planifié et une page de configuration pour analyser régulièrement les boîtes aux lettres (à l'aide du protocole IMAP) et enregistrer les courriers électroniques reçus dans votre application, au bon endroit et/ou créer automatiquement certains enregistrements (comme des opportunités). NewEmailCollector=Nouveau collecteur d'email EMailHost=Hôte du serveur de messagerie IMAP -MailboxSourceDirectory=Répertoire source dans la boîte aux lettres -MailboxTargetDirectory=Répertoire cible dans la boîte aux lettres -EmailcollectorOperations=Opérations à effectuer par le collectionneur +MailboxSourceDirectory=Répertoire source de la boîte aux lettres +MailboxTargetDirectory=Répertoire cible de la boîte aux lettres +EmailcollectorOperations=Opérations à effectuer par le collecteur CollectNow=Collecter maintenant DateLastResult=Date de dernière collecte LastResult=Dernier résultat @@ -1835,7 +1837,7 @@ EmailCollectorConfirmCollect=Voulez-vous exécuter la collecte pour ce collecteu NoNewEmailToProcess=Aucun nouvel email (correspondants aux filtres) à traiter NothingProcessed=Aucune action faite XEmailsDoneYActionsDone=%s e-mails qualifiés, %s e-mails traités avec succès (pour %s enregistrements/actions faites) par le collecteur -RecordEvent=Enregistrer événement émail +RecordEvent=Enregistrer événement email entrant CreateLeadAndThirdParty=Créer opportunité (et tiers si nécessaire) CodeLastResult=Code du résultat de la dernière collecte NbOfEmailsInInbox=Nombre de courriels dans le répertoire source @@ -1844,6 +1846,9 @@ LoadThirdPartyFromNameOrCreate=Charger le tiers à partir du nom (créer si non WithDolTrackingID=ID Tracker Dolibarr trouvé WithoutDolTrackingID=ID Tracker Dolibarr non trouvé FormatZip=Zip +MainMenuCode=Code d'entrée du menu (mainmenu) +ECMAutoTree=Afficher l'arborescence GED automatique +OperationParamDesc=Définissez les valeurs à utiliser pour l'action, ou comment extraire les valeurs. Par exemple:
VALUE:abc
REGEX:SUBJECT:([^\\s]*)
REGEX:BODY:Le nom de société est\\s([^\\s]*) ##### Resource #### ResourceSetup=Configuration du module Ressource UseSearchToSelectResource=Utilisez un champ avec auto-complétion pour choisir les ressources (plutôt qu'une liste déroulante). @@ -1852,3 +1857,5 @@ DisabledResourceLinkContact=Désactiver la fonctionnalité pour lier une ressour ConfirmUnactivation=Confirmer réinitialisation du module OnMobileOnly=Sur petit écran (smartphone) uniquement DisableProspectCustomerType=Désactiver le type de tiers "Prospect + Client" (le tiers doit donc être un client potentiel ou un client, mais ne peut pas être les deux) +MAIN_OPTIMIZEFORTEXTBROWSER=Simplifier l'interface pour les malvoyants +MAIN_OPTIMIZEFORTEXTBROWSERDesc=Activez cette option si vous êtes une personne malvoyante ou utilisez l'application à partir d'un navigateur de texte tel que Lynx ou Links. diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index c0a9d2c74b6..476298a9206 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -67,7 +67,7 @@ PaidBack=Remboursé DeletePayment=Supprimer le paiement ConfirmDeletePayment=Êtes-vous sûr de vouloir supprimer ce paiement ? ConfirmConvertToReduc=Voulez vous convertir ce(cet) %s en remise fixe ?
Le montant sera enregistré parmi les autres remises et pourra être utilisé en tant que remise sur une autre facture du client. -ConfirmConvertToReducSupplier=Souhaitez-vous convertir ce %s en une remise absolue?
Le montant sera sauvegardé parmi toutes les remises et pourra être utilisé comme remise pour une facture actuelle ou future de ce fournisseur. +ConfirmConvertToReducSupplier=Voulez vous convertir ce(cet) %s en remise fixe ?
Le montant sera enregistré parmi les autres remises et pourra être utilisé en tant que remise sur une autre facture courante ou future de ce fournisseur. SupplierPayments=Règlements fournisseurs ReceivedPayments=Règlements reçus ReceivedCustomersPayments=Règlements reçus du client @@ -92,7 +92,7 @@ PaymentAmount=Montant règlement ValidatePayment=Valider ce règlement PaymentHigherThanReminderToPay=Règlement supérieur au reste à payer HelpPaymentHigherThanReminderToPay=Attention, le montant de paiement pour une ou plusieurs factures est supérieur au reste à payer.
Corrigez votre saisie, sinon, confirmez et pensez à créer un avoir du trop perçu lors de la fermeture de chacune des factures surpayées. -HelpPaymentHigherThanReminderToPaySupplier=Attention, le montant du paiement d'une ou plusieurs factures est supérieur au montant restant à payer.
Modifiez votre entrée, sinon confirmez et envisagez de créer une note de crédit pour l'excédent payé pour chaque facture en trop. +HelpPaymentHigherThanReminderToPaySupplier=Attention, le montant de paiement pour une ou plusieurs factures est supérieur au reste à payer.
Corrigez votre saisie, sinon, confirmez et pensez à créer un avoir pour l'excédent pour chaque facture surpayée. ClassifyPaid=Classer 'Payée' ClassifyPaidPartially=Classer 'Payée partiellement' ClassifyCanceled=Classer 'Abandonnée' @@ -146,12 +146,12 @@ ErrorVATIntraNotConfigured=Numéro de TVA intracommunautaire non encore défini ErrorNoPaiementModeConfigured=Aucun mode de règlement défini par défaut. Allez corriger dans la configuration du module facture. ErrorCreateBankAccount=Créer un compte bancaire puis aller dans la configuration du module facture pour définir les modes de règlement ErrorBillNotFound=Facture %s inexistante -ErrorInvoiceAlreadyReplaced=Erreur, vous avez tenté de valider une facture pour remplacer la facture %s. Mais celle-ci a déjà été remplacée par la facture %s. +ErrorInvoiceAlreadyReplaced=Erreur, vous voulez valider une facture qui doit remplacer la facture %s. Mais cette dernière a déjà été remplacée par une autre facture %s. ErrorDiscountAlreadyUsed=Erreur, la remise a déjà été attribuée ErrorInvoiceAvoirMustBeNegative=Erreur, une facture de type Avoir doit avoir un montant négatif ErrorInvoiceOfThisTypeMustBePositive=Erreur, une facture de ce type doit avoir un montant positif ErrorCantCancelIfReplacementInvoiceNotValidated=Erreur, il n'est pas possible d'annuler une facture qui a été remplacée par une autre qui se trouve toujours à l'état 'brouillon'. -ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=Cette partie ou une autre est déjà utilisée et les séries d'escompte ne peuvent donc pas être supprimées. +ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=Cette partie ou une autre est déjà utilisé, aussi la remise ne peut être supprimée. BillFrom=Émetteur BillTo=Adressé à ActionsOnBill=Événements sur la facture @@ -180,7 +180,7 @@ ConfirmClassifyPaidBill=Êtes-vous sûr de vouloir classer la facture %s ConfirmCancelBill=Êtes-vous sûr de vouloir annuler la facture %s ? ConfirmCancelBillQuestion=Pour quelle raison voulez-vous classer la facture abandonnée ? ConfirmClassifyPaidPartially=Êtes-vous sûr de vouloir classer la facture %s comme payée ? -ConfirmClassifyPaidPartiallyQuestion=Cette facture n'a pas été payée complètement. Quelle est la raison pour la fermeture de cette facture? +ConfirmClassifyPaidPartiallyQuestion=Cette facture n'a pas été payée à hauteur du montant initial. Pour quelle raison voulez-vous la classer malgré tout ? ConfirmClassifyPaidPartiallyReasonAvoir=Le reste à payer (%s %s) est un trop facturé (car article retourné, oubli, escompte réalisé...), régularisé par un avoir ConfirmClassifyPaidPartiallyReasonDiscount=Le reste à payer (%s %s) est un escompte accordé parce que le paiement a été effectué avant terme. ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Le reste à payer (%s %s) est un escompte accordé après facture. J'accepte de perdre la TVA sur cet escompte @@ -189,11 +189,11 @@ ConfirmClassifyPaidPartiallyReasonBadCustomer=Mauvais payeur ConfirmClassifyPaidPartiallyReasonProductReturned=Produits en partie retournés ConfirmClassifyPaidPartiallyReasonOther=Créance abandonnée pour autre raison ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=Ce choix est possible si votre facture a été fournie avec les commentaires appropriés. (Exemple «Seule la taxe correspondant au prix effectivement payé donne droit à déduction») -ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=Dans certains pays, ce choix n'est possible que si votre facture contient des notes correctes. +ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=Ce choix est possible si votre facture était munie de la mention adéquate. (Exemple: mention définissant l'escompte ou du genre «seule la taxe correspondant au prix effectivement payé ouvre droit à déduction») ConfirmClassifyPaidPartiallyReasonAvoirDesc=Ce choix est le choix à prendre si les autres ne sont pas applicables ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=Un mauvais payeur est un client qui refuse de régler sa dette. ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=Ce choix sera celui choisi, dans le cas du paiement incomplet suite au retour d'une partie des produits -ConfirmClassifyPaidPartiallyReasonOtherDesc=Utilisez ce choix si tous les autres ne conviennent pas, par exemple dans les situations suivantes:
- paiement non effectué car certains produits ont été retournés
- montant réclamé trop important car une remise a été oubliée
Dans tous les cas, montant la sur-réclamation doit être corrigée dans le système comptable en créant une note de crédit. +ConfirmClassifyPaidPartiallyReasonOtherDesc=Ce choix sera celui choisi dans tout autre cas, par exemple, dans les cas suivants:
- paiement partiel car une partie des produits a été retourné.
- trop réclamé suite à oubli d'une remise
Dans tous les cas, le trop réclamé doit être régularisé en compta et envers le client par un avoir. ConfirmClassifyAbandonReasonOther=Autre ConfirmClassifyAbandonReasonOtherDesc=Ce choix sera celui choisi dans tout autre cas. Par exemple suite à l'intention de créer une facture de remplacement. ConfirmCustomerPayment=Confirmez-vous la saisie de ce règlement de %s %s ? @@ -327,8 +327,8 @@ DescTaxAndDividendsArea=Cet écran résume la liste de toutes les paiements réa NbOfPayments=Nb de paiements SplitDiscount=Scinder réduction en deux ConfirmSplitDiscount=Êtes-vous sûr de vouloir scinder la réduction de %s %s en 2 réductions plus petites ? -TypeAmountOfEachNewDiscount=Quantité d'entrée pour chacune des deux parties: -TotalOfTwoDiscountMustEqualsOriginal=Le total de deux nouvelles remises doit être égal au montant de la remise initiale. +TypeAmountOfEachNewDiscount=Saisissez le montant de chacune des deux parts : +TotalOfTwoDiscountMustEqualsOriginal=La somme du montant des 2 nouvelles réductions doit être équivalente au montant de la réduction à scinder. ConfirmRemoveDiscount=Êtes-vous sûr de vouloir supprimer cette réduction ? RelatedBill=Facture associée RelatedBills=Factures associées @@ -478,16 +478,16 @@ CantRemovePaymentWithOneInvoicePaid=Suppression impossible quand il existe au mo ExpectedToPay=Paiement attendu CantRemoveConciliatedPayment=Suppression d'un paiement rapproché impossible PayedByThisPayment=Règlé par ce paiement -ClosePaidInvoicesAutomatically=Classer «payées» toutes les factures standard, les acomptes ou les factures de remplacement entièrement payées +ClosePaidInvoicesAutomatically=Classifiez "Payée" toutes les factures standard, d'acompte ou de remplacement entièrement payées. ClosePaidCreditNotesAutomatically=Classer automatiquement à "Payé" les factures avoirs entièrement remboursées. ClosePaidContributionsAutomatically=Classer "payé" toutes les contributions sociales ou fiscales payées entièrement. -AllCompletelyPayedInvoiceWillBeClosed=Toutes les factures sans reste à payer seront automatiquement clôturées avec le statut "Payée". +AllCompletelyPayedInvoiceWillBeClosed=Toutes les factures avec un reste à payer nul seront automatiquement fermées au statut "Payé". ToMakePayment=Payer ToMakePaymentBack=Rembourser ListOfYourUnpaidInvoices=Liste des factures impayées NoteListOfYourUnpaidInvoices=Remarque: Cette liste ne contient que les factures des Tiers pour lesquels vous êtes le commercial affecté. RevenueStamp=Timbre fiscal -YouMustCreateInvoiceFromThird=Cette option est uniquement disponible lors de la création de factures à partir de l'onglet "client" d'un tiers +YouMustCreateInvoiceFromThird=Cette option est disponible uniquement lors de la création de factures depuis l'onglet "client" du tiers YouMustCreateInvoiceFromSupplierThird=Cette option est disponible uniquement lors de la création d'une facture depuis l'onglet "fournisseur" d'un tiers YouMustCreateStandardInvoiceFirstDesc=Pour créer une facture modèle, vous devez d'abord créer une facture standard brouillon et la convertir en modèle. PDFCrabeDescription=Modèle de facture PDF complet (modèle recommandé par défaut) diff --git a/htdocs/langs/fr_FR/blockedlog.lang b/htdocs/langs/fr_FR/blockedlog.lang index ae0b630096d..104f7ba280e 100644 --- a/htdocs/langs/fr_FR/blockedlog.lang +++ b/htdocs/langs/fr_FR/blockedlog.lang @@ -2,13 +2,13 @@ BlockedLog=Journaux Inaltérables Field=Champ BlockedLogDesc=Ce module retrace certains événements dans un journal immuable (que vous ne pouvez pas modifier une fois enregistré) dans une chaîne de blocs, en temps réel. Ce module assure la compatibilité avec les exigences des lois de certains pays (comme la France avec la loi Finance 2016 - Norme NF535). Fingerprints=Événements et empreintes archivés -FingerprintsDesc=C'est l'outil pour parcourir ou extraire les logs inaltérables. Les journaux inaltérables sont générés et archivés localement dans une table dédiée, en temps réel lorsque vous enregistrez une action dans dolibarr. Vous pouvez utiliser cet outil pour exporter cette archive et l'enregistrer sur un support externe (certains pays, comme la France, vous demandent de le faire chaque année). Notez qu'il n'y a pas de fonction pour purger ce journal et chaque changement essayé d'être fait directement dans ce journal (par un hacker par exemple) sera rapporté avec une empreinte non valide. Si vous avez vraiment besoin de purger cette table parce que vous avez utilisé votre application à des fins de démonstration/test et que vous voulez nettoyer vos données pour démarrer votre production, vous pouvez demander à votre revendeur ou intégrateur de réinitialiser votre base de données (toutes vos données seront supprimées).\n +FingerprintsDesc=C'est l'outil pour parcourir ou extraire les logs inaltérables. Les journaux inaltérables sont générés et archivés localement dans une table dédiée, en temps réel lorsque vous enregistrez une action dans dolibarr. Vous pouvez utiliser cet outil pour exporter cette archive et l'enregistrer sur un support externe (certains pays, comme la France, vous demandent de le faire chaque année). Notez qu'il n'y a pas de fonction pour purger ce journal et chaque changement effectué directement dans ce journal (par un pirate informatique par exemple) sera reporté avec une empreinte non valide. Si vous avez vraiment besoin de purger cette table parce que vous avez utilisé votre application à des fins de démonstration/test et que vous voulez nettoyer vos données pour démarrer votre production, vous pouvez demander à votre revendeur ou intégrateur de réinitialiser votre base de données (toutes vos données seront supprimées). CompanyInitialKey=Clé initiale de la société (hachage du bloc de genèse) BrowseBlockedLog=Logs inaltérables ShowAllFingerPrintsMightBeTooLong=Afficher tous les journaux archivés (peut être long) -ShowAllFingerPrintsErrorsMightBeTooLong=Afficher tous les logs d'archives non valides (peut être long) +ShowAllFingerPrintsErrorsMightBeTooLong=Afficher tous les journaux d'archives non valides (peut être long) DownloadBlockChain=Télécharger les empreintes -KoCheckFingerprintValidity=Le journal archivé n'est pas valide. Cela signifie que quelqu'un (un pirate informatique?) A modifié certaines données de ce journal archivé après son enregistrement ou a effacé l'enregistrement archivé précédent (vérifiez que la ligne avec le # précédent existe). +KoCheckFingerprintValidity=Le journal archivé n'est pas valide. Cela signifie que quelqu'un (un pirate informatique ?) A modifié certaines données de ce journal archivé après son enregistrement ou a effacé l'enregistrement archivé précédent (vérifiez que la ligne avec le # précédent existe). OkCheckFingerprintValidity=Le journal archivé est valide. Cela signifie que toutes les données de cette ligne n'ont pas été modifiées et l'enregistrement suit la précédente. OkCheckFingerprintValidityButChainIsKo=Le journal archivé semble valide par rapport au précédent mais la chaîne était corrompue auparavant. AddedByAuthority=Stocké dans une autorité distante @@ -20,24 +20,24 @@ logPAYMENT_VARIOUS_DELETE=Suppression logique du paiement (non affecté à la fa logPAYMENT_ADD_TO_BANK=Paiement ajouté à la banque logPAYMENT_CUSTOMER_CREATE=Paiement client créé logPAYMENT_CUSTOMER_DELETE=Suppression logique du paiement client -logDONATION_PAYMENT_CREATE=Paiement de donation créé -logDONATION_PAYMENT_DELETE=Suppression logique du paiement des dons +logDONATION_PAYMENT_CREATE=Paiement don créé +logDONATION_PAYMENT_DELETE=Suppression logique du paiement d'un don logBILL_PAYED=Facture client payée logBILL_UNPAYED=Facture client impayée logBILL_VALIDATE=Facture client validée logBILL_SENTBYMAIL=Facture client envoyée par mail -logBILL_DELETE=Facture client supprimée logiquement +logBILL_DELETE=Suppression logique de la facture client logMODULE_RESET=Le module BlockedLog a été désactivé logMODULE_SET=Le module BlockedLog a été activé logDON_VALIDATE=Don validé logDON_MODIFY=Don modifié -logDON_DELETE=Don logique suppression +logDON_DELETE=Suppression logique du don logMEMBER_SUBSCRIPTION_CREATE=Cotisation adhérent créée logMEMBER_SUBSCRIPTION_MODIFY=Cotisation adhérent modifiée -logMEMBER_SUBSCRIPTION_DELETE=Suppression logique d'abonnement de membre +logMEMBER_SUBSCRIPTION_DELETE=Suppression logique de la cotisation d'un adhérent BlockedLogBillDownload=Téléchargement facture client BlockedLogBillPreview=Aperçu facture client -BlockedlogInfoDialog=Détail du log +BlockedlogInfoDialog=Détail du journal ListOfTrackedEvents=Liste des actions suivies Fingerprint=Empreinte DownloadLogCSV=Exporter les journaux archivés (CSV) diff --git a/htdocs/langs/fr_FR/commercial.lang b/htdocs/langs/fr_FR/commercial.lang index 8619101a5f4..1c7ab2d13e8 100644 --- a/htdocs/langs/fr_FR/commercial.lang +++ b/htdocs/langs/fr_FR/commercial.lang @@ -73,8 +73,8 @@ StatusProsp=Status prospection DraftPropals=Propositions brouillons NoLimit=Pas de limite ToOfferALinkForOnlineSignature=Lien pour signature en ligne -WelcomeOnOnlineSignaturePage=Bienvenue sur la page pour accepter les propositions commerciales de%s -ThisScreenAllowsYouToSignDocFrom=Cet écran vous permet d'accepter et signer ou de refuser le devis ou la proposition commerciale -ThisIsInformationOnDocumentToSign=Ceci est une information sur le document à accepter ou à refuser +WelcomeOnOnlineSignaturePage=Bienvenue sur la page pour accepter les propositions commerciales de %s +ThisScreenAllowsYouToSignDocFrom=Cet écran vous permet d'accepter et signer en ligne, ou de refuser, le devis ou la proposition commerciale +ThisIsInformationOnDocumentToSign=Voici les informations sur le document à accepter ou refuser SignatureProposalRef=Signature du devis ou proposition commerciale %s FeatureOnlineSignDisabled=Fonctionnalité pour la signature en ligne désactivée ou document généré avant l'activation de la fonctionnalité diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index f062be18a66..7a423b0b007 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -77,7 +77,7 @@ Web=Web Poste= Poste DefaultLang=Langue par défaut VATIsUsed=Assujetti à la TVA -VATIsUsedWhenSelling=Cela définit si ce tiers inclut une taxe de vente ou non lorsqu'il facture une facture à ses propres clients. +VATIsUsedWhenSelling=Ceci définit si un tiers inclut une taxe de vente ou non lorsqu'il fait une facture à ses propres clients VATIsNotUsed=Non assujetti à la TVA CopyAddressFromSoc=Remplir avec l'adresse du tiers ThirdpartyNotCustomerNotSupplierSoNoRef=Tiers ni client ni fournisseur, pas d'objets référents disponibles diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index e7f50ef2a2a..c2edf5dc3f9 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -142,7 +142,7 @@ CalcModeVATDebt=Mode %sTVA sur débit%s. CalcModeVATEngagement=Mode %sTVA sur encaissement%s. CalcModeDebt=Analyse des factures enregistrées connues même si elles ne sont pas encore comptabilisées dans le Grand Livre. CalcModeEngagement=Analyse des paiements enregistrés connus, même s'ils ne sont pas encore comptabilisés dans le Grand Livre. -CalcModeBookkeeping=Analyse des données journalisées dans le tableau Grand livre. +CalcModeBookkeeping=Analyse des données journalisées dans le Grand livre. CalcModeLT1= Mode %sRE sur factures clients - factures fournisseurs%s CalcModeLT1Debt=Mode %sRE sur factures clients%s CalcModeLT1Rec= Mode %sRE sur factures fournisseurs%s @@ -229,11 +229,11 @@ ACCOUNTING_VAT_SOLD_ACCOUNT=Compte comptable par défaut pour la TVA - TVA sur l ACCOUNTING_VAT_BUY_ACCOUNT=Compte comptable par défaut pour la TVA - TVA sur les achats (utilisé si non défini au niveau de la configuration du dictionnaire de TVA) ACCOUNTING_VAT_PAY_ACCOUNT=Compte comptable par défaut pour le paiement de la TVA ACCOUNTING_ACCOUNT_CUSTOMER=Compte comptable utilisé pour le tiers client -ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Le compte de comptabilité dédié défini sur la carte tierce sera utilisé pour la comptabilité Subledger uniquement. Celui-ci sera utilisé pour le grand livre et comme valeur par défaut de la comptabilité Subledger si le compte de comptabilité client dédié sur une tierce partie n'est pas défini. +ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Le compte comptable dédié défini sur la fiche tiers sera utilisé pour l'affectation du compte auxiliaire uniquement. Celui-ci sera utilisé pour la comptabilité générale et comme valeur par défaut de la comptabilité auxiliaire si le compte comptable client dédié du ties n'est pas défini. ACCOUNTING_ACCOUNT_SUPPLIER=Compte comptable utilisé pour les tiers fournisseur -ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Le compte de comptabilité dédié défini sur la carte tierce sera utilisé pour la comptabilité Subledger uniquement. Celui-ci sera utilisé pour le grand livre et comme valeur par défaut de la comptabilité Subledger si le compte de comptabilité fournisseur dédié sur une tierce partie n'est pas défini. +ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Le compte de comptabilité dédié défini sur la fiche Tiers sera utilisé pour la comptabilité auxiliaire uniquement. Celui-ci sera utilisé pour le grand livre et comme valeur par défaut de la comptabilité auxiliaire si le compte de comptabilité fournisseur dédié au tiers n'est pas défini. CloneTax=Cloner une charge sociale/fiscale -ConfirmCloneTax=Confirmer le clone d'un impôt social / fiscal +ConfirmCloneTax=Confirmer le clonage de la charge sociale/fiscale CloneTaxForNextMonth=Cloner pour le mois suivant SimpleReport=Rapport simple AddExtraReport=Rapports complémentaires (Ajouter le rapport client local et international) @@ -248,7 +248,7 @@ ErrorBankAccountNotFound=Erreur: compte banque non trouvé FiscalPeriod=Période fiscale ListSocialContributionAssociatedProject=Liste des charges sociales liées au projet DeleteFromCat=Supprimer du groupe comptable -AccountingAffectation=Affectation comptable +AccountingAffectation=Compte affecté LastDayTaxIsRelatedTo=Dernier jour de la période pour laquelle la taxe est due VATDue=TVA réclamée ClaimedForThisPeriod=Réclamé pour la période diff --git a/htdocs/langs/fr_FR/deliveries.lang b/htdocs/langs/fr_FR/deliveries.lang index bbe5962af24..ff244a08917 100644 --- a/htdocs/langs/fr_FR/deliveries.lang +++ b/htdocs/langs/fr_FR/deliveries.lang @@ -28,3 +28,4 @@ ErrorStockIsNotEnough=Le stock est insuffisant Shippable=Expédiable NonShippable=Non expédiable ShowReceiving=Afficher le bon de réception +NonExistentOrder=Commande inexistante diff --git a/htdocs/langs/fr_FR/donations.lang b/htdocs/langs/fr_FR/donations.lang index 73f9a0b3512..e033bcf623b 100644 --- a/htdocs/langs/fr_FR/donations.lang +++ b/htdocs/langs/fr_FR/donations.lang @@ -31,4 +31,4 @@ DONATION_ART200=Afficher article 200 du CGI si vous êtes concernés DONATION_ART238=Afficher article 238 du CGI si vous êtes concernés DONATION_ART885=Afficher article 885 du CGI si vous êtes concernés DonationPayment=Paiement du don -DonationValidated=Donation %s validated +DonationValidated=Don %s validé diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index c33fad420ec..4083c510642 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -42,7 +42,7 @@ ErrorBadDateFormat=La valeur '%s' a un format de date non reconnu ErrorWrongDate=La date est incorrecte ErrorFailedToWriteInDir=Impossible d'écrire dans le répertoire %s ErrorFoundBadEmailInFile=Syntaxe d'email incorrecte trouvée pour %s lignes dans le fichier (exemple ligne %s avec email=%s) -ErrorUserCannotBeDelete=L'utilisateur ne peut pas être supprimé. Peut-être est-il associé à des entités Dolibarr. +ErrorUserCannotBeDelete=L'utilisateur ne peut pas être supprimé. Peut-être est-il associé à des éléments de Dolibarr. ErrorFieldsRequired=Des champs obligatoires n'ont pas été renseignés ErrorSubjectIsRequired=Le sujet du mail est obligatoire ErrorFailedToCreateDir=Echec à la création d'un répertoire. Vérifiez que le user du serveur Web ait bien les droits d'écriture dans les répertoires documents de Dolibarr. Si le paramètre safe_mode a été activé sur ce PHP, vérifiez que les fichiers php dolibarr appartiennent à l'utilisateur du serveur Web. @@ -77,7 +77,7 @@ ErrorRefAlreadyExists=La référence utilisée pour la création existe déjà ErrorPleaseTypeBankTransactionReportName=Choisissez le nom du relevé bancaire sur lequel la ligne est rapportées (Format AAAAMM ou AAAAMMJJ) ErrorRecordHasChildren=Impossible de supprimer l'enregistrement car il possède des enregistrements fils. ErrorRecordHasAtLeastOneChildOfType=L'objet a au moins un enfant de type %s -ErrorRecordIsUsedCantDelete=Impossible de supprimer l'enregistrement. Il est déjà utilisé ou inclus dans un autre objet. +ErrorRecordIsUsedCantDelete=Ne peut effacer l'enregistrement. Ce dernier est déjà utilisé ou inclut dans un autre élément. ErrorModuleRequireJavascript=Le javascript ne doit pas être désactivé pour que cette fonctionnalité soit utilisable. Pour activer/désactiver l'utilisation de javascript, allez dans le menu Accueil->Configuration->Affichage. ErrorPasswordsMustMatch=Les 2 mots de passe saisis doivent correspondre ErrorContactEMail=Une erreur technique est apparue. Merci de contacter l'administrateur à l'email suivant %s en lui indiquant le code erreur %s dans votre message ou mieux en fournissant une copie d'écran de cette page. @@ -141,7 +141,7 @@ ErrorBadFormat=Mauvais format ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Erreur, cet adhérent n'ait pas encore lié à un tiers. Lier le tier à un tiers existant ou créer un nouveau tiers avant de créer une adhésion avec facture. ErrorThereIsSomeDeliveries=Erreur, il y a des bordereaux de réception liées à ces expéditions. La suppression est refusée. ErrorCantDeletePaymentReconciliated=Impossible d'effacer un paiement qui a généré une écriture sur le compte bancaire et qui a été rapprochée. -ErrorCantDeletePaymentSharedWithPayedInvoice=Impossible de supprimer un paiement partagé par au moins une facture avec le statut Payé +ErrorCantDeletePaymentSharedWithPayedInvoice=Impossible d'effacer un paiement qui porte sur au moins une facture qui est à l'état payée. ErrorPriceExpression1=Ne peut assigner la constante '%s' ErrorPriceExpression2=Ne peut redéfinir la fonction '%s' ErrorPriceExpression3=Variable '%s' non définie dans la définition de fonction @@ -150,7 +150,7 @@ ErrorPriceExpression5=Unexpected '%s' ErrorPriceExpression6=Nombre incorrect d'arguments (%s donné,%s attendu) ErrorPriceExpression8=Operateur '%s' non attendu ErrorPriceExpression9=Une erreur inattendue s'est produite -ErrorPriceExpression10=L'opérateur '%s' manque d'opérande +ErrorPriceExpression10=Il manque l'opérande à l'opérateur '%s' ErrorPriceExpression11=Attendu '%s' ErrorPriceExpression14=Division par zéro ErrorPriceExpression17=Variable '%s' non définie @@ -221,9 +221,9 @@ WarningBookmarkAlreadyExists=Un marque-page avec ce titre ou cette destination ( WarningPassIsEmpty=Attention, le mot de passe de la base de données Dolibarr est vide. Cela représente une faille de sécurité. Il est recommandé d'ajouter manuellement un mot de passe à la base et de modifier le fichier conf.php pour refléter ce changement. WarningConfFileMustBeReadOnly=Attention, votre fichier de configuration (htdocs/conf/conf.php) est accessible en écriture au serveur Web. Ceci représente une faille sérieuse de sécurité. Modifiez les permissions pour qu'il soit en lecture seule pour le compte sous lequel tourne le serveur Web et non lisible pour les autres.
Si vous êtes sous Windows sur un disque dur utilisant un formatage FAT, sachez que ce système de fichier ne permet pas de protéger des fichiers et n'offre donc aucune solution pour réduire les risques de manipulation de ce fichier. WarningsOnXLines=Alertes sur %s enregistrement(s) source -WarningNoDocumentModelActivated=Aucun modèle, pour la génération de document, n'a été activé. Un modèle sera choisi par défaut jusqu'à ce que vous vérifiiez la configuration de votre module. +WarningNoDocumentModelActivated=Aucun modèle, pour la génération de document, n'a été activé. Un modèle sera pris par défaut en attendant la correction de configuration du module. WarningLockFileDoesNotExists=Attention, une fois l'installation terminée, les outils d'installation/migration doivent être désactivés en ajoutant un fichier install.lock dans le répertoire %s. L'absence de ce fichier représente une faille de sécurité. -WarningUntilDirRemoved=Tous les avertissements de sécurité (visibles uniquement par les administrateurs) resteront actifs tant que la vulnérabilité sera présente (ou que la constante MAIN_REMOVE_INSTALL_WARNING sera ajoutée dans Setup -> Other Setup). +WarningUntilDirRemoved=Les alertes de sécurité sont visibles par les administrateurs uniquement et resteront actives tant que la vulnérabilité sera avérée (ou que la constante MAIN_REMOVE_INSTALL_WARNING aura été définie dans Configuration->Divers) WarningCloseAlways=Attention, la fermeture se fait même lorsque le montant diffère. N'activez cette fonctionnalité qu'en connaissance de cause. WarningUsingThisBoxSlowDown=Attention, l'utilisation de cette boîte provoque de sérieux ralentissements des pages affichant cette boîte. WarningClickToDialUserSetupNotComplete=La configuration ClickToDial pour votre compte utilisateur n'est pas complète (voir l'onglet ClickToDial sur votre fiche utilisateur) diff --git a/htdocs/langs/fr_FR/exports.lang b/htdocs/langs/fr_FR/exports.lang index 0f661882f03..0abd35e87cc 100644 --- a/htdocs/langs/fr_FR/exports.lang +++ b/htdocs/langs/fr_FR/exports.lang @@ -101,7 +101,7 @@ ExampleAnyRefFoundIntoElement=Toute réf. trouvée pour les éléments %s ExampleAnyCodeOrIdFoundIntoDictionary=Tout code (ou id) trouvée dans le dictionnaire %s CSVFormatDesc=Fichier au format Comma Separated Value (.csv).
C'est un fichier au format texte dans lequel les champs sont séparés par le caractère [ %s ]. Si le séparateur est trouvé dans le contenu d'un champ, le champ doit être entouré du caractère [ %s ]. Le caractère d'échappement pour inclure un caractère de contour dans une donnée est [ %s ]. Excel95FormatDesc=Format de fichier Excel (.xls).
Format Excel 95 (BIFF5). -Excel2007FormatDesc=Format de fichier Excel (.xls).
Format standard Excel 2007 (SpreadsheetML). +Excel2007FormatDesc=Format de fichier Excel (.xlsx).
Format standard Excel 2007 (SpreadsheetML). TsvFormatDesc=Format de fichier à Valeurs Séparées par des Tabulations (.tsv).
C'est un fichier texte dont les champs sont séparés par des tabulations [tab]. ExportFieldAutomaticallyAdded=Le champ %s a été ajouté automatiquement car il évitera que des lignes identiques ne soient considérées comme des doublons (avec ce champ, aucune ligne ne sera identique mais aura un identifiant propre). CsvOptions=Options du fichier CSV diff --git a/htdocs/langs/fr_FR/holiday.lang b/htdocs/langs/fr_FR/holiday.lang index 2799105a3e8..1f10cb4b707 100644 --- a/htdocs/langs/fr_FR/holiday.lang +++ b/htdocs/langs/fr_FR/holiday.lang @@ -4,7 +4,7 @@ Holidays=Congés CPTitreMenu=Congés MenuReportMonth=État mensuel MenuAddCP=Créer demande de congés -NotActiveModCP=Vous devez activer le module Laisser pour voir cette page. +NotActiveModCP=Vous devez activer le module Congés pour afficher cette page. AddCP=Créer une demande de congés DateDebCP=Date Début DateFinCP=Date Fin @@ -20,7 +20,7 @@ LeaveId=ID demande de congès ReviewedByCP=Sera approuvé par UserForApprovalID=ID de l'utilisateur d'approbation UserForApprovalFirstname=Prénom de l'utilisateur d'approbation -UserForApprovalLastname=Nom d'utilisateur d'approbation +UserForApprovalLastname=Nom de l'utilisateur d'approbation UserForApprovalLogin=Login de l'utilisateur d'approbation DescCP=Description SendRequestCP=Créer une demande de congés diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang index d54e0034bc1..ba7dd44fcb7 100644 --- a/htdocs/langs/fr_FR/install.lang +++ b/htdocs/langs/fr_FR/install.lang @@ -16,11 +16,11 @@ PHPSupportCurl=PHP supporte l'extension Curl PHPSupportUTF8=Ce PHP prend en charge les fonctions UTF8. PHPMemoryOK=Votre mémoire maximum de session PHP est définie à %s. Ceci devrait être suffisant. PHPMemoryTooLow=Votre mémoire maximum de session PHP est définie à %s octets. Ceci est trop faible. Il est recommandé de modifier le paramètre memory_limit de votre fichier php.ini à au moins %s octets. -Recheck=Cliquez ici pour un test plus détaillé +Recheck=Cliquez ici pour un test plus probant ErrorPHPDoesNotSupportSessions=Votre installation PHP ne supporte pas les sessions. Cette fonctionnalité est nécessaire pour permettre à Dolibarr de fonctionner. Vérifiez votre configuration PHP et les autorisations du répertoire des sessions. ErrorPHPDoesNotSupportGD=Votre installation PHP ne supporte pas les fonctions graphiques GD. Aucun graphique ne sera disponible. ErrorPHPDoesNotSupportCurl=Votre version de PHP ne supporte pas l'extension Curl -ErrorPHPDoesNotSupportUTF8=Votre installation de PHP ne supporte pas les fonctions UTF8. Dolibarr ne peut pas fonctionner correctement. Résolvez ce problème avant d'installer Dolibarr. +ErrorPHPDoesNotSupportUTF8=Ce PHP ne prend pas en charge les fonctions UTF8. Résolvez le problème avant d'installer Dolibarr car il ne pourra pas fonctionner correctement. ErrorDirDoesNotExists=Le répertoire %s n'existe pas ou n'est pas accessible. ErrorGoBackAndCorrectParameters=Revenez en arrière et vérifiez / corrigez les paramètres. ErrorWrongValueForParameter=Vous avez peut-être saisi une mauvaise valeur pour le paramètre '%s'. @@ -30,9 +30,9 @@ ErrorDatabaseVersionTooLow=Version de base de donnée (%s) trop ancienne. La ver ErrorPHPVersionTooLow=Version de PHP trop ancienne. La version %s est requise. ErrorConnectedButDatabaseNotFound=Connexion au serveur réussie mais base '%s' introuvable. ErrorDatabaseAlreadyExists=La base de données '%s' existe déjà. -IfDatabaseNotExistsGoBackAndUncheckCreate=Si la base de données n'existe pas, revenez en arrière et cochez l'option "Créer une base de données". +IfDatabaseNotExistsGoBackAndUncheckCreate=Si la base n'existe pas, revenez en arrière et cochez l'option "Créer la base de données". IfDatabaseExistsGoBackAndCheckCreate=Si la base existe déjà, revenez en arrière et désactiver l'option "Créer la base de données". -WarningBrowserTooOld=La version du navigateur est trop ancienne. La mise à niveau de votre navigateur vers une version récente de Firefox, Chrome ou Opera est vivement recommandée. +WarningBrowserTooOld=Version du navigateur trop ancienne. Nous vous recommandons de mettre à jour vers une version récente de Firefox, Chrome ou Opera. PHPVersion=Version de PHP License=Licence d'utilisation ConfigurationFile=Fichier de configuration @@ -45,23 +45,23 @@ DolibarrDatabase=Base de données Dolibarr DatabaseType=Type de la base de données DriverType=Type du pilote Server=Serveur -ServerAddressDescription=Nom ou adresse IP du serveur de base de données. Habituellement, "hôte local" lorsque le serveur de base de données est hébergé sur le même serveur que le serveur Web. +ServerAddressDescription=Nom ou adresse IP du serveur de base de données, généralement 'localhost' quand le serveur est installé sur la même machine que le serveur web ServerPortDescription=Port du serveur. Ne rien mettre si inconnu. DatabaseServer=Serveur de base de données DatabaseName=Nom de la base de données -DatabasePrefix=Préfixe de table de base de données +DatabasePrefix=Préfixe des tables DatabasePrefixDescription=Préfixe de table de base de données. Si vide, la valeur par défaut est llx_. -AdminLogin=Compte utilisateur du propriétaire de la base de données Dolibarr. -PasswordAgain=Confirmer la confirmation du mot de passe +AdminLogin=Identifiant du propriétaire de la base de données Dolibarr. +PasswordAgain=Vérification du mot de passe AdminPassword=Mot de passe du propriétaire de la base de données Dolibarr. CreateDatabase=Créer la base de données -CreateUser=Créer un compte utilisateur ou accorder une autorisation de compte utilisateur sur la base de données Dolibarr +CreateUser=Créer le propriétaire ou lui affecter les droits à la base DatabaseSuperUserAccess=Serveur de base de données - Accès super utilisateur -CheckToCreateDatabase=Check the box if the database does not exist yet and so must be created.
In this case, you must also fill in the user name and password for the superuser account at the bottom of this page. +CheckToCreateDatabase=Cochez cette option si la base de données n'existe pas et doit être créée.
Dans ce cas, il faut renseigner identifiant et mot de passe du super-utilisateur au bas de cette page. CheckToCreateUser=Cochez la case si: le compte d'utilisateur de la base de données n'existe pas encore et doit donc être créé, ou si le compte d'utilisateur existe mais que la base de données n'existe pas et que les autorisations doivent être accordées.
Dans ce cas, vous devez entrer le compte d'utilisateur et le mot de passe et aussi le nom et le mot de passe du compte superutilisateur au bas de cette page. Si cette case est décochée, le propriétaire de la base de données et le mot de passe doivent déjà exister. -DatabaseRootLoginDescription=Nom du compte superutilisateur (pour créer de nouvelles bases de données ou de nouveaux utilisateurs), obligatoire si la base de données ou son propriétaire n'existe pas déjà. +DatabaseRootLoginDescription=Identifiant de l'utilisateur de la base ayant les droits de création de bases de données ou de comptes pour la base, requis si la base ou son propriétaire n'existent pas déjà et doivent être créés. KeepEmptyIfNoPassword=Laisser vide si le superutilisateur n'a pas de mot de passe (NON recommandé) -SaveConfigurationFile=Enregistrement des paramètres dans +SaveConfigurationFile=Enregistrement du fichier de configuration ServerConnection=Connexion au serveur DatabaseCreation=Création de la base de données CreateDatabaseObjects=Création des objets de la base @@ -72,7 +72,7 @@ CreateOtherKeysForTable=Création des clés étrangères et des index pour la ta OtherKeysCreation=Création des clés étrangères et des index FunctionsCreation=Création des fonctions AdminAccountCreation=Création du compte administrateur -PleaseTypePassword=Veuillez saisir un mot de passe, les mots de passe vides ne sont pas autorisés! +PleaseTypePassword=Veuillez saisir un mot de passe, les mots de passe vides ne sont pas acceptés ! PleaseTypeALogin=Veuillez taper un identifiant! PasswordsMismatch=Les mots de passe diffèrent, veuillez réessayer! SetupEnd=Fin de l'installation @@ -82,29 +82,29 @@ YouNeedToPersonalizeSetup=Vous devez maintenant configurer Dolibarr selon vos be AdminLoginCreatedSuccessfuly=Création du compte administrateur Dolibarr '%s' réussie. GoToDolibarr=Accéder à Dolibarr GoToSetupArea=Accéder à Dolibarr (espace de configuration) -MigrationNotFinished=La version de la base de données n'est pas complètement à jour: exécutez à nouveau le processus de mise à niveau. +MigrationNotFinished=La version de votre base n'est pas encore complètement à niveau, aussi il vous faudra relancer à nouveau une migration. GoToUpgradePage=Accéder à la page de migration à nouveau WithNoSlashAtTheEnd=Sans le slash "/" à la fin -DirectoryRecommendation=Il est recommandé d'utiliser un répertoire en dehors des pages Web. +DirectoryRecommendation=Il est recommandé de mettre ce répertoire en dehors du répertoire des pages web. LoginAlreadyExists=Existe déjà DolibarrAdminLogin=Identifiant de l'utilisateur administrateur de Dolibarr AdminLoginAlreadyExists=Compte administrateur Dolibarr '%s' déjà existant. Revenez en arrière si vous voulez en créer un autre. FailedToCreateAdminLogin=Echec de la création du compte administrateur Dolibarr WarningRemoveInstallDir=Attention, pour des raisons de sécurité, afin de bloquer une nouvelle utilisation des outils d'installation/migration, une fois l'installation terminée, il est conseillé de placer dans le répertoire document de Dolibarr un fichier nommé install.lock en lecture seule. -FunctionNotAvailableInThisPHP=Non disponible dans ce PHP +FunctionNotAvailableInThisPHP=Non disponible sur ce PHP ChoosedMigrateScript=Choix du script de migration DataMigration=Migration de la base (données) DatabaseMigration=Migration de la base de données (structure + certaines données) ProcessMigrateScript=Exécution du script ChooseYourSetupMode=Choisissez votre mode d'installation et cliquez sur "Démarrer"… FreshInstall=Première installation -FreshInstallDesc=Utilisez ce mode s'il s'agit de votre première installation. Sinon, ce mode peut réparer une installation précédente incomplète. Si vous souhaitez mettre à niveau votre version, choisissez le mode "Mettre à niveau". +FreshInstallDesc=Utilisez ce mode si c'est votre première installation. Si ce n'est pas le cas, ce mode peut réparer une installation précédente incomplète, mais si vous voulez juste mettre à jour, choisissez le mode "Mise à jour". Upgrade=Mise à jour UpgradeDesc=Utilisez ce mode après avoir écrasé les fichiers d'une ancienne installation Dolibarr par ceux d'une version plus récente. Ce choix permet de mettre à jour votre base et vos données pour cette nouvelle version. Start=Démarrer InstallNotAllowed=Installation non autorisée par les permissions du fichier conf.php YouMustCreateWithPermission=Vous devez créer un fichier %s et donner les droits d'écriture dans celui-ci au serveur web durant le processus d'installation. -CorrectProblemAndReloadPage=Veuillez résoudre le problème et appuyez sur F5 pour recharger la page. +CorrectProblemAndReloadPage=Corrigez le problème et rechargez la page (F5). AlreadyDone=Déjà migré DatabaseVersion=Version de la base ServerVersion=Version du serveur de base de données @@ -116,17 +116,17 @@ BecauseConnectionFailedParametersMayBeWrong=La connexion à la base de données OrphelinsPaymentsDetectedByMethod=Paiement orphelins détectés par la méthode %s RemoveItManuallyAndPressF5ToContinue=Supprimez-le manuellement et actualisez la page pour continuer (F5). FieldRenamed=Champ renommé -IfLoginDoesNotExistsCheckCreateUser=Si l'utilisateur n'existe pas encore, vous devez cocher l'option "Créer un utilisateur" +IfLoginDoesNotExistsCheckCreateUser=Si l'identifiant n'existe pas encore, vous devez cocher l'option "Créer l'utilisateur" ErrorConnection=Le serveur "%s", nom de base "%s", identifiant "%s", ou mot de passe de la base de données est peut-être incorrect ou la version du client PHP trop ancienne par rapport à la version de la base de données. InstallChoiceRecommanded=Choix recommandé pour installer la version %s depuis votre version actuelle %s InstallChoiceSuggested=Choix suggéré par l'installeur. -MigrateIsDoneStepByStep=La version ciblée (%s) présente un écart de plusieurs versions. L'assistant d'installation reviendra pour vous suggérer une migration supplémentaire une fois celle-ci terminée. +MigrateIsDoneStepByStep=La version cible (%s) ayant un écart de plusieurs versions, l'installeur reviendra proposer la migration suivante une fois celle-ci exécutée. CheckThatDatabasenameIsCorrect=Vérifiez que le nom de base "%s" est correct. IfAlreadyExistsCheckOption=Si ce nom est correct et que cette base n'existe pas déjà, vous devez cocher l'option "Créer la base de données". OpenBaseDir=Paramètre PHP openbasedir -YouAskToCreateDatabaseSoRootRequired=Vous avez coché la case "Créer une base de données". Pour cela, vous devez fournir le nom d'utilisateur / mot de passe du superutilisateur (bas du formulaire). -YouAskToCreateDatabaseUserSoRootRequired=Vous avez coché la case "Créer une base de données propriétaire". Pour cela, vous devez fournir le nom d'utilisateur / mot de passe du superutilisateur (bas du formulaire). -NextStepMightLastALongTime=L'étape en cours peut prendre plusieurs minutes. Veuillez patienter jusqu'à ce que l'écran suivant apparaisse complètement avant de continuer. +YouAskToCreateDatabaseSoRootRequired=Vous avez coché la case "Créer la base de données". Pour cela, identifiant et mot de passe du super utilisateur (en bas de formulaire) sont obligatoire. +YouAskToCreateDatabaseUserSoRootRequired=Vous avez coché la case "Créer l'utilisateur propriétaire" de la base. Pour cela, identifiant et mot de passe du super utilisateur (en bas de formulaire) sont obligatoire. +NextStepMightLastALongTime=L'étape en cours peut durer quelques minutes. Merci d'attendre l'affichage complet de la page suivante pour poursuivre. MigrationCustomerOrderShipping=Mise à jour stockage des expéditions des commandes clients MigrationShippingDelivery=Mise à jour stockage des expéditions MigrationShippingDelivery2=Mise à jour stockage des expéditions 2 @@ -134,13 +134,13 @@ MigrationFinished=Migration terminée LastStepDesc= Dernière étape : définissez ici le nom d'utilisateur et le mot de passe que vous souhaitez utiliser pour vous connecter à Dolibarr. Ne perdez pas cette information, car il s’agit du compte principal pour administrer tous les comptes d’utilisateurs supplémentaires / supplémentaires. ActivateModule=Activation du module %s ShowEditTechnicalParameters=Cliquer ici pour afficher/éditer les paramètres techniques (mode expert) -WarningUpgrade=Attention:\nAvez-vous d'abord effectué une sauvegarde de base de données?\nCeci est hautement recommandé. Une perte de données (due par exemple à des bogues dans mysql version 5.5.40 / 41/42/43) peut être possible au cours de ce processus. Il est donc essentiel de réaliser un vidage complet de votre base de données avant de commencer toute migration.\n\nCliquez sur OK pour démarrer le processus de migration ... +WarningUpgrade=Attention:\nAvez-vous d'abord effectué une sauvegarde de base de données?\nCeci est hautement recommandé. Une perte de données (due par exemple à des bogues dans mysql version 5.5.40/41/42/43) peut être possible au cours de ce processus. Il est donc essentiel de réaliser un vidage complet de votre base de données avant de commencer toute migration.\n\nCliquez sur OK pour démarrer le processus de migration ... ErrorDatabaseVersionForbiddenForMigration=La version de votre gestionnaire de base de données est %s. Celle-ci présente un défaut critique entraînant des pertes de données si vous changez la structure de votre base de données tel que requis par le processus de migration. C'est pourquoi la migration vous sera interdite tant que vous n'aurez pas mis à jour votre gestionnaire de base de données vers une version supérieure corrigée (Liste des versions affectées par le défaut: %s). KeepDefaultValuesWamp=Si vous utilisez l'installeur automatique DoliWamp, les données présentes ici sont pré-remplies. Ne les modifiez qu'en connaissance de cause. KeepDefaultValuesDeb=Vous utilisez l'assistant d'installation depuis un environnement Linux (Ubuntu, Debian, Fedora...). Les valeurs présentes ici sont pré-remplies. Seul le mot de passe d'accès du propriétaire de base de données à créer doit être renseigné. Les autres paramètres ne doivent être modifiés qu'en connaissance de cause. KeepDefaultValuesMamp=Vous utilisez l'assistant d'installation DoliMamp. Les valeurs présentes ici sont pré-remplies. Leur modification ne doit être effectuée qu'en connaissance de cause. KeepDefaultValuesProxmox=Vous utilisez l'assistant d'installation depuis une application Proxmox. Les valeurs présentes ici sont pré-remplies. Leur modification ne doit être effectuée qu'en connaissance de cause. -UpgradeExternalModule=Exécuter le processus de mise à niveau dédié du module externe +UpgradeExternalModule=Lancement du processus de mise à jour de modules externes SetAtLeastOneOptionAsUrlParameter=Définissez au moins une option en tant que paramètre dans l'URL. Par exemple: '... repair.php?standard=confirmed' NothingToDelete=Rien a supprimer NothingToDo=Rien à faire @@ -166,7 +166,7 @@ MigrationContractsLineCreation=Création ligne contrat pour contrat ref %s MigrationContractsNothingToUpdate=Pas ou plus de contrats (liés à un produit) sans ligne de détail à corriger. MigrationContractsFieldDontExist=Le champ fk_facture n'existe plus. Rien à faire. MigrationContractsEmptyDatesUpdate=Mise à jour des dates de contrats non renseignées -MigrationContractsEmptyDatesUpdateSuccess=Correction de la date de contrat vide effectuée avec succès +MigrationContractsEmptyDatesUpdateSuccess=Correction des dates de contrat vide effectuée avec succès MigrationContractsEmptyDatesNothingToUpdate=Pas ou plus de date de contrats à renseigner. MigrationContractsEmptyCreationDatesNothingToUpdate=Pas ou plus de date de création à renseigner. MigrationContractsInvalidDatesUpdate=Mise à jour dates contrat incorrectes (pour contrats avec détail en service) @@ -194,8 +194,8 @@ MigrationProjectTaskTime=Mise à jour du temps consommé en secondes MigrationActioncommElement=Mise à jour des données des actions des éléments MigrationPaymentMode=Migration des modes de paiement MigrationCategorieAssociation=Migration des categories -MigrationEvents=Migration d'événements pour ajouter le propriétaire d'événement dans la table d'affectation -MigrationEventsContact=Migration d'événements pour ajouter un contact d'événement dans la table d'affectation +MigrationEvents=Migration des évènements pour ajouter les propriétaires dans la table des utilisateurs assignés +MigrationEventsContact=Migration des événements pour ajouter le contact de l'événement dans la table d'affectation MigrationRemiseEntity=Mettre à jour le champ "entity" de la table "llx_societe_remise MigrationRemiseExceptEntity=Mettre à jour le champ "entity" de la table "llx_societe_remise_except" MigrationUserRightsEntity=Mise à jour du champ entity de llx_user_rights @@ -203,10 +203,10 @@ MigrationUserGroupRightsEntity=Mise à jour du champ entity de llx_usergroup_rig MigrationUserPhotoPath=Migration des chemins de photos pour les utilisateurs MigrationReloadModule=Rechargement du module %s MigrationResetBlockedLog=Réinitialiser le module BlockedLog pour l'algorithme v7 -ShowNotAvailableOptions=Afficher les options non disponibles -HideNotAvailableOptions=Masquer les options non disponibles +ShowNotAvailableOptions=Afficher les choix non disponibles +HideNotAvailableOptions=Cacher les choix non disponibles ErrorFoundDuringMigration=Une erreur est survenu lors du processus de migration, aussi l'étape suivante ne peut pas être réalisée. Pour ignorer les erreurs, vous pouvez cliquer ici, mais l'application ou certaines fonctionnalités risquent de présenter des dysfonctionnements jusqu'à la résolution de la ou des erreurs -YouTryInstallDisabledByDirLock=L'application a tenté de se mettre à niveau automatiquement, mais les pages d'installation / de mise à niveau ont été désactivées pour des raisons de sécurité (répertoire renommé avec le suffixe .lock).
+YouTryInstallDisabledByDirLock=L'application essaie de se mettre à jour, mais les pages d'installation / mise à jour ont été désactivées pour des raisons de sécurité (répertoire renommé avec le suffixe .lock).
YouTryInstallDisabledByFileLock=L'application a tenté de se mettre à niveau automatiquement, mais les pages d'installation / de mise à niveau ont été désactivées pour des raisons de sécurité (grâce à l'existence d'un fichier de verrouillage install.lock dans le répertoire de documents dolibarr).
ClickHereToGoToApp=Cliquez ici pour aller sur votre application -ClickOnLinkOrRemoveManualy=Cliquez sur le lien suivant. Si vous voyez toujours cette même page, vous devez supprimer / renommer le fichier install.lock dans le répertoire des documents. +ClickOnLinkOrRemoveManualy=Cliquez sur le lien suivant et si vous atteignez toujours cette page, vous devez supprimer manuellement le fichier install.lock dans le répertoire documents diff --git a/htdocs/langs/fr_FR/mails.lang b/htdocs/langs/fr_FR/mails.lang index 02e568ae8a9..7e553430d7f 100644 --- a/htdocs/langs/fr_FR/mails.lang +++ b/htdocs/langs/fr_FR/mails.lang @@ -46,9 +46,9 @@ ErrorMailRecipientIsEmpty=L'adresse du destinataire est vide WarningNoEMailsAdded=Aucun nouvel email à ajouter à la liste des destinataires. ConfirmValidMailing=Confirmez-vous la validation de l'emailing ? ConfirmResetMailing=Attention, en réinitialisant l'emailing %s, vous autorisez son émission en masse une nouvelle fois. Est-ce bien ce que vous voulez faire ? -ConfirmDeleteMailing=Êtes-vous sûr de vouloir supprimer cet email? -NbOfUniqueEMails=Nombre d'e-mails uniques -NbOfEMails=Nombre de courriels +ConfirmDeleteMailing=Êtes-vous sûr de vouloir supprimer cet emailing ? +NbOfUniqueEMails=Nombre d'emails uniques +NbOfEMails=Nb. d'emails TotalNbOfDistinctRecipients=Nombre de destinataires uniques NoTargetYet=Aucun destinataire défini (Aller sur l'onglet Destinataires) NoRecipientEmail=Aucun e-mail de destinataire pour %s @@ -67,7 +67,7 @@ DateSending=Date envoi SentTo=Envoyés à %s MailingStatusRead=Lu YourMailUnsubcribeOK=L'adresse email %s est bien désinscrite de la liste. -ActivateCheckReadKey=Clé utilisée pour chiffrer l'URL utilisée pour les fonctions "Lire accusé de réception" et "Se désabonner" +ActivateCheckReadKey=Clé utilisée pour chiffrer l'URL utilisée pour les fonctions "Lecture confirmée" et "Se désabonner" EMailSentToNRecipients=Email envoyé à %s destinataires. EMailSentForNElements=Email envoyé pour %s enregistrements XTargetsAdded=%s destinataires ajoutés dans la liste cible @@ -166,4 +166,4 @@ InGoingEmailSetup=Configuration email entrant OutGoingEmailSetupForEmailing=Configuration des e-mail sortant (pour les e-mails de masse) DefaultOutgoingEmailSetup=Configuration des emails sortant Information=Information -ContactsWithThirdpartyFilter=Contacts avec filtre tiers +ContactsWithThirdpartyFilter=Contacts avec filtre sur le tiers diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index c1abf964395..1c0c44406be 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -51,11 +51,11 @@ ErrorFileNotUploaded=Le fichier n'a pas été transféré. Vérifiez que sa tail ErrorInternalErrorDetected=Erreur détectée ErrorWrongHostParameter=Mauvais paramètre Serveur ErrorYourCountryIsNotDefined=Votre pays n'est pas défini. Corriger en allant dans Accueil-Configuration-Société/Institution-Editer. -ErrorRecordIsUsedByChild=Impossible de supprimer cet enregistrement. Cet enregistrement est utilisé par au moins un enregistrement enfant. +ErrorRecordIsUsedByChild=Impossible de supprimer cet enregistrement. Ce dernier est utilisé en tant que père par au moins un enregistrement fils. ErrorWrongValue=Valeur incorrecte ErrorWrongValueForParameterX=Valeur incorrecte pour le paramètre %s ErrorNoRequestInError=Aucune requête en erreur -ErrorServiceUnavailableTryLater=Service non disponible pour le moment. Réessayez plus tard. +ErrorServiceUnavailableTryLater=Service non disponible actuellement. Réessayer plus tard. ErrorDuplicateField=Doublon dans un champ unique ErrorSomeErrorWereFoundRollbackIsDone=Quelques erreurs ont été trouvées. Les modifications ont été annulées. ErrorConfigParameterNotDefined=Le paramètre %s n'est pas défini dans le fichier de configuration Dolibarr conf.php. @@ -81,7 +81,7 @@ FileUploaded=Le fichier a été transféré avec succès FileTransferComplete=Fichier (s) chargé (s) avec succès FilesDeleted=Fichier(s) supprimé(s) avec succès FileWasNotUploaded=Un fichier a été sélectionné pour attachement mais n'a pas encore été uploadé. Cliquez sur "Joindre ce fichier" pour cela. -NbOfEntries=Nombre de Entrées +NbOfEntries=Nb d'entrées GoToWikiHelpPage=Consulter l'aide (nécessite un accès internet) GoToHelpPage=Consulter l'aide RecordSaved=Enregistrement sauvegardé @@ -233,7 +233,7 @@ Limit=Limite Limits=Limites Logout=Déconnexion NoLogoutProcessWithAuthMode=Pas de fonctionnalité de déconnexion applicative avec le mode d'authentification %s -Connection=Identifiant +Connection=Se connecter Setup=Configuration Alert=Alerte MenuWarnings=Alertes @@ -628,7 +628,7 @@ FeatureNotYetSupported=Fonctionnalité pas encore prise en charge CloseWindow=Fermer fenêtre Response=Réponse Priority=Priorité -SendByMail=Envoyer par email +SendByMail=Envoyer email MailSentBy=Mail envoyé par TextUsedInTheMessageBody=Corps du message SendAcknowledgementByMail=Envoi A.R. par email @@ -716,7 +716,7 @@ ValidatePayment=Valider ce règlement CreditOrDebitCard=Carte de crédit ou débit FieldsWithAreMandatory=Les champs marqués par un %s sont obligatoires FieldsWithIsForPublic=Les champs marqués par %s seront affichés sur la liste publique des adhérents. Si vous ne le souhaitez pas, décochez la case "public". -AccordingToGeoIPDatabase=(selon conversion GeoIP) +AccordingToGeoIPDatabase=(obtenu par conversion GeoIP) Line=Ligne NotSupported=Non pris en charge RequiredField=Champ obligatoire @@ -724,8 +724,8 @@ Result=Résultat ToTest=Tester ValidateBefore=La fiche doit être validée pour pouvoir utiliser cette fonction Visibility=Visibilité -Totalizable=Totalisable -TotalizableDesc=Ce champ est totalisable en liste +Totalizable=Sommable +TotalizableDesc=Ce champ peut être sommé dans les listes Private=Privé Hidden=Caché Resources=Ressources @@ -798,7 +798,7 @@ PrintFile=Imprimer fichier %s ShowTransaction=Afficher l'écriture sur le compte bancaire ShowIntervention=Afficher intervention ShowContract=Afficher contrat -GoIntoSetupToChangeLogo=Allez à Accueil - Configuration - Société pour changer de logo ou allez à Accueil - Configuration - Afficher pour masquer. +GoIntoSetupToChangeLogo=Allez dans Accueil - Configuration - Société/institution pour changer le logo ou aller dans Accueil - Configuration - Affichage pour le cacher. Deny=Refuser Denied=Refusé ListOf=Liste de %s @@ -819,7 +819,7 @@ NoRecordSelected=Aucu enregistrement sélectionné MassFilesArea=Zone des fichiers générés en masse ShowTempMassFilesArea=Afficher la zone des fichiers générés en masse ConfirmMassDeletion=Confirmation de suppression en masse -ConfirmMassDeletionQuestion=Êtes-vous sûr de vouloir supprimer l’enregistrement sélectionné %s? +ConfirmMassDeletionQuestion=Êtes-vous sur de vouloir supprimer la(les) %s valeur(s) sélectionnée(s) ? RelatedObjects=Objets liés ClassifyBilled=Classer facturé ClassifyUnbilled=Classer non facturé @@ -857,7 +857,7 @@ HR=HR HRAndBank=HR et banque AutomaticallyCalculated=Calculé automatiquement TitleSetToDraft=Retour à l'état de brouillon -ConfirmSetToDraft=Êtes-vous sûr de vouloir revenir au statut de brouillon? +ConfirmSetToDraft=Etes vous sûr de vouloir revenir à l'état Brouillon ? ImportId=Id import Events=Événements EMailTemplates=Modèles des courriels @@ -940,7 +940,7 @@ CommentAdded=Commentaire ajouté CommentDeleted=Commentaire supprimé Everybody=Tout le monde PayedBy=Payé par -PayedTo=Versée à +PayedTo=Payé à Monthly=Mensuel Quarterly=Trimestriel Annual=Annuel @@ -950,8 +950,8 @@ LocalAndRemote=Local et distant KeyboardShortcut=Raccourci clavier AssignedTo=Assigné à Deletedraft=Supprimer brouillon -ConfirmMassDraftDeletion=Projet de confirmation de suppression en masse +ConfirmMassDraftDeletion=Confirmation de suppression de brouillon en masse FileSharedViaALink=Fichier partagé via un lien -SelectAThirdPartyFirst=Sélectionnez d'abord un tiers ... +SelectAThirdPartyFirst=Sélectionnez d'abord un tiers... YouAreCurrentlyInSandboxMode=Vous travaillez actuellement dans le mode "bac à sable" de %s Inventory=Inventaire diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index a27cd5c5747..6e3a5e7513e 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -111,12 +111,12 @@ SendingAnEMailToMember=Envoi d'informations par e-mail à un adhérent SendingEmailOnAutoSubscription=Envoi d'email lors de l'auto-inscription SendingEmailOnMemberValidation=Envoie d'email à la validation d'un nouvel adhérent SendingEmailOnNewSubscription=Envoyer un email sur un nouvel abonnement -SendingReminderForExpiredSubscription=Envoi d'un rappel pour les adhésions expirées +SendingReminderForExpiredSubscription=Envoi d'un rappel pour les abonnements expirés SendingEmailOnCancelation=Envoie d'email à l'annulation # Topic of email templates YourMembershipRequestWasReceived=Votre demande d'adhésion a été reçue. YourMembershipWasValidated=Votre adhésion a été enregistrée -YourSubscriptionWasRecorded=Votre nouvelle adhésion a été enregistrée +YourSubscriptionWasRecorded=Votre nouvelle cotisation a été enregistrée SubscriptionReminderEmail=Rappel de cotisation YourMembershipWasCanceled=Votre adhésion a été annulée CardContent=Contenu de votre fiche adhérent @@ -124,7 +124,7 @@ CardContent=Contenu de votre fiche adhérent ThisIsContentOfYourMembershipRequestWasReceived=Nous vous informons que votre demande d'adhésion a bien été reçue.

ThisIsContentOfYourMembershipWasValidated=Nous vous informons que votre adhésion a été validé avec les informations suivantes:

ThisIsContentOfYourSubscriptionWasRecorded=Nous vous informons que votre nouvelle cotisation a été enregistrée.

-ThisIsContentOfSubscriptionReminderEmail=Nous voulons vous informer que votre adhésion est sur le point d'expirer. Nous espérons que vous pourrez la renouveler, votre soutien nous ait précieux

+ThisIsContentOfSubscriptionReminderEmail=Nous voulons vous informer que votre abonnement est sur le point d'expirer ou a déjà expiré (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Nous espérons que vous pourrez le renouveler.

ThisIsContentOfYourCard=Ceci est un rappel des informations que nous avons vos concernant. N'hésitez pas à nous contacter en cas d'erreur.

DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Sujet de l'email reçu en cas d'auto-inscription d'un invité DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Email reçu en cas d'auto-inscription d'un invité @@ -188,11 +188,10 @@ MembersByNature=Cet écran vous montre les statistiques sur les membres par natu MembersByRegion=Cet écran vous montre les statistiques sur les membres par région. VATToUseForSubscriptions=Taux de TVA pour les adhésions NoVatOnSubscription=Pas de TVA sur les adhésions -MEMBER_PAYONLINE_SENDEMAIL=E-mail pour avertir des confirmations de validation d'un règlement d'une adhésion (exemple : paiementrecu@exemple.fr) ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Produit/Service utilisé pour la ligne de cotisation dans la facture: %s NameOrCompany=Nom ou société SubscriptionRecorded=Adhésion enregistré NoEmailSentToMember=Aucun e-mail envoyé à l'adhérent EmailSentToMember=Email envoyé à l'adhérent à %s SendReminderForExpiredSubscriptionTitle=Envoyer une relance par mail pour les cotisations expirées -SendReminderForExpiredSubscription=Envoyer un rappel par e-mail aux membres lorsque l'abonnement est sur le point d'expirer (le paramètre est le nombre de jours avant la fin de l'abonnement pour envoyer le rappel) +SendReminderForExpiredSubscription=Envoyer un rappel par e-mail aux membres lorsque l'adhésion est sur le point d'expirer (le paramètre est le nombre de jours avant la fin de l'adhésion pour envoyer le rappel. Il peut s'agir d'une liste de jours séparé par un point-virgule, par exemple '10;5;0;-5') diff --git a/htdocs/langs/fr_FR/modulebuilder.lang b/htdocs/langs/fr_FR/modulebuilder.lang index fce1f10b7cd..cac0e7b555e 100644 --- a/htdocs/langs/fr_FR/modulebuilder.lang +++ b/htdocs/langs/fr_FR/modulebuilder.lang @@ -22,11 +22,11 @@ ModuleBuilderDeschooks=Cet onglet est dédié aux points d'accroche. ModuleBuilderDescwidgets=Cet onglet est dédié à la gestion/construction de widgets. ModuleBuilderDescbuildpackage=Vous pouvez générer ici un fichier de package "prêt à distribuer" (un fichier .zip normalisé) de votre module et un fichier de documentation "prêt à distribuer". Cliquez simplement sur le bouton pour créer le paquet ou le fichier de documentation. EnterNameOfModuleToDeleteDesc=Vous pouvez supprimer votre module. ATTENTION: Tous fichiers relatifs a ce module ET toutes bases de donnes seront supprimés! -EnterNameOfObjectToDeleteDesc=Vous pouvez supprimer un objet\nATTENTION:\nTous fichiers relatifs a cet objet seront supprimes +EnterNameOfObjectToDeleteDesc=Vous pouvez effacer un objet. ATTENTION : Tous les fichiers reliés à cet objet seront définitivement perdus ! DangerZone=Zone de danger BuildPackage=Générer package/documentation BuildDocumentation=Générez la documentation -ModuleIsNotActive=Ce module n'est pas encore activé. Allez à %s pour le faire vivre ou cliquez ici: +ModuleIsNotActive=Le module n'est pas encore activé. Aller à %s pour l'activer ou cliquer ici : ModuleIsLive=Ce module a été activé. Tout changement sur lui pourrait casser une fonctionnalité actuellement activée. DescriptionLong=Description longue EditorName=Nom de l'éditeur @@ -66,7 +66,7 @@ PageForLib=Fichier pour les librairies PHP SqlFileExtraFields=Fichier SQL pour les attributs complémentaires SqlFileKey=Fichier SQL pour les clés et index AnObjectAlreadyExistWithThisNameAndDiffCase=Un objet existe déjà avec ce nom dans une casse différente -UseAsciiDocFormat=Vous pouvez utiliser le format Markdown, mais il est recommandé d'utiliser le format Asciidoc (comparaison entre .md et .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) +UseAsciiDocFormat=Vous pouvez utiliser le format Markdown, mais il est recommandé d'utiliser le format Asciidoc (Comparaison entre .md et .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) IsAMeasure=Est une mesure DirScanned=Répertoire scanné NoTrigger=Pas de trigger @@ -78,7 +78,7 @@ SeeExamples=Voir des exemples ici EnabledDesc=Condition pour que ce champ soit actif (Exemples: 1 ou $conf->global->MYMODULE_MYOPTION) VisibleDesc=Le champ est-il visible ? (Exemples: 0 = Jamais visible, 1 = Visible sur les listes et formulaires de création/mise à jour/visualisation, 2 = Visible uniquement sur la liste, 3 = Visible uniquement sur le formulaire de création/mise à jour/affichage. Utiliser une valeur négative signifie que le champ n'est pas affiché par défaut sur la liste mais peut être sélectionné pour l'affichage) IsAMeasureDesc=Peut-on cumuler la valeur du champ pour obtenir un total dans les listes ? (Exemples: 1 ou 0) -SearchAllDesc=Le champ est-il utilisé pour effectuer une recherche à partir de l'outil de recherche rapide? (Exemples: 1 ou 0) +SearchAllDesc=Le champ doit-il être utilisé pour effectuer une recherche à partir de l'outil de recherche rapide ? (Exemples: 1 ou 0) SpecDefDesc=Entrez ici toute la documentation que vous souhaitez joindre au module et qui n'a pas encore été définis dans d'autres onglets. Vous pouvez utiliser .md ou, mieux, la syntaxe enrichie .asciidoc. LanguageDefDesc=Entrez dans ces fichiers, toutes les clés et la traduction pour chaque fichier de langue. MenusDefDesc=Définissez ici les menus fournis par votre module (une fois définis, ils sont visibles dans l'éditeur de menu %s) @@ -96,7 +96,7 @@ DropTableIfEmpty=(Supprimer la table si vide) TableDoesNotExists=La table %s n'existe pas TableDropped=La table %s a été supprimée InitStructureFromExistingTable=Construire la chaîne du tableau de structure d'une table existante -UseAboutPage=Désactiver la page "A propos" -UseDocFolder=Désactiver le dossier Documentation +UseAboutPage=Désactiver la page "à propos de" +UseDocFolder=Désactiver le dossier de la documentation UseSpecificReadme=Utiliser un fichier ReadMe spécifique -RealPathOfModule=Reel chemin du dossier du module +RealPathOfModule=Chemin réel du dossier du module diff --git a/htdocs/langs/fr_FR/multicurrency.lang b/htdocs/langs/fr_FR/multicurrency.lang index 028881b07d9..3270b11714e 100644 --- a/htdocs/langs/fr_FR/multicurrency.lang +++ b/htdocs/langs/fr_FR/multicurrency.lang @@ -4,8 +4,8 @@ ErrorAddRateFail=Erreur lors de l'ajout du taux ErrorAddCurrencyFail=Erreur lors de l'ajout de la devise ErrorDeleteCurrencyFail=Erreur de suppression multicurrency_syncronize_error=Erreur de synchronisation: %s -MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Utilisez la date du document pour rechercher le taux de change, au lieu d'utiliser le dernier taux connu -multicurrency_useOriginTx=Lorsqu'un objet est créé à partir d'un autre, conservez le taux d'origine de l'objet source (sinon utilisez le dernier taux connu). +MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Utilisez la date du document pour trouver le taux de change, au lieu d'utiliser dernier taux connu +multicurrency_useOriginTx=Quand un objet est créé à partir d'un autre, garder le taux original de l'objet source (sinon utiliser le dernier taux connu) CurrencyLayerAccount=API CurrencyLayer CurrencyLayerAccount_help_to_synchronize=Vous devez créer un compte sur leur site web pour pouvoir utiliser cette fonctionnalité.
Obtenez votre Clé API
Si vous utilisez un compte gratuit, vous ne pouvez pas changer la devise source(USD par défaut)
Mais si votre devise principale n'est pas USD, vous pouvez utiliser une devise source alternative pour forcer votre devise principale

Vous êtes limité à 1000 synchronisations par mois. multicurrency_appId=Clé API diff --git a/htdocs/langs/fr_FR/opensurvey.lang b/htdocs/langs/fr_FR/opensurvey.lang index 55daf2154a2..35a9031583f 100644 --- a/htdocs/langs/fr_FR/opensurvey.lang +++ b/htdocs/langs/fr_FR/opensurvey.lang @@ -35,7 +35,7 @@ TitleChoice=Libellé du choix ExportSpreadsheet=Exporter feuille de résultats ExpireDate=Date expiration NbOfSurveys=Nombre de sondages -NbOfVoters=Nbre de votants +NbOfVoters=Nb. de votants SurveyResults=Résultats PollAdminDesc=Vous êtes habilité à modifier toutes les lignes de votes par le bouton "Éditer". Vous pouvez supprimer une colonne ou ligne avec %s. Vous pouvez aussi ajouter une nouvelle colonne avec %s. 5MoreChoices=5 choix suplémentaires diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang index 6b24934922b..b5156890eef 100644 --- a/htdocs/langs/fr_FR/orders.lang +++ b/htdocs/langs/fr_FR/orders.lang @@ -88,7 +88,7 @@ NumberOfOrdersByMonth=Nombre de commandes par mois AmountOfOrdersByMonthHT=Montant total de commandes par mois (HT) ListOfOrders=Liste des commandes CloseOrder=Clôturer commande -ConfirmCloseOrder=Voulez-vous vraiment que cette commande soit livrée? Une fois qu'une commande est livrée, elle peut être définie sur facturée. +ConfirmCloseOrder=Êtes-vous sûr de vouloir classer cette commande à Délivrée ? Une fois une commande délivrée, elle peut aussi être passée à facturée. ConfirmDeleteOrder=Êtes-vous sûr de vouloir effacer cette commande ? ConfirmValidateOrder=Êtes-vous sûr de vouloir valider cette commande sous la référence %s ? ConfirmUnvalidateOrder=Êtes-vous sûr de vouloir restaurer la commande %s au statut brouillon ? diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index d6d7f092877..ec144505b83 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -70,7 +70,7 @@ Notify_PROJECT_CREATE=Création de projet Notify_TASK_CREATE=Tâche créée Notify_TASK_MODIFY=Tâche modifiée Notify_TASK_DELETE=Tâche supprimée -Notify_EXPENSE_REPORT_VALIDATE=Rapport de dépenses validé (approbation requise) +Notify_EXPENSE_REPORT_VALIDATE=Note de frais validée (approbation requise) Notify_EXPENSE_REPORT_APPROVE=Note de frais approuvé Notify_HOLIDAY_VALIDATE=Demande de congé validée (approbation requise) Notify_HOLIDAY_APPROVE=Demande de congé approuvée @@ -80,7 +80,7 @@ TotalSizeOfAttachedFiles=Taille totale fichiers/documents liés MaxSize=Taille maximum AttachANewFile=Ajouter un nouveau fichier/document LinkedObject=Objet lié -NbOfActiveNotifications=Nombre de notifications (nb d'e-mails de destinataires) +NbOfActiveNotifications=Nombre de notifications (nb de destinataires emails) PredefinedMailTest=__(Hello)__,\nCeci est un mail de test envoyé à __EMAIL__.\nLes deux lignes sont séparées par un saut de ligne.\n\n__USER_SIGNATURE__ PredefinedMailTestHtml=__(Hello)__\nCeci est un message de test (le mot test doit être en gras).
Les 2 lignes sont séparées par un retour à la ligne.

__SIGNATURE__ PredefinedMailContentContract=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ @@ -203,7 +203,7 @@ EMailTextOrderRefused=La commande %s a été refusée. EMailTextOrderRefusedBy=La commande %s a été refusée par %s. EMailTextExpeditionValidated=L'expédition %s a été validée. EMailTextExpenseReportValidated=La note de frais %s a été validée. -EMailTextExpenseReportApproved=Le expensereport %s a été approuvé. +EMailTextExpenseReportApproved=La note de frais %s a été approuvée. EMailTextHolidayValidated=La demande de congé %s a été validée. EMailTextHolidayApproved=La demande de congé %s a été approuvée. ImportedWithSet=Lot d'importation (Import key) diff --git a/htdocs/langs/fr_FR/paybox.lang b/htdocs/langs/fr_FR/paybox.lang index a1071a91622..702494f5203 100644 --- a/htdocs/langs/fr_FR/paybox.lang +++ b/htdocs/langs/fr_FR/paybox.lang @@ -10,7 +10,7 @@ ToComplete=À compléter YourEMail=Email de confirmation du paiement Creditor=Bénéficiaire PaymentCode=Code de paiement -PayBoxDoPayment=Payer par carte de crédit ou débit (Paybox) +PayBoxDoPayment=Payer par carte bancaire (Paybox) ToPay=Saisir règlement YouWillBeRedirectedOnPayBox=Vous serez redirigé vers la page sécurisée Paybox de saisie de votre carte bancaire Continue=Continuer diff --git a/htdocs/langs/fr_FR/paypal.lang b/htdocs/langs/fr_FR/paypal.lang index 2d94ef5c1ff..4255bd0f6c7 100644 --- a/htdocs/langs/fr_FR/paypal.lang +++ b/htdocs/langs/fr_FR/paypal.lang @@ -11,7 +11,7 @@ PAYPAL_SSLVERSION=Curl Version SSL PAYPAL_API_INTEGRAL_OR_PAYPALONLY=Proposer le paiement intégral (Carte+Paypal) ou Paypal seul PaypalModeIntegral=Intégral PaypalModeOnlyPaypal=PayPal seul -ONLINE_PAYMENT_CSS_URL=URL facultative de la feuille de style CSS sur la page de paiement en ligne +ONLINE_PAYMENT_CSS_URL=URL optionnelle de la feuille de style CSS sur la page de paiement en ligne ThisIsTransactionId=Voici l'identifiant de la transaction: %s PAYPAL_ADD_PAYMENT_URL=Ajouter l'URL de paiement Paypal lors de l'envoi d'un document par email NewOnlinePaymentReceived=Nouveau paiement en ligne reçu @@ -27,8 +27,8 @@ ShortErrorMessage=Message d'erreur court ErrorCode=Code erreur ErrorSeverityCode=Code d'erreur sévérité OnlinePaymentSystem=Système de paiement en ligne -PaypalLiveEnabled=PayPal live activé (sinon test / mode sandbox) -PaypalImportPayment=Importer des paiements PayPal +PaypalLiveEnabled=Paypal live activé (sinon mode test/bac à sable) +PaypalImportPayment=Importer des paiements Paypal PostActionAfterPayment=Actions complémentaires après paiement ARollbackWasPerformedOnPostActions=Une annulation a été effectuée sur toutes les actions Post paiement. Vous devez compléter les actions complémentaires manuellement si elles sont nécessaires. ValidationOfPaymentFailed=La validation du paiement a échoué diff --git a/htdocs/langs/fr_FR/printing.lang b/htdocs/langs/fr_FR/printing.lang index e93ce936de1..62cad4af2c5 100644 --- a/htdocs/langs/fr_FR/printing.lang +++ b/htdocs/langs/fr_FR/printing.lang @@ -2,7 +2,7 @@ Module64000Name=Impressions Directe Module64000Desc=Activer le système d'impression Directe PrintingSetup=Réglages du module Impression Directe -PrintingDesc=Ce module ajoute un bouton Imprimer à différents modules pour permettre aux documents d'être imprimés directement sur une imprimante sans avoir à ouvrir le document dans une autre application. +PrintingDesc=Ce module ajoute un bouton Imprimer afin d'envoyer directement les documents à une imprimante (sans ouvrir le document dans une application). MenuDirectPrinting=Travaux d'impressions directe DirectPrint=Impressions Directe PrintingDriverDesc=Paramètres de configuration pour le driver d'impression @@ -19,7 +19,7 @@ UserConf=Configuration par utilisateur PRINTGCP_INFO=Configuration Google OAuth API PRINTGCP_AUTHLINK=Authentification PRINTGCP_TOKEN_ACCESS=Token OAuth Google Cloud Impression -PrintGCPDesc=Ce pilote permet d'envoyer des documents directement à une imprimante à l'aide de Google Cloud Print. +PrintGCPDesc=Ce driver permet d'envoyer des documents directement à l'imprimante via Google Cloud Print GCP_Name=Nom GCP_displayName=Nom affiché GCP_Id=Id imprimante @@ -27,7 +27,7 @@ GCP_OwnerName=Nom propriétaire GCP_State=Etat imprimante GCP_connectionStatus=Etats en ligne GCP_Type=Type d'imprimante -PrintIPPDesc=Ce pilote permet d’envoyer des documents directement à une imprimante. Il nécessite un système Linux avec CUPS installé. +PrintIPPDesc=Ce driver permet d'envoyer les documents directement à une imprimante. Il requiert un système Linux avec CUPS installé. PRINTIPP_HOST=Serveur d'impression PRINTIPP_PORT=Port PRINTIPP_USER=Identifiant diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 571376ebeb0..77ad53a3eff 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -17,7 +17,7 @@ Reference=Référence NewProduct=Nouveau produit NewService=Nouveau service ProductVatMassChange=Changement TVA en masse -ProductVatMassChangeDesc=Cette page peut être utilisée pour modifier un taux de TVA défini sur des produits ou services d’une valeur à une autre. Attention, cette modification est globale / effectuée sur toutes les bases. +ProductVatMassChangeDesc=Cette page permet de modifier les taux de TVA définis sur les produits ou services d'une valeur vers une autre. Attention, la modification est réalisée en masse sur toute la base de donnée. MassBarcodeInit=Initialisation codes-barre MassBarcodeInitDesc=Cette page peut être utilisée pour initialiser un code-barre sur des objets qui ne disposent pas de code-barre défini. Vérifiez avant que l'installation du module code-barres est complète. ProductAccountancyBuyCode=Code comptable (achat) @@ -97,7 +97,7 @@ NoteNotVisibleOnBill=Note (non visible sur les factures, propals...) ServiceLimitedDuration=Si produit de type service à durée limitée : MultiPricesAbility=Plusieurs niveaux de prix par produit/service (chaque client est dans un et un seul niveau) MultiPricesNumPrices=Nombre de prix -AssociatedProductsAbility=Activer des produits virtuels (kits) +AssociatedProductsAbility=Pris en charge des produits virtuels (kits) AssociatedProducts=Produits virtuels AssociatedProductsNumber=Nbre de sous-produits constituant ce produit virtuel ParentProductsNumber=Nbre de produits virtuels/packages parent @@ -134,7 +134,7 @@ PredefinedServicesToSell=Services prédéfinis en vente PredefinedProductsAndServicesToSell=Produits/Services prédéfinis en vente PredefinedProductsToPurchase=Produits prédéfinis à acheter PredefinedServicesToPurchase=Services prédéfinis à acheter -PredefinedProductsAndServicesToPurchase=Produits / services prédéfinis à l'achat +PredefinedProductsAndServicesToPurchase=Produits/services prédéfinis à acheter NotPredefinedProducts=Pas de produit/service prédéfini GenerateThumb=Générer la vignette ServiceNb=Service no %s @@ -145,7 +145,7 @@ Finished=Produit manufacturé RowMaterial=Matière première CloneProduct=Cloner produit/service ConfirmCloneProduct=Êtes-vous sûr de vouloir cloner le produit ou service %s ? -CloneContentProduct=Cloner toutes les informations principales du produit / service +CloneContentProduct=Cloner les informations générales du produit/service ClonePricesProduct=Cloner les prix CloneCompositionProduct=Cloner le produits packagés CloneCombinationsProduct=Cloner les variantes @@ -233,7 +233,7 @@ BarCodeDataForThirdparty=Information de code barre du produit %s : ResetBarcodeForAllRecords=Définir la valeur de code-barres pour tous les enregistrements (cela réinitialiser également les valeurs de code-barres déjà défini par des nouvelles) PriceByCustomer=Prix différents pour chaque client PriceCatalogue=Un seul prix de vente par produit/service -PricingRule=Règles de vente +PricingRule=Règles pour les prix clients AddCustomerPrice=Ajouter prix par client ForceUpdateChildPriceSoc=Définir le même prix sur les filiales des clients PriceByCustomerLog=Historique des prix clients précédents diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index e279650cf37..8f35705a5cc 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -169,7 +169,7 @@ SelectElement=Séléctionnez l'élément AddElement=Associer l'élément # Documents models DocumentModelBeluga=Modèle de document project pour l'aperçu des objets liées -DocumentModelBaleine=Modèle de document de projet pour les tâches +DocumentModelBaleine=Modèles de document de rapport de tâches de projets DocumentModelTimeSpent=Modèle de rapport de projet pour le temps passé PlannedWorkload=Charge de travail prévue PlannedWorkloadShort=Charge de travail @@ -195,7 +195,7 @@ ProjectOverview=Vue d'ensemble ManageTasks=Utiliser les projets pour suivre les tâches et/ou saisir du temps consommé (feuilles de temps) ManageOpportunitiesStatus=Utiliser les projets pour suivre les affaires / opportunités ProjectNbProjectByMonth=Nb de projets créés par mois -ProjectNbTaskByMonth=Nombre de tâches créées par mois +ProjectNbTaskByMonth=Nb de tâches créées par mois ProjectOppAmountOfProjectsByMonth=Montant des opportunités par mois ProjectWeightedOppAmountOfProjectsByMonth=Montant pondéré des opportunités par mois ProjectOpenedProjectByOppStatus=Opportunités ouvertes par statut d'opportunité diff --git a/htdocs/langs/fr_FR/salaries.lang b/htdocs/langs/fr_FR/salaries.lang index ac9510d110f..2745a118b94 100644 --- a/htdocs/langs/fr_FR/salaries.lang +++ b/htdocs/langs/fr_FR/salaries.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - salaries SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Compte comptable utilisé pour les utilisateurs -SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=Le compte de comptabilité dédié défini sur la carte d’utilisateur sera utilisé pour la comptabilité Subledger uniquement. Celui-ci sera utilisé pour le grand livre et comme valeur par défaut de la comptabilité Subledger si le compte de comptabilité utilisateur dédié sur utilisateur n'est pas défini. +SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=Le compte comptable défini sur la fiche utilisateur sera utilisé uniquement pour la comptabilité auxiliaire. Celui-ci sera utilisé pour le grand livre et comme valeur par défaut de la comptabilité auxiliaire si le compte dédié de l'utilisateur n'est pas défini. SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Compte comptable par défaut pour les paiements de salaires Salary=Salaire Salaries=Salaires NewSalaryPayment=Nouveau règlement de salaire -AddSalaryPayment=Ajouter un paiement de salaire +AddSalaryPayment=Ajouter paiement de salaire SalaryPayment=Règlement salaire SalariesPayments=Règlements des salaires ShowSalaryPayment=Afficher règlement de salaire @@ -16,4 +16,4 @@ THMDescription=Cette valeur peut être utilisé pour calculer le coût horaire c TJMDescription=Cette valeur est actuellement seulement une information et n'est utilisé pour aucun calcul LastSalaries=Les %s derniers règlements de salaires AllSalaries=Tous les règlements de salaires -SalariesStatistics=Statistiques salariales +SalariesStatistics=Statistiques diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index 7b904e37bea..f5272a7c20e 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -54,20 +54,20 @@ PMPValueShort=PMP EnhancedValueOfWarehouses=Valorisation des stocks UserWarehouseAutoCreate=Créer automatiquement un stock/entrepôt propre à l'utilisateur lors de sa création AllowAddLimitStockByWarehouse=Autoriser l'ajout d'une limite et d'un stock désiré par produit et entrepôt à la place de produit seul -IndependantSubProductStock=Le stock de produits et le stock de sous-produits sont indépendants +IndependantSubProductStock=Le stock du produit et le stock des sous-produits sont indépendant QtyDispatched=Quantité ventilée QtyDispatchedShort=Qté ventilée QtyToDispatchShort=Qté à ventiler OrderDispatch=Biens reçus -RuleForStockManagementDecrease=Choisissez Règle pour la réduction automatique du stock (la réduction manuelle est toujours possible, même si une règle de diminution automatique est activée). -RuleForStockManagementIncrease=Choisissez Règle pour augmentation de stock automatique (une augmentation manuelle est toujours possible, même si une règle d’augmentation automatique est activée) -DeStockOnBill=Diminution des stocks réels lors de la validation de la facture client / note de crédit -DeStockOnValidateOrder=Diminuer les stocks réels lors de la validation de la commande client +RuleForStockManagementDecrease=Règle de gestion des décrémentations automatiques de stock (la décrémentation manuelle est toujours possible, même si une décrémentation automatique est activée) +RuleForStockManagementIncrease=Règle de gestion des incrémentations de stock (l'incrémentation manuelle est toujours possible, même si une incrémentation automatique est activée) +DeStockOnBill=Décrémenter les stocks physiques sur validation des factures/avoirs clients +DeStockOnValidateOrder=Décrémenterr les stocks physiques sur validation des commandes clients DeStockOnShipment=Décrémenter les stocks physiques sur validation des expéditions DeStockOnShipmentOnClosing=Décrémenter les stocks physiques au classement "clôturée" de l'expédition -ReStockOnBill=Augmenter les stocks réels lors de la validation de la facture fournisseur / de la note de crédit -ReStockOnValidateOrder=Augmenter les stocks réels lors de l'approbation des bons de commande -ReStockOnDispatchOrder=Augmenter les stocks réels lors de l'expédition manuelle dans l'entrepôt, après la réception de la commande fournisseur +ReStockOnBill=Incrémenter les stocks physiques sur validation des factures/avoirs fournisseurs +ReStockOnValidateOrder=Incrémenter les stocks physiques sur approbation des commandes fournisseurs +ReStockOnDispatchOrder=Incrémenter les stocks physiques sur ventilation manuelle dans les entrepôts, après réception de la marchandise OrderStatusNotReadyToDispatch=La commande n'a pas encore ou n'a plus un statut permettant une ventilation en stock. StockDiffPhysicTeoric=Explication de l'écart stock physique-virtuel NoPredefinedProductToDispatch=Pas de produits prédéfinis dans cet objet. Aucune ventilation en stock n'est donc à faire. @@ -129,9 +129,9 @@ RecordMovement=Enregistrer transfert ReceivingForSameOrder=Réceptions pour cette commande StockMovementRecorded=Mouvement de stocks enregistré RuleForStockAvailability=Règles d'exigence sur les stocks -StockMustBeEnoughForInvoice=Le niveau de stock doit être suffisant pour ajouter un produit / service à la facture (le contrôle est effectué sur le stock réel actuel lors de l'ajout d'une ligne dans la facture, quelle que soit la règle de changement de stock automatique). -StockMustBeEnoughForOrder=Le niveau de stock doit être suffisant pour ajouter un produit / service à la commande (le contrôle est effectué sur le stock réel actuel lors de l'ajout d'une ligne à la commande, quelle que soit la règle de changement de stock automatique) -StockMustBeEnoughForShipment= Le niveau de stock doit être suffisant pour ajouter un produit / service à l'envoi (le contrôle est effectué sur le stock réel actuel lors de l'ajout d'une ligne dans l'envoi, quelle que soit la règle de changement de stock automatique) +StockMustBeEnoughForInvoice=Le niveau de stock doit être suffisant pour ajouter ce produit/service à la facture (la vérification est faite sur le stock réel lors de l'ajout de la ligne de facture, quelquesoit la règle de modification automatique de stock) +StockMustBeEnoughForOrder=Le niveau de stock doit être suffisant pour ajouter ce produit/service à la commande (la vérification est faite sur le stock réel lors de l'ajout de la ligne de commande, quelquesoit la règle de modification automatique de stock) +StockMustBeEnoughForShipment= Le niveau de stock doit être suffisant pour ajouter ce produit/service à l'expédition (la vérification est faite sur le stock réel lors de l'ajout de la ligne à l'expédition, quelquesoit la règle de modification automatique de stock) MovementLabel=Libellé du mouvement TypeMovement=Type de mouvement DateMovement=Date de mouvement @@ -201,7 +201,7 @@ ExitEditMode=Quitter l'édition inventoryDeleteLine=Effacer ligne RegulateStock=Réguler le stock ListInventory=Liste -StockSupportServices=La gestion des stocks prend en charge les services +StockSupportServices=La gestion des stock s'applique aussi aux services StockSupportServicesDesc=Par défaut, seul les produits/services de type "produit" peuvent bénéficier d'une gestion de stock. En activant ce paramètre, et si le module Services est activé, la gestion de stock pourra être appliquée aux articles de type "service". ReceiveProducts=Recevoir produits StockIncreaseAfterCorrectTransfer=Augmentation par correction/transfert diff --git a/htdocs/langs/fr_FR/stripe.lang b/htdocs/langs/fr_FR/stripe.lang index ee86210f92d..a85a84bcd11 100644 --- a/htdocs/langs/fr_FR/stripe.lang +++ b/htdocs/langs/fr_FR/stripe.lang @@ -12,7 +12,7 @@ YourEMail=Email de confirmation du paiement STRIPE_PAYONLINE_SENDEMAIL=Email à prévenir en cas de paiement (succès ou non) Creditor=Bénéficiaire PaymentCode=Code de paiement -StripeDoPayment=Payer par carte de crédit/débit (Stripe) +StripeDoPayment=Payer par carte bancaire (Stripe) YouWillBeRedirectedOnStripe=Vous allez être redirigé vers la page sécurisée de Stripe pour insérer les informations de votre carte de crédit Continue=Continuer ToOfferALinkForOnlinePayment=URL de paiement %s @@ -23,8 +23,6 @@ ToOfferALinkForOnlinePaymentOnFreeAmount=URL offrant une interface de paiement e ToOfferALinkForOnlinePaymentOnMemberSubscription=URL offrant une interface de paiement en ligne %s sur la base d'une cotisation d'adhérent YouCanAddTagOnUrl=Vous pouvez de plus ajouter le paramètre URL &tag=value à n'importe quelles de ces URL (obligatoire pour le paiement libre uniquement) pour ajouter votre propre "code commentaire" du paiement. SetupStripeToHavePaymentCreatedAutomatically=Configurez votre URL Stripe à %s pour avoir le paiement créé automatiquement si validé. -YourPaymentHasBeenRecorded=Cette page confirme que votre paiement a bien été enregistré. Merci. -YourPaymentHasNotBeenRecorded=Votre paiement n'a pas été enregistré et la transaction a été annulée. AccountParameter=Paramètres du compte UsageParameter=Paramètres d'utilisation InformationToFindParameters=Informations pour trouver vos paramètres de compte %s @@ -58,8 +56,9 @@ NameOnCard=Nom sur la carte CardNumber=Numéro de carte ExpiryDate=Date d'expiration CVN=CVN -DeleteACard=Delete Card -ConfirmDeleteCard=Are you sure you want to delete this Credit or Debit card? +DeleteACard=Supprimer carte +ConfirmDeleteCard=Êtes-vous sûr de vouloir supprimer cette carte de crédit ou de débit? CreateCustomerOnStripe=Créer client sur Stripe CreateCardOnStripe=Créer carte sur Stripe ShowInStripe=Afficher dans Stripe +StripeUserAccountForActions=Compte d'utilisateur à utiliser pour certains e-mails de notification d'événements Stripe (Stripe payouts) diff --git a/htdocs/langs/fr_FR/users.lang b/htdocs/langs/fr_FR/users.lang index 2a7b80c5b71..d661978cdc2 100644 --- a/htdocs/langs/fr_FR/users.lang +++ b/htdocs/langs/fr_FR/users.lang @@ -66,7 +66,7 @@ CreateDolibarrThirdParty=Créer un tiers LoginAccountDisableInDolibarr=Le compte est désactivé sur Dolibarr. UsePersonalValue=Utiliser valeur personnalisée InternalUser=Utilisateur interne -ExportDataset_user_1=Les utilisateurs et leurs propriétés +ExportDataset_user_1=Utilisateurs et attributs DomainUser=Utilisateur du domaine %s Reactivate=Réactiver CreateInternalUserDesc=Ce formulaire permet de créer un utilisateur interne à votre société/institution. Pour créer un utilisateur externe (client, fournisseur, ...), utilisez le bouton 'Créer compte utilisateur' qui se trouve sur la fiche du contact du tiers. diff --git a/htdocs/langs/fr_FR/website.lang b/htdocs/langs/fr_FR/website.lang index 55c9df5d9b8..9b7801bf31f 100644 --- a/htdocs/langs/fr_FR/website.lang +++ b/htdocs/langs/fr_FR/website.lang @@ -51,7 +51,7 @@ NoPageYet=Pas de page pour l'instant YouCanCreatePageOrImportTemplate=Vous pouvez créer une nouvelle page ou importer un modèle de site Web complet. SyntaxHelp=Aide sur quelques astuces spécifiques de syntaxe YouCanEditHtmlSourceckeditor=Vous pouvez éditer le code source en activant l'éditeur HTML avec le bouton "Source". -YouCanEditHtmlSource=
Vous pouvez inclure du code PHP dans le source en utilisant le tags <?php ?>. Les variables globales suivantes sont disponibles: $conf, $langs, $db, $mysoc, $user, $website, $websitepage, $weblang.

Vous pouvez aussi inclure le contenu d'une autre page/containeur avec la syntaxe suivante:
<?php includeContainer('alias_of_container_to_include'); ?>

Vous pouvez faire une redirection sur une autre Page/Containeur avec la syntax (Note: N'afficher pas de contenu avant un redirect):
<?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

Pour ajouter un lien vers une autre page, utilisez la syntax
<a href="alias_of_page_to_link_to.php">mylink<a>

Pour inclure un lien pour télécharger un fichier stocké dans le répertoire documentsutilisez le wrapper documents.php:
Example, pour un fichier dans documents/ecm (besoin d'être loggué), la syntaxe est:
<a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
Pour un fichier dans documents/mdedias (répertoire ouvert au publique), la syntaxe est:
<a href="/document.php?modulepart=medias&file=[relative_dir]/filename.ext">.
Pour un fichier partagé avec un lien de partage (accès ouvert en utilisant la clé de partage du fichier), la syntaxe est:
<a href="/document.php?hashp=publicsharekeyoffile">

Pour inclure une image stockée dans le répertoire documents, utilisez le wrapper viewimage.php:
Example, pour une image dans documents/medias (accès ouvert), la syntax est:
<a href="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
+YouCanEditHtmlSource=
Vous pouvez inclure du code PHP dans le source en utilisant le tags <?php ?>. Les variables globales suivantes sont disponibles: $conf, $langs, $db, $mysoc, $user, $website, $websitepage, $weblang.

Vous pouvez aussi inclure le contenu d'une autre page/containeur avec la syntaxe suivante:
<?php includeContainer('alias_of_container_to_include'); ?>

Vous pouvez faire une redirection sur une autre Page/Containeur avec la syntax (Note: N'afficher pas de contenu avant un redirect):
<?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

Pour ajouter un lien vers une autre page, utilisez la syntax
<a href="alias_of_page_to_link_to.php">mylink<a>

Pour inclure un lien pour télécharger un fichier stocké dans le répertoire documentsutilisez le wrapper documents.php:
Example, pour un fichier dans documents/ecm (besoin d'être loggué), la syntaxe est:
<a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
Pour un fichier dans documents/mdedias (répertoire ouvert au publique), la syntaxe est:
<a href="/document.php?modulepart=medias&file=[relative_dir]/filename.ext">.
Pour un fichier partagé avec un lien de partage (accès ouvert en utilisant la clé de partage du fichier), la syntaxe est:
<a href="/document.php?hashp=publicsharekeyoffile">

Pour inclure une image stockée dans le répertoire documents, utilisez le wrapper viewimage.php:
Example, pour une image dans documents/medias (accès ouvert), la syntax est:
<img src="/viewimage.php?cache=1&modulepart=medias&file=[relative_dir/]filename.ext">
ClonePage=Cloner la page/container CloneSite=Cloner le site SiteAdded=Site web ajouté @@ -61,7 +61,7 @@ LanguageMustNotBeSameThanClonedPage=Vous clonez une page comme traduction. La la ParentPageId=Id de la page parent WebsiteId=ID site web CreateByFetchingExternalPage=Créer une page / un container en récupérant une page à partir d'une URL externe ... -OrEnterPageInfoManually=Ou créez une page à partir de rien ou à partir d'un modèle de page ... +OrEnterPageInfoManually=Ou créer une page à partir de rien ou à partir d'un modèle de page... FetchAndCreate=Récupérer et Créer ExportSite=Exporter site ImportSite=Importer modèle de site web From c5686df035d1bbd68ae258c95e6ba9b0be40acb2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Jan 2019 18:16:08 +0100 Subject: [PATCH 044/183] Sync transifex --- htdocs/langs/de_CH/admin.lang | 1 - htdocs/langs/es_CL/admin.lang | 1 - htdocs/langs/es_EC/admin.lang | 1 - htdocs/langs/fr_CA/admin.lang | 1 - htdocs/langs/fr_CA/commercial.lang | 1 - htdocs/langs/pt_BR/admin.lang | 1 - 6 files changed, 6 deletions(-) diff --git a/htdocs/langs/de_CH/admin.lang b/htdocs/langs/de_CH/admin.lang index 76c9f612a90..90624dd7b8d 100644 --- a/htdocs/langs/de_CH/admin.lang +++ b/htdocs/langs/de_CH/admin.lang @@ -88,7 +88,6 @@ Module49Desc=Bearbeiterverwaltung Module70Name=Arbeitseinsätze Module80Name=Auslieferungen Module1200Desc=Mantis-Integation -Module3100Desc=Skypebutton bei Kontakten / Drittparteien / Mitgliedern hinzufügen Module50100Desc=Kassenmodul Module63000Desc=Resourcen verwalten(Drucker, Autos, Räume,...) diese können dann im Kalender verwendet werden Permission26=Angebote schliessen diff --git a/htdocs/langs/es_CL/admin.lang b/htdocs/langs/es_CL/admin.lang index a40e99a796c..93ee3101ef4 100644 --- a/htdocs/langs/es_CL/admin.lang +++ b/htdocs/langs/es_CL/admin.lang @@ -356,7 +356,6 @@ Module2610Name=API / servicios web (servidor REST) Module2610Desc=Habilite el servidor REST Dolibarr proporcionando servicios API Module2660Name=Llamar a WebServices (cliente SOAP) Module2900Desc=Capacidades de conversiones GeoIP Maxmind -Module3100Desc=Agregar un botón de Skype a los usuarios / terceros / contactos / tarjetas de miembros Module4000Desc=Gestión de recursos humanos (gestión del departamento, contratos de empleados y sentimientos) Module5000Name=Multi-compañía Module5000Desc=Le permite administrar múltiples compañías diff --git a/htdocs/langs/es_EC/admin.lang b/htdocs/langs/es_EC/admin.lang index b5be72a7b68..4da30a203a0 100644 --- a/htdocs/langs/es_EC/admin.lang +++ b/htdocs/langs/es_EC/admin.lang @@ -370,7 +370,6 @@ Module2610Name=API / Servicios Web (servidor REST) Module2610Desc=Habilitar el servidor REST de Dolibarr que proporciona servicios API Module2660Name=WebServices de llamadas (cliente SOAP) Module2900Desc=Capacidades de conversiones GeoIP Maxmind -Module3100Desc=Agregar un botón de Skype a usuarios / cliente / proveedor / contactos / tarjetas de miembros Module4000Desc=Administración de recursos humanos (administración del departamento, los contratos y los sentimientos de los empleados) Module5000Desc=Permite gestionar múltiples empresas Module6000Name=Flujo de Trabajo diff --git a/htdocs/langs/fr_CA/admin.lang b/htdocs/langs/fr_CA/admin.lang index a66102ceb59..de2ad046148 100644 --- a/htdocs/langs/fr_CA/admin.lang +++ b/htdocs/langs/fr_CA/admin.lang @@ -116,7 +116,6 @@ Module2600Desc=Active le serveur de Web Services de Dolibarr Module2610Name=services API / Web ( serveur REST ) Module2610Desc=Activer le serveur REST de services API de les services Module2660Name=WebServices appel ( client SOAP ) -Module3100Desc=Ajouter un bouton Skype aux utilisateurs / tiers / contacts / cartes membres Module4000Name=Gestion des ressources humaines Module10000Name=Sites Internet Module20000Name=Gestion des demandes de congès diff --git a/htdocs/langs/fr_CA/commercial.lang b/htdocs/langs/fr_CA/commercial.lang index 3a2d56fa4a6..23c9d98fa34 100644 --- a/htdocs/langs/fr_CA/commercial.lang +++ b/htdocs/langs/fr_CA/commercial.lang @@ -9,5 +9,4 @@ SaleRepresentativesOfThirdParty=Représentants commerciaux de tiers LastDoneTasks=Dernières %s actions complétées LastActionsToDo=Le plus ancien %s actions non complétées ActionAC_OTH_AUTO=Événements insérés automatiquement -WelcomeOnOnlineSignaturePage=Bienvenue sur la page pour accepter les propositions commerciales de %s SignatureProposalRef=Signature de la proposition commerciale %s diff --git a/htdocs/langs/pt_BR/admin.lang b/htdocs/langs/pt_BR/admin.lang index 580099e2a95..ed1f3794eec 100644 --- a/htdocs/langs/pt_BR/admin.lang +++ b/htdocs/langs/pt_BR/admin.lang @@ -390,7 +390,6 @@ Module2600Desc=Ativa o servidor de serviços web do Dolibarr Module2610Desc=Permitir que o servidor prestação de serviços de API REST do Dolibarr Module2660Name=Chamar ServiçosWeb (cliente SOAP) Module2900Desc=Capacidade de conversão com o GeoIP Maxmind -Module3100Desc=Adicionar um botão Skype nos cartões dos usuários / terceiros / contatos membros Module4000Name=RH Module4000Desc=Gerenciamento de recursos humanos (gerenciamento do departamento, contratos dos funcionários e benefícios) Module5000Name=Multi-Empresas From e5d1466ec58dd1c418b170a931afa0f0bbf03d3f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 22 Jan 2019 18:44:28 +0100 Subject: [PATCH 045/183] Update card.php --- htdocs/don/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index f412eac3e63..d7512e95799 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -107,7 +107,7 @@ if ($action == 'update') $object->amount = price2num(GETPOST("amount",'alpha')); $object->town = GETPOST("town",'alpha'); $object->zip = GETPOST("zipcode",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); + $object->country_id = GETPOST('country_id','int'); $object->email = GETPOST("email",'alpha'); $object->date = $donation_date; $object->public = GETPOST("public",'alpha'); @@ -162,7 +162,7 @@ if ($action == 'add') $object->amount = price2num(GETPOST("amount",'alpha')); $object->zip = GETPOST("zipcode",'alpha'); $object->town = GETPOST("town",'alpha'); - $object->country_id = GETPOST('country_id', 'int'); + $object->country_id = GETPOST('country_id','int'); $object->email = GETPOST('email', 'alpha'); $object->date = $donation_date; $object->note_private= GETPOST("note_private",'none'); From bb1e7ee0a17c0e23f00baf8b8fb0f1c93f6e1e51 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Jan 2019 19:54:47 +0100 Subject: [PATCH 046/183] Fix transifex --- htdocs/langs/lv_LV/admin.lang | 603 +++++++++++++++-------------- htdocs/langs/lv_LV/assets.lang | 59 +++ htdocs/langs/lv_LV/blockedlog.lang | 53 +++ htdocs/langs/lv_LV/cashdesk.lang | 9 +- htdocs/langs/lv_LV/companies.lang | 2 +- htdocs/langs/lv_LV/install.lang | 2 +- htdocs/langs/lv_LV/main.lang | 2 +- htdocs/langs/lv_LV/members.lang | 4 +- htdocs/langs/lv_LV/printing.lang | 14 +- htdocs/langs/lv_LV/ticket.lang | 290 ++++++++++++++ 10 files changed, 727 insertions(+), 311 deletions(-) create mode 100644 htdocs/langs/lv_LV/assets.lang create mode 100644 htdocs/langs/lv_LV/blockedlog.lang create mode 100644 htdocs/langs/lv_LV/ticket.lang diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index 3cae2e5aa41..c202a277024 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -9,8 +9,8 @@ VersionExperimental=Eksperimentāls VersionDevelopment=Attīstība VersionUnknown=Nezināms VersionRecommanded=Ieteicams -FileCheck=Failu veseluma pārbaudītājs -FileCheckDesc=Šis rīks ļauj pārbaudīt failu integritāti un jūsu lietojumprogrammas iestatījumus, salīdzinot katru failu ar oficiālo. Var pārbaudīt arī dažu iestatīšanas konstantes vērtību. Varat izmantot šo rīku, lai noteiktu, vai, piemēram, hacker ir modificējis dažus failus. +FileCheck=Failu kopas integritātes pārbaudes +FileCheckDesc=Šis rīks ļauj jums pārbaudīt failu integritāti un jūsu programmas iestatīšanu, salīdzinot katru failu ar oficiālo. Var pārbaudīt arī dažu iestatīšanas konstantu vērtību. Šo rīku var izmantot, lai noteiktu, vai ir mainīti faili (piemēram, hacker). FileIntegrityIsStrictlyConformedWithReference=Files integrity is strictly conformed with the reference. FileIntegrityIsOkButFilesWereAdded=Failu integritātes pārbaude ir pagājusi, taču ir pievienoti daži jauni faili. FileIntegritySomeFilesWereRemovedOrModified=Failu integritātes pārbaude neizdevās. Daži faili tika mainīti, noņemti vai pievienoti. @@ -23,11 +23,11 @@ FilesUpdated=Atjaunotie faili FilesModified=Modificētie faili FilesAdded=Pievienotie faili FileCheckDolibarr=Pārbaudīt aplikācijas failu veselumu -AvailableOnlyOnPackagedVersions=Vietējais faila integritātes pārbaude ir pieejams tikai tad, ja lietojumprogramma ir instalēta no oficiālās pakotnes +AvailableOnlyOnPackagedVersions=Vietējais fails integritātes pārbaudei ir pieejams tikai tad, ja programma ir instalēta no oficiāla paketes XmlNotFound=Xml Integrity Pieteikuma fails nav atrasts SessionId=Sesijas ID SessionSaveHandler=Pārdevējs, lai saglabātu sesijas -SessionSavePath=Uzglabāšanas sesijas lokalizācija +SessionSavePath=Sesijas saglabāšanas vieta PurgeSessions=Iztīrīt sesijas ConfirmPurgeSessions=Vai jūs tiešām vēlaties iztīrītu visas sesijas? Tas atvienos katru lietotāju (izņemot sevi). NoSessionListWithThisHandler=Saglabāt sesijas apstrādātāju, kas konfigurēts jūsu PHP, neļauj uzskaitīt visas darbojas sesijas. @@ -37,7 +37,7 @@ UnlockNewSessions=Noņemt savienojuma bloķēšanu YourSession=Jūsu sesija Sessions=Lietotāju sesijas WebUserGroup=Web servera lietotājs/grupa -NoSessionFound=Šķiet, ka jūsu PHP nepieļauj aktīvo sesiju uzskaitījumu. Sarakstu ( %s ) saglabātais katalogs var tikt aizsargāts (piemēram, ar OS atļaujām vai PHP direktīvu open_basedir). +NoSessionFound=Šķiet, ka jūsu PHP konfigurācija neļauj iekļaut aktīvās sesijas. Direktorija, ko izmanto sesiju saglabāšanai ( %s ), var būt aizsargāta (piemēram, ar OS atļaujām vai PHP direktīvu open_basedir). DBStoringCharset=Datu bāzes kodējuma datu uzglabāšanai DBSortingCharset=Datu bāzes rakstzīmju kopa, lai kārtotu datus ClientCharset=Klienta kodējums @@ -54,8 +54,8 @@ SetupArea=Iestatījumi UploadNewTemplate=Augšupielādēt jaunu veidni (-es) FormToTestFileUploadForm=Forma, lai pārbaudītu failu augšupielādi (pēc uiestatītajiem parametriem) IfModuleEnabled=Piezīme: jā, ir efektīva tikai tad, ja modulis %s ir iespējots -RemoveLock=Dzēst failu %s, ja tāds ir, lai varētu izmantošanu atjaunināšanas rīku. -RestoreLock=Atjaunot failu %s ar lasīšanas tiesībām tikai, lai bloķētu atjaunošanas rīka izmantošanu. +RemoveLock=Ja ir, noņemiet / pārdēvējiet failu %s , lai varētu izmantot atjaunināšanas / instalēšanas rīku. +RestoreLock=Atjaunojiet failu %s tikai ar lasīšanas atļauju, lai atspējotu jebkādu turpmāku atjaunināšanas / instalēšanas rīka izmantošanu. SecuritySetup=Drošības iestatījumi SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=Kļūda, šim modulim ir nepieciešama PHP versija %s vai augstāka @@ -91,7 +91,7 @@ NextValueForInvoices=Nākošā vērtība (rēķini) NextValueForCreditNotes=Nākošā vērtība (kredīta piezīmes) NextValueForDeposit=Nākamā vērtība (pirmā iemaksa) NextValueForReplacements=Tālāk vērtība (nomaiņa) -MustBeLowerThanPHPLimit=Piezīme: jūsu PHP ierobežo katra failu augšupielādes lielumu %s %s, neatkarīgi no šī parametra vērtība ir +MustBeLowerThanPHPLimit=Piezīme: jūsu PHP konfigurācija pašlaik ierobežo maksimālo faila lielumu, lai augšupielādētu %s %s, neatkarīgi no šī parametra vērtības NoMaxSizeByPHPLimit=Piezīme: Nav limits tiek noteikts jūsu PHP konfigurācijā MaxSizeForUploadedFiles=Maksimālais augšupielādējamo failu izmērs (0 nepieļaut failu augšupielādi) UseCaptchaCode=Izmantot grafisko kodu (CAPTCHA) pieteikšanās lapā @@ -130,7 +130,7 @@ YouCanEditPHPTZ=Lai iestatītu citu PHP laika joslu (nav nepieciešams), varat m HoursOnThisPageAreOnServerTZ=Brīdinājums, pretēji citiem ekrāniem, šīs lapas stundas neatrodas jūsu vietējā laika joslā, bet servera laika joslā. Box=Logrīks Boxes=Logrīki -MaxNbOfLinesForBoxes=Maksimālais logrīku līniju skaits +MaxNbOfLinesForBoxes=Maks. logrīku līniju skaits AllWidgetsWereEnabled=Ir iespējoti visi pieejamie logrīki PositionByDefault=Noklusējuma secība Position=Pozīcija @@ -141,13 +141,13 @@ LangFile=. lang fails System=Sistēma SystemInfo=Sistēmas informācija SystemToolsArea=Sistēmas rīku iestatīšana -SystemToolsAreaDesc=Šī sadaļa piedāvā administrēšanas funkcijas. Lietojiet izvēlni, lai izvēlētos funkciju kuru Jūs meklējat. +SystemToolsAreaDesc=Šī joma nodrošina administrēšanas funkcijas. Izmantojiet izvēlni, lai izvēlētos vajadzīgo funkciju. Purge=Tīrīt -PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in %s directory). Using this feature is not necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server. +PurgeAreaDesc=Šī lapa ļauj izdzēst visus Dolibarr ģenerētos vai glabātos failus (pagaidu faili vai visi faili %s direktorijā). Šīs funkcijas izmantošana parasti nav nepieciešama. Tas tiek nodrošināts kā risinājums lietotājiem, kuru Dolibarr uztur pakalpojumu sniedzējs, kas nepiedāvā atļaujas, lai dzēstu tīmekļa servera ģenerētos failus. PurgeDeleteLogFile=Dzēsiet žurnāla failus, tostarp %s , kas definēti Syslog modulim (nav datu pazaudēšanas riska). PurgeDeleteTemporaryFiles=Dzēst visus pagaidu failus (nav datu pazaudēšanas riska) PurgeDeleteTemporaryFilesShort=Dzēst pagaidu failus -PurgeDeleteAllFilesInDocumentsDir=Dzēst visus failus direktorijā %s. Pagaidu failus un arī datu bāzes rezerves dumpus, pievienotie faili pievienoti elementiem (trešās personas, rēķini, ...) un augšupielādēta ECM modulī tiks dzēsti. +PurgeDeleteAllFilesInDocumentsDir=Dzēsiet visus failus direktorijā: %s .
Tas izdzēsīs visus radītos dokumentus, kas saistīti ar elementiem (trešajām personām, rēķiniem utt.), ECM modulī augšupielādētiem failiem, datu bāzes rezerves izgāztuvēm un pagaidu failus. PurgeRunNow=Tīrīt tagad PurgeNothingToDelete=Nav mapes vai failu, kurus jādzēš. PurgeNDirectoriesDeleted=%s faili vai direktorijas dzēsti. @@ -160,16 +160,16 @@ Restore=Atjaunot RunCommandSummary=Rezerves kopijas izveide ir uzsākta ar komandu BackupResult=Rezerves kopijas izveidošanas rezultāts BackupFileSuccessfullyCreated=Rezerves kopijas fails veiksmīgi izveidots -YouCanDownloadBackupFile=Izveidotos failus tagad var lejupielādēt +YouCanDownloadBackupFile=Radīto failu tagad var lejupielādēt NoBackupFileAvailable=Nav rezerves kopiju faili pieejami ExportMethod=Eksportēšanas veids ImportMethod=Importēšanas veids ToBuildBackupFileClickHere=Lai izveidotu rezerves kopiju noklikšķiniet šeit . -ImportMySqlDesc=Lai importētu rezerves kopijas failu, jums ir jāizmanto mysql komandas komandrinda: +ImportMySqlDesc=Lai importētu MySQL rezerves failu, varat izmantot phpMyAdmin, izmantojot savu hostingu, vai izmantot komandu no komandrindas mysql komandu.
Piemēram: ImportPostgreSqlDesc=Lai importētu rezerves kopijas failu, jums ir jāizmanto pg_restore komandu komandrindā: ImportMySqlCommand=%s %s < manarezerveskopija.sql ImportPostgreSqlCommand=%s %s mybackupfails.sql -FileNameToGenerate=Faila nosaukumu kuru izveido +FileNameToGenerate=Faila nosaukums dublējumam: Compression=Saspiešana CommandsToDisableForeignKeysForImport=Komandu atslēgt ārvalstu taustiņus uz importu CommandsToDisableForeignKeysForImportWarning=Obligāti, ja jūs vēlaties, lai varētu atjaunot savu SQL dump vēlāk @@ -209,7 +209,7 @@ SeeInMarkerPlace=Skatiet Marketplace Updated=Atjaunots Nouveauté=Jaunums AchatTelechargement=Pirkt / lejupielādēt -GoModuleSetupArea=Lai izvietotu / instalētu jaunu moduli, dodieties uz moduļa iestatīšanas apgabalu vietnē %s . +GoModuleSetupArea=Lai izvietotu / instalētu jaunu moduli, dodieties uz moduļa iestatīšanas apgabalu: %s . DoliStoreDesc=DoliStore ir oficiālā mājaslapa Dolibarr ERP / CRM papildus moduļiem DoliPartnersDesc=Uzņēmumi, kas piedāvā pielāgotus izstrādātus moduļus vai funkcijas.
Piezīme: tā kā Dolibarr ir atvērtā koda programma, ikviens , kurš ir pieredzējis PHP programmēšanā, var izveidot moduli. WebSiteDesc=Ārējās vietnes vairākiem papildinājumiem (bez kodols) moduļiem ... @@ -225,18 +225,18 @@ Required=Nepieciešams UsedOnlyWithTypeOption=Used by some agenda option only Security=Drošība Passwords=Paroles -DoNotStoreClearPassword=Neglabāt nešifrētas paroles datubāzē bet izmantot šifrētas (aktivizācija ieteicama) -MainDbPasswordFileConfEncrypted=Datubāzes paroli šifrēti conf.php (aktivēt ieteicams) +DoNotStoreClearPassword=Šifrēt datu bāzē saglabātās paroles (NAV kā vienkāršu tekstu). Ir ļoti ieteicams aktivizēt šo opciju. +MainDbPasswordFileConfEncrypted=Šifrēt datubāzes paroli, kas saglabāta conf.php. Ir ļoti ieteicams aktivizēt šo opciju. InstrucToEncodePass=Lai paroli šifrētu conf.php failā, nomainiet rindiņu
$ dolibarr_main_db_pass = "...";
ar
$ dolibarr_main_db_pass = "crypted: %s"; InstrucToClearPass=To have password decoded (clear) into the conf.php file, replace the line
$dolibarr_main_db_pass="crypted:...";
by
$dolibarr_main_db_pass="%s"; -ProtectAndEncryptPdfFiles=Radīto PDF failu aizsardzība NAV ieteicama (pārtraukumi masas PDF paaudzes) +ProtectAndEncryptPdfFiles=Aizsargāt ģenerētos PDF failus. Tas nav ieteicams, jo tas pārtrauc lielapjoma PDF ģenerēšanu. ProtectAndEncryptPdfFilesDesc=Aizsardzība PDF dokumentu saglabā to pieejamu lasīt un izdrukāt ar jebkuru PDF pārlūkprogrammu. Tomēr, rediģēšana un kopēšana nav iespējams vairs. Ņemiet vērā, ka, izmantojot šo funkciju veidojot kopējos apvienotos pdf nedarbojas (piemēram, neapmaksātiem rēķiniem). Feature=Iespēja DolibarrLicense=Licence Developpers=Izstrādātāji/ziedotāji -OfficialWebSite=Dolibarr starptautiskā oficiālā tīmekļa vietne +OfficialWebSite=Dolibarr oficiālā tīmekļa vietne OfficialWebSiteLocal=Lokālā mājas lapa (%s) -OfficialWiki=Dolibarr Wiki dokumentācija +OfficialWiki=Dolibarr dokumentācija / Wiki OfficialDemo=Dolibarr tiešsaistes demo OfficialMarketPlace=Oficiālais tirgus vieta ārējiem moduļiem/papildinājumiem OfficialWebHostingService=Saistītie tīmekļa vietnes pakalpojumi (Cloud hosting) @@ -290,14 +290,14 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Noklusējuma sūtītāja e-pasta ziņojums manuālai UserEmail=Lietotāja e-pasts CompanyEmail=Uzņēmuma e-pasts FeatureNotAvailableOnLinux=Iezīme nav pieejams Unix, piemēram, sistēmas. Pārbaudi savu sendmail programmai vietas. -SubmitTranslation=Ja šīs valodas tulkojums nav pabeigts vai jūs atradāt kļūdas, varat to labot, rediģējot failus katalogā langs / %s un iesniedziet izmaiņas vietnē www.transifex.com/dolibarr-association/dolibarr/. +SubmitTranslation=Ja šīs valodas tulkojums nav pilnīgs vai jūs atradīsiet kļūdas, varat to labot, rediģējot failus direktorijā langs / %s un iesniedzot izmaiņas vietnē www.transifex.com/dolibarr-association/dolibarr/ SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. ModuleSetup=Moduļa iestatīšana ModulesSetup=Moduļu/Aplikāciju iestatīšana ModuleFamilyBase=Sistēma -ModuleFamilyCrm=Klientu pārvaldība (CRM) -ModuleFamilySrm=Pārdevēja saistību pārvaldība (VRM) -ModuleFamilyProducts=Produktu Pārvaldība (PP) +ModuleFamilyCrm=Klientu attiecību pārvaldība (CRM) +ModuleFamilySrm=Pārdevēja attiecību pārvaldība (VRM) +ModuleFamilyProducts=Produktu pārvaldība (PM) ModuleFamilyHr=Darbinieku resursu pārvaldība (DRP) ModuleFamilyProjects=Projekti / Sadarbības darbi ModuleFamilyOther=Cits @@ -310,12 +310,12 @@ ModuleFamilyInterface=Interfaces with external systems MenuHandlers=Izvēlnes manipulatori MenuAdmin=Izvēlnes redaktors DoNotUseInProduction=Neizmantot produkcijā -ThisIsProcessToFollow=Šie ir soļi, kas jāipilda: +ThisIsProcessToFollow=Jaunināšanas procedūra: ThisIsAlternativeProcessToFollow=Tas ir alternatīvs iestatījums, lai apstrādātu manuāli: StepNb=Solis %s -FindPackageFromWebSite=Atrodiet paketi, kurā ir norādītas vēlamās funkcijas (piemēram, oficiālajā tīmekļa vietnē %s). -DownloadPackageFromWebSite=Lejupielādēt arhīvu (piem. no oficialās mājas lapas %s). -UnpackPackageInDolibarrRoot=Ielieciet / noņemiet iepakotos failus servera direktorijā, kas veltīts Dolibarr: %s +FindPackageFromWebSite=Atrodiet paketi, kas nodrošina vajadzīgās funkcijas (piemēram, oficiālajā tīmekļa vietnē %s). +DownloadPackageFromWebSite=Lejupielādējiet paketi (piemēram, no oficiālās tīmekļa vietnes %s). +UnpackPackageInDolibarrRoot=Izsaiņojiet / noņemiet iepakotos failus savā Dolibarr servera direktorijā: %s UnpackPackageInModulesRoot=Lai izvietotu / instalētu ārējo moduli, izpakotu / izjauktu iepakotos failus ārējo moduļu servera direktorijā:
%s SetupIsReadyForUse=Moduļa izvietošana ir pabeigta. Tomēr savā pieteikumā ir jāiespējo un jāiestata modulis, dodoties uz lapu iestatīšanas moduļiem: %s . NotExistsDirect=Alternatīva saknes direktorijs nav definēta.
@@ -323,7 +323,7 @@ InfDirAlt=Kopš 3 versijas, ir iespējams noteikt alternatīvu sakne directory.T InfDirExample=
Pēc tam ierakstiet to failā conf.php
$ dolibarr_main_url_root_alt = "/custom"
$dolibarr_main_document_root_alt = '/path/of/dolibarr/htdocs/ custom'
Ja šīm rindiņas ir komentētas ar "#", lai tās iespējotu, vienkārši noņemiet "#" simbolu. YouCanSubmitFile=Varat arī augšupielādēt moduļa .zip failu paketi: CurrentVersion=Dolibarr pašreizējā versija -CallUpdatePage=Pārejiet uz lapu, kura atjaunina datu bāzes struktūru un datus: %s. +CallUpdatePage=Pārlūkojiet lapu, kas atjaunina datubāzes struktūru un datus: %s. LastStableVersion=Jaunākā stabilā versija LastActivationDate=Jaunākais aktivizācijas datums LastActivationAuthor=Jaunākais aktivizētāja autors @@ -347,7 +347,7 @@ ErrorCantUseRazIfNoYearInMask=Error, can't use option @ to reset counter each ye ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Kļūda, nevar izmantot iespēju @, ja secība {gggg} {mm} vai {gads} {mm} nav maska. UMask=Umask parametri jauniem failiem Unix/Linux/BSD/Mac failu sistēma. UMaskExplanation=Šis parametrs ļauj noteikt atļaujas, kas pēc noklusējuma failus, ko rada Dolibarr uz servera (laikā augšupielādēt piemēram).
Tam jābūt astotnieku vērtība (piemēram, 0666 nozīmē lasīt un rakstīt visiem).
Šis parametrs ir bezjēdzīgi uz Windows servera. -SeeWikiForAllTeam=Apskatiet wiki lapu, lai uzzinātu visu dalībnieku un to organizāciju pilnu sarakstu +SeeWikiForAllTeam=Apskatiet Wiki lapu, lai iegūtu sarakstu ar dalībniekiem un to organizāciju UseACacheDelay= Kavēšanās caching eksporta atbildes sekundēs (0 vai tukšs bez cache) DisableLinkToHelpCenter=Paslēpt saites "vajadzīga palīdzība vai atbalsts" pieteikšanās lapā DisableLinkToHelp=Noslēpt saiti uz tiešsaistes palīdzību "%s" @@ -364,27 +364,27 @@ ExampleOfDirectoriesForModelGen=Piemēri sintaksi:
c: \\ mydir
/ Home FollowingSubstitutionKeysCanBeUsed=
Lai uzzinātu, kā izveidot savu odt dokumentu veidnes, pirms uzglabājot tos šajos katalogi, lasīt wiki dokumentus: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Vārda/Uzvārda atrašanās vieta -DescWeather=Šādas bildes tiks parādīta paneļa kad vairāki vēlu darbību sasniedz šādas vērtības: +DescWeather=Turpmāk redzamie attēli tiks parādīti panelī, kad kavēto darbību skaits sasniegs šādas vērtības: KeyForWebServicesAccess=Galvenais, lai izmantotu Web Services (parametrs "dolibarrkey", kas veikalu) TestSubmitForm=Ievades testa forma -ThisForceAlsoTheme=Izmantojot šo izvēlni vadītājs būs arī izmantot savu tēmu kāds ir lietotāja izvēles. Arī šī izvēlne vadītājs specializējies smartphones nav strādā uz visām viedtālrunis. Izmantot citu izvēlnes pārvaldnieku, ja jums rodas problēmas jums. +ThisForceAlsoTheme=Izmantojot šo izvēlņu menedžeri, neatkarīgi no lietotāja izvēles tiks izmantota arī sava tēma. Arī šis viedtālruņiem specializētais izvēlņu pārvaldnieks nedarbojas visos viedtālrunī. Ja rodas problēmas ar citu, izmantojiet citu izvēlņu pārvaldnieku. ThemeDir=Izskata katalogs ConnectionTimeout=Savienojuma beigu laiks ResponseTimeout=Atbildes taimauts SmsTestMessage=Testa ziņojums no __ PHONEFROM__ to __ PHONETO__ ModuleMustBeEnabledFirst=Modulim %s jābūt aktivizētam vispirms, ja jūs vēlaties izmantot šo funkciju. SecurityToken=Atslēga uz drošu saiti -NoSmsEngine=Nav pieejams SMS sūtītāju pārvaldnieks. SMS sūtītāju pārvaldnieks nav instalēts ar noklusējuma izplatīšanu, jo tas ir atkarīgs no ārējā piegādātāja, taču jūs varat atrast kādu no %s +NoSmsEngine=Nav pieejams neviens SMS sūtītāja pārvaldnieks. SMS sūtītāja pārvaldnieks nav instalēts ar noklusējuma izplatīšanu, jo tie ir atkarīgi no ārēja piegādātāja, bet jūs varat atrast kādu no %s PDF=PDF -PDFDesc=Varat iestatīt katru globālo opciju, kas saistīta ar PDF ģenerēšanu -PDFAddressForging=Noteikumi veidojot adreses lauku -HideAnyVATInformationOnPDF=Slēpt visu ar pārdošanas nodokli / PVN saistīto informāciju par radīto PDF failu +PDFDesc=Globālās iespējas PDF ģenerēšanai. +PDFAddressForging=Adreses lodziņu noteikumi +HideAnyVATInformationOnPDF=Slēpt visu informāciju, kas saistīta ar pārdošanas nodokli / PVN PDFRulesForSalesTax=Pārdošanas nodokļa / PVN noteikumi PDFLocaltax=Noteikumi par %s -HideLocalTaxOnPDF=Slēpt %s likmi pdf kolonnas nodokļu pārdošanā -HideDescOnPDF=Slēpt produktu aprakstu radītos PDF -HideRefOnPDF=Slēpt produktu ref. izveidotajos PDF -HideDetailsOnPDF=Slēpt produktu līnijas detaļas izveidotajos PDF +HideLocalTaxOnPDF=Paslēpt %s likmi slejā Nodokļu pārdošana +HideDescOnPDF=Paslēpt produktu aprakstu +HideRefOnPDF=Hide products ref. +HideDetailsOnPDF=Slēpt informāciju par produktu līnijām PlaceCustomerAddressToIsoLocation=Izmantojiet franču standarta pozīciju (La Poste) klienta adreses pozīcijai Library=Bibliotēka UrlGenerationParameters=Parametri, lai nodrošinātu drošas saites @@ -395,7 +395,7 @@ ButtonHideUnauthorized=Slēpt pogas ne-admin lietotājiem, lai veiktu nesankcion OldVATRates=Vecā PVN likme NewVATRates=Jaunā PVN likme PriceBaseTypeToChange=Pārveidot par cenām ar bāzes atsauces vērtību, kas definēta tālāk -MassConvert=Uzsākt masveida konvertēšanu +MassConvert=Uzsākt lielapjoma reklāmguvumu String=Rinda TextLong=Garš teksts HtmlText=Html teksts @@ -417,16 +417,16 @@ ExtrafieldCheckBox=Izvēles rūtiņas ExtrafieldCheckBoxFromList=Izvēles rūtiņas no tabulas ExtrafieldLink=Saite uz objektu ComputedFormula=Aprēķinātais lauks -ComputedFormulaDesc=Šeit varat ievadīt formulu, izmantojot citas objekta īpašības vai jebkuru PHP kodēšanu, lai iegūtu dinamisku aprēķinātu vērtību. Varat izmantot visas PHP saderīgās formulas, tostarp "?" nosacījumu operators un pēc globāla objekta: $ db, $ conf, $ langs, $ mysoc, $ user, $ object .
BRĪDINĀJUMS : tikai dažas $ objekts var būt pieejams. Ja jums ir vajadzīgas īpašības, kas nav ielādētas, vienkārši iegūstiet sev objektu savā formulā kā otrajā piemērā.
Izmantojot aprēķināto lauku, jūs nevarat ievadīt sev jebkādu vērtību no saskarnes. Arī tad, ja ir sintakses kļūda, formula var atgriezties neko.

Formulas piemērs:
$ object-> id <10? ($ object-> id / 2, 2): ($ object-> id + 2 * $ user-> id) * (int) substr ($ mysoc-> zip, 1, 2)

Piemērs, lai atkārtoti ielādētu objektu
(($ reloadedobj = jauns Societe ($ db)) && ($ reloadedobj-> fetch ($ obj-> id? $ Obj-> id: ($ obj-> rowid? $ Obj- rowid: $ object-> id))> 0))? $ reloadedobj-> array_options ['options_extrafieldkey'] * $ reloadedobj-> capital / 5: '-1'

Cits piemērs formulas, lai piespiestu objekta un tā vecāka objekta slodzi:
(($ reloadedobj = jauns uzdevums ($ db)) && ($ reloadedobj-> fetch ($ object-> id)> 0) && ($ secondloadedobj = jauns projekts ($ db)) && ($ secondloadedobj-> fetch ($ reloadedobj-> fk_project )> 0))? $ secondloadedobj-> ref: 'Vecāks projekts nav atrasts' +ComputedFormulaDesc=Šeit varat ievadīt formulu, izmantojot citas objekta īpašības vai jebkuru PHP kodējumu, lai iegūtu dinamisku aprēķināto vērtību. Jūs varat izmantot jebkuru PHP saderīgu formulu, ieskaitot "?" stāvokļa operators un šāds globāls objekts: $ db, $ conf, $ langs, $ mysoc, $ user, $ object .
BRĪDINĀJUMS : tikai daži $ $ rekvizīti objekts var būt pieejams. Ja jums nav vajadzīgo īpašību, vienkārši ielādējiet objektu savā formulā, piemēram, otrajā piemērā.
Izmantojot aprēķināto lauku, jūs nevarat ievadīt sev nekādu vērtību no saskarnes. Arī tad, ja ir sintakses kļūda, formula nevar atgriezties neko.

Piemērs formulas:
$ object-> id <10? apaļa ($ object-> id / 2, 2): ($ object-> id + 2 * $ user-> id) * (int) substr ($ mysoc-> zip, 1, 2)

Piemērs, lai ielādētu objektu
(($ reloadedobj = jauns Societe ($ db)) & & ($ reloadedobj-> ielādēt ($ obj-> id? $ Obj-> id: ($ obj-> rowid? $ Obj-> rowid: $ object-> id))> 0))? $ reloadedobj-> array_options ['options_extrafieldkey'] * $ reloadedobj-> capital / 5: '-1'

Cits piemērs formulas, lai piespiestu objektu slodzi un tā mātes objektu:
(($ reloadedobj = jauns uzdevums ($ db)) && ($ reloadedobj-> fetch ($ object-> id)> 0) & & ($ secondloadedobj = jauns projekts ($ db)) & & ($ secondloadedobj-> fetch ($ reloadedobj-> fk_project )> 0))? $ secondloadedobj-> ref: 'Vecāku projekts nav atrasts' ExtrafieldParamHelpPassword=Atstājot šo lauku tukšu, tas nozīmē, ka šī vērtība tiks saglabāta bez šifrēšanas (laukam jābūt paslēptai tikai ar zvaigznīti uz ekrāna).
Iestatiet 'auto', lai izmantotu noklusējuma šifrēšanas kārtulu, lai saglabātu paroli datubāzē (pēc tam vērtība lasīt būs ashh tikai, nav iespējams izgūt sākotnējo vērtību) -ExtrafieldParamHelpselect=Vērtību sarakstam jābūt līnijām ar formāta atslēgu, vērtību (ja taustiņš nevar būt "0")

piemēram:
1, vērtība 1
2, vērtība 2
kods3, vērtība3 < br> ...

Lai sarakstu izveidotu atkarībā no cita papildinoša atribūtu saraksta:
1, value1 | options_ parent_list_code : parent_key
2, value2 | options_ parent_list_code : parent_key

Lai saraksts būtu atkarīgs no cita saraksta:
1, value1 | parent_list_code : parent_key
2, value2 | parent_list_code : parent_key -ExtrafieldParamHelpcheckbox=Vērtību sarakstam jābūt līnijām ar formāta atslēgu, vērtību (ja taustiņš nevar būt "0")

piemēram:
1, vērtība 1
2, vērtība 2
3, vērtība 3 < br> ... -ExtrafieldParamHelpradio=Vērtību sarakstam jābūt līnijām ar formāta atslēgu, vērtību (ja taustiņš nevar būt "0")

piemēram:
1, vērtība 1
2, vērtība 2
3, vērtība 3 < br> ... -ExtrafieldParamHelpsellist=Vērtību saraksts nāk no tabulas
Sintakses: table_name: label_field: id_field :: filtrs
Piemērs: c_typent: libelle: id :: filtru

- idfilter ir necessarly primārā int atslēga
- filtrs var būt vienkāršs tests (piemēram, aktīvs = 1), lai parādītu tikai aktīvo vērtību
Jūs varat arī izmantot $ ID $ filtra raganā ir pašreizējā objekta pašreizējais ID
Lai veiktu SELECT filtru, izmantojiet $ SEL $
, ja vēlaties filtrēt ārējos laukus, izmantojiet sintaksi extra.fieldcode = ... (ja lauka kods ir extrafield lauka kods)

Lai iegūtu sarakstu, atkarībā no cita papildinoša atribūtu saraksta: < br> c_typent: libelle: id: options_ parent_list_code | vecāki_column: filtrs

Lai sarakstā iekļautu citu sarakstu:
c_typent: libelle: id: parent_list_code | vecāku_column: filtrs -ExtrafieldParamHelpchkbxlst=Vērtību saraksts nāk no tabulas
Sintakses: table_name: label_field: id_field :: filtrs
Piemērs: c_typent: libelle: id :: filtru

filtrs var būt vienkāršs tests (piemēram, aktīvs = 1 ), lai parādītu tikai aktīvo vērtību

Jūs varat arī izmantot $ ID $ filtra raganā ir pašreizējā objekta pašreizējais ID
Lai veiktu SELECT filtru, izmantojiet $ SEL $
, ja vēlaties filtrēt uz lauka izmantošanu sintakss extra.fieldcode = ... (ja lauka kods ir extrafield laukums)

Lai sarakstu izveidotu atkarībā no cita papildinoša atribūtu saraksta:
c_typent: libelle: id: options_ parent_list_code | vecāki_column: filtrs

Lai sarakstā iekļautu citu sarakstu:
c_typent: libelle: id: parent_list_code | parent_column: filtrs +ExtrafieldParamHelpselect=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0')

, piemēram,: 1, vērtība1
2, vērtība2
kods3, vērtība3 < br> ...

Lai saraksts būtu atkarīgs no cita papildinošā atribūtu saraksta:
1, vērtība1 | opcijas_ vecāku_līmeņa kods : vecāku_skava
2, vērtība2 | opcijas_ vecāku saraksts_code : parent_key

Lai saraksts būtu atkarīgs no cita saraksta:
1, vērtība1 | vecāku saraksts_code : vecāku_skava
2, vērtība2 | vecāku saraksts_code : vecāku_poga +ExtrafieldParamHelpcheckbox=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0')

, piemēram,: 1, vērtība1
2, vērtība2
3, vērtība3 < br> ... +ExtrafieldParamHelpradio=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0')

, piemēram,: 1, vērtība1
2, vērtība2
3, vērtība3 < br> ... +ExtrafieldParamHelpsellist=Vērtību saraksts nāk no tabulas
Sintakse: table_name: label_field: id_field :: filtrs
piemērs: c_typent: libelle: id :: filtrs

- idfilter ir obligāti primārs int key | - filtrs var būt vienkāršs tests (piemēram, aktīvs = 1), lai parādītu tikai aktīvo vērtību
filtru raganā var izmantot arī $ ID $, kas ir pašreizējā objekta pašreizējais ID. $
, ja vēlaties filtrēt uz ekrāna, izmantojiet sintaksi extra.fieldcode = ... (ja lauka kods ir extrafield kods)

Lai saraksts būtu atkarīgs no cita papildu atribūtu saraksta: < br> c_typent: libelle: id: options_ vecāku_list_code | vecāku_krāsa: filtrs

Lai iegūtu sarakstu atkarībā no cita saraksta:
c_typent: libelle: id: parent_list_code | vecāku_ sleja: filtrs +ExtrafieldParamHelpchkbxlst=Vērtību saraksts nāk no tabulas
Sintakse: table_name: label_field: id_field :: filtrs
piemērs: c_typent: libelle: id :: filtrs

filtrs var būt vienkāršs tests (piemēram, aktīvs = 1 ), lai parādītu tikai aktīvo vērtību
Jūs varat arī izmantot $ ID $ filtru raganā, kas ir pašreizējā objekta pašreizējais ID
Lai SELECT veiktu filtru, izmantojiet $ SEL $
, ja vēlaties filtrēt uz ekrāna. syntax extra.fieldcode = ... (ja lauka kods ir extrafield kods)

Lai iegūtu sarakstu atkarībā no cita papildu atribūtu saraksta:
c_typent: libelle: id: options_ parent_list_code | vecāku_krāsa: filtrs

Lai iegūtu sarakstu atkarībā no cita saraksta:
c_typent: libelle: id: vecāku saraksts_code | vecāku_ sleja: filtrs ExtrafieldParamHelplink=Parametriem jābūt ObjectName: Classpath
Syntax: ObjectName: Classpath
Piemēri:
Societe: societe / class / societe.class.php
Kontakti: contact / class / contact.class.php LibraryToBuildPDF=Bibliotēka, ko izmanto PDF veidošanai -LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:
1 : local tax apply on products and services without vat (localtax is calculated on amount without tax)
2 : local tax apply on products and services including vat (localtax is calculated on amount + main tax)
3 : local tax apply on products without vat (localtax is calculated on amount without tax)
4 : local tax apply on products including vat (localtax is calculated on amount + main vat)
5 : local tax apply on services without vat (localtax is calculated on amount without tax)
6 : local tax apply on services including vat (localtax is calculated on amount + tax) +LocalTaxDesc=Dažas valstis var piemērot divus vai trīs nodokļus katrā rēķina rindā. Šādā gadījumā izvēlieties otrā un trešā nodokļa veidu un likmi. Iespējamie veidi ir:
1: vietējais nodoklis attiecas uz produktiem un pakalpojumiem bez tvertnes (localtax tiek aprēķināts bez nodokļa)
2: vietējie nodokļi attiecas uz produktiem un pakalpojumiem, ieskaitot vat (localtax tiek aprēķināta pēc summas + galvenais nodoklis) )
3: vietējie nodokļi attiecas uz produktiem bez cisternām (localtax tiek aprēķināta bez nodokļa)
4: vietējie nodokļi attiecas uz produktiem, ieskaitot tvertni (localtax tiek aprēķināta pēc summas + galvenā tvertne)
5: vietējais nodoklis, ko piemēro par pakalpojumiem bez vat (vietējais maksājums tiek aprēķināts bez nodokļa)
6: vietējiem nodokļiem, kas attiecas uz pakalpojumiem, ieskaitot mucu (vietējais maksājums tiek aprēķināts pēc summas + nodokļa) SMS=SMS LinkToTestClickToDial=Ievadiet tālruņa numuru, uz kuru zvanīt, lai parādītu saiti, lai pārbaudītu Nospied lai zvanītu url lietotājam %s RefreshPhoneLink=Atsvaidzināt @@ -443,30 +443,30 @@ InitEmptyBarCode=Sākotnējā vērtība nākamajiem %s tukšajiem ierakstiem EraseAllCurrentBarCode=Dzēst visas svītrkodu vērtības ConfirmEraseAllCurrentBarCode=Vai tiešām vēlaties dzēst visas svītrkodu vērtības ? AllBarcodeReset=Visas svītrkodu vērtības dzēstas -NoBarcodeNumberingTemplateDefined=Svītrkoda moduļa iestatījumos nav iespējota neviena svītrkoda šablona. +NoBarcodeNumberingTemplateDefined=Svītrkodu moduļa iestatījumos nav iespējota numerācijas svītrkodu veidne. EnableFileCache=Iespējot faila kešu -ShowDetailsInPDFPageFoot=Pievienojiet detalizētu informāciju PDF failu kājenē, piemēram, uzņēmuma adresi vai vadītāju vārdus (lai aizpildītu profesionālos identifikācijas datus, uzņēmuma kapitālu un PVN numuru). -NoDetails=Nav vairāk informācijas kājenē +ShowDetailsInPDFPageFoot=Pievienot sīkāku informāciju kājenē, piemēram, uzņēmuma adresi vai pārvaldnieka vārdus (papildus profesionālajiem identifikatoriem, uzņēmuma kapitālu un PVN numuru). +NoDetails=Papildu dati kājenē nav pieejami DisplayCompanyInfo=Rādīt uzņēmuma adresi DisplayCompanyManagers=Rādīt menedžeru vārdus DisplayCompanyInfoAndManagers=Rādīt uzņēmuma adresi un menedžeru vārdus EnableAndSetupModuleCron=Ja vēlaties, lai šis atkārtotās rēķins tiktu ģenerēts automātiski, modulis * %s * ir jāaktivizē un jāuzstāda pareizi. Pretējā gadījumā rēķinu ģenerēšana no šī veidnes jāveic manuāli, izmantojot pogu * Izveidot *. Ņemiet vērā, ka pat tad, ja esat iespējojis automātisko ģenerēšanu, joprojām varat droši uzsākt manuālo ģenerēšanu. Dublikātu ģenerēšana tajā pašā laika posmā nav iespējama. ModuleCompanyCodeCustomerAquarium=%s, kam seko klienta kods klienta grāmatvedības kodam -ModuleCompanyCodeSupplierAquarium=%s, kam seko piegādātāja kods piegādātāja grāmatvedības kodam +ModuleCompanyCodeSupplierAquarium=%s, kam seko pārdevēja grāmatvedības koda pārdevēja kods ModuleCompanyCodePanicum=Atgriezt tukšu grāmatvedības kodu. -ModuleCompanyCodeDigitaria=Grāmatvedības kods ir atkarīgs no trešās puses koda. Kods sastāv no rakstzīmes "C" pirmajā pozīcijā, kam seko trešās puses pirmās 5 rakstzīmes. +ModuleCompanyCodeDigitaria=Grāmatvedības kods ir atkarīgs no trešās puses koda. Kods sastāv no rakstzīmes "C" pirmajā pozīcijā, kam seko pirmās 5 trešās puses koda rakstzīmes. Use3StepsApproval=Pēc noklusējuma ir jābūt veidotam un apstiprinātam Pirkšanas pasūtījumam no 2 dažādiem lietotājiem (viens solis / lietotājs, lai izveidotu un viens solis / lietotājs apstiprinātu. Ņemiet vērā, ka, ja lietotājam ir gan atļauja izveidot un apstiprināt, viens solis / lietotājs būs pietiekams) . Ar šo opciju varat prasīt trešās pakāpes / lietotāja apstiprinājumu, ja summa ir lielāka par īpašo vērtību (tādēļ būs nepieciešami 3 soļi: 1 = validācija, 2 = pirmais apstiprinājums un 3 = otrais apstiprinājums, ja summa ir pietiekama).
Iestatiet, ka tas ir tukšs, ja pietiek vienam apstiprinājumam (2 pakāpieniem), ja tam vienmēr ir nepieciešams otrais apstiprinājums (3 pakāpieni). UseDoubleApproval=Izmantojiet 3 pakāpju apstiprinājumu, ja summa (bez nodokļiem) ir augstāka par ... -WarningPHPMail=BRĪDINĀJUMS: bieži vien labāk ir iestatīt izejošos e-pastus, lai izmantotu sava pakalpojumu sniedzēja e-pasta serveri, nevis noklusējuma iestatījumus. Daži e-pasta pakalpojumu sniedzēji (piemēram, Yahoo) neļauj sūtīt e-pastu no cita servera, nevis no sava servera. Jūsu pašreizējā iestatīšana izmanto lietojumprogrammas serveri, lai nosūtītu e-pastu, nevis jūsu e-pasta pakalpojumu sniedzēja serveri, tādēļ daži adresāti (tie, kas ir saderīgi ar ierobežojošo DMARC protokolu), jautās savam e-pasta pakalpojumu sniedzējam, ja viņi var pieņemt jūsu e-pastu un dažus e-pasta pakalpojumu sniedzējus (piemēram, Yahoo) var atbildēt "nē", jo serveris nav viņu, tāpēc maz no jūsu nosūtītajiem e-pasta ziņojumiem var tikt pieņemti (uzmanieties arī no jūsu e-pasta pakalpojumu sniedzēja sūtīšanas kvotas).
Ja jūsu e-pasta pakalpojumu sniedzējs (piemēram, Yahoo) šis ierobežojums, jums ir jāmaina e-pasta iestatīšana, lai izvēlētos citu metodi "SMTP serveris" un ievadiet SMTP serveri un akreditācijas datus, ko sniedz jūsu e-pasta pakalpojumu sniedzējs (jautājiet savam e-pasta pakalpojumu sniedzējam, lai saņemtu sava konta SMTP akreditācijas datus). +WarningPHPMail=BRĪDINĀJUMS: bieži vien ir labāk iestatīt izejošos e-pastus, lai izmantotu sava pakalpojumu sniedzēja e-pasta serveri, nevis noklusējuma iestatījumus. Daži e-pasta pakalpojumu sniedzēji (piemēram, Yahoo) neļauj jums sūtīt e-pastu no cita servera nekā viņu pašu serveris. Pašreizējā iestatīšana izmanto lietojumprogrammas serveri, lai nosūtītu e-pastu, nevis e-pasta pakalpojumu sniedzēja serveri, tāpēc daži saņēmēji (viens, kas ir saderīgs ar ierobežojošo DMARC protokolu), jautās jūsu e-pasta pakalpojumu sniedzējam, ja viņi varēs pieņemt jūsu e-pasta adresi un dažus e-pasta pakalpojumu sniedzējus (piemēram, Yahoo) var atbildēt uz „nē”, jo serveris nav viņu, tāpēc daži no jūsu nosūtītajiem e-pasta ziņojumiem var nebūt pieņemami (uzmanieties arī no e-pasta pakalpojumu sniedzēja sūtīšanas kvotas).
Ja jūsu e-pasta pakalpojumu sniedzējam (piemēram, Yahoo) ir šis ierobežojums ir jāmaina e-pasta iestatīšana, lai izvēlētos citu metodi "SMTP serveris" un ievadiet SMTP serveri un e-pasta pakalpojumu sniedzēja piešķirtos akreditācijas datus. WarningPHPMail2=Ja jūsu e-pasta SMTP pakalpojumu sniedzējam ir jāierobežo e-pasta klients uz dažām IP adresēm (ļoti reti), tas ir jūsu ERP CRM lietojumprogrammas e-pasta lietotāja aģenta (MUA) IP adrese: %s . ClickToShowDescription=Noklikšķiniet, lai parādītu aprakstu DependsOn=Šim modulim nepieciešams modulis (-i) RequiredBy=Šis modulis nepieciešams modulim (-ļiem) TheKeyIsTheNameOfHtmlField=Šis ir HTML lauka nosaukums. Lai izlasītu HTML lapas saturu, ir nepieciešamas tehniskās zināšanas, lai iegūtu lauka atslēgas nosaukumu. -PageUrlForDefaultValues=Jums jāievada relatīvais lapas ceļš URL. Ja URL tiek iekļauti parametri, noklusējuma vērtības būs efektīvas, ja visi parametri ir vienādi. -PageUrlForDefaultValuesCreate=
Piemērs:
Jaunas trešās puses veidlapas izveidei ir %s

Par ārējo moduļu URL, kas ir instalēti pielāgotajā direktorijā, neiekļauj "custom /" tāpēc izmantojiet kā mymodule / mypage.php , nevis custom / mymodule / mypage.php.
Ja vēlaties noklusējuma vērtību tikai tad, ja url ir kāds parametrs, varat izmantot %s -PageUrlForDefaultValuesList=
Piemērs:
Lapai, kas ir trešo pušu saraksts, tā ir %s

Par ārējo moduļu URL, kas ir instalēti pielāgotajā direktorijā, neietver "custom /" izmantojiet tādu kā mymodule / mypagelist.php , nevis custom / mymodule / mypagelist.php.
Ja vēlaties noklusējuma vērtību tikai tad, ja url ir kāds parametrs, varat izmantot %s -EnableDefaultValues=Iespējot personalizēto noklusēto vērtību izmantošanu +PageUrlForDefaultValues=Jums jāievada lapas URL relatīvais ceļš. Ja URL ietverat parametrus, noklusējuma vērtības būs efektīvas, ja visi parametri ir iestatīti vienādā vērtībā. +PageUrlForDefaultValuesCreate=
Piemērs:
Lai veidlapa izveidotu jaunu trešo personu, tā ir %s .
Par ārējā moduļa URL, kas instalēts pielāgotā direktorijā, neietveriet "custom /" , tāpēc izmantojiet ceļu, piemēram, mymodule / mypage.php , nevis pielāgotu / mymodule / mypage.php.
Ja vēlaties noklusējuma vērtību tikai tad, ja URL ir kāds parametrs, varat izmantot %s < / spēcīgs> +PageUrlForDefaultValuesList=
Piemērs:
Lapai, kurā uzskaitītas trešās personas, tas ir %s .
Par ārējā moduļa URL, kas instalēts pielāgotā direktorijā, neietveriet 'custom /' ceļš, piemēram, mymodule / mypagelist.php un nevis pielāgots / mymodule / mypagelist.php.
Ja vēlaties noklusējuma vērtību tikai tad, ja URL ir kāds parametrs, varat izmantot %s +EnableDefaultValues=Iespējot noklusējuma vērtību pielāgošanu EnableOverwriteTranslation=Iespējot pārrakstīto tulkojumu izmantošanu GoIntoTranslationMenuToChangeThis=Taustiņam ir atrasts tulkojums ar šo kodu. Lai mainītu šo vērtību, jums ir jārediģē no Home-Setup-translation. WarningSettingSortOrder=Brīdinājums, noklusējuma rūtiņu secības iestatīšana var radīt tehnisku kļūdu, apmeklējot saraksta lapu, ja lauks nav nezināma lauka. Ja rodas šāda kļūda, atgriezieties šajā lapā, lai noņemtu noklusējuma kārtošanas secību un atjaunotu noklusējuma darbību. @@ -477,12 +477,12 @@ WatermarkOnDraftExpenseReports=Ūdenszīme uz izdevumu pārskatu projektiem AttachMainDocByDefault=Iestatiet to uz 1, ja vēlaties pēc noklusējuma pievienot e-pasta galveno dokumentu (ja nepieciešams) FilesAttachedToEmail=Pievienot failu SendEmailsReminders=Sūtīt darba kārtībā atgādinājumus pa e-pastu -davDescription=Pievienojiet komponents DAV serverim +davDescription=Iestatiet WebDAV serveri DAVSetup=DAV moduļa uzstādīšana -DAV_ALLOW_PUBLIC_DIR=Iespējot publisko direktoriju (WebDav direktoriju bez nepieciešamības pieslēgties) -DAV_ALLOW_PUBLIC_DIRTooltip=Publiskā direktorija WebDav ir WebDAV katalogs, kuru ikvienam var piekļūt (lasīšanas un rakstīšanas režīmā), bez nepieciešamības / izmantot pašreizējo lietotāja vārdu / paroli. -DAV_ALLOW_ECM_DIR=Iespējot DMS / ECM moduļa saknes direktoriju (nepieciešams pieslēgums) -DAV_ALLOW_ECM_DIRTooltip=Saknes direktorija, kurā visi faili tiek manuāli augšupielādēti, izmantojot DMS / ECM moduli. Tāpat kā tīmekļa saskarnes funkcijai, lai piekļūtu tai, jums būs nepieciešama derīga ieeja / parole ar piešķirtajām atļaujām. +DAV_ALLOW_PUBLIC_DIR=Iespējot publisko direktoriju (WebDAV katalogs - nav nepieciešams pieteikties) +DAV_ALLOW_PUBLIC_DIRTooltip=WebDAV publiskais katalogs ir WebDAV katalogs, kuram ikviens var piekļūt (lasīšanas un rakstīšanas režīmā), bez nepieciešamās atļaujas (pieteikšanās / paroles konts). +DAV_ALLOW_ECM_DIR=Iespējot privāto direktoriju (DMS / ECM moduļa saknes direktorijs - nepieciešams pieteikties) +DAV_ALLOW_ECM_DIRTooltip=Saknes direktorijs, kurā visi faili tiek manuāli augšupielādēti, izmantojot DMS / ECM moduli. Līdzīgi kā piekļuvei no tīmekļa saskarnes, jums būs nepieciešama derīga lietotājvārds / parole, lai piekļūtu tam. # Modules Module0Name=Lietotāji un grupas Module0Desc=Lietotāju / Darbinieku un Grupu vadība @@ -494,35 +494,35 @@ Module10Name=Grāmatvedība Module10Desc=Vienkāršie grāmatvedības pārskati (žurnāli, apgrozījums), pamatojoties uz datubāzes saturu. Neizmanto virsgrāmatu galdiņu. Module20Name=Priekšlikumi Module20Desc=Komerc priekšlikumu vadība -Module22Name=Masveida e-pasta sūtījumi -Module22Desc=Masu e-pasta vadība +Module22Name=Masu e-pasta ziņojumi +Module22Desc=Pārvaldiet lielapjoma sūtīšanu pa e-pastu Module23Name=Enerģija Module23Desc=Uzraudzība patēriņu enerģijas Module25Name=Klientu Pasūtījumi Module25Desc=Klientu pasūtījumu pārvaldīšana Module30Name=Rēķini Module30Desc=Rēķinu un kredītkartes pārvaldīšana klientiem. Rēķinu un kredītrisku pārvaldīšana piegādātājiem -Module40Name=Piegādātāji -Module40Desc=Piegādātāju un pirkumu vadība (pirkšanas pasūtījumi un norēķini) +Module40Name=Pārdevēji +Module40Desc=Pārdevēji un pirkumu pārvaldība (pirkuma pasūtījumi un norēķini) Module42Name=Atkļūdošanas žurnāli Module42Desc=Žurnalēšana (fails, syslog, ...). Šādi žurnāli ir paredzēti tehniskiem / atkļūdošanas nolūkiem. Module49Name=Redaktors Module49Desc=Redaktora vadība Module50Name=Produkti -Module50Desc=Produkta vadība +Module50Desc=Produktu pārvaldība Module51Name=Masu sūtījumi Module51Desc=Masu papīra pasta vadības Module52Name=Krājumi -Module52Desc=Krājumu pārvaldīšana (produkti) +Module52Desc=Krājumu pārvaldība (tikai produktiem) Module53Name=Pakalpojumi -Module53Desc=Pakalpojumu vadība +Module53Desc=Pakalpojumu pārvaldība Module54Name=Līgumi / Abonementi Module54Desc=Līgumu (pakalpojumu vai regulāru abonēšanas) vadība Module55Name=Svītrkodi Module55Desc=Svītrkodu vadība Module56Name=Telefonija Module56Desc=Telefonijas integrācija -Module57Name=Tiešie bankas maksājuma uzdevumi +Module57Name=Bankas tiešā debeta maksājumi Module57Desc=Tiešā debeta maksājuma uzdevumu pārvaldīšana. Tas ietver SEPA datnes izveidi Eiropas valstīm. Module58Name=NospiedLaiSavienotos Module58Desc=Integrācija ar ClickToDial sistēmas (zvaigznīte, ...) @@ -533,11 +533,11 @@ Module70Desc=Intervences vadība Module75Name=Izdevumi un ceļojumu piezīmes Module75Desc=Izdevumi un ceļojumu piezīmju vadība Module80Name=Sūtījumi -Module80Desc=Sūtījumu un piegādes rīkojumu vadība -Module85Name=Bankas un skaidra nauda +Module80Desc=Sūtījumi un piegādes pavadzīmju pārvaldība +Module85Name=Bankas un nauda Module85Desc=Banku vai naudas kontu administrēšana Module100Name=Ārējā vietne -Module100Desc=Dolibarr izvēlnēs pievienojiet ārējās vietnes saiti, lai to skatītu Dolibarr rāmī +Module100Desc=Pievienojiet saiti uz ārēju vietni kā galveno izvēlnes ikonu. Vietne Dolibarr lapā tiek rādīta rāmī. Module105Name=Pastnieks un SPIP Module105Desc=Pastnieks vai SPIP saskarne loceklis moduli Module200Name=LDAP @@ -545,50 +545,50 @@ Module200Desc=LDAP direktoriju sinhronizācija Module210Name=PostNuke Module210Desc=PostNuke integrācija Module240Name=Datu eksports -Module240Desc=Dolibarr datu eksportēšanas rīks (ar palīdzību) +Module240Desc=Tool to export Dolibarr data (with assistants) Module250Name=Datu imports -Module250Desc=Instruments datu importēšanai Dolibarr (ar palīdzību) +Module250Desc=Instruments datu importēšanai Dolibarr (ar palīgiem) Module310Name=Dalībnieki Module310Desc=Fonda biedru vadība Module320Name=RSS barotne -Module320Desc=Pievienot RSS plūsmu Dolibarr lapās -Module330Name=Grāmatzīmes un saīsnes -Module330Desc=Veidojiet īsceļus, vienmēr pieejamus, iekšējām vai ārējām lapām, kurām bieži piekļūstat +Module320Desc=Pievienojiet RSS plūsmu Dolibarr lapām +Module330Name=Grāmatzīmes un īsceļi +Module330Desc=Izveidojiet admin izvēlnes īsceļus uz iekšējām / ārējām lapām Module400Name=Projekti vai potenciālie pirkumi Module400Desc=Projektu vadība, vadītāji / iespējas un / vai uzdevumi. Jūs varat arī piešķirt projektam jebkuru elementu (rēķins, pasūtījums, priekšlikums, iejaukšanās, ...) un iegūt projekta skatījumā šķērsvirzienu. Module410Name=Vebkalendārs Module410Desc=Web kalendāra integrācija Module500Name=Nodokļi un īpašie izdevumi Module500Desc=Citu izdevumu vadīšana (pārdošanas nodokļi, sociālie vai fiskālie nodokļi, dividendes, ...) -Module510Name=Darbinieku algu izmaksa +Module510Name=Algas Module510Desc=Ierakstiet un izsekojiet darbinieku maksājumus -Module520Name=Aizdevums +Module520Name=Aizdevumi Module520Desc=Aizdevumu vadība -Module600Name=Paziņojumi par biznesa pasākumiem -Module600Desc=Sūtiet e-pasta paziņojumus, ko aktivizē uzņēmējdarbības notikums, lietotājiem (katram lietotājam iestatīta iestatīšana), trešo pušu kontakti (iestatījums, kas noteikts katrā trešā puse) vai definētiem e-pasta ziņojumiem -Module600Long=Ņemiet vērā, ka šis modulis sūta e-pastus reāllaikā, kad rodas īpašs biznesa notikums. Ja jūs meklējat funkciju, lai nosūtītu e-pasta atgādinājumus par darba kārtības pasākumiem, dodieties uz moduļa darba kārtības iestatīšanu. +Module600Name=Paziņojumi +Module600Desc=Sūtiet e-pasta paziņojumus, ko izraisījis uzņēmuma notikums: katram lietotājam (iestatījums ir noteikts katram lietotājam), katram trešās puses kontaktpersonai (iestatīšana noteikta katrai trešajai pusei) vai konkrētiem e-pasta ziņojumiem +Module600Long=Ņemiet vērā, ka šis modulis sūta e-pastus reālā laikā, kad notiek konkrēts biznesa notikums. Ja meklējat iespēju nosūtīt e-pasta atgādinājumus par dienas kārtības notikumiem, dodieties uz moduļa Agenda uzstādīšanu. Module610Name=Produkta varianti Module610Desc=Produkta variantu veidošana (krāsa, izmērs utt.) Module700Name=Ziedojumi Module700Desc=Ziedojumu pārvaldība -Module770Name=Izdevumu atskaites -Module770Desc=Izmaksu pārskatu pārvaldīšana un pieprasīšana (transportēšana, ēdināšana, ...) -Module1120Name=Pārdevēja komerciāls piedāvājums +Module770Name=Izdevumu pārskati +Module770Desc=Pārvaldiet izdevumu pārskatu prasības (transportēšana, ēdināšana, ...) +Module1120Name=Pārdevēja komerciālie priekšlikumi Module1120Desc=Pieprasiet pārdevēju komerciālo priekšlikumu un cenas Module1200Name=Mantis Module1200Desc=Mantis integrācija Module1520Name=Dokumentu veidošana -Module1520Desc=Mass mail document generation +Module1520Desc=Masu e-pasta dokumentu ģenerēšana Module1780Name=Atslēgvārdi / sadaļas -Module1780Desc=Izveidojiet tagus / kategoriju (produktus, klientus, pārdevējus, kontaktpersonas vai dalībniekus) +Module1780Desc=Create tags/category (products, customers, suppliers, contacts or members) Module2000Name=WYSIWYG redaktors -Module2000Desc=Ļauj teksta laukus rediģēt, izmantojot CKEditor +Module2000Desc=Atļaut teksta laukus rediģēt / formatēt, izmantojot CKEditor (html) Module2200Name=Dinamiskas cenas -Module2200Desc=Enable the usage of math expressions for prices +Module2200Desc=Izmantojiet matemātikas izteiksmes cenu automātiskai ģenerēšanai Module2300Name=Plānotie darbi Module2300Desc=Plānotais darbavietu vadība (alias cron vai chrono galds) Module2400Name=Pasākumi / darba kārtība -Module2400Desc=Izsekot notikumus. Ļaujiet Dolibarr reģistrēt automātiskus notikumus izsekošanas nolūkos vai reģistrēt manuālus notikumus vai sanāksmes. Tas ir galvenais labais Klientu vai piegādātāju saistību pārvaldības modulis. +Module2400Desc=Sekojiet notikumiem. Reģistrējiet automātiskos notikumus izsekošanas nolūkos vai ierakstiet manuālos notikumus vai sanāksmes. Tas ir galvenais modulis labam klientu vai pārdevēju attiecību pārvaldībai. Module2500Name=DMS / ECM Module2500Desc=Dokumentu vadības sistēma / elektroniskā satura vadība. Jūsu radīto vai saglabāto dokumentu automātiska organizēšana. Kopīgojiet tos pēc vajadzības. Module2600Name=API/Web services (SOAP server) @@ -596,14 +596,14 @@ Module2600Desc=Enable the Dolibarr SOAP server providing API services Module2610Name=API/Web services (REST server) Module2610Desc=Enable the Dolibarr REST server providing API services Module2660Name=Call WebServices (SOAP client) -Module2660Desc=Dolibarr tīmekļa pakalpojumu klienta iespējošana (var tikt izmantota, lai nosūtītu datus / pieprasījumus ārējiem serveriem. Pašlaik tiek atbalstīti tikai piegādātāja pasūtījumi.) +Module2660Desc=Iespējot Dolibarr tīmekļa pakalpojumu klientu (var izmantot datu / pieprasījumu virzīšanai uz ārējiem serveriem. Pašlaik tiek atbalstīti tikai pirkuma pasūtījumi.) Module2700Name=Gravatar Module2700Desc=Izmantojiet Gravatar tiešsaistes pakalpojumu (www.gravatar.com), lai parādītu lietotāju / dalībnieku fotoattēlu (atrodams ar viņu e-pastu). Nepieciešama piekļuve internetam Module2800Desc=FTP klients Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP MaxMind pārveidošanu iespējas Module3100Name=Skaips -Module3100Desc=Add a Skype button into card of users / third parties / contacts / members +Module3100Desc=Pievienojiet Skype pogu kartēm lietotājiem / trešajām personām / kontaktpersonām / dalībniekiem Module3200Name=Nemainīgi arhīvi Module3200Desc=Iespējojiet nemainīgu biznesa notikumu žurnālu. Notikumi tiek arhivēti reāllaikā. Žurnāls ir tikai lasāmu tabulu ķēdes notikumus, kurus var eksportēt. Šis modulis dažās valstīs var būt obligāts. Module4000Name=HRM @@ -613,27 +613,29 @@ Module5000Desc=Ļauj jums pārvaldīt vairākus uzņēmumus Module6000Name=Darba plūsma Module6000Desc=Darbplūsmas vadība (automātiska objekta izveide un / vai automātiska statusa maiņa) Module10000Name=Mājas lapas -Module10000Desc=Izveidojiet publiskās vietnes ar WYSIWG redaktoru. Vienkārši uzstādiet savu tīmekļa serveri (Apache, Nginx, ...), lai norādītu uz īpašo Dolibarr direktoriju, lai to tiešsaistē varētu izmantot internetā ar savu domēna vārdu. -Module20000Name=Atvaļinājuma pieprasījumu pārvaldība -Module20000Desc=Atzīt un izsekot darbiniekiem atstāt pieprasījumus -Module39000Name=Produktu partijas -Module39000Desc=Lot or serial number, eat-by and sell-by date management on products +Module10000Desc=Izveidojiet tīmekļa vietnes (publiski) ar WYSIWYG redaktoru. Vienkārši iestatiet savu tīmekļa serveri (Apache, Nginx, ...), lai norādītu uz speciālo Dolibarr direktoriju, lai to varētu izmantot internetā ar savu domēna nosaukumu. +Module20000Name=Atstāt pieprasījuma pārvaldību +Module20000Desc=Definējiet un izsekojiet darbinieku atvaļinājuma pieprasījumus +Module39000Name=Produkta daudzums +Module39000Desc=Daudzums, sērijas numuri, ēdienkarte / pārdošana pēc datuma vadība produktiem Module40000Name=Daudzvalūtu Module40000Desc=Izmantojiet alternatīvas valūtas cenās un dokumentos Module50000Name=Paybox -Module50000Desc=Piedāvājiet klientiem PayBox tiešsaistes maksājumu lapu (kredītkartes / debetkartes). To var izmantot, lai jūsu klienti varētu veikt bezmaksas maksājumus vai maksājumus konkrētā Dolibarr objektā (rēķins, pasūtījums, ...) -Module50100Name=Tirdzniecības punkts -Module50100Desc=Pārdošanas moduļa vietne (POS). -Module50150Name=Tirdzniecības punkts -Module50150Desc=Tirdzniecības vietas modulis (Touch screen POS). +Module50000Desc=Piedāvājiet klientiem PayBox tiešsaistes maksājumu lapu (kredītkartes / debetkartes). To var izmantot, lai ļautu saviem klientiem veikt ad hoc maksājumus vai maksājumus, kas saistīti ar konkrētu Dolibarr objektu (rēķins, pasūtījums utt.) +Module50100Name=POS SimplePOS +Module50100Desc=Pārdošanas punkts SimplePOS (vienkāršs POS). +Module50150Name=POS TakePOS +Module50150Desc=Pārdošanas punkta modulis TakePOS (skārienekrāns POS). Module50200Name=Paypal -Module50200Desc=Piedāvājiet klientiem PayPal tiešsaistes maksājumu lapu (PayPal kontu vai kredītkartes / debetkartes). To var izmantot, lai jūsu klienti varētu veikt bezmaksas maksājumus vai maksājumus konkrētā Dolibarr objektā (rēķins, pasūtījums, ...) +Module50200Desc=Piedāvājiet klientiem PayPal tiešsaistes maksājumu lapu (PayPal kontu vai kredītkartes / debetkartes). To var izmantot, lai ļautu saviem klientiem veikt ad hoc maksājumus vai maksājumus, kas saistīti ar konkrētu Dolibarr objektu (rēķins, pasūtījums utt.) +Module50300Name=Stripe +Module50300Desc=Piedāvājiet klientiem Stripe tiešsaistes maksājumu lapu (kredītkartes / debetkartes). To var izmantot, lai ļautu saviem klientiem veikt ad hoc maksājumus vai maksājumus, kas saistīti ar konkrētu Dolibarr objektu (rēķins, pasūtījums utt.) Module50400Name=Accounting (advanced) Module50400Desc=Grāmatvedības vadība (divkāršie ieraksti, atbalsta vispārējās un papildu grāmatiņas). Eksportēt virsgrāmatu vairākos citos grāmatvedības programmatūras formātos. Module54000Name=PrintIPP Module54000Desc=Tiešā druka (neatverot dokumentus), izmantojot Cups IPP saskarni (printerim jābūt redzamam no servera, un CUPS ir jāinstalē serverī). Module55000Name=Aptauja vai balsojums -Module55000Desc=Modulis, lai izveidotu tiešsaistes aptaujas, aptaujas vai balsis (piemēram, Doodle, Studs, Rdvz, ...) +Module55000Desc=Izveidot tiešsaistes aptaujas, aptaujas vai balsis (piemēram, Doodle, Studs, RDVz utt.) Module59000Name=Malas Module59000Desc=Moduli, lai pārvaldītu peļņu Module60000Name=Komisijas @@ -641,7 +643,7 @@ Module60000Desc=Modulis lai pārvaldītu komisijas Module62000Name=Inkoterms Module62000Desc=Pievienojiet funkcijas, lai pārvaldītu Incoterms Module63000Name=Resursi -Module63000Desc=Pārvaldīt resursus (printerus, automašīnas, istabu, ...), pēc tam varat dalīties ar notikumiem +Module63000Desc=Pārvaldiet resursus (printerus, automašīnas, telpas, ...), lai piešķirtu notikumiem Permission11=Lasīt klientu rēķinus Permission12=Izveidot / mainīt klientu rēķinus Permission13=Neapstiprināti klientu rēķini @@ -699,13 +701,13 @@ Permission113=Setup financial accounts (create, manage categories) Permission114=Vienkāršojiet darījumus Permission115=Eksportēt darījumus un kontu izrakstus Permission116=Pārvietot starp kontiem -Permission117=Pārvaldīt pārbaudes dispečervadības +Permission117=Pārvaldiet pārbaudes nosūtīšanu Permission121=Skatīt trešās personas, kas saistītas ar lietotāju Permission122=Izveidot/labot trešās personas, kas saistītas ar lietotāju Permission125=Dzēst trešās personas, kas saistītas ar lietotāju Permission126=Eksportēt trešās puses -Permission141=Lasiet visus projektus un uzdevumus (arī privātos projektus, par kuriem es neesmu kontakts) -Permission142=Izveidojiet / modificējiet visus projektus un uzdevumus (arī privātos projektus, par kuriem es neesmu kontakts) +Permission141=Lasīt visus projektus un uzdevumus (arī privātus projektus, kuriem es neesmu kontaktpersona) +Permission142=Izveidot / modificēt visus projektus un uzdevumus (arī privātus projektus, kuriem es neesmu kontaktpersona) Permission144=Delete all projects and tasks (also private projects i am not contact for) Permission146=Lasīt pakalpojumu sniedzējus Permission147=Lasīt statistiku @@ -725,14 +727,14 @@ Permission173=Dzēst ceļojumus un izdevumus Permission174=Read all trips and expenses Permission178=Eksportēt ceļojumus un izdevumus Permission180=Lasīt piegādātājus -Permission181=Lasīt piegādātāju pasūtījumus -Permission182=Izveidot/mainīt piegādātāju pasūtījumus -Permission183=Apstiprināt piegādātāju pasūtījumus -Permission184=Apstiprināt piegādātāja pasūtījumus -Permission185=Pasūtiet vai atceliet piegādātāja pasūtījumus -Permission186=Saņemt piegādātāju pasūtījumus -Permission187=Aizvērt piegādātāja pasūtījumus -Permission188=Atcelt piegādātāja pasūtījumus +Permission181=Lasīt pirkuma pasūtījumus +Permission182=Izveidot / mainīt pirkuma pasūtījumus +Permission183=Apstipriniet pirkuma pasūtījumus +Permission184=Apstipriniet pirkuma pasūtījumus +Permission185=Pasūtīt vai atcelt pirkuma pasūtījumus +Permission186=Saņemiet pirkuma pasūtījumus +Permission187=Aizvērt pirkuma pasūtījumus +Permission188=Atcelt pirkuma pasūtījumus Permission192=Izveidot līnijas Permission193=Atcelt līnijas Permission194=Lasīt joslas platuma līnijas @@ -765,7 +767,7 @@ PermissionAdvanced253=Izveidot/mainīt iekšējoss/ārējos lietotājus un atļa Permission254=Izveidot/mainīt ārējos lietotājus tikai Permission255=Mainīt citu lietotāju paroli Permission256=Izdzēst vai bloķēt citus lietotājus -Permission262=Paplašināt piekļuvi visām trešajām pusēm (ne tikai trešajām personām, kuras lietotājs ir pārdošanas pārstāvis).
Nav spēkā ārējiem lietotājiem (vienmēr vienīgi par sevi, par priekšlikumiem, rīkojumiem, rēķiniem, līgumiem uc)
projektiem (tikai noteikumi par projektu atļaujām, redzamību un uzdevumiem). +Permission262=Paplašināt piekļuvi visām trešajām personām (ne tikai trešām personām, kurām šis lietotājs ir pārdošanas pārstāvis).
Nav spēkā attiecībā uz ārējiem lietotājiem (vienmēr tikai attiecībā uz priekšlikumiem, pasūtījumiem, rēķiniem, līgumiem uc). Nav efektīvs projektiem (tikai noteikumi par projektu atļaujām, redzamību un uzdevumiem). Permission271=Lasīt CA Permission272=Lasīt rēķinus Permission273=Izrakstīt rēķinus @@ -775,10 +777,10 @@ Permission283=Dzēst kontaktus Permission286=Eksportēt kontaktus Permission291=Skatīt tarifus Permission292=Kas atļaujas par tarifiem -Permission293=Mainīt klientu tarifus -Permission300=Lasīt svītrkodus -Permission301=Izveidot / mainīt svītrkodus -Permission302=Dzēst svītrkodus +Permission293=Mainīt klienta tarifus +Permission300=Lasiet svītrkodus +Permission301=Izveidojiet / modificējiet svītrkodus +Permission302=Svītrkoda dzēšana Permission311=Lasīt pakalpojumus Permission312=Assign service/subscription to contract Permission331=Lasīt grāmatzīmes @@ -831,29 +833,29 @@ Permission1102=Izveidot/mainīt piegādes pasūtījumus Permission1104=Apstiprināt piegādes pasūtījumus Permission1109=Dzēst piegādes pasūtījumus Permission1181=Lasīt piegādātājus -Permission1182=Lasīt piegādātāju pasūtījumus -Permission1183=Izveidot/mainīt piegādātāju pasūtījumus -Permission1184=Pārbaudīt piegādātāju pasūtījumus -Permission1185=Apstiprināt piegādātājq pasūtījumus -Permission1186=Pasūtīt piegādātāja pasūtījumus -Permission1187=Saņemšanu piegādātāju pasūtījumu -Permission1188=Dzēst piegādātāju pasūtījumus -Permission1190=Approve (second approval) supplier orders +Permission1182=Lasīt pirkuma pasūtījumus +Permission1183=Izveidot / mainīt pirkuma pasūtījumus +Permission1184=Apstipriniet pirkuma pasūtījumus +Permission1185=Apstipriniet pirkuma pasūtījumus +Permission1186=Pasūtījuma pirkuma pasūtījumi +Permission1187=Apstipriniet pirkuma pasūtījumu saņemšanu +Permission1188=Dzēst pasūtījumus +Permission1190=Apstiprināt (otro apstiprinājumu) pirkuma pasūtījumus Permission1201=Saņemt eksportēšanas rezultātu Permission1202=Izveidot/Modificēt eksportu -Permission1231=Lasīt piegādātāja rēķinus -Permission1232=Izveidot/mainīt piegādātāja rēķinus -Permission1233=Apstiprināt piegādātāju rēķinus -Permission1234=Dzēst piegādātāju rēķinus -Permission1235=Nosūtīt piegādātāju rēķinus pa e-pastu -Permission1236=Eksporta piegādātāju rēķinus, atribūti un maksājumus -Permission1237=Eksporta piegādātāju pasūtījumus un to detaļas +Permission1231=Lasiet pārdevēja rēķinus +Permission1232=Izveidojiet / modificējiet piegādātāja rēķinus +Permission1233=Apstipriniet pārdevēja rēķinus +Permission1234=Dzēst piegādātāja rēķinus +Permission1235=Sūtīt pārdevēja rēķinus pa e-pastu +Permission1236=Eksportēt pārdevēja rēķinus, atribūtus un maksājumus +Permission1237=Eksporta pirkšanas pasūtījumi un to detaļas Permission1251=Palaist masveida importu ārējiem datiem datu bāzē (datu ielāde) Permission1321=Eksporta klientu rēķinus, atribūti un maksājumus Permission1322=Atkārtoti atvērt samaksāto rēķinu Permission1421=Eksportēt klientu pasūtījumus un atribūtus -Permission20001=Lasīt atvaļinājuma pieprasījumus (jūsu atvaļinājums un jūsu padoto atvaļinājums) -Permission20002=Izveidojiet / mainiet savus atvaļinājuma pieprasījumus (jūsu atvaļinājums un jūsu padotajiem atvaļinājums) +Permission20001=Lasiet atvaļinājuma pieprasījumus (jūsu atvaļinājumu un jūsu padoto atvaļinājumu) +Permission20002=Izveidojiet / modificējiet atvaļinājuma pieprasījumus (jūsu atvaļinājumu un jūsu padotajiem) Permission20003=Dzēst atvaļinājumu pieprasījumus Permission20004=Lasīt visus atvaļinājuma pieprasījumus (pat lietotājs nav pakļauts) Permission20005=Izveidot / mainīt atvaļinājumu pieprasījumus visiem (pat lietotājam nav padotajiem) @@ -875,7 +877,7 @@ Permission2503=Pievienot vai dzēst dokumentus Permission2515=Iestatīt dokumentu direktorijas Permission2801=Lietot FTP klientu lasīšanas režīmā (pārlūko un lejupielādē) Permission2802=Lietot FTP klientu rakstīšanas režīmā (dzēst vai augšupielādēt failus) -Permission50101=Izmantot tirdzniecības punktus POS +Permission50101=Izmantot pārdošanas vietu Permission50201=Lasīt darījumus Permission50202=Importēt darījumus Permission54001=Drukāt @@ -888,28 +890,28 @@ Permission63001=Lasīt resursus Permission63002=Izveidot/labot resursus Permission63003=Dzēst resursus Permission63004=Saistīt resursus ar darba kārtības pasākumiem -DictionaryCompanyType=Trešo pušu veidi -DictionaryCompanyJuridicalType=Trešo pušu juridiskās formas -DictionaryProspectLevel=Prospect potential level -DictionaryCanton=Valsts / province +DictionaryCompanyType=Trešās puses veidi +DictionaryCompanyJuridicalType=Trešo personu juridiskās personas +DictionaryProspectLevel=Prospect potenciālu +DictionaryCanton=Valstis / provinces DictionaryRegion=Reģions DictionaryCountry=Valstis DictionaryCurrency=Valūtas -DictionaryCivility=Personiskie un profesionālie nosaukumi +DictionaryCivility=Honorifics DictionaryActions=Darba kārtības pasākumu veidi -DictionarySocialContributions=Social or fiscal taxes types +DictionarySocialContributions=Sociālo vai nodokļu nodokļu veidi DictionaryVAT=PVN likmes vai pārdošanas procentu likmes DictionaryRevenueStamp=Nodokļu zīmogu daudzums -DictionaryPaymentConditions=Apmaksas noteikumi +DictionaryPaymentConditions=Maksājuma nosacījumi DictionaryPaymentModes=Maksājumu veidi -DictionaryTypeContact=Kontakti/adrešu veidi +DictionaryTypeContact=Kontaktu/Adrešu veidi DictionaryTypeOfContainer=Vietnes lapu / konteineru veids DictionaryEcotaxe=Ecotax (WEEE) DictionaryPaperFormat=Papīra formāts DictionaryFormatCards=Kartes formāti DictionaryFees=Izdevumu pārskats - izdevumu pārskatu rindu veidi DictionarySendingMethods=Piegādes veidi -DictionaryStaff=Personāls +DictionaryStaff=Darbinieku skaits DictionaryAvailability=Piegādes kavēšanās DictionaryOrderMethods=Pasūtījumu veidi DictionarySource=Origin of proposals/orders @@ -918,7 +920,7 @@ DictionaryAccountancysystem=Models for chart of accounts DictionaryAccountancyJournal=Grāmatvedības žurnāli DictionaryEMailTemplates=E-pasta veidnes DictionaryUnits=Vienības -DictionaryProspectStatus=Prospection status +DictionaryProspectStatus=Prospekta statuss DictionaryHolidayTypes=Atvaļinājumu veidi DictionaryOpportunityStatus=Vadošais statuss projektu / vadībai DictionaryExpenseTaxCat=Izdevumu pārskats - transporta kategorijas @@ -928,11 +930,11 @@ SetupNotSaved=Iestatīšana nav saglabāta BackToModuleList=Atpakaļ uz moduļu sarakstu BackToDictionaryList=Atpakaļ uz vārdnīcu sarakstu TypeOfRevenueStamp=Nodokļu zīmoga veids -VATManagement=Pārdošanas nodokļa vadība -VATIsUsedDesc=Pēc noklusējuma, veidojot izredzes, rēķinus, pasūtījumus utt., Pārdošanas nodokļa likme atbilst aktīvajam standarta noteikumam:
Ja pārdevējam nav jāmaksā pārdošanas nodoklis, tad Pārdošanas nodokļa noklusējums ir 0. Beigu punkts.
Ja (pārdevēja valsts = pircēja valsts), tad Pārdošanas nodoklis pēc noklusējuma ir vienāds ar Pārdošanas nodokli produkta pārdevējam valstī. Noteikuma beigas.
Ja pārdevējs un pircējs ir gan Eiropas Kopienā, gan preces ir ar transportu saistītas preces (pārvadājumi, nosūtīšana, aviokompānija), noklusējuma Pārdošanas nodoklis ir 0. Šis noteikums ir atkarīgs no pārdevēja valsts - lūdzu konsultējieties ar savu grāmatvedi. Pircējs maksā pārdošanas nodokli savā muitas iestādē savā valstī, nevis pārdevējam. Noteikuma beigas.
Ja pārdevējs un pircējs ir gan Eiropas Kopienā, gan pircējs nav uzņēmums (ar reģistrētu Kopienas iekšzemes pārdošanas nodokļa numuru), tad Pārdošanas nodoklis, neievērojot Pārdevēja valsts Pārdošanas nodokli . Noteikuma beigas.
Ja pārdevējs un pircējs ir gan Eiropas Kopienā, gan pircējs ir uzņēmums (ar reģistrētu Kopienas iekšējo pārdošanas nodokļa numuru), tad Pārdošanas nodoklis ir 0 pēc noklusējuma. Noteikuma beigas.
Jebkurā gadījumā ierosinātā noklusējuma vērtība ir Pārdošanas nodoklis = 0. Noteikuma beigas. -VATIsNotUsedDesc=Pēc noklusējuma ierosinātais pārdošanas nodoklis ir 0, ko var izmantot tādām lietām kā asociācijas, privātpersonas vai mazie uzņēmumi. -VATIsUsedExampleFR=Francijā tas nozīmē uzņēmumus vai organizācijas, kurām ir reāla fiskālā sistēma (Vienkāršota īsta vai normāla reālā). Sistēma, kurā tiek deklarēts pārdošanas nodoklis. -VATIsNotUsedExampleFR=Francijā tas nozīmē asociācijas, kas nav deklarētas par pārdošanas nodokli, vai uzņēmumi, organizācijas vai brīvās profesijas, kuras ir izvēlējušās mikrouzņēmumu fiskālo sistēmu (pārdošanas nodoklis franšīzē) un samaksājis franšīzes pārdošanas nodokli bez pārdošanas deklarācijas. Šī izvēle rēķinos parādīs atsauci "Nav piemērojams pārdošanas nodoklis - CGI art-293B". +VATManagement=Pārdošanas nodokļu pārvaldība +VATIsUsedDesc=Pēc noklusējuma, veidojot perspektīvas, rēķinus, pasūtījumus utt., Pārdošanas nodokļa likme atbilst aktīvajam standarta noteikumam:
Ja pārdevējam nav jāmaksā pārdošanas nodoklis, tad pārdošanas nodoklis noklusē līdz 0. Noteikumu beigas. (pārdevēja valsts = pircēja valsts), tad pārdošanas nodoklis pēc noklusējuma ir vienāds ar preces pārdošanas nodokli pārdevēja valstī. Noteikumu beigas.
Ja pārdevējs un pircējs ir Eiropas Kopienā un preces ir ar transportu saistītas preces (pārvadājumi, kuģniecība, aviosabiedrība), noklusējuma PVN ir 0. Šis noteikums ir atkarīgs no pārdevēja valsts - lūdzu, konsultējieties ar savu grāmatvedi. PVN pircējam jāmaksā muitas iestādei savā valstī, nevis pārdevējam. Noteikumu beigas.
Ja pārdevējs un pircējs ir gan Eiropas Kopienā, gan pircējs nav uzņēmums (ar reģistrētu Kopienas iekšējo PVN numuru), tad PVN nepilda pārdevēja valsts PVN likmi. Noteikumu beigas.
Ja pārdevējs un pircējs ir gan Eiropas Kopienā, gan pircējs ir uzņēmums (ar reģistrētu Kopienas iekšējo PVN numuru), tad PVN pēc noklusējuma ir 0. Noteikumu beigas.
Jebkurā citā gadījumā piedāvātā noklusējuma vērtība ir pārdošanas nodoklis = 0. Noteikumu beigas. +VATIsNotUsedDesc=Pēc noklusējuma piedāvātais pārdošanas nodoklis ir 0, ko var izmantot tādām lietām kā asociācijas, privātpersonas vai mazie uzņēmumi. +VATIsUsedExampleFR=Francijā tas nozīmē uzņēmumus vai organizācijas, kurām ir reāla fiskālā sistēma (vienkāršota reāla vai reāla). Sistēma, kurā deklarē PVN. +VATIsNotUsedExampleFR=Francijā tas nozīmē asociācijas, kas nav deklarētas par tirdzniecības nodokli, vai uzņēmumi, organizācijas vai brīvās profesijas, kas izvēlējušās mikrouzņēmumu fiskālo sistēmu (pārdošanas nodoklis franšīzē) un samaksājuši franšīzes pārdošanas nodokli bez pārdošanas nodokļa deklarācijas. Ar šo izvēli rēķinos būs redzama atsauce "Nav piemērojams pārdošanas nodoklis - CGI 293.B pants". ##### Local Taxes ##### LTRate=Likme LocalTax1IsNotUsed=Nelietot otru nodokli @@ -1012,8 +1014,8 @@ MessageLogin=Iežurnalēšanās lapas paziņojums LoginPage=Pieteikšanās lapa BackgroundImageLogin=Fona attēls PermanentLeftSearchForm=Pastāvīgā meklēšanas forma kreisajā izvēlnē -DefaultLanguage=Noklusējuma izmantojamā valoda (valodas kods) -EnableMultilangInterface=Iespējot daudzvalodu interfeisu +DefaultLanguage=Noklusējuma valoda +EnableMultilangInterface=Iespējot daudzvalodu atbalstu EnableShowLogo=Rādīt logotipu kreisajā izvēlnē CompanyInfo=Uzņēmums / organizācija CompanyIds=Uzņēmuma / organizācijas identitāte @@ -1031,30 +1033,30 @@ OwnerOfBankAccount=Bankas konta īpašnieks %s BankModuleNotActive=Bankas kontu modulis nav ieslēgts ShowBugTrackLink=Rādīt saiti " %s " Alerts=Brīdinājumi -DelaysOfToleranceBeforeWarning=Kavēšanās pirms brīdinājuma brīdinājuma parādīšanas -DelaysOfToleranceDesc=Šis ekrāns ļauj definēt kavēšanos, pirms brīdinājums tiek parādīts ekrānā ar ikonu %s katram vēlīnam elementam. -Delays_MAIN_DELAY_ACTIONS_TODO=Kavēšanās (dienās) pirms brīdinājuma par plānotajiem pasākumiem (darba kārtības notikumi) vēl nav pabeigta -Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Kavēšanās (dienās) pirms brīdinājuma par projektu, kas nav slēgts laikā -Delays_MAIN_DELAY_TASKS_TODO=Kavēšanās (dienās) pirms brīdinājuma par plānotajiem uzdevumiem (projekta uzdevumi) vēl nav pabeigta -Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Kavējums (dienās) pirms brīdinājuma par pasūtījumiem, kas vēl nav apstrādāti -Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Vēl aizkavēšanās (dienās) pirms brīdinājuma par pirkuma pasūtījumiem, kas vēl nav apstrādāti -Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Aizkavēšanās (dienās) pirms brīdinājuma par priekšlikumiem slēgt -Delays_MAIN_DELAY_PROPALS_TO_BILL=Aizkavēšanās (dienās) pirms brīdinājuma par priekšlikumiem, par kuriem nav iekasēta samaksa -Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Kavēšanās (dienās) pirms brīdinājuma par aktivizētajiem pakalpojumiem -Delays_MAIN_DELAY_RUNNING_SERVICES=Kavējums (dienās) pirms brīdinājuma par pakalpojumiem, kuru termiņš ir beidzies -Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Delay (dienās) pirms brīdinājuma par neapmaksātiem piegādātāja rēķiniem -Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Kavējums (dienās) pirms brīdinājuma par neapmaksātiem klienta rēķiniem -Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Delay (dienās) pirms brīdinājuma par notiekošo bankas saskaņošanu -Delays_MAIN_DELAY_MEMBERS=Kavēšanās (dienās) pirms brīdinājuma par atlikto dalības maksu -Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Delay (dienās) pirms brīdinājuma par čeka depozītu darīt -Delays_MAIN_DELAY_EXPENSEREPORTS=Aizkavēšanās (dienās) pirms brīdinājuma par izdevumu pārskatu apstiprināšanu +DelaysOfToleranceBeforeWarning=Kavēšanās, pirms tiek parādīts brīdinājuma brīdinājums par: +DelaysOfToleranceDesc=Iestatiet aizkavi pirms brīdinājuma ikonas %s parādīšanas ekrānā par novēloto elementu. +Delays_MAIN_DELAY_ACTIONS_TODO=Plānotie notikumi (darba kārtības notikumi) nav pabeigti +Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Projekts nav slēgts laikā +Delays_MAIN_DELAY_TASKS_TODO=Plānotais uzdevums (projekta uzdevumi) nav pabeigts +Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Rīkojums nav apstrādāts +Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Pirkuma pasūtījums nav apstrādāts +Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Priekšlikums nav slēgts +Delays_MAIN_DELAY_PROPALS_TO_BILL=Priekšlikums nav jāmaksā +Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Pakalpojums aktivizēšanai +Delays_MAIN_DELAY_RUNNING_SERVICES=Beidzies pakalpojums +Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Neapmaksāts pārdevēja rēķins +Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Neapmaksāts klienta rēķins +Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Līdz bankas saskaņošanai +Delays_MAIN_DELAY_MEMBERS=Aizkavēta dalības maksa +Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Pārbaudiet depozītu, kas nav izdarīts +Delays_MAIN_DELAY_EXPENSEREPORTS=Izdevumu pārskats apstiprināšanai SetupDescription1=Pirms sākat lietot Dolibarr, jānosaka daži sākotnējie parametri un moduļi ir iespējoti / konfigurēti. -SetupDescription2=Obligātie iestatīšanas soļi ir 2 pirmie soļi iestatīšanas izvēlnē, proti: +SetupDescription2=Šādas divas sadaļas ir obligātas (divi pirmie ieraksti izvēlnē Iestatīšana): SetupDescription3= %s -> %s
Galvenie parametri, kurus izmanto, lai pielāgotu Dolibarr noklusējuma darbību (piemēram, attiecībā uz valstīm saistītām funkcijām). SetupDescription4= %s -> %s
Dolibarr ERP / CRM ir vairāku moduļu / lietojumprogrammu kolekcija, kas ir vairāk vai mazāk neatkarīgas. Jūsu vajadzībām atbilstošie moduļi ir jāaktivizē un jākonfigurē. Jaunas preces / iespējas tiek pievienotas izvēlnēm, aktivizējot moduli. -SetupDescription5=Citu iestatījumu izvēlnes ieraksti nodrošina papildu parametrus. +SetupDescription5=Citi iestatījumu izvēlnes ieraksti pārvalda izvēles parametrus. LogEvents=Drošības audita notikumi -Audit=Drošības notikumi +Audit=Audits InfoDolibarr=Par Dolibarr InfoBrowser=Pārlūkprogrammas info InfoOS=Par OS @@ -1066,14 +1068,14 @@ BrowserName=Pārlūkprogrammas nosaukums BrowserOS=Pārlūkprogrammas OS ListOfSecurityEvents=Saraksts ar Dolibarr drošības pasākumiem SecurityEventsPurged=Drošības pasākumi dzēsti -LogEventDesc=Šeit varat iespējot drošības notikumu reģistrēšanu. Administratori pēc tam var redzēt tā saturu, izmantojot izvēlni %s - %s . Brīdinājums, šī funkcija var patērēt lielu datu apjomu datu bāzē. +LogEventDesc=Iespējot konkrētu drošības notikumu reģistrēšanu. Administratori reģistrē izvēlni %s - %s . Brīdinājums: šī funkcija datu bāzē var radīt lielu datu apjomu. AreaForAdminOnly=Iestatīšanas parametrus var iestatīt tikai administratora lietotāji . SystemInfoDesc=Sistēmas informācija ir dažādi tehniskā informācija jums tikai lasīšanas režīmā un redzama tikai administratoriem. -SystemAreaForAdminOnly=Šī joma ir pieejama administratora lietotājiem. Neviens no Dolibarr atļauju var samazināt šo robežu. +SystemAreaForAdminOnly=Šī joma ir pieejama tikai administratora lietotājiem. Dolibarr lietotāja atļaujas nevar mainīt šo ierobežojumu. CompanyFundationDesc=Rediģējiet uzņēmuma / organizācijas informāciju. Noklikšķiniet uz pogas "%s" vai "%s" lapas apakšdaļā. AccountantDesc=Rediģējiet informāciju par savu grāmatvedi / grāmatvedi AccountantFileNumber=Faila numurs -DisplayDesc=Jūs varat izvēlēties katru parametru, kas saistīts ar Dolibarr izskatu +DisplayDesc=Šeit var mainīt parametrus, kas ietekmē Dolibarr izskatu un uzvedību. AvailableModules=Pieejamās progrmma / moduļi ToActivateModule=Lai aktivizētu moduļus, dodieties uz iestatīšanas apgabalu (Sākums-> Iestatīšana-> Moduļi). SessionTimeOut=Sesijas pārtraukums @@ -1084,42 +1086,42 @@ TriggerDisabledByName=Trigeri Šajā failā ir invalīdi ar-NORUN piedēk TriggerDisabledAsModuleDisabled=Trigeri Šajā failā ir invalīdi, kā modulis %s ir atspējots. TriggerAlwaysActive=Trigeri Šajā failā ir aktīva vienmēr, neatkarīgi ir aktivizēts Dolibarr moduļiem. TriggerActiveAsModuleActive=Trigeri Šajā failā ir aktīvs kā modulis %s ir iespējots. -GeneratedPasswordDesc=Noteikt šeit, kas noteikums jūs vēlaties izmantot, lai radītu jaunu paroli, ja jūs lūgt, lai ir auto radīto paroli +GeneratedPasswordDesc=Izvēlieties metodi, kas izmantojama automātiski ģenerētām parolēm. DictionaryDesc=Ievietojiet visus atsauces datus. Varat pievienot savas vērtības noklusējuma vērtībai. -ConstDesc=This page allows you to edit all other parameters not available in previous pages. These are mostly reserved parameters for developers or advanced troubleshooting. For a list of options check here. +ConstDesc=Šī lapa ļauj rediģēt (ignorēt) parametrus, kas nav pieejami citās lapās. Tie ir galvenokārt rezervētie parametri izstrādātājiem / uzlabotas traucējummeklēšanas. Pilns pieejamo parametru saraksts skatiet šeit . MiscellaneousDesc=All other security related parameters are defined here. LimitsSetup=Ierobežojumi / Precision iestatīšanas LimitsDesc=Šeit jūs varat noteikt ierobežojumus, precizitātes un optimizāciju, ko Dolibarr izmanto -MAIN_MAX_DECIMALS_UNIT=Maksimālais ciparu skaits aiz komata cenām -MAIN_MAX_DECIMALS_TOT=Maksimālās decimāldaļas kopējai cenai -MAIN_MAX_DECIMALS_SHOWN=Max aiz komata par cenām parādīta ekrānā (Add ... pēc šo numuru, ja jūs vēlaties redzēt ... kad numurs tiek apcirsti, kad redzams uz ekrāna) -MAIN_ROUNDING_RULE_TOT=Step of rounding range (for countries where rounding is done on something else than base 10. For example, put 0.05 if rounding is done by 0.05 steps) +MAIN_MAX_DECIMALS_UNIT=Maks. decimāldaļas par vienības cenām +MAIN_MAX_DECIMALS_TOT=Maks. decimāldaļām par kopējo cenu +MAIN_MAX_DECIMALS_SHOWN=Maks. decimāldaļām par cenām parādīts ekrānā . Pēc šī parametra pievienojiet elipses ... (piemēram, "2 ..."), ja vēlaties, lai " ... " tiktu pievienota saīsinātajai cenai. +MAIN_ROUNDING_RULE_TOT=Noapaļošanas posma posms (valstīm, kurās noapaļošana notiek ar kaut ko citu, nevis 10. pamatu. Piemēram, ievietojiet 0,05, ja noapaļošana tiek veikta ar 0,05 soļiem) UnitPriceOfProduct=Neto vienības produkta cena -TotalPriceAfterRounding=Kopējā cena (neto/pvn/ar nodokli) pēc noapaļošanas +TotalPriceAfterRounding=Kopējā cena (bez PVN / nodokļa) pēc noapaļošanas ParameterActiveForNextInputOnly=Parametrs stājas spēkā no nākamās ievades -NoEventOrNoAuditSetup=Vēl neviens drošības notikums nav reģistrēts. Tas var būt normāli, ja lapā "Iestatīšana - Drošība - notikumi" nav veikta revīzija. +NoEventOrNoAuditSetup=Drošības notikums nav reģistrēts. Tas ir normāli, ja lapa "Iestatīšana - Drošība - Notikumi" nav iespējota. NoEventFoundWithCriteria=Šim meklēšanas kritērijam nav atrasts neviens drošības notikums. SeeLocalSendMailSetup=Skatiet sendmail iestatījumus -BackupDesc=Lai izveidotu pilnu Dolibarr rezerves kopiju jums ir: -BackupDesc2=Save content of documents directory (%s) that contains all uploaded and generated files (So it includes all dump files generated at step 1). -BackupDesc3=Saglabājiet datubāzes saturu (%s) noņemšanas failā. Šim nolūkam varat izmantot palīgu. -BackupDescX=Arhivēto katalogs jāglabā drošā vietā. +BackupDesc=Lai veiktu Dolibarr instalācijas pilnīgu dublējumu, ir nepieciešami divi soļi. +BackupDesc2=Dublējiet direktoriju "dokumentu" ( %s ) saturu, kurā ir visi augšupielādētie un ģenerētie faili. Tas ietvers arī visus 1. posmā radītos izgāztuves failus. +BackupDesc3=Dublējiet datubāzē jūsu datubāzes struktūru un saturu ( %s ). Lai to izdarītu, varat izmantot šādu palīgu. +BackupDescX=Arhivēto direktoriju vajadzētu glabāt drošā vietā. BackupDescY=Radītais dump fails jāglabā drošā vietā. BackupPHPWarning=Ar šo metodi nevar veikt rezerves kopijas. Ieteicams iepriekšējais. -RestoreDesc=Lai atjaunotu Dolibarr rezeves kopiju jums ir: -RestoreDesc2=Atjaunojiet arhīvu failu (piemēram, zip fails) dokumentu direktorijā, lai iegūtu failu koku jaunā Dolibarr instalācijas dokumentu direktorijā vai šajā pašreizējā dokumentu direktorijā ( %s ). -RestoreDesc3=Atjaunot datus no rezerves kopijas faila, datu bāzē jaunā Dolibarr instalācijā vai datu bāzē pašreizējajai instalācijai (%s). Brīdinājums, kad atjaunošana ir pabeigta, jums ir jāizmanto lietotāja vārds / parole, kas bija tad, kad tika veikta rezerves kopija, lai pieslēgtos atkal. Lai atjaunotu rezerves kopiju datubāzei esošajā instalācijā, jūs varat sekot šim palīgam. +RestoreDesc=Lai atjaunotu Dolibarr dublējumu, ir nepieciešamas divas darbības. +RestoreDesc2=Atjaunojiet kataloga "dokumentu" rezerves failu (piemēram, zip failu) jaunai Dolibarr instalācijai vai šajā pašreizējā dokumentu direktorijā ( %s ). +RestoreDesc3=Atjaunojiet datu bāzes struktūru un datus no dublējuma faila jaunās Dolibarr instalācijas datu bāzē vai šīs pašreizējās instalācijas datubāzē ( %s ). Brīdinājums, kad atjaunošana ir pabeigta, jums ir jāizmanto pieteikumvārds / parole, kas pastāvēja no dublēšanas laika / instalācijas, lai vēlreiz izveidotu savienojumu.
Lai atjaunotu dublējuma datubāzi šajā pašreizējā instalācijā, varat sekot šim palīgam. RestoreMySQL=MySQL imports ForcedToByAModule= Šis noteikums ir spiests %s ar aktivēto modulis -PreviousDumpFiles=Izveidotie datubāzes rezerves kopijas faili -WeekStartOnDay=Pirmā nedēļas diena -RunningUpdateProcessMayBeRequired=Running jaunināšanas procesu, šķiet, ir nepieciešams (Programmas versija %s atšķiras no bāzes versijas %s) +PreviousDumpFiles=Esošie dublējuma faili +WeekStartOnDay=Nedēļas pirmā diena +RunningUpdateProcessMayBeRequired=Šķiet, ka nepieciešams veikt jaunināšanas procesu (programmas versija %s atšķiras no datu bāzes versijas %s) YouMustRunCommandFromCommandLineAfterLoginToUser=Jums ir palaist šo komandu no komandrindas pēc pieteikšanās uz apvalks ar lietotāju %s, vai jums ir pievienot-W iespēju beigās komandrindas, lai sniegtu %s paroli. YourPHPDoesNotHaveSSLSupport=SSL funkcijas, kas nav pieejama jūsu PHP DownloadMoreSkins=Vairāki izskati lejupielādei -SimpleNumRefModelDesc=Atgriež atsauces numuru formātā %syymm-NNNN kur yy ir gads, MM ir mēnesis, un nnnn ir secība bez cauruma un bez reset -ShowProfIdInAddress=Parādiet profesionālu ID ar adresēm uz dokumentiem -ShowVATIntaInAddress=Slēpt Kopienas iekšzemes PVN numuru ar adresēm dokumentos +SimpleNumRefModelDesc=Atgriež atsauces numuru ar formātu %syymm-nnnn, kur yy ir gads, mm ir mēnesis un nnnn ir secīgs bez atiestatīšanas +ShowProfIdInAddress=Rādīt profesionālo ID ar adresēm +ShowVATIntaInAddress=Slēpt Kopienas iekšējo PVN numuru ar adresēm TranslationUncomplete=Daļējs tulkojums MAIN_DISABLE_METEO=Atspējot meteoroloģisko skatu MeteoStdMod=Standarta režīms @@ -1128,20 +1130,20 @@ MeteoPercentageMod=Procentuālais režīms MeteoPercentageModEnabled=Procentuālais režīms ir aktivizēts MeteoUseMod=Noklikšķiniet, lai izmantotu %s TestLoginToAPI=Tests pieteikties API -ProxyDesc=Dažām Dolibarr funkcijām ir nepieciešama piekļuve internetam. Šeit definējiet šeit parametrus. Ja Dolibarr serveris atrodas proxy serverī, šie parametri parāda Dolibarr, kā ar to piekļūt internetam. -ExternalAccess=Ārējā piekļuve -MAIN_PROXY_USE=Izmantot starpniekserveri (savādāk tieša piekļuve internetam) -MAIN_PROXY_HOST=Nosaukums / adrese proxy serverim -MAIN_PROXY_PORT=Proxy servera ports -MAIN_PROXY_USER=Pieslēdzies, lai izmantotu starpniekserveri -MAIN_PROXY_PASS=Parole, lai izmantotu starpniekserveri -DefineHereComplementaryAttributes=Noteikt visus atribūtus, kas vēl nav pieejami pēc noklusējuma, un šeit vēlaties atbalstīt %s. +ProxyDesc=Dažām Dolibarr funkcijām ir nepieciešams interneta pieslēgums. Šeit definējiet interneta savienojuma parametrus, piemēram, piekļuvi starpniekserverim, ja nepieciešams. +ExternalAccess=Ārējā / interneta piekļuve +MAIN_PROXY_USE=Izmantojiet starpniekserveri (citādi piekļuve ir tieši internetā) +MAIN_PROXY_HOST=Starpniekserveris: nosaukums / adrese +MAIN_PROXY_PORT=Starpniekserveris: ports +MAIN_PROXY_USER=Starpniekserveris: pieteikšanās / lietotājs +MAIN_PROXY_PASS=Starpniekserveris: parole +DefineHereComplementaryAttributes=Šeit norādiet visus papildu / pielāgotos atribūtus, kurus vēlaties iekļaut: %s ExtraFields=Papildus atribūti ExtraFieldsLines=Papildinošas atribūti (līnijas) ExtraFieldsLinesRec=Papildu atribūti (veidņu rēķinu līnijas) ExtraFieldsSupplierOrdersLines=Complementary attributes (order lines) ExtraFieldsSupplierInvoicesLines=Complementary attributes (invoice lines) -ExtraFieldsThirdParties=Papildinošas atribūti (thirdparty) +ExtraFieldsThirdParties=Papildu atribūti (trešā persona) ExtraFieldsContacts=Papildu atribūti (kontakti / adrese) ExtraFieldsMember=Papildinošas atribūti (biedrs) ExtraFieldsMemberType=Papildinošas atribūti (biedrs tipa) @@ -1160,7 +1162,7 @@ SendmailOptionMayHurtBuggedMTA=Funkcija sūtīt vēstules, izmantojot metodi "PH TranslationSetup=Tulkojumu konfigurēšana TranslationKeySearch=Meklēt tulkošanas atslēgu vai virkni TranslationOverwriteKey=Pārrakstīt rakstīšanas virkni -TranslationDesc=How to set displayed application language :
* Systemwide: menu Home - Setup - Display
* Per user: Use the User display setup tab on user card (click on username at the top of the screen). +TranslationDesc=Kā iestatīt displeja valodu:
* Noklusējums / sistēma: izvēlne Sākums -> Iestatīšana -> Displejs
* Katram lietotājam: noklikšķiniet uz lietotājvārda ekrāna augšpusē un modificējiet Lietotāja kartes iestatīšana lietotāja kartē. TranslationOverwriteDesc=Jūs varat arī ignorēt virknes, kas aizpilda nākamo tabulu. Izvēlieties savu valodu no %s nolaižamās izvēlnes, ievietojiet tulkošanas taustiņu virkni uz "%s" un jauno tulkojumu uz "%s" TranslationOverwriteDesc2=Varat izmantot citu cilni, lai uzzinātu, kuru tulkošanas atslēgu izmantot TranslationString=Tulkošanas virkne @@ -1173,10 +1175,10 @@ TotalNumberOfActivatedModules=Activated application/modules: %s / %s SuhosinSessionEncrypt=Sesija uzglabāšana šifrēta ar Suhosin ConditionIsCurrently=Stāvoklis šobrīd ir %s -YouUseBestDriver=Jūs izmantojat draiveri %s, kas pašlaik ir labākais draiveris. +YouUseBestDriver=Jūs izmantojat draiveri %s, kas ir labākais šobrīd pieejams draiveris. YouDoNotUseBestDriver=Jūs izmantojat draiveri %s, bet ieteicams ir %s. NbOfProductIsLowerThanNoPb=Jums ir tikai %s produkti/pakalpojumi datu bāzē. Tai nav nepieciešama īpaša optimizācija. SearchOptim=Meklēšanas optimizācija @@ -1185,8 +1187,8 @@ BrowserIsOK=Jūs izmantojat tīmekļa pārlūku %s. Šī pārlūkprogramma ir dr BrowserIsKO=Jūs izmantojat tīmekļa pārlūku %s. Šī pārlūka informācija ir slikta izvēle drošībai, veiktspējai un uzticamībai. Mēs iesakām izmantot Firefox, Chrome, Opera vai Safari. XDebugInstalled=XDebug ir ielādēts XCacheInstalled=XCache ir ielādēts. -AddRefInList=Displejs Klienta / Piegādātāja ref. info saraksts (atlasiet sarakstu vai izvēles rūtiņu) un lielākā daļa hipersaišu.
Trešās personas parādīsies ar nosaukumu "CC12345 - SC45678 - The Big Company corp". "Big Company corp" vietā. -AddAdressInList=Parādiet Klienta / Piegādes adreses informācijas sarakstu (atlasiet sarakstu vai izvēles rūtiņu)
Trešās personas parādīsies ar nosaukumu "The Big Company corp" vietā ar nosaukumu "The Big Company corp. - 21 jump street 123456 Big city - USA". +AddRefInList=Rādīt klientu / pārdevēju ref. info saraksts (atlasiet sarakstu vai kombinēto) un lielākā daļa hipersaites.
Trešās puses parādīsies ar nosaukumu "CC12345 - SC45678 - Lielais uzņēmums". "Lielā uzņēmuma korpuss" vietā. +AddAdressInList=Rādīt klienta / pārdevēja adrešu sarakstu (izvēlieties sarakstu vai kombināciju)
Trešās puses parādīsies ar nosaukumu "Lielās kompānijas korpuss - 21 lēkt iela 123456", nevis "Lielā uzņēmuma korpuss". AskForPreferredShippingMethod=Pieprasiet vēlamo piegādes metodi trešajām pusēm. FieldEdition=Izdevums lauka %s FillThisOnlyIfRequired=Piemērs: +2 (aizpildiet tikai, ja sastopaties ar problēmām) @@ -1198,32 +1200,32 @@ PasswordGenerationPerso=Return a password according to your personally defined c SetupPerso=According to your configuration PasswordPatternDesc=Password pattern description ##### Users setup ##### -RuleForGeneratedPasswords=Noteikums, lai radītu piedāvātos paroles vai apstiprināt paroles -DisableForgetPasswordLinkOnLogonPage=Nerādīt saiti "Aizmirsu paroli" pieteikšanās lapā +RuleForGeneratedPasswords=Noteikumi paroļu ģenerēšanai un apstiprināšanai +DisableForgetPasswordLinkOnLogonPage=Nerādīt saiti "Aizmirsta parole" lapā Pieteikšanās lapā UsersSetup=Lietotāju moduļa uzstādīšana -UserMailRequired=E-pasts nepieciešams, lai izveidotu jaunu lietotāju +UserMailRequired=Lai izveidotu jaunu lietotāju, nepieciešams e-pasts ##### HRM setup ##### HRMSetup=HRM module setup ##### Company setup ##### CompanySetup=Uzņēmuma moduļa uzstādīšana -CompanyCodeChecker=Iespējas, lai automātiski izveidotu klienta / pārdevēja kodus -AccountCodeManager=Iespējas automātiski ģenerēt klienta / pārdevēja grāmatvedības kodus -NotificationsDesc=EMails notifications feature allows you to silently send automatic mail, for some Dolibarr events. Targets of notifications can be defined: -NotificationsDescUser=* vienam lietotājam, vienam lietotājam laikā. -NotificationsDescContact=* uz trešo pušu kontaktpersonām (klientiem vai pārdevējiem), vienu kontaktu laikā. -NotificationsDescGlobal=* vai iestatot globālos mērķa e-pastus moduļa iestatīšanas lapā. +CompanyCodeChecker=Klienta / pārdevēja kodu automātiskās ģenerēšanas iespējas +AccountCodeManager=Klienta / pārdevēja grāmatvedības kodu automātiskās ģenerēšanas iespējas +NotificationsDesc=E-pasta paziņojumus var automātiski nosūtīt dažiem Dolibarr notikumiem.
Paziņojumu saņēmēji var tikt definēti: +NotificationsDescUser=* vienam lietotājam, vienam lietotājam vienlaicīgi. +NotificationsDescContact=* katram trešās puses kontaktam (klientiem vai pārdevējiem), vienam kontaktam vienlaicīgi. +NotificationsDescGlobal=* vai iestatot globālās e-pasta adreses šajā iestatīšanas lapā. ModelModules=Dokumentu veidnes DocumentModelOdt=Izveidojiet dokumentus no OpenDocument veidnes (.ODT / .ODS faili no LibreOffice, OpenOffice, KOffice, TextEdit, ...) WatermarkOnDraft=Ūdenszīme dokumenta projektā JSOnPaimentBill=Activate feature to autofill payment lines on payment form CompanyIdProfChecker=Noteikumi par profesionāliem ID MustBeUnique=Jābūt unikālam? -MustBeMandatory=Obligāts, lai izveidotu trešās puses (ja ir definēts PVN numurs vai uzņēmuma veids)? +MustBeMandatory=Obligāti jāizveido trešās personas (ja definēts PVN numurs vai uzņēmuma veids)? MustBeInvoiceMandatory=Mandatory to validate invoices? TechnicalServicesProvided=Tehniskie pakalpojumi #####DAV ##### -WebDAVSetupDesc=Šīs ir saites, lai piekļūtu WebDAV direktorijai. Tas satur "publisku" direktoriju, kas pieejams jebkuram lietotājam, kurš zina URL (ja ir atļauta publiskā direktorija piekļuve) un "privātai" direktorijai, kurai ir nepieciešams esošais pieteikšanās konts / parole. -WebDavServer=%sServera:%s saknes adrese +WebDAVSetupDesc=Šī ir saite, lai piekļūtu WebDAV direktorijai. Tā satur "publisku" dir., Kas atvērts jebkuram lietotājam, kurš zina URL (ja publiskā kataloga piekļuve ir atļauta) un "privātu" direktoriju, kuram ir nepieciešams esošs pieteikšanās konts / parole. +WebDavServer=%s servera%s saknes URL: ##### Webcal setup ##### WebCalUrlForVCalExport=Eksporta saite uz %s formātā ir pieejams šādā tīmekļa vietnē: %s ##### Invoices ##### @@ -1236,13 +1238,13 @@ CreditNote=Kredīta piezīme CreditNotes=Kredīta piezīmes ForceInvoiceDate=Force rēķina datumu apstiprināšanas datuma SuggestedPaymentModesIfNotDefinedInInvoice=Ieteicamie maksājumi režīmā rēķinā pēc noklusējuma, ja nav definēts rēķins -SuggestPaymentByRIBOnAccount=Ieteikt maksājumus, ko izņemt no konta -SuggestPaymentByChequeToAddress=Ieteikt maksājumu ar čeku, lai +SuggestPaymentByRIBOnAccount=Iesakiet norēķinu ar norēķinu kontu +SuggestPaymentByChequeToAddress=Ieteikt maksājumu ar čeku uz FreeLegalTextOnInvoices=Brīvs teksts uz rēķiniem WatermarkOnDraftInvoices=Ūdenszīme uz sagataves rēķiniem (nav ja tukšs) PaymentsNumberingModule=Maksājumu numerācijas modelis -SuppliersPayment=Piegādātāju maksājumi -SupplierPaymentSetup=Piegādātāju maksājumu iestatīšana +SuppliersPayment=Pārdevēja maksājumi +SupplierPaymentSetup=Pārdevēja maksājumu iestatīšana ##### Proposals ##### PropalSetup=Commercial priekšlikumi modulis uzstādīšana ProposalsNumberingModules=Komerciālie priekšlikumu numerācijas modeļi @@ -1251,17 +1253,17 @@ FreeLegalTextOnProposal=Brīvais teksts komerciālajos priekšlikumos WatermarkOnDraftProposal=Ūdenszīme projektu komerciālo priekšlikumu (none ja tukšs) BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL=Ask for bank account destination of proposal ##### SupplierProposal ##### -SupplierProposalSetup=Cena pieprasa pārdevēju moduļa iestatīšanu -SupplierProposalNumberingModules=Cenas pieprasa pārdevējiem numerācijas modeļus -SupplierProposalPDFModules=Cenas pieprasa pārdevējiem dokumentu modeļus -FreeLegalTextOnSupplierProposal=Brīvs teksts cenu pieprasījumu pārdevējiem -WatermarkOnDraftSupplierProposal=Ūdenszīme par cenu cenu pieprasījumu pārdevējiem (neviens nav tukšs) +SupplierProposalSetup=Price requests suppliers module setup +SupplierProposalNumberingModules=Price requests suppliers numbering models +SupplierProposalPDFModules=Price requests suppliers documents models +FreeLegalTextOnSupplierProposal=Free text on price requests suppliers +WatermarkOnDraftSupplierProposal=Watermark on draft price requests suppliers (none if empty) BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Ask for bank account destination of price request WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Pieprasīt noliktavas avotu pasūtīšanai ##### Suppliers Orders ##### BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Pieprasiet bankas konta galamērķi pirkuma pasūtījumā ##### Orders ##### -OrdersSetup=Pasūtījumu vadības iestatīšana +OrdersSetup=Klientu pasūtījumu pārvaldības iestatīšana OrdersNumberingModules=Pasūtījumu numerācijas modeļi OrdersModelModule=Pasūtīt dokumenti modeļi FreeLegalTextOnOrders=Brīvs teksts pasūtījumos @@ -1284,10 +1286,10 @@ WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty) MembersSetup=Dalībnieku moduļa uzstādīšana MemberMainOptions=Galvenās iespējas AdherentLoginRequired= Pārvaldīt Pieteikšanos katram dalībniekam -AdherentMailRequired=E-Mail nepieciešams, lai izveidotu jaunu locekli +AdherentMailRequired=Lai izveidotu jaunu dalībnieku, nepieciešams e-pasts MemberSendInformationByMailByDefault=Rūtiņu, lai nosūtītu pasta apstiprinājums locekļiem (validāciju vai jauns abonements) ir ieslēgts pēc noklusējuma -VisitorCanChooseItsPaymentMode=Apmeklētājs var izvēlēties pieejamos maksājumu veidus -MEMBER_REMINDER_EMAIL=Iespējot automātisku atgādinājumu pa e-pastu no abonementiem ar beigu datumu. Piezīme: modulis %s ir jāaktivizē un pareizi iestatīts, lai saņemtu atgādinājumu. +VisitorCanChooseItsPaymentMode=Apmeklētājs var izvēlēties no pieejamiem maksājumu veidiem +MEMBER_REMINDER_EMAIL=Iespējot automātisku atgādinājumu pa e-pastu par beidzies abonementi. Piezīme. Modulim %s jābūt iespējotai un pareizi iestatītai, lai nosūtītu atgādinājumus. ##### LDAP setup ##### LDAPSetup=LDAP iestatījumi LDAPGlobalParameters=Globālie parametri @@ -1368,25 +1370,25 @@ LDAPLdapMapping=LDAP kartēšana LDAPFieldLoginUnix=Lietotājs (Unix) LDAPFieldLoginExample=Piemērs: uid LDAPFilterConnection=Meklēšanas filtrs -LDAPFilterConnectionExample=Piemērs: &(objektClass = inetOrgPerson) +LDAPFilterConnectionExample=Piemērs: & (objectClass = inetOrgPerson) LDAPFieldLoginSamba=Lietotāja vārds (samba, Aktīvā direktorija) -LDAPFieldLoginSambaExample=Piemērs: kāds konta nosaukums +LDAPFieldLoginSambaExample=Piemērs: samaccountname LDAPFieldFullname=Vārds un uzvārds LDAPFieldFullnameExample=Piemērs: cn LDAPFieldPasswordNotCrypted=Parole nav šifrēta LDAPFieldPasswordCrypted=Parole šifrēta -LDAPFieldPasswordExample=Piemērs: lietotajaParole +LDAPFieldPasswordExample=Piemērs: userPassword LDAPFieldCommonNameExample=Piemērs: cn LDAPFieldName=Nosaukums LDAPFieldNameExample=Piemērs: sn LDAPFieldFirstName=Vārds -LDAPFieldFirstNameExample=Piemērs: Vārds +LDAPFieldFirstNameExample=Piemērs LDAPFieldMail=E-pasta adrese LDAPFieldMailExample=Piemērs: pasts LDAPFieldPhone=Darba tālruņa numurs -LDAPFieldPhoneExample=Piemērs: telefons +LDAPFieldPhoneExample=Piemērs: telefona numurs LDAPFieldHomePhone=Personīgais tālruņa numurs -LDAPFieldHomePhoneExample=Piemērs: Mājas telefons +LDAPFieldHomePhoneExample=Piemērs: homephone LDAPFieldMobile=Mobilais tālrunis LDAPFieldMobileExample=Piemērs: mobilais LDAPFieldFax=Faksa numurs @@ -1394,16 +1396,16 @@ LDAPFieldFaxExample=Piemērs: facsimiletelephonenumber LDAPFieldAddress=Iela LDAPFieldAddressExample=Piemērs: iela LDAPFieldZip=Pasta indekss -LDAPFieldZipExample=Piemērs: pasta indekss +LDAPFieldZipExample=Piemērs: pasta kods LDAPFieldTown=Pilsēta LDAPFieldTownExample=Piemērs: l LDAPFieldCountry=Valsts LDAPFieldDescription=Apraksts LDAPFieldDescriptionExample=Piemērs: apraksts LDAPFieldNotePublic=Publiskā piezīme -LDAPFieldNotePublicExample=Piemērs: publiskā piezīme +LDAPFieldNotePublicExample=Piemērs: publicnote LDAPFieldGroupMembers= Grupas dalībnieki -LDAPFieldGroupMembersExample= Piemērs: uniqueMember +LDAPFieldGroupMembersExample= Piemērs: unikāls loceklis LDAPFieldBirthdate=Dzimšanas diena LDAPFieldCompany=Kompānija LDAPFieldCompanyExample=Piemērs: o @@ -1441,8 +1443,8 @@ CacheByClient=Pārlūka kešatmiņa CompressionOfResources=Kompresijas HTTP atbildes CompressionOfResourcesDesc=Piemēram, izmantojot Apache direktīvu "AddOutputFilterByType DEFLATE" TestNotPossibleWithCurrentBrowsers=Such an automatic detection is not possible with current browsers -DefaultValuesDesc=Šeit jūs varat definēt / izpildīt noklusējuma vērtību, kuru vēlaties izveidot, kad izveidojat jaunu ierakstu un / vai noklusējuma filtrus, vai kārtot kārtību, kad jūsu saraksts ieraksta. -DefaultCreateForm=Noklusējuma vērtības (veidot veidlapās) +DefaultValuesDesc=Šeit jūs varat definēt noklusējuma vērtību, kuru vēlaties izmantot, veidojot jaunu ierakstu, un / vai noklusējuma filtrus vai kārtošanas secību ierakstot ierakstus. +DefaultCreateForm=Noklusējuma vērtības (izmantošanai veidlapās) DefaultSearchFilters=Noklusējuma meklēšanas filtri DefaultSortOrder=Noklusējuma kārtošanas kārtība DefaultFocus=Noklusējuma fokusa lauki @@ -1451,8 +1453,8 @@ DefaultMandatory=Obligātie veidlapu lauki ProductSetup=Produktu moduļa uzstādīšana ServiceSetup=Pakalpojumu moduļa uzstādīšana ProductServiceSetup=Produktu un pakalpojumu moduļu uzstādīšana -NumberOfProductShowInSelect=Maksimālais skaits produktu kombinācijas izvēlētos sarakstus (0 = nav ierobežojumu) -ViewProductDescInFormAbility=Parādīt produkta aprakstus veidlapās (citādi kā uznirstošo rīku padomu) +NumberOfProductShowInSelect=Maksimālais produktu skaits, kas jāparāda kombinētajos atlases sarakstos (0 = bez ierobežojuma) +ViewProductDescInFormAbility=Rādīt produktu aprakstus veidlapās (citādi tiek parādīts rīkjoslas uznirstošajā logā) MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal ViewProductDescInThirdpartyLanguageAbility=Displeja produktu apraksti trešās puses valodā UseSearchToSelectProductTooltip=Arī tad, ja jums ir liels produktu skaits (> 100 000), varat palielināt ātrumu, iestatot iestatījumu -> Cits iestatījumu konstante PRODUCT_DONOTSEARCH_ANYWHERE uz 1. Tad meklēšana būs tikai virknes sākums. @@ -1497,7 +1499,7 @@ GenbarcodeLocation=Bar code generation command line tool (used by internal engin BarcodeInternalEngine=Iekšējais dzinējs BarCodeNumberManager=Manager to auto define barcode numbers ##### Prelevements ##### -WithdrawalsSetup=Setup of module Direct debit payment orders +WithdrawalsSetup=Moduļa tiešā debeta maksājumu iestatīšana ##### ExternalRSS ##### ExternalRSSSetup=Ārējā RSS importa iestatīšana NewRSS=Jauna RSS barotne @@ -1505,15 +1507,15 @@ RSSUrl=RSS links RSSUrlExample=Interesants RSS ##### Mailing ##### MailingSetup=Pasta vēstuļu sūtīšanas modulis iestatīšanu -MailingEMailFrom=Nosūtītāja e-pasts (No) uz e-pastu nosūtīto vēstuļu sūtīšanas modulis -MailingEMailError=Atgriezties e-pastu (Kļūdas-līdz) uz e-pastu ar kļūdām +MailingEMailFrom=Sūtītāja e-pasts (no) e-pasta moduļa sūtītajiem e-pastiem +MailingEMailError=Atgriezties e-pastā (kļūdas) e-pastiem ar kļūdām MailingDelay=Seconds to wait after sending next message ##### Notification ##### -NotificationSetup=EMail notification module setup -NotificationEMailFrom=Nosūtītāja e-pasts (No) uz e-pastu nosūtīti paziņojumi -FixedEmailTarget=Fixed email target +NotificationSetup=E-pasta paziņojumu moduļa iestatīšana +NotificationEMailFrom=Sūtītāja e-pasts (no) e-pastiem, ko nosūtījis Paziņojumu modulis +FixedEmailTarget=Saņēmējs ##### Sendings ##### -SendingsSetup=Nosūtīšanas moduļa iestatīšana +SendingsSetup=Piegādes moduļa iestatīšana SendingsReceiptModel=Nosūtot saņemšanas modeli SendingsNumberingModules=Sendings numerācijas moduļus SendingsAbility=Support shipping sheets for customer deliveries @@ -1573,8 +1575,8 @@ TaxSetup=Taxes, social or fiscal taxes and dividends module setup OptionVatMode=PVN jāmaksā OptionVATDefault=Standarta bāze OptionVATDebitOption=Uzkrājumu princips -OptionVatDefaultDesc=PVN ir jāmaksā:
- Piegādes laikā precēm (mēs izmantojam rēķina datumu)
- Par maksājumiem par pakalpojumiem -OptionVatDebitOptionDesc=PVN ir jāmaksā:
- Piegādes laikā precēm (mēs izmantojam rēķina datumu)
- Par rēķinu (debets) attiecībā uz pakalpojumiem +OptionVatDefaultDesc=PVN ir jāmaksā:
- par preču piegādi (pamatojoties uz rēķina datumu)
- par maksājumiem par pakalpojumiem +OptionVatDebitOptionDesc=PVN ir jāmaksā:
- par preču piegādi (pamatojoties uz faktūrrēķina datumu)
- par rēķinu (debeta) par pakalpojumiem OptionPaymentForProductAndServices=Naudas bāze produktiem un pakalpojumiem OptionPaymentForProductAndServicesDesc=PVN ir jāmaksā:
- par samaksu par precēm
- par maksājumiem par pakalpojumiem SummaryOfVatExigibilityUsedByDefault=PVN piemērošanas laiks pēc noklusējuma saskaņā ar izvēlēto iespēju: @@ -1606,20 +1608,20 @@ AGENDA_SHOW_LINKED_OBJECT=Parādīt saistīto objektu darba kārtībā ##### Clicktodial ##### ClickToDialSetup=Klikšķiniet lai Dial moduļa uzstādīšanas ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
__PHONETO__ that will be replaced with the phone number of person to call
__PHONEFROM__ that will be replaced with phone number of calling person (yours)
__LOGIN__ that will be replaced with clicktodial login (defined on user card)
__PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=Šis modulis ļauj tālruņu numurus noklikšķināt. Klikšķis uz šīs ikonas tiks izsaukts, lai jūsu tālruņa zvanu veiktu tālruņa numurs. To var izmantot, lai zvanītu uz Dolibarr zvanu centra sistēmu, kas, piemēram, var izsaukt tālruņa numuru SIP sistēmā. +ClickToDialDesc=Šis modulis ļauj noklikšķināt uz numuriem, uz kuriem var noklikšķināt. Noklikšķinot uz ikonas, tālrunis zvanīs uz numuru. To var izmantot, lai izsauktu zvanu centra sistēmu no Dolibarr, kas var izsaukt tālruņa numuru, piemēram, SIP sistēmā. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Izmantojiet šo metodi, ja jūsu lietotājiem ir programmatūras tālrunis vai programmatūras interfeiss, kas uzstādīts uz tā paša datora kā pārlūks, un tiek izsaukts, kad jūs noklikšķināt uz savas pārlūkprogrammas saites, kas sākas ar "tel:". Ja jums ir nepieciešams pilnīgs servera risinājums (nav nepieciešama lokālā programmatūras instalēšana), jums tas jādara, lai tas būtu "nē" un aizpildītu nākamo lauku. -##### Point Of Sales (CashDesk) ##### -CashDesk=Tirdzniecības punkts -CashDeskSetup=Pārdošanas punktu moduļa iestatīšana +##### Point Of Sale (CashDesk) ##### +CashDesk=Tirdzniecības vieta +CashDeskSetup=Tirdzniecības moduļa punkts CashDeskThirdPartyForSell=Noklusējuma vispārējā trešā puse, ko izmanto pārdošanai CashDeskBankAccountForSell=Noklusējuma konts, lai izmantotu, lai saņemtu naudas maksājumus -CashDeskBankAccountForCheque= Noklusējuma konts, lai izmantotu, lai saņemtu maksājumus ar čeku +CashDeskBankAccountForCheque= Noklusējuma konts, ko izmanto, lai saņemtu maksājumus ar čeku CashDeskBankAccountForCB= Noklusējuma konts, lai izmantotu, lai saņemtu maksājumus ar kredītkarti CashDeskDoNotDecreaseStock=Atspējot krājumu samazinājumu, kad pārdošana tiek veikta no tirdzniecības vietas (ja "nē", krājumu samazinājums tiek veikts par katru pārdošanu, kas veikta no POS, neatkarīgi no moduļa nolikumā norādītās iespējas). CashDeskIdWareHouse=Force and restrict warehouse to use for stock decrease StockDecreaseForPointOfSaleDisabled=Krājumu samazinājums no tirdzniecības vietām invalīdiem -StockDecreaseForPointOfSaleDisabledbyBatch=Stock decrease in POS is not compatible with lot management +StockDecreaseForPointOfSaleDisabledbyBatch=Krājumu samazinājums POS nav saderīgs ar moduļa Serial / Lot pārvaldību (pašlaik darbojas), tāpēc krājumu samazinājums ir atspējots. CashDeskYouDidNotDisableStockDecease=Veicot pārdošanu no pārdošanas vietām, jūs neesat atspējojis krājumu samazināšanos. Tādēļ ir vajadzīga noliktava. ##### Bookmark ##### BookmarkSetup=Grāmatzīmju moduļa iestatīšana @@ -1640,20 +1642,20 @@ ApiKey=Key for API WarningAPIExplorerDisabled=API pētnieks ir atspējots. API pētnieks nav pienākums sniegt API pakalpojumus. Tas ir līdzeklis izstrādātājam, lai atrastu / pārbaudītu REST API. Ja jums ir nepieciešams šis rīks, dodieties uz moduļa API REST iestatīšanu, lai to aktivizētu. ##### Bank ##### BankSetupModule=Bankas moduļa uzstādīšana -FreeLegalTextOnChequeReceipts=Brīvais teksts uz čeku ieņēmumiem +FreeLegalTextOnChequeReceipts=Bezmaksas teksts čeku čekos BankOrderShow=Displejs secībā bankas kontu valstīm, izmantojot "sīki bankas numurs" BankOrderGlobal=Vispārējs BankOrderGlobalDesc=Vispārējā displejs rīkojums BankOrderES=Spāņu BankOrderESDesc=Spāņu displejs, lai -ChequeReceiptsNumberingModule=Cheque Receipts Numbering module +ChequeReceiptsNumberingModule=Pārbaudiet čeku numerācijas moduli ##### Multicompany ##### MultiCompanySetup=Multi-kompānija modulis iestatīšana ##### Suppliers ##### -SuppliersSetup=Piegādātāja moduļa iestatījumi +SuppliersSetup=Pārdevēja moduļa iestatīšana SuppliersCommandModel=Pilnīga pirkuma pasūtījuma veidne (logotips ...) SuppliersInvoiceModel=Pabeigt pārdevēja rēķina veidni (logotips ...) -SuppliersInvoiceNumberingModel=Piegādātāju rēķinu numerācijas modeļus +SuppliersInvoiceNumberingModel=Pārdevēja rēķinu numerācijas modeļi IfSetToYesDontForgetPermission=If set to yes, don't forget to provide permissions to groups or users allowed for the second approval ##### GeoIPMaxmind ##### GeoIPMaxmindSetup=GeoIP MaxMind moduļa iestatīšana @@ -1689,7 +1691,7 @@ NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0"," SalariesSetup=Iestatījumi algu modulim SortOrder=Kārtošanas secība Format=Formāts -TypePaymentDesc=0: Klienta maksājuma veids, 1: Piegādātāja maksājuma veids, 2: gan klientu, gan piegādātāju maksājuma veids +TypePaymentDesc=0: Klienta maksājuma veids, 1: Pārdevēja maksājuma veids, 2: Gan klientu, gan piegādātāju maksājumu veids IncludePath=Include path (defined into variable %s) ExpenseReportsSetup=Setup of module Expense Reports TemplatePDFExpenseReports=Document templates to generate expense report document @@ -1697,16 +1699,16 @@ ExpenseReportsIkSetup=Moduļa Expense Reports iestatīšana - Milles indekss ExpenseReportsRulesSetup=Moduļa Expense Reports iestatīšana - noteikumi ExpenseReportNumberingModules=Izdevumu pārskatu numerācijas modulis NoModueToManageStockIncrease=No module able to manage automatic stock increase has been activated. Stock increase will be done on manual input only. -YouMayFindNotificationsFeaturesIntoModuleNotification=You may find options for EMail notifications by enabling and configuring the module "Notification". +YouMayFindNotificationsFeaturesIntoModuleNotification=Varat atrast e-pasta paziņojumu iespējas, iespējot un konfigurējot moduli "Paziņošana". ListOfNotificationsPerUser=Paziņojumu saraksts katram lietotājam * -ListOfNotificationsPerUserOrContact=Paziņojumu saraksts katram lietotājam * vai katram kontaktam ** -ListOfFixedNotifications=List of fixed notifications +ListOfNotificationsPerUserOrContact=Paziņojumu (notikumu) saraksts, kas pieejami katram lietotājam * vai kontaktam ** +ListOfFixedNotifications=Fiksēto paziņojumu saraksts GoOntoUserCardToAddMore=Atveriet lietotāja cilni "Paziņojumi", lai pievienotu vai noņemtu paziņojumus lietotājiem GoOntoContactCardToAddMore=Atveriet trešās personas cilni "Paziņojumi", lai pievienotu vai noņemtu paziņojumus par kontaktpersonām / adresēm Threshold=Slieksnis -BackupDumpWizard=Wizard to build database backup dump file +BackupDumpWizard=Wizard, lai izveidotu dublējuma failu SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason: -SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is only manual steps a privileged user can do. +SomethingMakeInstallFromWebNotPossible2=Šī iemesla dēļ šeit aprakstītais process ir manuāls process, kurā var veikt tikai priviliģēts lietotājs. InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file %s to allow this feature. ConfFileMustContainCustom=Lai instalētu vai izveidotu ārēju moduli no lietojumprogrammas, moduļa faili jāiegādājas direktorijā %s . Lai šo direktoriju apstrādātu Dolibarr, jums ir jāiestata conf / conf.php , lai pievienotu 2 direktīvu līnijas:
$ dolibarr_main_url_root_alt = "/ custom"; < br> $ dolibarr_main_document_root_alt = '%s / custom'; HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over @@ -1732,8 +1734,8 @@ ColorFormat=RGB krāsa ir HEX formātā, piemēram: FF0000 PositionIntoComboList=Position of line into combo lists SellTaxRate=Pārdošanas nodokļa likme RecuperableOnly=Jā par PVN "Neuztverams, bet atgūstams", kas paredzēts dažai Francijas valstij. Uzturiet vērtību "Nē" visos citos gadījumos. -UrlTrackingDesc=If the provider or transport service offer a page or web site to check status of your shipping, you can enter it here. You can use the key {TRACKID} into URL parameters so the system will replace it with value of tracking number user entered into shipment card. -OpportunityPercent=Veidojot vadību, jūs definēsiet paredzēto projekta / svina apjomu. Saskaņā ar svina statusu šo summu var reizināt ar šo likmi, lai novērtētu globālo summu, ko var radīt visas jūsu iespējas. Vērtība ir procenti (no 0 līdz 100). +UrlTrackingDesc=Ja pakalpojumu sniedzējs vai transporta pakalpojums piedāvā lapu vai tīmekļa vietni, lai pārbaudītu sūtījumu statusu, varat to ievadīt šeit. Jūs varat izmantot taustiņu {TRACKID} URL parametros, lai sistēma to aizstātu ar izsekošanas numuru, ko lietotājs ievadījis sūtījuma kartē. +OpportunityPercent=Izveidojot vadību, jūs definēsiet paredzamo projekta / vadītāja summu. Saskaņā ar svina statusu šī summa var tikt reizināta ar šo likmi, lai novērtētu kopējo summu, ko var radīt visi jūsu klienti. Vērtība ir procentuālā daļa (no 0 līdz 100). TemplateForElement=This template record is dedicated to which element TypeOfTemplate=Veidne TemplateIsVisibleByOwnerOnly=Veidne ir redzama tikai īpašniekam @@ -1762,10 +1764,10 @@ YouUseLastStableVersion=Jūs izmantojat pēdējo stabilo versiju TitleExampleForMajorRelease=Example of message you can use to announce this major release (feel free to use it on your web sites) TitleExampleForMaintenanceRelease=Example of message you can use to announce this maintenance release (feel free to use it on your web sites) ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s ir pieejams. Versija %s ir liela versija ar daudzām jaunām funkcijām gan lietotājiem, gan izstrādātājiem. Jūs varat to lejupielādēt no https://www.dolibarr.org portāla lejupielādes apgabala (apakšdirektorijā Stable versijas). Lai iegūtu pilnīgu izmaiņu sarakstu, varat izlasīt ChangeLog . -ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s ir pieejams. Versija %s ir uzturēšanas versija, tāpēc tajā ir tikai kļūdu labojumi. Mēs iesakām ikvienam, kurš izmanto vecāku versiju, jaunināt uz šo. Tā kā jebkurā tehniskās apkopes izlaidumā šajā versijā nav jaunu funkciju vai datu struktūras izmaiņu. Jūs varat to lejupielādēt no https://www.dolibarr.org portāla lejupielādes apgabala (apakšdirektorijā Stable versijas). Lai iegūtu pilnīgu izmaiņu sarakstu, varat izlasīt ChangeLog . -MultiPriceRuleDesc=Ja ir ieslēgta opcija "Vairāki cenu līmeņi uz produktu / pakalpojumu", katram produktam varat noteikt atšķirīgas cenas (vienu cenu līmenī). Lai ietaupītu laiku, šeit jūs varat ievadīt kārtulu, lai katram līmenim aprēķinātu cenu saskaņā ar pirmā līmeņa cenu, tāpēc katram produktam būs jāievada tikai pirmā līmeņa cena. Šī lapa ir šeit, lai ietaupītu laiku un varētu būt noderīga tikai tad, ja jūsu cenas katram līmenim ir salīdzinātas ar pirmo līmeni. Jūs varat ignorēt šo lapu vairumā gadījumu. +ExampleOfNewsMessageForMaintenanceRelease=Ir pieejams Dolibarr ERP & CRM %s. Versija %s ir apkopes versija, tāpēc tajā ir tikai kļūdu labojumi. Mēs iesakām visiem lietotājiem jaunināt uz šo versiju. Tehniskās apkopes izdevums neievieš jaunas funkcijas vai izmaiņas datubāzē. To var lejupielādēt no https://www.dolibarr.org portāla lejupielādes apgabala (apakšdirektorija Stabilas versijas). Lai iegūtu pilnīgu izmaiņu sarakstu, varat izlasīt ChangeLog . +MultiPriceRuleDesc=Ja ir iespējota opcija "Vairāki cenu līmeņi katram produktam / pakalpojumam", katram produktam varat noteikt dažādas cenas (vienu cenu līmenī). Lai ietaupītu laiku, šeit jūs varat ievadīt noteikumu, lai automātiski aprēķinātu cenu katram līmenim, pamatojoties uz pirmā līmeņa cenu, tāpēc katram produktam būs jāievada tikai pirmā līmeņa cena. Šī lapa ir izstrādāta, lai ietaupītu jūsu laiku, bet ir noderīga tikai tad, ja jūsu cenas katrā līmenī ir saistītas ar pirmo līmeni. Vairumā gadījumu šo lapu varat ignorēt. ModelModulesProduct=Veidlapas produktu dokumentos -ToGenerateCodeDefineAutomaticRuleFirst=Lai varētu automātiski ģenerēt kodus, vispirms ir jānosaka pārvaldnieks, lai automātiski noteiktu svītrkoda numuru. +ToGenerateCodeDefineAutomaticRuleFirst=Lai varētu automātiski ģenerēt kodus, vispirms jādefinē pārvaldnieks, lai automātiski definētu svītrkoda numuru. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=Skatīt ChangeLog failu (tikai angļu valodā) AllPublishers=Visi izdevēji @@ -1803,25 +1805,25 @@ MAIN_PDF_MARGIN_LEFT=Kreisā puse PDF failā MAIN_PDF_MARGIN_RIGHT=Labā puse PDF failā MAIN_PDF_MARGIN_TOP=Galvene PDF failā MAIN_PDF_MARGIN_BOTTOM=Kājene PDF failā -NothingToSetup=Šajā modulī nav īpašu iestatījumu. +NothingToSetup=Šim modulim nav nepieciešama īpaša iestatīšana. SetToYesIfGroupIsComputationOfOtherGroups=Iestatiet to uz "jā", ja šī grupa ir citu grupu aprēķins EnterCalculationRuleIfPreviousFieldIsYes=Ievadiet aprēķina kārtulu, ja iepriekšējais lauks ir iestatīts uz Jā (Piemēram, 'CODEGRP1 + CODEGRP2') SeveralLangugeVariatFound=Atrasti vairāki valodu varianti COMPANY_AQUARIUM_REMOVE_SPECIAL=Noņemt īpašās rakstzīmes COMPANY_AQUARIUM_CLEAN_REGEX=Regex filtrs tīrajai vērtībai (COMPANY_AQUARIUM_CLEAN_REGEX) GDPRContact=Datu aizsardzības inspektors (DPO, datu konfidencialitāte vai GDPR kontakts) -GDPRContactDesc=Ja jūs glabājat datus par Eiropas uzņēmumiem / pilsoni, varat saglabāt kontaktpersonu, kas ir atbildīgs par vispārējo datu aizsardzības regulu šeit +GDPRContactDesc=Ja jūs glabājat datus par Eiropas uzņēmumiem / pilsoņiem, varat nosaukt kontaktpersonu, kas ir atbildīga par Vispārējo datu aizsardzības regulu HelpOnTooltip=Palīdzības teksts tiek parādīts rīka padomā -HelpOnTooltipDesc=Šeit ievietojiet tekstu vai tulkošanas taustiņu, lai teksts tiktu rādīts rīka padomē, kad šis lauks parādās formā -YouCanDeleteFileOnServerWith=Šo failu varat izdzēst serverī, izmantojot komandrindu:
%s +HelpOnTooltipDesc=Ievietojiet tekstu vai tulkošanas atslēgu šeit, lai teksts tiktu rādīts rīkā, kad šis lauks parādās formā +YouCanDeleteFileOnServerWith=Šo failu var dzēst serverī ar komandrindu:
%s ChartLoaded=Konta diagramma ielādēta SocialNetworkSetup=Moduļa Sociālo tīklu iestatīšana EnableFeatureFor=Iespējot funkcijas %s -VATIsUsedIsOff=Piezīme. Iespēja izmantot pārdošanas nodokli vai PVN izvēlnē %s - %s ir iestatīts uz Izslēgts, tādēļ pārdošanas nodoklis vai izmantotā PVN vienmēr būs 0 pārdošanai. +VATIsUsedIsOff=Piezīme. Izvēlnē %s - %s izvēlētā pārdošanas nodokļa vai PVN izmantošana ir iestatīta uz Izslēgts , tāpēc pārdošanas nodoklis vai izmantotais PVN vienmēr būs 0 pārdošanai. SwapSenderAndRecipientOnPDF=Pārsūtīt sūtītāja un adresāta adresi PDF formātā -FeatureSupportedOnTextFieldsOnly=Brīdinājums, funkcija tiek atbalstīta tikai teksta laukos +FeatureSupportedOnTextFieldsOnly=Brīdinājums, funkcija tiek atbalstīta tikai teksta laukos. Jāiestata arī URL parametrs action = Create vai action = rediģēt. VAI lapas nosaukumam jābeidzas ar 'new.php', lai aktivizētu šo funkciju. EmailCollector=E-pasta savācējs -EmailCollectorDescription=Pievienojiet plānoto darbu un iestatīšanas lapu, lai regulāri skenētu e-pasta kastes (izmantojot IMAP protokolu) un reģistrētu jūsu pieteikumā saņemtos e-pastus īstajā vietā un / vai izveidotu automātisku ierakstu (piemēram, potenciālie klienti). +EmailCollectorDescription=Pievienojiet ieplānoto darbu un iestatīšanas lapu, lai regulāri skenētu e-pasta kastes (izmantojot IMAP protokolu) un ierakstītu savā pieteikumā saņemtos e-pasta ziņojumus pareizajā vietā un / vai automātiski izveidotu ierakstus (piemēram, vadus). NewEmailCollector=Jauns e-pasta savācējs EMailHost=E-pasta IMAP serveris MailboxSourceDirectory=Pastkastes avota katalogs @@ -1831,24 +1833,29 @@ CollectNow=Savākt tagad DateLastResult=Pēdējās vākšanas datums LastResult=Pēdējais rezultāts EmailCollectorConfirmCollectTitle=E-pasts apkopo apstiprinājumu -EmailCollectorConfirmCollect=Vai jūs vēlaties palaist kolekcijas kolekcionāru tagad? +EmailCollectorConfirmCollect=Vai vēlaties savākt šīs kolekcijas kolekciju tagad? NoNewEmailToProcess=Nav apstrādāts jauns e-pasts (atbilstošie filtri) NothingProcessed=Nekas nav paveikts -XEmailsDoneYActionsDone=%s e-pastu kvalificēts, %s e-pasts veiksmīgi apstrādāts (par %s ierakstu / veiktas darbības) kolekcionārs +XEmailsDoneYActionsDone=kvalificēti e-pasta ziņojumi %s, %s e-pasta vēstules veiksmīgi apstrādātas (par %s ierakstu / veiktajām darbībām) ar kolekcionāru RecordEvent=Ierakstiet e-pasta notikumu -CreateLeadAndThirdParty=Izveidojiet svinu (un, ja nepieciešams, trešo pusi) +CreateLeadAndThirdParty=Izveidot vadību (un, ja nepieciešams, trešo personu) CodeLastResult=Pēdējā vākšanas rezultāta kods NbOfEmailsInInbox=E-pasta numurs avota direktorijā -LoadThirdPartyFromName=Ielādēt trešās puses nosaukumu (tikai ielāde) -LoadThirdPartyFromNameOrCreate=Ielādējiet trešās puses nosaukumu (izveidojiet, ja tas nav atrasts). +LoadThirdPartyFromName=Ielādējiet trešo personu no nosaukuma (tikai ielāde) +LoadThirdPartyFromNameOrCreate=Ielādējiet trešo personu no nosaukuma (izveidojiet, ja nav atrasts) WithDolTrackingID=Atrasts Dolibarr izsekošanas ID WithoutDolTrackingID=Dolibarr izsekošanas ID nav atrasts FormatZip=Pasta indekss +MainMenuCode=Izvēlnes ievades kods (mainmenu) +ECMAutoTree=Rādīt automātisko ECM koku +OperationParamDesc=Definējiet vērtības, kas izmantojamas darbībai vai kā iegūt vērtības. Piemēram:
VALUE: abc
REGEX: TEMATI: ([^] *)
REGEX: BODY: Mans uzņēmuma nosaukums ir ([^ s] *) ##### Resource #### -ResourceSetup=Konfigurācijas moduļa resurss +ResourceSetup=Resursu moduļa konfigurēšana UseSearchToSelectResource=Izmantojiet meklēšanas formu, lai izvēlētos resursu (nevis nolaižamo sarakstu). DisabledResourceLinkUser=Atspējot funkciju, lai resursus saistītu ar lietotājiem DisabledResourceLinkContact=Atspējot funkciju, lai resursu saistītu ar kontaktpersonām ConfirmUnactivation=Apstipriniet moduļa atiestatīšanu OnMobileOnly=Tikai mazam ekrānam (viedtālrunim) DisableProspectCustomerType=Atspējojiet "Prospect + Customer" trešās puses veidu (tādēļ trešai personai jābūt Prospect vai Klientam, bet nevar būt abas) +MAIN_OPTIMIZEFORTEXTBROWSER=Vienkāršojiet saskarni neredzīgajam +MAIN_OPTIMIZEFORTEXTBROWSERDesc=Iespējojiet šo opciju, ja esat akls cilvēks, vai izmantojiet programmu no teksta pārlūkprogrammas, piemēram, lūsis vai saites. diff --git a/htdocs/langs/lv_LV/assets.lang b/htdocs/langs/lv_LV/assets.lang new file mode 100644 index 00000000000..f632913c15e --- /dev/null +++ b/htdocs/langs/lv_LV/assets.lang @@ -0,0 +1,59 @@ +# Copyright (C) 2018 Alexandre Spangaro +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# +# Generic +# +Assets = Aktīvi +NewAsset = Jauns aktīvs +AccountancyCodeAsset = Grāmatvedības kods (aktīvs) +AccountancyCodeDepreciationAsset = Grāmatvedības kods (nolietojuma aktīvu konts) +AccountancyCodeDepreciationExpense = Grāmatvedības kods (nolietojuma izmaksu konts) +NewAssetType=Jauns aktīvu veids +AssetsTypeSetup=Aktīvu veidu iestatīšana +AssetTypeModified=Pamatlīdzekļu veids pārveidots +AssetType=Aktīva veids +AssetsLines=Aktīvi +DeleteType=Dzēst +DeleteAnAssetType=Dzēst aktīva veidu +ConfirmDeleteAssetType=Vai tiešām vēlaties dzēst šo aktīvu veidu? +ShowTypeCard=Rādīt veidu "%s" + +# Module label 'ModuleAssetsName' +ModuleAssetsName = Aktīvi +# Module description 'ModuleAssetsDesc' +ModuleAssetsDesc = Aktīvu apraksts + +# +# Admin page +# +AssetsSetup = Aktīvu uzstādīšana +Settings = Iestatījumi +AssetsSetupPage = Aktīvu iestatīšanas lapa +ExtraFieldsAssetsType = Papildu atribūti (Assets type) +AssetsType=Aktīva veids +AssetsTypeId=Aktīva veida id +AssetsTypeLabel=Aktīva veida nosaukums +AssetsTypes=Aktīvu veidi + +# +# Menu +# +MenuAssets = Aktīvi +MenuNewAsset = Jauns aktīvs +MenuTypeAssets = Ierakstiet aktīvus +MenuListAssets = Saraksts +MenuNewTypeAssets = Jauns veids +MenuListTypeAssets = Saraksts diff --git a/htdocs/langs/lv_LV/blockedlog.lang b/htdocs/langs/lv_LV/blockedlog.lang new file mode 100644 index 00000000000..06724ff30dc --- /dev/null +++ b/htdocs/langs/lv_LV/blockedlog.lang @@ -0,0 +1,53 @@ +BlockedLog=Nepārveidojami baļķi +Field=Lauks +BlockedLogDesc=Šis modulis daži notikumi tiek novirzīti nemainīgā žurnālā (kuru jūs nevarat pārveidot, kad ierakstīts) reāllaikā. Šis modulis nodrošina saderību ar dažu valstu likumu prasībām (piemēram, Francijā ar Likumu Finanšu 2016 - Norme NF535). +Fingerprints=Arhivēti notikumi un pirkstu nospiedumi +FingerprintsDesc=Šis ir rīks, lai pārlūkotu vai izvelētu nemainīgus žurnālus. Nemaināmie žurnāli tiek ģenerēti un lokāli arhivēti īpašajā tabulā, reāllaikā, kad ieraksta biznesa notikumu. Varat izmantot šo rīku, lai eksportētu šo arhīvu un saglabātu to ārējam atbalstam (dažas valstis, piemēram, Francija, lūdz jums to darīt katru gadu). Ņemiet vērā, ka šī žurnāla tīrīšana nav funkcija, un visas izmaiņas, kas tika mēģināt izdarīt tieši šajā žurnālā (piemēram, hacker), tiek ziņotas ar nederīgu pirkstu nospiedumu. Ja jums patiešām ir jāiztīra šī tabula, jo izmantojāt savu pieteikumu demonstrācijas / pārbaudes nolūkam un vēlaties tīrīt savus datus, lai sāktu savu produkciju, varat lūgt savam tālākpārdevējam vai integratoram atjaunot datu bāzi (visas jūsu dati tiks noņemti). +CompanyInitialKey=Uzņēmuma sākotnējā atslēga (ģeēzijas bloks) +BrowseBlockedLog=Nepārveidojami žurnāli +ShowAllFingerPrintsMightBeTooLong=Rādīt visus arhivētos žurnālus (var būt garš) +ShowAllFingerPrintsErrorsMightBeTooLong=Rādīt visus nederīgos arhīva žurnālus (var būt garš) +DownloadBlockChain=Lejupielādējiet pirkstu nospiedumus +KoCheckFingerprintValidity=Arhivētais žurnāls nav derīgs. Tas nozīmē, ka kāds (hakeris?) Ir modificējis dažus šī arhivētā žurnāla datus pēc tā ierakstīšanas vai ir dzēsis iepriekšējo arhivēto ierakstu (pārbaudiet, vai līnija ar iepriekšējo # pastāv). +OkCheckFingerprintValidity=Arhivēts žurnāls ir derīgs. Tas nozīmē, ka visi dati šajā rindiņā nav modificēti un ieraksti atbilst iepriekšējam. +OkCheckFingerprintValidityButChainIsKo=Arhivētais žurnāls šķiet derīgs salīdzinājumā ar iepriekšējo, bet ķēde agrāk tika bojāta. +AddedByAuthority=Uzglabāti tālvadības iestādē +NotAddedByAuthorityYet=Vēl nav saglabāts tālvadības iestādē +ShowDetails=Rādīt saglabātos datus +logPAYMENT_VARIOUS_CREATE=Maksājums (nav piešķirts rēķinam) ir izveidots +logPAYMENT_VARIOUS_MODIFY=Maksājums (nav piešķirts rēķinam) ir mainīts +logPAYMENT_VARIOUS_DELETE=Maksājums (nav piešķirts rēķinam) loģiska dzēšana +logPAYMENT_ADD_TO_BANK=Maksājums ir pievienots bankai +logPAYMENT_CUSTOMER_CREATE=Klienta maksājums ir izveidots +logPAYMENT_CUSTOMER_DELETE=Klienta maksājuma loģiska dzēšana +logDONATION_PAYMENT_CREATE=Ziedojuma maksājums izveidots +logDONATION_PAYMENT_DELETE=Ziedojuma maksājuma loģiska dzēšana +logBILL_PAYED=Klienta rēķins ir samaksāts +logBILL_UNPAYED=Klienta rēķins ir neapmaksāts +logBILL_VALIDATE=Klienta rēķins apstiprināts +logBILL_SENTBYMAIL=Klienta rēķins nosūtīts pa pastu +logBILL_DELETE=Klienta rēķins ir loģiski izdzēsts +logMODULE_RESET=Module BlockedLog tika atspējota +logMODULE_SET=Modulis BlockedLog ir iespējots +logDON_VALIDATE=Ziedojums apstiprināts +logDON_MODIFY=Ziedojums ir labots +logDON_DELETE=Ziedojuma loģiska dzēšana +logMEMBER_SUBSCRIPTION_CREATE=Dalībnieka abonements izveidots +logMEMBER_SUBSCRIPTION_MODIFY=Dalībnieku abonēšana ir labota +logMEMBER_SUBSCRIPTION_DELETE=Locekļu abonēšanas loģiskā dzēšana +BlockedLogBillDownload=Klientu rēķinu lejupielāde +BlockedLogBillPreview=Klienta rēķina priekšskatījums +BlockedlogInfoDialog=Žurnāla detaļas +ListOfTrackedEvents=Saraksts ar izsekojamiem notikumiem +Fingerprint=Pirkstu nospiedums +DownloadLogCSV=Eksportēt arhivētos žurnālus (CSV) +logDOC_PREVIEW=Apstiprināta dokumenta priekšskatījums, lai drukātu vai lejupielādētu +logDOC_DOWNLOAD=Apstiprināta dokumenta lejupielāde drukāšanai vai nosūtīšanai +DataOfArchivedEvent=Pilna datuma no arhivēta notikuma +ImpossibleToReloadObject=Oriģināls objekts (tips %s, id %s) nav saistīts (skatīt sleju "Pilnas datnes", lai iegūtu nemainīgus saglabātos datus). +BlockedLogAreRequiredByYourCountryLegislation=Nemaināmu žurnālu moduli var pieprasīt jūsu valsts tiesību akti. Atspējojot šo moduli, nākotnes darījumi var kļūt nederīgi attiecībā uz likumu un juridiskās programmatūras izmantošanu, jo tos nevar apstiprināt ar nodokļu revīziju. +BlockedLogActivatedBecauseRequiredByYourCountryLegislation=Nemaināmu žurnālu modulis tika aktivizēts jūsu valsts tiesību aktu dēļ. Atspējojot šo moduli, nākotnes darījumi var kļūt nederīgi attiecībā uz likumu un juridiskās programmatūras izmantošanu, jo tos nevar apstiprināt ar nodokļu revīziju. +BlockedLogDisableNotAllowedForCountry=To valstu saraksts, kurās šī moduļa izmantošana ir obligāta (tikai, lai novērstu kļūdainu moduļa deaktivizēšanu, ja jūsu valsts ir šajā sarakstā, moduļa atspējošana nav iespējama bez pirmā rediģēšanas saraksta. Jāņem vērā arī tas, ka šī moduļa iespējošana / atspējošana saglabājiet ierakstu nemainīgajā žurnālā). +OnlyNonValid=Nederīgs +TooManyRecordToScanRestrictFilters=Pārāk daudz ierakstu, lai skenētu / analizētu. Lūdzu, ierobežojiet sarakstu ar vairāk ierobežojošiem filtriem. +RestrictYearToExport=Ierobežot mēnesi / gads eksportam diff --git a/htdocs/langs/lv_LV/cashdesk.lang b/htdocs/langs/lv_LV/cashdesk.lang index 77aa33d00ba..2be4437bc35 100644 --- a/htdocs/langs/lv_LV/cashdesk.lang +++ b/htdocs/langs/lv_LV/cashdesk.lang @@ -32,7 +32,7 @@ DeleteArticle=Klikšķiniet, lai izņemtu šo rakstu FilterRefOrLabelOrBC=Meklēšana (Ref/Nosaukums) UserNeedPermissionToEditStockToUsePos=Jūs lūdzat samazināt krājumus rēķina izveidē, tāpēc lietotājam, kurš izmanto POS, ir jābūt atļaujai rediģēt krājumus. DolibarrReceiptPrinter=Dolibarr čeku printeris -PointOfSale=Tirdzniecības punkts +PointOfSale=Tirdzniecības vieta PointOfSaleShort=POS CloseBill=Aizvērt rēķinu Floors=Stāvi @@ -42,3 +42,10 @@ Place=Vieta TakeposConnectorNecesary=Ir nepieciešams "TakePOS Connector" OrderPrinters=Pasūtīt printerus SearchProduct=Meklēt produktu +Receipt=Saņemšana +Header=Galvene +Footer=Kājene +AmountAtEndOfPeriod=Summa perioda beigās (diena, mēnesis vai gads) +TheoricalAmount=Teoriskā summa +RealAmount=Reālā summa +CashFenceDone=Naudas žogs veikts par periodu diff --git a/htdocs/langs/lv_LV/companies.lang b/htdocs/langs/lv_LV/companies.lang index f3876cf001e..b176af3f44c 100644 --- a/htdocs/langs/lv_LV/companies.lang +++ b/htdocs/langs/lv_LV/companies.lang @@ -419,7 +419,7 @@ ProductsIntoElements=List of products/services into %s CurrentOutstandingBill=Current outstanding bill OutstandingBill=Maks. par izcilu rēķinu OutstandingBillReached=Maks. par izcilu rēķinu -OrderMinAmount=Minimālā summa pasūtījumam +OrderMinAmount=Minimālā pasūtījuma summa MonkeyNumRefModelDesc=Atgrieziet numuru ar kodu %syymm-nnnn klienta kodam un %syymm-nnnn par pārdevēja kodu, kur yy ir gads, mm ir mēnesis, un nnnn ir secība bez pārtraukuma un nav atgriezties pie 0. LeopardNumRefModelDesc=Kods ir bez maksas. Šo kodu var mainīt jebkurā laikā. ManagingDirectors=Menedžera(u) vārds (CEO, direktors, prezidents...) diff --git a/htdocs/langs/lv_LV/install.lang b/htdocs/langs/lv_LV/install.lang index 8e3851d9194..a0c9a704bca 100644 --- a/htdocs/langs/lv_LV/install.lang +++ b/htdocs/langs/lv_LV/install.lang @@ -6,7 +6,7 @@ ConfFileDoesNotExistsAndCouldNotBeCreated=Konfigurācijas fails %s nepa ConfFileCouldBeCreated=Konfigurācijas failu %s var izveidot. ConfFileIsNotWritable=Konfigurācijas fails %s nav rakstāms. Pārbaudīt atļaujas. Pirmajai instalēšanai jūsu tīmekļa serverim jāspēj rakstīt šajā failā konfigurācijas procesa laikā ("chmod 666", piemēram, operētājsistēmā Unix, piemēram). ConfFileIsWritable=Konfigurācijas failā %s var ierakstīt. -ConfFileMustBeAFileNotADir=Configuration file %s must be a file, not a directory. +ConfFileMustBeAFileNotADir=Konfigurācijas failam %s jābūt failam, nevis direktorijai. ConfFileReload=Pārsūtot parametrus no konfigurācijas faila. PHPSupportSessions=PHP atbalsta sesijas. PHPSupportPOSTGETOk=PHP atbalsta mainīgos POST un GET. diff --git a/htdocs/langs/lv_LV/main.lang b/htdocs/langs/lv_LV/main.lang index 3244668bee9..45cc2183eac 100644 --- a/htdocs/langs/lv_LV/main.lang +++ b/htdocs/langs/lv_LV/main.lang @@ -392,7 +392,7 @@ VATINs=IGST nodokļi LT1=Pārdošanas nodoklis 2 LT1Type=Pārdošanas nodoklis 2 tips LT2=Pārdošanas nodoklis 3 -LT2Type=3 pārdošanas nodoklis +LT2Type=Pārdošanas nodoklis 3 tips LT1ES=RE LT2ES=IRPF LT1IN=CGST diff --git a/htdocs/langs/lv_LV/members.lang b/htdocs/langs/lv_LV/members.lang index af0be78dc28..c8e854de034 100644 --- a/htdocs/langs/lv_LV/members.lang +++ b/htdocs/langs/lv_LV/members.lang @@ -84,7 +84,7 @@ ConfirmResiliateMember=Vai tiešām vēlaties pārtraukt šo dalībnieku? DeleteMember=Dzēst dalībnieku ConfirmDeleteMember=Are you sure you want to delete this member (Deleting a member will delete all his subscriptions)? DeleteSubscription=Dzēst abonementu -ConfirmDeleteSubscription=Are you sure you want to delete this subscription? +ConfirmDeleteSubscription=Vai tiešām vēlaties dzēst šo abonementu? Filehtpasswd=Htpasswd fails ValidateMember=Apstiprināt dalībnieku ConfirmValidateMember=Are you sure you want to validate this member? @@ -177,7 +177,7 @@ NewMemberbyWeb=Jauns dalībnieks pievienots. Gaida apstiprinājumu NewMemberForm=Jauna dalībnieka forma SubscriptionsStatistics=Statistika par abonementu NbOfSubscriptions=Abonementu skaits -AmountOfSubscriptions=Apjoms abonementu +AmountOfSubscriptions=Abonementu daudzums TurnoverOrBudget=Apgrozījums (uzņēmumam) vai budžets (par pamatu) DefaultAmount=Default summa parakstīšanās CanEditAmount=Apmeklētājs var izvēlēties / rediģēt summu no tās parakstītā diff --git a/htdocs/langs/lv_LV/printing.lang b/htdocs/langs/lv_LV/printing.lang index 8936aeed91c..55628ecdd0f 100644 --- a/htdocs/langs/lv_LV/printing.lang +++ b/htdocs/langs/lv_LV/printing.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - printing Module64000Name=Tiešā drukāšana Module64000Desc=Iespējot tiešās drukāšanas sistēmu -PrintingSetup=Setup of Direct Printing System -PrintingDesc=This module adds a Print button to send documents directly to a printer (without opening document into an application) with various module. +PrintingSetup=Tiešās drukāšanas sistēmas iestatīšana +PrintingDesc=Šis modulis pievieno pogai Print (Drukāt) dažādiem moduļiem, lai ļautu dokumentus iespiest tieši uz printeri, neizmantojot dokumentu citā lietojumprogrammā. MenuDirectPrinting=Tiešās drukāšanas darbi DirectPrint=Tiešā druka PrintingDriverDesc=Configuration variables for printing driver. @@ -19,7 +19,7 @@ UserConf=Iestatījumi katram lietotājam PRINTGCP_INFO=Google OAuth API setup PRINTGCP_AUTHLINK=Autentifikācija PRINTGCP_TOKEN_ACCESS=Google mākoņdrukas OAuth marķieris -PrintGCPDesc=This driver allow to send documents directly to a printer with Google Cloud Print. +PrintGCPDesc=Šis draiveris ļauj sūtīt dokumentus tieši printerim, izmantojot Google mākoņdruku. GCP_Name=Nosaukums GCP_displayName=Nosaukums GCP_Id=Printera Id @@ -27,7 +27,7 @@ GCP_OwnerName=Īpašnieka nosaukums GCP_State=Printera statuss GCP_connectionStatus=Statuss GCP_Type=Printera tips -PrintIPPDesc=This driver allow to send documents directly to a printer. It requires a Linux system with CUPS installed. +PrintIPPDesc=Šis draiveris ļauj nosūtīt dokumentus tieši printerim. Tam nepieciešama Linux sistēma ar instalētu CUPS. PRINTIPP_HOST=Drukas serveris PRINTIPP_PORT=Ports PRINTIPP_USER=Pieslēgties @@ -38,8 +38,8 @@ Printer=Printeris IPP_Uri=Printera Uri IPP_Name=Printera nosaukums IPP_State=Printera statuss -IPP_State_reason=State reason -IPP_State_reason1=State reason1 +IPP_State_reason=Statuss, iemesls +IPP_State_reason1=Statuss, iemesls1 IPP_BW=Melnbalts IPP_Color=Krāsainais IPP_Device=Ierīce @@ -51,4 +51,4 @@ GoogleAuthConfigured=Google OAuth akreditācijas dati tika atrasti moduļa OAuth PrintingDriverDescprintgcp=Configuration variables for printing driver Google Cloud Print. PrintingDriverDescprintipp=Konfigurācijas mainīgie drukāšanas vadītāja krūzes. PrintTestDescprintgcp=List of Printers for Google Cloud Print. -PrintTestDescprintipp=Krūzīšu printeru saraksts. +PrintTestDescprintipp=CUPS printeru saraksts. diff --git a/htdocs/langs/lv_LV/ticket.lang b/htdocs/langs/lv_LV/ticket.lang new file mode 100644 index 00000000000..68a7f6e1e69 --- /dev/null +++ b/htdocs/langs/lv_LV/ticket.lang @@ -0,0 +1,290 @@ +# en_US lang file for module ticket +# Copyright (C) 2013 Jean-François FERRY +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# +# Generic +# + +Module56000Name=Pieteikumi +Module56000Desc=Biļešu sistēma izsniegšanai vai pieprasījuma pārvaldīšanai + +Permission56001=Apskatīt pieteikumus +Permission56002=Labot pieteikumus +Permission56003=Dzēst pieteikumus +Permission56004=Pieteikumu pārvaldīšana +Permission56005=Skatīt visu trešo personu biļetes (nav efektīva ārējiem lietotājiem, vienmēr ir jāattiecas tikai uz trešo personu, no kuras viņi ir atkarīgi) + +TicketDictType=Pieteikumu veids +TicketDictCategory=Pieteikumu sadaļa +TicketDictSeverity=Pieteikuma svarīgums +TicketTypeShortBUGSOFT=Dysfontionnement logiciel +TicketTypeShortBUGHARD=Dysfontionnement matériel +TicketTypeShortCOM=Tirdzniecības jautājums +TicketTypeShortINCIDENT=Palīdzības pieprasījums +TicketTypeShortPROJET=Projekts +TicketTypeShortOTHER=Cits + +TicketSeverityShortLOW=Zems +TicketSeverityShortNORMAL=Normāls +TicketSeverityShortHIGH=Augsts +TicketSeverityShortBLOCKING=Kritiski/bloķēšana + +ErrorBadEmailAddress=Lauks "%s" ir nepareizs +MenuTicketMyAssign=Mani pieteikumi +MenuTicketMyAssignNonClosed=Mani atvērtie pieteikumi +MenuListNonClosed=Atvērtie pieteikumi + +TypeContact_ticket_internal_CONTRIBUTOR=Ieguldītājs +TypeContact_ticket_internal_SUPPORTTEC=Piešķirtais lietotājs +TypeContact_ticket_external_SUPPORTCLI=Klientu kontaktu / incidentu izsekošana +TypeContact_ticket_external_CONTRIBUTOR=Ārējais ieguldītājs + +OriginEmail=E-pasta avots +Notify_TICKETMESSAGE_SENTBYMAIL=Sūtīt pieteikuma atbildi e-pastā + +# Status +NotRead=Nav lasāms +Read=Lasīt +Answered=Atbildēts +Assigned=Piešķirts +InProgress=Procesā +Waiting=Gaida +Closed=Slēgts +Deleted=Dzēsts + +# Dict +Type=Veids +Category=Sadaļa +Severity=Smagums + +# Email templates +MailToSendTicketMessage=Lai nosūtītu e-pastu no pieteikuma + +# +# Admin page +# +TicketSetup=Pieteikumu moduļa iestatīšana +TicketSettings=Iestatījumi +TicketSetupPage= +TicketPublicAccess=Publiska saskarne, kurai nav nepieciešama identifikācija, ir pieejama šādā URL +TicketSetupDictionaries=Lietojumprogrammu kategoriju veids un smaguma pakāpe ir konfigurējama no vārdnīcām +TicketParamModule=Moduļa mainīgā iestatīšana +TicketParamMail=E-pasta iestatīšana +TicketEmailNotificationFrom=Paziņojuma e-pasts no +TicketEmailNotificationFromHelp=Izmanto biļešu ziņu atbildē, izmantojot piemēru +TicketEmailNotificationTo=Paziņojumu e-pastu uz +TicketEmailNotificationToHelp=Sūtiet e-pasta paziņojumus uz šo adresi. +TicketNewEmailBodyLabel=Īsziņa tiek nosūtīta pēc biļetes izveidošanas (publiskā saskarne) +TicketNewEmailBodyHelp=Šeit norādītais teksts tiks ievietots e-pastā, apstiprinot jauna biļetes izveidi no publiskā saskarnes. Informācija par biļetes apspriešanu tiek automātiski pievienota. +TicketParamPublicInterface=Publiskās saskarnes iestatīšana +TicketsEmailMustExist=Pieprasīt esošu e-pasta adresi, lai izveidotu pieteikumu +TicketsEmailMustExistHelp=Publiskā interfeisa e-pasta adrese jau ir jāaizpilda datu bāzē, lai izveidotu jaunu biļeti. +PublicInterface=Publiskā saskarne +TicketUrlPublicInterfaceLabelAdmin=Publiskās saskarnes URL +TicketUrlPublicInterfaceHelpAdmin=Ir iespējams definēt alias ar tīmekļa serveri un tādējādi nodrošināt publisko saskarni ar citu IP adresi. +TicketPublicInterfaceTextHomeLabelAdmin=Publiskās saskarnes satikšanās teksts +TicketPublicInterfaceTextHome=Jūs varat izveidot atbalsta biļeti vai esošo skatījumu no sava identifikatora izsekošanas biļetes. +TicketPublicInterfaceTextHomeHelpAdmin=Šeit definētais teksts parādīsies publiskās saskarnes mājas lapā. +TicketPublicInterfaceTopicLabelAdmin=Interfeisa virsraksts +TicketPublicInterfaceTopicHelp=Šis teksts parādīsies kā publiskā saskarnes nosaukums. +TicketPublicInterfaceTextHelpMessageLabelAdmin=Palīdziet tekstu ziņojuma ierakstā +TicketPublicInterfaceTextHelpMessageHelpAdmin=Šis teksts parādās virs lietotāja ziņojuma ievades lauka. +ExtraFieldsTicket=Papildus atribūti +TicketCkEditorEmailNotActivated=HTML redaktors nav aktivizēts. Lūdzu, ievietojiet FCKEDITOR_ENABLE_MAIL saturu 1, lai to iegūtu. +TicketsDisableEmail=Nesūtiet e-pastus par biļešu izveidi vai ziņojumu ierakstīšanu +TicketsDisableEmailHelp=Pēc noklusējuma e-pastus sūta, kad tiek veidotas jaunas biļetes vai ziņojumi. Iespējojiet šo opciju, lai atspējotu * all * e-pasta paziņojumus +TicketsLogEnableEmail=Iespējot žurnālu pa e-pastu +TicketsLogEnableEmailHelp=Katrā izmaiņā ** katram kontaktam **, kas saistīts ar biļeti, tiks nosūtīts e-pasts **. +TicketParams=Parametri +TicketsShowModuleLogo=Parādiet moduļa logotipi publiskajā saskarnē +TicketsShowModuleLogoHelp=Iespējojiet šo opciju, lai slēptu logotipa moduli publiskās saskarnes lapās +TicketsShowCompanyLogo=Parādīt uzņēmuma logotipi publiskā saskarnē +TicketsShowCompanyLogoHelp=Iespējojiet šo opciju, lai slēptu galvenā uzņēmuma logotipi publiskās saskarnes lapās +TicketsEmailAlsoSendToMainAddress=Arī nosūtiet paziņojumu uz galveno e-pasta adresi +TicketsEmailAlsoSendToMainAddressHelp=Iespējojiet šo opciju, lai nosūtītu e-pastu uz adresi "Paziņojuma e-pasta adrese" (skatiet iestatījumu zemāk). +TicketsLimitViewAssignedOnly=Ierobežot displeja ar biļetēm, kas piešķirtas pašreizējam lietotājam (neeksistē ārējiem lietotājiem, vienmēr var attiekties tikai uz trešo personu, no kuras viņi ir atkarīgi) +TicketsLimitViewAssignedOnlyHelp=Tiks redzamas tikai pašreizējam lietotājam piešķirtās biļetes. Neattiecas uz lietotāju ar biļešu pārvaldīšanas tiesībām. +TicketsActivatePublicInterface=Aktivizēt publisko saskarni +TicketsActivatePublicInterfaceHelp=Publiskā saskarne ļauj apmeklētājiem izveidot biļetes. +TicketsAutoAssignTicket=Automātiski piešķirt lietotāju, kas izveidojis biļeti +TicketsAutoAssignTicketHelp=Veidojot biļeti, lietotājs var automātiski piešķirt biļeti. +TicketNumberingModules=Čeku numerācijas modulis +TicketNotifyTiersAtCreation=Paziņot par trešās puses izveidošanu + +# +# Index & list page +# +TicketsIndex=Pieteikumi - mājās +TicketList=Pieteikumu saraksts +TicketAssignedToMeInfos=Šajā lapā tiek parādīts pieteikumu saraksts, kas tiek piešķirts pašreizējam lietotājam +NoTicketsFound=Nav atrasts neviens pieteikums +TicketViewAllTickets=Skatīt visus pieteikumus +TicketViewNonClosedOnly=Skatīt tikai atvērtos pieteikumus +TicketStatByStatus=Pieteikumi pēc statusa + +# +# Ticket card +# +Ticket=Biļete +TicketCard=Pieteikuma kartiņa +CreateTicket=Izveidot pieteikumu +EditTicket=Rediģēt pieteikumu +TicketsManagement=Pieteikumu pārvaldīšana +CreatedBy=Izveidojis +NewTicket=Jauns notikums +SubjectAnswerToTicket=Pieteikuma atbilde +TicketTypeRequest=Pieprasījuma veids +TicketCategory=Sadaļa +SeeTicket=Apskatīt pieteikumu +TicketMarkedAsRead=Pieteikums ir atzīmēts kā lasīts +TicketReadOn=Izlasīts +TicketCloseOn=Aizvērts +MarkAsRead=Atzīmējiet pieteikumu kā lasītu +TicketMarkedAsReadButLogActionNotSaved=Biļete ir atzīmēta kā slēgta, bet neviena darbība nav saglabāta +TicketHistory=Pieteikumu vēsture +AssignUser=Piešķirts lietotājam +TicketAssigned=Pieteikums ir piešķirts +TicketChangeType=Mainīt veidu +TicketChangeCategory=Mainīt sadaļu +TicketChangeSeverity=Mainīt nozīmīgumu +TicketAddMessage=Pievienot ziņu +AddMessage=Pievienot ziņu +MessageSuccessfullyAdded=Pieteikums pievienots +TicketMessageSuccessfullyAdded=Ziņojums ir veiksmīgi pievienots +TicketMessagesList=Ziņu saraksts +NoMsgForThisTicket=Nav ziņu par šo pieteikumu +Properties=Klasifikācija +LatestNewTickets=Jaunākie %s jaunākie pieteikumi (nav izlasīti) +TicketSeverity=Svarīgums +ShowTicket=Apskatīt pieteikumu +RelatedTickets=Saistītie pieteikumi +TicketAddIntervention=Izveidojiet iejaukšanos +CloseTicket=Slēgts pieteikums +CloseATicket=Aizvērt pieteikumu +ConfirmCloseAticket=Apstiprināt pieteikuma aizvēršanu +ConfirmDeleteTicket=Lūdzu, apstipriniet pieteikuma dzēšanu +TicketDeletedSuccess=Pieteikums ir dzēsts veiksmīgi +TicketMarkedAsClosed=Pieteikums ir atzīmēta kā slēgts +TicketMarkedAsClosedButLogActionNotSaved=Biļete atzīmēta kā slēgta, bet žurnāls nav saglabāts! +TicketDurationAuto=Aprēķinātais ilgums +TicketDurationAutoInfos=Ilgums, kas aprēķināts automātiski no intervences +TicketUpdated=Pieteikums atjaunināts +SendMessageByEmail=Nosūtīt ziņu pa e-pastu +TicketNewMessage=Jauna ziņa +ErrorMailRecipientIsEmptyForSendTicketMessage=Saņēmējs ir tukšs. Nav e-pasta nosūtīt +TicketGoIntoContactTab=Lūdzu, dodieties uz cilni "Kontakti", lai tos atlasītu +TicketMessageMailIntro=Ievads +TicketMessageMailIntroHelp=Šis teksts tiek pievienots tikai e-pasta sākumā un netiks saglabāts. +TicketMessageMailIntroLabelAdmin=Ievads, nosūtot e-pastu +TicketMessageMailIntroText=Labdien,
Jauna atbilde tika nosūtīta uz biļeti, ar kuru sazināties. Šeit ir ziņa:
+TicketMessageMailIntroHelpAdmin=Šis teksts tiks ievietots pirms atbildes uz biļeti teksta. +TicketMessageMailSignature=Paraksts +TicketMessageMailSignatureHelp=Šis teksts tiek pievienots tikai e-pasta ziņojuma beigās un netiks saglabāts. +TicketMessageMailSignatureText=

Ar cieņu,

--

+TicketMessageMailSignatureLabelAdmin=Atbildes e-pasta paraksts +TicketMessageMailSignatureHelpAdmin=Šis teksts tiks ievietots pēc atbildes ziņojuma. +TicketMessageHelp=Tikai šis teksts tiks saglabāts ziņojumu sarakstā uz biļešu kartes. +TicketMessageSubstitutionReplacedByGenericValues=Mainīšanas mainīgos aizstāj ar vispārējām vērtībām. +TimeElapsedSince=Laiks pagājis kopš +TicketTimeToRead=Laiks, kas pagājis pirms izlasīšanas +TicketContacts=Kontakti biļete +TicketDocumentsLinked=Ar biļeti saistītie dokumenti +ConfirmReOpenTicket=Vai apstiprināt atkārtotu pieteikuma atvēršanu ? +TicketMessageMailIntroAutoNewPublicMessage=Pieteikumā tika ievietota jauna ziņa par tēmu%s: +TicketAssignedToYou=Pieteikums piešķirts +TicketAssignedEmailBody=Jums piešķīra pieteikumu # %s %s +MarkMessageAsPrivate=Atzīmēt ziņu kā privātu +TicketMessagePrivateHelp=Šis ziņojums netiks rādīts ārējiem lietotājiem +TicketEmailOriginIssuer=Emitents pēc biļetes avota +InitialMessage=Sākotnējā ziņa +LinkToAContract=Saite uz līgumu +TicketPleaseSelectAContract=Izvēlieties līgumu +UnableToCreateInterIfNoSocid=Nevar izveidot iejaukšanos, ja nav noteikta trešā puse +TicketMailExchanges=Pasta apmaiņa +TicketInitialMessageModified=Sākotnējais ziņojums ir labots +TicketMessageSuccesfullyUpdated=Ziņa ir veiksmīgi atjaunota +TicketChangeStatus=Mainīt statusu +TicketConfirmChangeStatus=Apstiprināt statusa maiņu: %s? +TicketLogStatusChanged=Statuss mainīts: %s līdz %s +TicketNotNotifyTiersAtCreate=Neinformēt uzņēmumu par radīšanu +Unread=Nelasīts + +# +# Logs +# +TicketLogMesgReadBy=Pieteikumu lasīja %s +NoLogForThisTicket=Vēl nav piereģistrējies par šo biļeti +TicketLogAssignedTo=Pieteikums piešķirts %s +TicketAssignedButLogActionNotSaved=Piešķirts pieteikums, bet žurnāls nav saglabāts! +TicketLogPropertyChanged=Mainīt klasifikāciju: no %s līdz %s +TicketLogClosedBy=Pieteikumu slēdza %s +TicketLogProgressSetTo=Progresa izmaiņas %s procenti +TicketLogReopen=Pieteikumu atkārtoti atvēra + +# +# Public pages +# +TicketSystem=Pieteikumu sistēma +ShowListTicketWithTrackId=Parādīt biļešu sarakstu no maršruta ID +ShowTicketWithTrackId=Rādīt biļeti no maršruta ID +TicketPublicDesc=Jūs varat izveidot atbalsta biļeti vai pārbaudīt no esoša ID. +YourTicketSuccessfullySaved=Biļete ir veiksmīgi saglabāta! +MesgInfosPublicTicketCreatedWithTrackId=Jauns pieteikums ir izveidots ar ID %s. +PleaseRememberThisId=Lūdzu, saglabājiet izsekošanas numuru, kuru mēs vēlāk varētu jums lūgt. +TicketNewEmailSubject=Pieteikuma izveides apstiprinājums +TicketNewEmailSubjectCustomer=Jauns atbalsta biļete +TicketNewEmailBody=Šis ir automātisks e-pasts, lai apstiprinātu, ka esat reģistrējies jauns biļete. +TicketNewEmailBodyCustomer=Šis ir automātiskais e-pasta ziņojums, kas apstiprina, ka jaunais biļete ir tikko izveidots jūsu kontā. +TicketNewEmailBodyInfosTicket=Informācija biļetes uzraudzībai +TicketNewEmailBodyInfosTrackId=Pieteikuma izsekošanas numurs: %s +TicketNewEmailBodyInfosTrackUrl=Jūs varat apskatīt biļetes norisi, noklikšķinot uz iepriekš redzamās saites. +TicketNewEmailBodyInfosTrackUrlCustomer=Jūs varat apskatīt pieteikuma statusu konkrētajā saskarnē, noklikšķinot uz šīs saites +TicketEmailPleaseDoNotReplyToThisEmail=Lūdzu, neatbildiet tieši uz šo e-pastu! Izmantojiet saiti, lai atbildētu interfeisu. +TicketPublicInfoCreateTicket=Šī veidlapa ļauj ierakstīt atbalsta biļeti mūsu vadības sistēmā. +TicketPublicPleaseBeAccuratelyDescribe=Lūdzu, precīzi aprakstiet problēmu. Iesniedziet pēc iespējas vairāk informācijas, lai mēs varētu pareizi identificēt jūsu pieprasījumu. +TicketPublicMsgViewLogIn=Lūdzu, ievadiet biļešu izsekošanas ID +TicketTrackId=Izsekošanas ID +OneOfTicketTrackId=Viens no jūsu izsekošanas ID +ErrorTicketNotFound=Biļete ar izsekošanas ID %s nav atrasta! +Subject=Virsraksts +ViewTicket=Skatīt pieteikumu +ViewMyTicketList=Skatīt manu pieteikumu sarakstu +ErrorEmailMustExistToCreateTicket=Kļūda: e-pasta adrese nav atrodama mūsu datu bāzē +TicketNewEmailSubjectAdmin=Izveidots jauns pieteikums +TicketNewEmailBodyAdmin=

Pieteikums tikko tika izveidots ar ID #%s, skatīt informāciju:

+SeeThisTicketIntomanagementInterface=Skatiet biļeti vadības saskarnē +TicketPublicInterfaceForbidden=Pieeja šai vietai: aizliegta + +# notifications +TicketNotificationEmailSubject=Pieteikums %s ir atjaunots +TicketNotificationEmailBody=Šī ir automātiska ziņa, kas informē jūs, ka biļete %s tikko atjaunināta +TicketNotificationRecipient=Paziņojuma saņēmējs +TicketNotificationLogMessage=Log ziņojums +TicketNotificationEmailBodyInfosTrackUrlinternal=Skatīt biļeti interfeisu +TicketNotificationNumberEmailSent=Paziņojuma e-pasts nosūtīts: %s + + +# +# Boxes +# +BoxLastTicket=Jaunākais izveidotais pieteikums +BoxLastTicketDescription=Jaunākie %s izveidotie pieteikumi +BoxLastTicketContent= +BoxLastTicketNoRecordedTickets=Nav nesen nelasītu pieteikumu +BoxLastModifiedTicket=Jaunākie labotie pieteikumi +BoxLastModifiedTicketDescription=Jaunākās %s lanbotās biļetes +BoxLastModifiedTicketContent= +BoxLastModifiedTicketNoRecordedTickets=Nav nesen labotu pieteikumu From b3dfbaf38ca1f1ff2bf4e51a884ff8668a46217e Mon Sep 17 00:00:00 2001 From: jfefe Date: Wed, 23 Jan 2019 02:44:34 +0100 Subject: [PATCH 047/183] FIX: wrong permission test for inventory creation --- htdocs/product/inventory/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 24848ad26c5..a9cff0e79c7 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -78,12 +78,12 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $permissiontoadd = $user->rights->stock->write; - $permissiontodelete = $user->rights->stock->write; + $permissiontoadd = $user->rights->stock->creer; + $permissiontodelete = $user->rights->stock->supprimer; } else { - $permissiontoadd = $user->rights->stock->inventory_advance->create; + $permissiontoadd = $user->rights->stock->inventory_advance->write; $permissiontodelete = $user->rights->stock->inventory_advance->write; } From e860d664d741b0154516de012a0db5a49054b847 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Jan 2019 11:54:20 +0100 Subject: [PATCH 048/183] Fix substitution of __REF_CLIENT__ --- htdocs/core/lib/functions.lib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 91b2b7bdfdb..516ef6b8aaf 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5837,8 +5837,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob { $substitutionarray['__ID__'] = '__ID__'; $substitutionarray['__REF__'] = '__REF__'; - $substitutionarray['__REFCLIENT__'] = '__REFCLIENT__'; - $substitutionarray['__REFSUPPLIER__'] = '__REFSUPPLIER__'; + $substitutionarray['__REF_CLIENT__'] = '__REF_CLIENT__'; + $substitutionarray['__REF_SUPPLIER__'] = '__REF_SUPPLIER__'; $substitutionarray['__EXTRAFIELD_XXX__'] = '__EXTRAFIELD_XXX__'; $substitutionarray['__THIRDPARTY_ID__'] = '__THIRDPARTY_ID__'; @@ -5884,6 +5884,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob { $substitutionarray['__ID__'] = $object->id; $substitutionarray['__REF__'] = $object->ref; + $substitutionarray['__REF_CLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); + $substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); + // For backward compatibility $substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); $substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); From e33f102dc27b019d13f2ea533f6e8c2430510f0b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Jan 2019 14:57:43 +0100 Subject: [PATCH 049/183] FIX Edit of virtualhost --- htdocs/core/class/html.form.class.php | 5 +- htdocs/langs/en_US/website.lang | 3 +- htdocs/website/index.php | 443 ++++++++++++++------------ 3 files changed, 244 insertions(+), 207 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 588715b6567..4c4e51c4b13 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -516,7 +516,7 @@ class Form * @param string $text Text to show * @param string $htmltext Content of tooltip * @param int $direction 1=Icon is after text, -1=Icon is before text, 0=no icon - * @param string $type Type of picto ('info', 'help', 'warning', 'superadmin', 'mypicto@mymodule', ...) or image filepath + * @param string $type Type of picto ('info', 'help', 'warning', 'superadmin', 'mypicto@mymodule', ...) or image filepath or 'none' * @param string $extracss Add a CSS style to td, div or span tag * @param int $noencodehtmltext Do not encode into html entity the htmltext * @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span @@ -557,12 +557,13 @@ class Form if ($type == 'info' || $type == 'help') return $text; } + $img=''; if ($type == 'info') $img = img_help(0, $alt); elseif ($type == 'help') $img = img_help(($tooltiptrigger != '' ? 2 : 1), $alt); elseif ($type == 'superadmin') $img = img_picto($alt, 'redstar'); elseif ($type == 'admin') $img = img_picto($alt, 'star'); elseif ($type == 'warning') $img = img_warning($alt); - else $img = img_picto($alt, $type); + elseif ($type != 'none') $img = img_picto($alt, $type); // $type can be an image path return $this->textwithtooltip($text, $htmltext, (($tooltiptrigger && ! $img)?3:2), $direction, $img, $extracss, $notabs, '', $noencodehtmltext, $tooltiptrigger, $forcenowrap); } diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index d5dd5827a70..f8250ebbc6b 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -39,11 +39,12 @@ ViewPageInNewTab=View page in new tab SetAsHomePage=Set as Home page RealURL=Real URL ViewWebsiteInProduction=View web site using home URLs -SetHereVirtualHost=Use with Apache/NGinx/...
If you can create, on your web server (Apache, Nginx, ...), a dedicated Virtual Host with PHP enabled and a Root directory on
%s
then enter here the virtual hostname you have created, so the preview can be done also using this dedicated web server access instead of only using Dolibarr server. +SetHereVirtualHost=Use with Apache/NGinx/...
If you can create, on your web server (Apache, Nginx, ...), a dedicated Virtual Host with PHP enabled and a Root directory on
%s
then set the name of the virtual host you have created in the properties of web site, so the preview can be done also using this dedicated web server access instead of the internal Dolibarr server. YouCanAlsoTestWithPHPS=Use with PHP embedded server
On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running
php -S 0.0.0.0:8080 -t %s CheckVirtualHostPerms=Check also that virtual host has permission %s on files into
%s ReadPerm=Read WritePerm=Write +TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=Preview %s in a new tab.

The %s will be served by an external web server (like Apache, Nginx, IIS). You must install and setup this server before to point to directory:
%s
URL served by external server:
%s PreviewSiteServedByDolibarr=Preview %s in a new tab.

The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.
The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.
URL served by Dolibarr:
%s

To use your own external web server to serve this web site, create a virtual host on your web server that point on directory
%s
then enter the name of this virtual server and click on the other preview button. VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 6824ae80360..88fb642d50a 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -298,7 +298,7 @@ if ($action == 'addsite') $tmpobject=new Website($db); $tmpobject->ref = GETPOST('WEBSITE_REF','alpha'); $tmpobject->description = GETPOST('WEBSITE_DESCRIPTION','alpha'); - $tmpobject->virtualhost = GETPOST('WEBSITE_VIRTUALHOST','alpha'); + $tmpobject->virtualhost = GETPOST('virtualhost','alpha'); $result = $tmpobject->create($user); if ($result <= 0) @@ -867,180 +867,207 @@ if ($action == 'updatecss') $res = $object->fetch(0, $websitekey); $website = $object; - // Save master.inc.php file - $filemaster=$pathofwebsite.'/master.inc.php'; - - dol_syslog("Save master file ".$filemaster); - - dol_mkdir($pathofwebsite); - - // Now generate the master.inc.php page - $result = dolSaveMasterFile($filemaster); - if (! $result) setEventMessages('Failed to write file '.$filemaster, null, 'errors'); - - - // Html header file - $htmlheadercontent =''; - - /* We disable php code since htmlheader is never executed as an include but only read by fgets_content. - $htmlheadercontent.= "\n";*/ - - $htmlheadercontent.= preg_replace(array('/\n*/ims','/<\/html>\n*/ims'),array('',''),GETPOST('WEBSITE_HTML_HEADER', 'none')); - - /*$htmlheadercontent.= "\n".'"."\n";*/ - - $htmlheadercontent = trim($htmlheadercontent)."\n"; - - dolSaveHtmlHeader($filehtmlheader, $htmlheadercontent); - - - // Css file - $csscontent =''; - - $csscontent.= "\n"; - - $csscontent.= GETPOST('WEBSITE_CSS_INLINE', 'none'); - - $csscontent.= "\n".'"."\n"; - - dol_syslog("Save css content into ".$filecss); - - dol_mkdir($pathofwebsite); - $result = file_put_contents($filecss, $csscontent); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($filecss, octdec($conf->global->MAIN_UMASK)); - - if (! $result) + if (GETPOSTISSET('virtualhost')) { - $error++; - setEventMessages('Failed to write file '.$filecss, null, 'errors'); + if (GETPOST('virtualhost','alpha') && ! preg_match('/^http/',GETPOST('virtualhost','alpha'))) + { + $error++; + setEventMessages('Error URL must start with http:// or https://', null, 'errors'); + $action='editcss'; + } + + if (! $error) + { + $object->virtualhost = GETPOST('virtualhost','alpha'); + + $result = $object->update($user); + if ($result < 0) + { + $error++; + setEventMessages($object->error, $object->errors, 'errors'); + $action='editcss'; + } + } } - - // Js file - $jscontent =''; - - $jscontent.= "\n"; - - $jscontent.= GETPOST('WEBSITE_JS_INLINE', 'none'); - - $jscontent.= "\n".'"."\n"; - - dol_syslog("Save js content into ".$filejs); - - dol_mkdir($pathofwebsite); - $result = file_put_contents($filejs, $jscontent); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($filejs, octdec($conf->global->MAIN_UMASK)); - - if (! $result) - { - $error++; - setEventMessages('Failed to write file '.$filejs, null, 'errors'); - } - - - // Robot file - $robotcontent =''; - - /*$robotcontent.= "\n";*/ - - $robotcontent.= GETPOST('WEBSITE_ROBOT', 'none'); - - /*$robotcontent.= "\n".'"."\n";*/ - - dol_syslog("Save file robot into ".$filerobot); - - dol_mkdir($pathofwebsite); - $result = file_put_contents($filerobot, $robotcontent); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($filerobot, octdec($conf->global->MAIN_UMASK)); - - if (! $result) - { - $error++; - setEventMessages('Failed to write file '.$filerobot, null, 'errors'); - } - - - // Css file - $htaccesscontent =''; - - /*$htaccesscontent.= "\n";*/ - - $htaccesscontent.= GETPOST('WEBSITE_HTACCESS', 'none'); - - /*$htaccesscontent.= "\n".'"."\n";*/ - - dol_syslog("Save file htaccess into ".$filehtaccess); - - dol_mkdir($pathofwebsite); - $result = file_put_contents($filehtaccess, $htaccesscontent); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($filehtaccess, octdec($conf->global->MAIN_UMASK)); - - if (! $result) - { - $error++; - setEventMessages('Failed to write file '.$filehtaccess, null, 'errors'); - } - - // Message if no error if (! $error) { - setEventMessages($langs->trans("Saved"), null, 'mesgs'); - } + // Save master.inc.php file + $filemaster=$pathofwebsite.'/master.inc.php'; - $action='preview'; + dol_syslog("Save master file ".$filemaster); + + dol_mkdir($pathofwebsite); + + // Now generate the master.inc.php page + $result = dolSaveMasterFile($filemaster); + if (! $result) setEventMessages('Failed to write file '.$filemaster, null, 'errors'); + + + // Html header file + $htmlheadercontent =''; + + /* We disable php code since htmlheader is never executed as an include but only read by fgets_content. + $htmlheadercontent.= "\n";*/ + + $htmlheadercontent.= preg_replace(array('/\n*/ims','/<\/html>\n*/ims'),array('',''),GETPOST('WEBSITE_HTML_HEADER', 'none')); + + /*$htmlheadercontent.= "\n".'"."\n";*/ + + $htmlheadercontent = trim($htmlheadercontent)."\n"; + + dolSaveHtmlHeader($filehtmlheader, $htmlheadercontent); + + + // Css file + $csscontent =''; + + $csscontent.= "\n"; + + $csscontent.= GETPOST('WEBSITE_CSS_INLINE', 'none'); + + $csscontent.= "\n".'"."\n"; + + dol_syslog("Save css content into ".$filecss); + + dol_mkdir($pathofwebsite); + $result = file_put_contents($filecss, $csscontent); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($filecss, octdec($conf->global->MAIN_UMASK)); + + if (! $result) + { + $error++; + setEventMessages('Failed to write file '.$filecss, null, 'errors'); + } + + + // Js file + $jscontent =''; + + $jscontent.= "\n"; + + $jscontent.= GETPOST('WEBSITE_JS_INLINE', 'none'); + + $jscontent.= "\n".'"."\n"; + + dol_syslog("Save js content into ".$filejs); + + dol_mkdir($pathofwebsite); + $result = file_put_contents($filejs, $jscontent); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($filejs, octdec($conf->global->MAIN_UMASK)); + + if (! $result) + { + $error++; + setEventMessages('Failed to write file '.$filejs, null, 'errors'); + } + + + // Robot file + $robotcontent =''; + + /*$robotcontent.= "\n";*/ + + $robotcontent.= GETPOST('WEBSITE_ROBOT', 'none'); + + /*$robotcontent.= "\n".'"."\n";*/ + + dol_syslog("Save file robot into ".$filerobot); + + dol_mkdir($pathofwebsite); + $result = file_put_contents($filerobot, $robotcontent); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($filerobot, octdec($conf->global->MAIN_UMASK)); + + if (! $result) + { + $error++; + setEventMessages('Failed to write file '.$filerobot, null, 'errors'); + } + + + // Css file + $htaccesscontent =''; + + /*$htaccesscontent.= "\n";*/ + + $htaccesscontent.= GETPOST('WEBSITE_HTACCESS', 'none'); + + /*$htaccesscontent.= "\n".'"."\n";*/ + + dol_syslog("Save file htaccess into ".$filehtaccess); + + dol_mkdir($pathofwebsite); + $result = file_put_contents($filehtaccess, $htaccesscontent); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($filehtaccess, octdec($conf->global->MAIN_UMASK)); + + if (! $result) + { + $error++; + setEventMessages('Failed to write file '.$filehtaccess, null, 'errors'); + } + + + // Message if no error + if (! $error) + { + setEventMessages($langs->trans("Saved"), null, 'mesgs'); + } + + $action='preview'; + } } } @@ -1791,46 +1818,40 @@ if (! GETPOST('hide_websitemenu')) $urlext=$virtualurl; $urlint=$urlwithroot.'/public/website/index.php?website='.$websitekey; - $htmltext = $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $urlint, $dataroot); - $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); - $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), DOL_DATA_ROOT.'/website
'.DOL_DATA_ROOT.'/medias'); - print ''; - print $form->textwithpicto('', $htmltext, 1, 'preview'); - print ''; - print '
'; - print ''; - //print ''; - $htmltext =$langs->trans("SetHereVirtualHost", $dataroot); - $htmltext.='
'; - $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); - $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), DOL_DATA_ROOT.'/website
'.DOL_DATA_ROOT.'/medias'); - $htmltext.='
'; - $htmltext.='
'; - $htmltext.=$langs->trans("YouCanAlsoTestWithPHPS", $dataroot); - print $form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helpvirtualhost'); - print '
'; - + $linktotestonwebserver = ''; + $linktotestonwebserver.= $langs->trans("TestDeployOnWeb", $virtualurl).' '.img_picto('','object_globe'); + $linktotestonwebserver.= ''; + $htmltext = ''; if (empty($object->fk_default_home)) { - $htmltext = ''.$langs->trans("YouMustDefineTheHomePage").'
'.$langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext?$urlext:''.$langs->trans("VirtualHostUrlNotDefined").''); - $htmltext.='
'; - $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); - $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), DOL_DATA_ROOT); - print 'transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext)).'">'; - print $form->textwithpicto('', $htmltext, 1, 'preview_ext'); - print ''; + $htmltext.= ''.$langs->trans("YouMustDefineTheHomePage").'

'; + } + if (empty($virtualurl)) + { + $htmltext.= ''.$langs->trans("VirtualHostUrlNotDefined").'

'; } else { - $htmltext = $langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext?$urlext:''.$langs->trans("VirtualHostUrlNotDefined").''); - $htmltext.='
'; - $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); - $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), DOL_DATA_ROOT.'/website
'.DOL_DATA_ROOT.'/medias'); - print 'transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext)).'">'; - print $form->textwithpicto('', $htmltext, 1, 'preview_ext'); - print ''; + $htmltext.= '
'.$langs->trans("GoTo").' '.$virtualurl.'

'; } + if (! empty($conf->global->WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER)) + { + $htmltext.= '
'.$conf->global->WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER; + } + else + { + $htmltext.=$langs->trans("SetHereVirtualHost", $dataroot); + $htmltext.='
'; + $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); + $htmltext.='
bb'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), DOL_DATA_ROOT.'/website
'.DOL_DATA_ROOT.'/medias'); + $htmltext.='
'; + $htmltext.='
'; + $htmltext.=$langs->trans("YouCanAlsoTestWithPHPS", $dataroot); + } + print $form->textwithpicto($linktotestonwebserver, $htmltext, 1, 'none', '', 0, 2, 'helpvirtualhost'); + print '
'; + } if (in_array($action, array('editcss','editmenu','file_manager'))) @@ -2321,6 +2342,19 @@ if ($action == 'editcss') print ''; + // VirtualHost + print '
'; + print '
'; - print ''; + print ''; print ''; } @@ -1188,19 +1188,19 @@ if ($object->id > 0) print ''; if ($objp->df > 0) { - print ''; + print ''; } else { - print ''; + print ''; } - print ''; if (! empty($conf->global->MAIN_SHOW_PRICE_WITH_TAX_IN_SUMMARIES)) { - print ''; } diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index 53176c8b76f..5acc81b0cf6 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -100,7 +100,7 @@ if ($resql) print ''; print img_action($langs->trans("Show"),$obj->id).' '; print $langs->trans("StatusProspect".$obj->id); - print ''; + print ''; $i++; } print "
'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllBills").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').''; + print ''; print '
'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllBills").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').'
'.dol_print_date($db->jdate($objp->df),'day').''.dol_print_date($db->jdate($objp->df),'day').'!!!!!!'; + print ''; print price($objp->total_ht); print ''; + print ''; print price($objp->total_ttc); print ''.$obj->cc.'
'.$obj->cc.'

"; @@ -140,7 +140,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) print '
'; print ''.img_object($langs->trans("ShowPropal"),"propal").' '.$obj->ref.''; - print ''; + print ''; print price($obj->price); print "
'; + + $htmltext = $langs->trans("SetHereVirtualHost", DOL_DATA_ROOT.'/website/'.$websitekey.''); + $htmltext.='
'; + $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); + $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), DOL_DATA_ROOT.'/website
'.DOL_DATA_ROOT.'/medias'); + + print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, 'virtualhosttooltip'); + print '
'; + print ''; + print '
'; dol_fiche_end(); @@ -2370,14 +2404,15 @@ if ($action == 'createsite') print '
'; + $htmltext = $langs->trans("SetHereVirtualHost", DOL_DATA_ROOT.'/website/websiteref'); $htmltext.='
'; $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); $htmltext.='
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), DOL_DATA_ROOT.'/website
'.DOL_DATA_ROOT.'/medias'); - print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, 'tooltipvirtual'); + print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, 'virtualhosttooltip'); print '
'; - print ''; + print ''; print '
'; - print ''; + print ''; print '
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Total").''.price($total)."
'.price($obj->total_ht).'
'.price($obj->total_ttc).'
'.price($obj->total_ttc).'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Total").''.price($total)."
'.price($obj->total_ht).'
'.price($obj->total_ttc).'
'.price($obj->total_ttc).'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("FullList").''.$langs->trans("FullList").'
'.$companystatic->getNomUrl(1,'customer',48).''; + print ''; print $companystatic->getLibCustProspStatut(); print "'.dol_print_date($db->jdate($objp->tms),'day')."'.dol_print_date($db->jdate($objp->tms),'day')."
'; print ''; print ''; - print ''; + print ''; print ''; if ($num) { @@ -574,7 +574,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->societe->lire) $companystatic->canvas=$objp->canvas; print ''; print ''; - print ''; + print ''; print ''; $i++; @@ -656,7 +656,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TO $companystatic->canvas=$objp->canvas; print $companystatic->getNomUrl(1,'customer',44); print ''."\n"; - print "\n"; + print "\n"; $i++; } @@ -743,13 +743,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1, 'customer', 44); print ''; - print ''."\n"; if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) { - print ''; + print ''; } else { - print ''; + print ''; } print ''."\n"; print ''."\n"; @@ -762,7 +762,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } else if ($total>0) { - print '"; + print '"; } print "
'.$langs->trans("BoxTitleLastModifiedSuppliers",min($max,$num)).''.$langs->trans("FullList").''.$langs->trans("FullList").'
'.$companystatic->getNomUrl(1,'supplier',44).''.dol_print_date($db->jdate($objp->dm),'day').''.dol_print_date($db->jdate($objp->dm),'day').'
".$staticcontrat->LibStatut($obj->statut,3)."
".$staticcontrat->LibStatut($obj->statut,3)."
'; + print ''; print dol_print_date($db->jdate($obj->dp),'day').''.price($obj->total_ht).''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->total_ttc).''.$propalstatic->LibStatut($obj->fk_statut,3).'
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("Total")."".price($total)." 
"; print "
"; @@ -847,13 +847,13 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1, 'customer', 44); print '
'; + print ''; print dol_print_date($db->jdate($obj->dp),'day').''.price($obj->total_ht).''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->total_ttc).''.$orderstatic->LibStatut($obj->fk_statut,$obj->billed,3).'
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("Total")."".price($total)." 
"; print "
"; diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 7bbf727a517..aed6e0c53cb 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -149,7 +149,7 @@ if ($_socid > 0) print '
'.$langs->trans("Date").''.$langs->trans("PriceLevel").''.$langs->trans("User").''.$langs->trans("User").'
'.$obj->price_level.' '.$userstatic->getNomUrl(1).''.$userstatic->getNomUrl(1).'
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("DiscountOfferedBy").' 
'.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; print ''.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("DiscountOfferedBy").' 
'.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; print ''.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("Author").' 
'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->ref.''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; print ''.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("Author").' 
'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->ref.''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; print ''.$obj->town.' '.$obj->code_client.' '.$obj->code_compta.' '.dol_print_date($db->jdate($obj->datec)).''.dol_print_date($db->jdate($obj->datec)).'
'.$commandestatic->LibStatut($status,$bool,0).''.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' '; + print ''.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' '; print $commandestatic->LibStatut($status,$bool,3); print ''; print '
'.$langs->trans("Total").''.$total.'
'.$langs->trans("Total").''.$total.'

"; } else @@ -289,7 +289,7 @@ if ($resql) print ' '; print '
'; + print ''; $filename=dol_sanitizeFileName($obj->ref); $filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref); $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; @@ -302,7 +302,7 @@ if ($resql) print $companystatic->getNomUrl(1,'company',16); print ''.dol_print_date($db->jdate($obj->datem),'day').''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'
'; + print ''; $filename=dol_sanitizeFileName($obj->ref); $filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref); $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; @@ -382,7 +382,7 @@ if (! empty($conf->commande->enabled)) print $companystatic->getNomUrl(1,'company',24); print ''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'
'; + print ''; $filename=dol_sanitizeFileName($obj->ref); $filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref); $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; @@ -464,7 +464,7 @@ if (! empty($conf->commande->enabled)) print $companystatic->getNomUrl(1,'company'); print ''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'
'.price($obj->total_ht)."'.price($obj->total_ht)."'.price($obj->total_tva)."'.price($obj->total_tva)."'.price($obj->total_ttc)."'.price($obj->total_ttc)."'.$generic_commande->LibStatut($obj->fk_statut, $obj->billed, 5, 1).''.$generic_commande->LibStatut($obj->fk_statut, $obj->billed, 5, 1).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totalttc']).''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totalttc']).'
'; print ''; print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; print ''; $oldyear=0; @@ -324,24 +324,24 @@ foreach ($data as $val) print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; } print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; $oldyear=$year; } diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 392d2455e2a..840ba06980a 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -81,9 +81,9 @@ if (count($linkedObjectBlock) > 1) - - - + + + Date: Wed, 23 Jan 2019 17:39:40 +0100 Subject: [PATCH 057/183] update with html5 compliant code --- htdocs/compta/bank/annuel.php | 2 +- htdocs/compta/bank/bankentries_list.php | 34 ++++++++++++------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 64f4e15cce6..63f1ffd107d 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -232,7 +232,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++) print '"; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { - print ''; + print ''; } print "\n"; diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index a8d86c1a5f9..a3928cbc0ca 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -704,8 +704,8 @@ if ($resql) $form->select_comptes(GETPOST('add_account','int')?GETPOST('add_account','int'):$search_account,'add_account',0,'',1, ($id > 0 || ! empty($ref)?' disabled="disabled"':'')); print ''; //} - print ''; - print ''; + print ''; + print ''; /*if (! empty($conf->accounting->enabled)) { print ''; } if (! empty($arrayfields['b.debit']['checked'])) { - print ''; } if (! empty($arrayfields['b.credit']['checked'])) { - print ''; } if (! empty($arrayfields['balancebefore']['checked'])) { - print ''; } if (! empty($arrayfields['balance']['checked'])) { - print ''; @@ -1072,13 +1072,13 @@ if ($resql) if (! empty($arrayfields['balancebefore']['checked'])) { - print ''; } if (! empty($arrayfields['balance']['checked'])) { - print ''; } @@ -1126,7 +1126,7 @@ if ($resql) // Ref if (! empty($arrayfields['b.rowid']['checked'])) { - print ''; if (! $i) $totalarray['nbfield']++; @@ -1346,7 +1346,7 @@ if ($resql) // Bank account if (! empty($arrayfields['ba.ref']['checked'])) { - print '\n"; if (! $i) $totalarray['nbfield']++; @@ -1369,7 +1369,7 @@ if ($resql) // Credit if (! empty($arrayfields['b.credit']['checked'])) { - print ''; + print ''; } else { - print ''; + print ''; } } else @@ -1407,7 +1407,7 @@ if ($resql) { if ($balance >= 0) { - print ''; + print ''; } else { @@ -1523,8 +1523,8 @@ if ($resql) if ($num < $limit && empty($offset)) print ''; else print ''; } - elseif ($totalarray['totaldebfield'] == $i) print ''; - elseif ($totalarray['totalcredfield'] == $i) print ''; + elseif ($totalarray['totaldebfield'] == $i) print ''; + elseif ($totalarray['totalcredfield'] == $i) print ''; elseif ($i == $posconciliatecol) { print ''; } +// Payment numpad +print '\n"; + $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); $htmltext = ''.$langs->trans("AvailableVariables").':
'; diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index 0f846922332..853ffe56c77 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -53,14 +53,20 @@ $langs->loadLangs(array("main", "bills", "cashdesk")); ?> @@ -353,27 +353,30 @@ $( document ).ready(function() { -
-
+
+
-
- - - - - - - - - - - - - - - - -
+
+
+ +
+ + + + + + + + + + + + + + + + +
-
+
'.$menu['title'].''; } ?> -
- -
+
+
+
+
-
id='catdiv'> - width="98%" id='catimg'/> -
-
-
-
+
id='catdiv'> + width="98%" id='catimg'/> +
+
+
+
-
+
-
+
-
onclick="MoreProducts('less');" onclick="MoreProducts('more');" > - width="95%" id='proimg'/> -
-
-
-
+
onclick="MoreProducts('less');" onclick="MoreProducts('more');" > + width="95%" id='proimg'/> +
+
+
+
+
+
- Date: Sun, 27 Jan 2019 09:17:01 +0100 Subject: [PATCH 093/183] correct menu --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 215ce25e398..e441fbce582 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -805,7 +805,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 2200); $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer, '', '', '', 201); $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->rights->ficheinter->lire, '', '', '', 202); - $newmenu->add("/fichinter/card-red.php?leftmenu=ficheinter", $langs->trans("ModelList"), 1, $user->rights->ficheinter->lire, '', '', '', 203); + $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ModelList"), 1, $user->rights->ficheinter->lire, '', '', '', 203); $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->rights->fournisseur->commande->lire); } } From 6e91b3cefcd28a410f59b224071704b932501f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 27 Jan 2019 10:49:34 +0100 Subject: [PATCH 094/183] PSR2 usage of else if is discouraged --- dev/examples/code/create_user.php | 2 +- dev/setup/codesniffer/ruleset.xml | 3 +- dev/translation/autotranslator.class.php | 4 +- dev/translation/sanity_check_en_langfiles.php | 4 +- dev/translation/strip_language_file.php | 2 +- htdocs/accountancy/admin/account.php | 2 +- htdocs/accountancy/admin/accountmodel.php | 14 +-- htdocs/accountancy/admin/card.php | 6 +- htdocs/accountancy/admin/categories_list.php | 16 +-- htdocs/accountancy/admin/fiscalyear_card.php | 6 +- htdocs/accountancy/admin/journals_list.php | 12 +-- htdocs/accountancy/bookkeeping/card.php | 6 +- htdocs/accountancy/customer/lines.php | 4 +- htdocs/accountancy/customer/list.php | 4 +- htdocs/accountancy/expensereport/lines.php | 4 +- htdocs/accountancy/expensereport/list.php | 4 +- htdocs/accountancy/journal/bankjournal.php | 50 +++++----- htdocs/accountancy/supplier/lines.php | 4 +- htdocs/accountancy/supplier/list.php | 4 +- htdocs/adherents/class/adherent.class.php | 4 +- htdocs/adherents/class/api_members.class.php | 2 +- htdocs/adherents/stats/geo.php | 6 +- htdocs/adherents/subscription.php | 4 +- htdocs/adherents/type.php | 10 +- htdocs/admin/agenda_other.php | 8 +- htdocs/admin/agenda_reminder.php | 8 +- htdocs/admin/bank.php | 4 +- htdocs/admin/boxes.php | 6 +- htdocs/admin/commande.php | 20 ++-- htdocs/admin/company.php | 12 +-- htdocs/admin/confexped.php | 2 +- htdocs/admin/const.php | 2 +- htdocs/admin/contract.php | 12 +-- htdocs/admin/dict.php | 80 +++++++-------- htdocs/admin/dolistore/ajax/image.php | 2 +- .../admin/dolistore/class/dolistore.class.php | 2 +- htdocs/admin/ecm.php | 2 +- htdocs/admin/expedition.php | 12 +-- htdocs/admin/expensereport.php | 12 +-- htdocs/admin/facture.php | 8 +- htdocs/admin/fckeditor.php | 2 +- htdocs/admin/fichinter.php | 14 +-- htdocs/admin/holiday.php | 12 +-- htdocs/admin/ihm.php | 2 +- htdocs/admin/mails.php | 4 +- htdocs/admin/mails_templates.php | 4 +- htdocs/admin/menus/other.php | 2 +- htdocs/admin/modules.php | 8 +- htdocs/admin/notification.php | 2 +- htdocs/admin/pdf.php | 2 +- htdocs/admin/prelevement.php | 4 +- htdocs/admin/propal.php | 6 +- htdocs/admin/reception_setup.php | 12 +-- htdocs/admin/security.php | 6 +- htdocs/admin/security_file.php | 2 +- htdocs/admin/security_other.php | 4 +- htdocs/admin/supplier_invoice.php | 8 +- htdocs/admin/supplier_order.php | 16 +-- htdocs/admin/supplier_payment.php | 10 +- htdocs/admin/supplier_proposal.php | 6 +- htdocs/admin/syslog.php | 2 +- htdocs/admin/system/constall.php | 2 +- htdocs/admin/system/database-tables.php | 6 +- htdocs/admin/system/dbtable.php | 2 +- htdocs/admin/system/dolibarr.php | 4 +- htdocs/admin/tools/dolibarr_export.php | 2 +- htdocs/admin/tools/dolibarr_import.php | 4 +- htdocs/admin/tools/eaccelerator.php | 12 +-- htdocs/admin/tools/listsessions.php | 2 +- htdocs/admin/translation.php | 2 +- htdocs/api/class/api.class.php | 2 +- htdocs/api/class/api_setup.class.php | 2 +- htdocs/blockedlog/admin/blockedlog_list.php | 2 +- htdocs/blockedlog/class/authority.class.php | 2 +- htdocs/blockedlog/class/blockedlog.class.php | 24 ++--- htdocs/cashdesk/class/Facturation.class.php | 30 +++--- htdocs/cashdesk/facturation.php | 2 +- htdocs/cashdesk/facturation_verif.php | 4 +- htdocs/categories/card.php | 24 ++--- htdocs/categories/class/categorie.class.php | 6 +- htdocs/categories/traduction.php | 2 +- htdocs/categories/viewcat.php | 12 +-- htdocs/comm/action/card.php | 4 +- htdocs/comm/action/class/actioncomm.class.php | 2 +- htdocs/comm/action/index.php | 10 +- htdocs/comm/action/pertype.php | 8 +- htdocs/comm/action/peruser.php | 8 +- htdocs/comm/address.php | 8 +- htdocs/comm/index.php | 6 +- htdocs/comm/mailing/card.php | 22 ++--- htdocs/comm/mailing/cibles.php | 6 +- .../mailing/class/advtargetemailing.class.php | 8 +- htdocs/comm/propal/card.php | 66 ++++++------- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/comm/propal/contact.php | 6 +- htdocs/comm/propal/index.php | 2 +- htdocs/comm/propal/list.php | 2 +- htdocs/commande/card.php | 64 ++++++------ htdocs/commande/class/api_orders.class.php | 2 +- htdocs/commande/class/commande.class.php | 2 +- htdocs/commande/contact.php | 4 +- htdocs/compta/bank/card.php | 8 +- htdocs/compta/bank/class/account.class.php | 4 +- htdocs/compta/bank/ligne.php | 26 ++--- htdocs/compta/deplacement/card.php | 16 +-- .../class/deplacementstats.class.php | 2 +- htdocs/compta/facture/card.php | 64 ++++++------ .../facture/class/facture-rec.class.php | 4 +- htdocs/compta/facture/class/facture.class.php | 12 +-- htdocs/compta/facture/contact.php | 4 +- htdocs/compta/facture/fiche-rec.php | 4 +- .../compta/facture/invoicetemplate_list.php | 8 +- htdocs/compta/facture/list.php | 4 +- htdocs/compta/localtax/clients.php | 8 +- htdocs/compta/localtax/quadri_detail.php | 4 +- htdocs/compta/paiement/cheque/card.php | 2 +- .../cheque/class/remisecheque.class.php | 4 +- htdocs/compta/paiement/cheque/list.php | 4 +- .../compta/paiement/class/paiement.class.php | 10 +- htdocs/compta/resultat/index.php | 28 +++--- .../salaries/class/salariesstats.class.php | 2 +- htdocs/compta/stats/byratecountry.php | 6 +- htdocs/compta/stats/cabyprodserv.php | 10 +- htdocs/compta/stats/cabyuser.php | 6 +- htdocs/compta/stats/casoc.php | 14 +-- htdocs/compta/stats/index.php | 8 +- htdocs/compta/tva/clients.php | 6 +- htdocs/compta/tva/list.php | 2 +- htdocs/compta/tva/quadri_detail.php | 6 +- htdocs/contact/class/contact.class.php | 4 +- htdocs/contact/list.php | 12 +-- htdocs/contact/perso.php | 2 +- htdocs/contrat/card.php | 28 +++--- htdocs/contrat/class/contrat.class.php | 2 +- htdocs/contrat/list.php | 6 +- htdocs/core/actions_builddoc.inc.php | 2 +- htdocs/core/actions_sendmails.inc.php | 6 +- htdocs/core/actions_setnotes.inc.php | 2 +- htdocs/core/ajax/ajaxdirpreview.php | 30 +++--- htdocs/core/ajax/constantonoff.php | 2 +- htdocs/core/ajax/extraparams.php | 16 +-- htdocs/core/ajax/loadinplace.php | 12 +-- htdocs/core/ajax/price.php | 2 +- htdocs/core/ajax/saveinplace.php | 16 +-- .../boxes/box_graph_product_distribution.php | 6 +- htdocs/core/class/CMailFile.class.php | 8 +- htdocs/core/class/CSMSFile.class.php | 2 +- .../core/class/commondocgenerator.class.php | 10 +- htdocs/core/class/commonobject.class.php | 90 ++++++++--------- htdocs/core/class/conf.class.php | 10 +- htdocs/core/class/coreobject.class.php | 6 +- htdocs/core/class/discount.class.php | 4 +- htdocs/core/class/dolgeoip.class.php | 2 +- htdocs/core/class/dolgraph.class.php | 2 +- htdocs/core/class/extrafields.class.php | 14 +-- htdocs/core/class/fileupload.class.php | 4 +- htdocs/core/class/html.form.class.php | 98 +++++++++---------- htdocs/core/class/html.formadmin.class.php | 4 +- htdocs/core/class/html.formcompany.class.php | 14 +-- htdocs/core/class/html.formcontract.class.php | 2 +- htdocs/core/class/html.formfile.class.php | 48 ++++----- htdocs/core/class/html.formmail.class.php | 6 +- htdocs/core/class/html.formprojet.class.php | 10 +- htdocs/core/class/html.formsms.class.php | 2 +- htdocs/core/class/interfaces.class.php | 4 +- htdocs/core/class/menubase.class.php | 2 +- htdocs/core/class/rssparser.class.php | 4 +- htdocs/core/class/smtps.class.php | 10 +- htdocs/core/class/translate.class.php | 8 +- htdocs/core/db/mssql.class.php | 8 +- htdocs/core/db/mysqli.class.php | 4 +- htdocs/core/db/pgsql.class.php | 12 +-- htdocs/core/db/sqlite3.class.php | 16 +-- .../connectors/php/commands.php | 2 +- htdocs/core/lib/bank.lib.php | 2 +- htdocs/core/lib/barcode.lib.php | 8 +- htdocs/core/lib/company.lib.php | 10 +- htdocs/core/lib/date.lib.php | 18 ++-- htdocs/core/lib/files.lib.php | 98 +++++++++---------- htdocs/core/lib/functions.lib.php | 98 +++++++++---------- htdocs/core/lib/functions2.lib.php | 34 +++---- htdocs/core/lib/geturl.lib.php | 8 +- htdocs/core/lib/ldap.lib.php | 6 +- htdocs/core/lib/memory.lib.php | 8 +- htdocs/core/lib/modulebuilder.lib.php | 6 +- htdocs/core/lib/pdf.lib.php | 16 +-- htdocs/core/lib/product.lib.php | 6 +- htdocs/core/lib/project.lib.php | 4 +- htdocs/core/lib/security.lib.php | 92 ++++++++--------- htdocs/core/lib/security2.lib.php | 2 +- htdocs/core/lib/tax.lib.php | 20 ++-- htdocs/core/lib/ws.lib.php | 2 +- htdocs/core/login/functions_openid.php | 4 +- htdocs/core/menus/standard/auguria.lib.php | 8 +- htdocs/core/menus/standard/auguria_menu.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 8 +- htdocs/core/menus/standard/eldy_menu.php | 2 +- htdocs/core/menus/standard/empty.php | 2 +- htdocs/core/modules/DolibarrModules.class.php | 2 +- .../barcode/doc/tcpdfbarcode.modules.php | 2 +- .../barcode/mod_barcode_product_standard.php | 2 +- .../modules/contract/mod_contract_olive.php | 2 +- .../modules/dons/html_cerfafr.modules.php | 30 +++--- .../doc/pdf_standard.modules.php | 2 +- .../modules/facture/doc/pdf_crabe.modules.php | 8 +- .../core/modules/facture/mod_facture_mars.php | 6 +- .../modules/facture/mod_facture_mercure.php | 4 +- .../modules/facture/mod_facture_terre.php | 4 +- .../modules/import/import_csv.modules.php | 6 +- .../modules/import/import_xlsx.modules.php | 6 +- .../modules/mailings/xinputfile.modules.php | 2 +- .../modules/member/doc/pdf_standard.class.php | 12 +-- .../doc/pdf_standardlabel.class.php | 12 +-- .../printsheet/doc/pdf_tcpdflabel.class.php | 16 +-- .../product/mod_codeproduct_elephant.php | 6 +- .../product/mod_codeproduct_leopard.php | 2 +- .../societe/mod_codeclient_elephant.php | 4 +- .../societe/mod_codeclient_leopard.php | 2 +- .../modules/societe/mod_codeclient_monkey.php | 2 +- .../societe/mod_codecompta_aquarium.php | 6 +- .../stock/doc/pdf_stdmovement.modules.php | 2 +- .../mod_facture_fournisseur_cactus.php | 4 +- .../mod_facture_fournisseur_tulip.php | 4 +- htdocs/core/photos_resize.php | 16 +-- htdocs/core/tpl/card_presend.tpl.php | 2 +- htdocs/core/tpl/login.tpl.php | 2 +- htdocs/core/tpl/objectline_create.tpl.php | 6 +- htdocs/core/tpl/passwordforgotten.tpl.php | 2 +- htdocs/cron/card.php | 2 +- htdocs/don/admin/donation.php | 6 +- htdocs/don/card.php | 2 +- htdocs/don/class/don.class.php | 2 +- htdocs/ecm/class/ecmdirectory.class.php | 4 +- htdocs/ecm/dir_add_card.php | 2 +- htdocs/ecm/dir_card.php | 2 +- htdocs/expedition/card.php | 32 +++--- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/expedition/contact.php | 4 +- htdocs/expedition/shipment.php | 2 +- htdocs/expensereport/card.php | 2 +- htdocs/exports/export.php | 2 +- htdocs/externalsite/frames.php | 2 +- htdocs/fichinter/card-rec.php | 4 +- htdocs/fichinter/card.php | 36 +++---- htdocs/fichinter/contact.php | 4 +- htdocs/filefunc.inc.php | 2 +- .../fourn/class/fournisseur.facture.class.php | 2 +- htdocs/fourn/class/paiementfourn.class.php | 8 +- htdocs/fourn/commande/card.php | 40 ++++---- htdocs/fourn/commande/contact.php | 4 +- htdocs/fourn/commande/dispatch.php | 2 +- htdocs/fourn/facture/card.php | 22 ++--- htdocs/fourn/facture/contact.php | 4 +- htdocs/fourn/facture/paiement.php | 4 +- htdocs/ftp/index.php | 10 +- htdocs/holiday/card.php | 8 +- htdocs/hrm/establishment/card.php | 4 +- htdocs/install/check.php | 2 +- htdocs/install/inc.php | 16 +-- htdocs/install/lib/repair.lib.php | 8 +- htdocs/install/repair.php | 14 +-- htdocs/install/step1.php | 4 +- htdocs/install/upgrade.php | 2 +- htdocs/install/upgrade2.php | 2 +- htdocs/livraison/card.php | 2 +- htdocs/loan/card.php | 2 +- htdocs/main.inc.php | 2 +- htdocs/master.inc.php | 6 +- htdocs/opensurvey/exportcsv.php | 2 +- htdocs/opensurvey/results.php | 12 +-- htdocs/product/admin/product.php | 2 +- htdocs/product/admin/product_extrafields.php | 2 +- .../product/actions_card_product.class.php | 10 +- .../service/actions_card_service.class.php | 2 +- htdocs/product/card.php | 10 +- .../product/class/html.formproduct.class.php | 8 +- htdocs/product/class/product.class.php | 14 +-- htdocs/product/composition/card.php | 2 +- .../class/price_parser.class.php | 6 +- htdocs/product/dynamic_price/editor.php | 6 +- htdocs/product/fournisseurs.php | 2 +- htdocs/product/index.php | 4 +- htdocs/product/list.php | 6 +- htdocs/product/popuprop.php | 2 +- htdocs/product/price.php | 2 +- htdocs/product/stats/card.php | 2 +- .../stock/class/mouvementstock.class.php | 6 +- .../product/stock/lib/replenishment.lib.php | 2 +- htdocs/product/stock/movement_list.php | 2 +- htdocs/product/stock/replenishorders.php | 4 +- htdocs/product/traduction.php | 2 +- htdocs/projet/activity/perday.php | 2 +- htdocs/projet/admin/project.php | 20 ++-- htdocs/projet/class/project.class.php | 6 +- htdocs/projet/element.php | 26 ++--- htdocs/projet/list.php | 10 +- htdocs/projet/tasks.php | 16 +-- htdocs/projet/tasks/list.php | 8 +- htdocs/projet/tasks/time.php | 6 +- htdocs/public/members/new.php | 8 +- htdocs/public/onlinesign/newonlinesign.php | 2 +- htdocs/public/opensurvey/studs.php | 12 +-- htdocs/public/payment/newpayment.php | 4 +- htdocs/public/payment/paymentko.php | 2 +- htdocs/public/payment/paymentok.php | 6 +- htdocs/reception/card.php | 22 ++--- htdocs/reception/class/reception.class.php | 2 +- htdocs/reception/contact.php | 4 +- htdocs/resource/contact.php | 4 +- htdocs/societe/admin/societe.php | 2 +- .../canvas/actions_card_common.class.php | 2 +- htdocs/societe/card.php | 8 +- htdocs/societe/class/societe.class.php | 12 +-- htdocs/societe/consumption.php | 4 +- htdocs/societe/societecontact.php | 4 +- htdocs/supplier_proposal/card.php | 50 +++++----- .../class/supplier_proposal.class.php | 2 +- htdocs/supplier_proposal/contact.php | 4 +- htdocs/supplier_proposal/index.php | 2 +- htdocs/takepos/customers.php | 4 +- htdocs/takepos/genimg/index.php | 2 +- htdocs/takepos/invoice.php | 11 +-- htdocs/takepos/takepos.php | 4 +- htdocs/user/card.php | 10 +- htdocs/user/class/user.class.php | 6 +- htdocs/user/class/usergroup.class.php | 2 +- htdocs/user/group/card.php | 2 +- htdocs/user/hierarchy.php | 2 +- htdocs/user/home.php | 2 +- htdocs/user/list.php | 6 +- htdocs/user/perms.php | 4 +- .../webservices/server_productorservice.php | 2 +- htdocs/website/index.php | 2 +- scripts/user/sync_groups_ldap2dolibarr.php | 2 +- scripts/user/sync_users_ldap2dolibarr.php | 2 +- 335 files changed, 1524 insertions(+), 1526 deletions(-) diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php index f8e0ba23011..4e6669de03c 100755 --- a/dev/examples/code/create_user.php +++ b/dev/examples/code/create_user.php @@ -80,7 +80,7 @@ if ($idobject > 0) dol_print_error($db,$obj->error); } } -else if ($obj->error == 'ErrorLoginAlreadyExists') +elseif ($obj->error == 'ErrorLoginAlreadyExists') { print "User with login ".$obj->login." already exists\n"; } diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 879d791b8e9..525797429b5 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -65,7 +65,7 @@ 0 - + diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 123b7f6157d..fbab36c0120 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -221,8 +221,8 @@ class autoTranslator } if ($key == 'CHARSET') $val=$this->_outputpagecode; - else if (preg_match('/^Format/',$key)) $val=$value; - else if ($value=='-') $val=$value; + elseif (preg_match('/^Format/',$key)) $val=$value; + elseif ($value=='-') $val=$value; else { // If not translated then translate diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index 0e3b2c7513f..cfc51e210f4 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -215,8 +215,8 @@ foreach ($dups as $string => $pages) $s.="\n"; if ($duplicateinsamefile) $sduplicateinsamefile .= $s; - else if ($inmain) $sinmainandother .= $s; - else if ($inadmin) $sininstallandadmin .= $s; + elseif ($inmain) $sinmainandother .= $s; + elseif ($inadmin) $sininstallandadmin .= $s; else $sother .= $s; } diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index 92233d71b98..685626d6c11 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -310,7 +310,7 @@ foreach($filesToProcess as $fileToProcess) { //print "Key $key is a key we always want to see into secondary file (line: $cnt).\n"; } - else if ( ! array_key_exists($key, $aSecondary)) + elseif ( ! array_key_exists($key, $aSecondary)) { //print "Key $key does NOT exist in secondary language (line: $cnt).\n"; continue; diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index c9b72d9cc4c..45ecb5cd6e6 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -162,7 +162,7 @@ if (empty($reshook)) if ($result < 0) { setEventMessages($accounting->error, $accounting->errors, 'errors'); } - } else if ($action == 'enable') { + } elseif ($action == 'enable') { if ($accounting->fetch($id)) { $result = $accounting->account_activate($id); } diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index e5f1d211f3b..809132b3719 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -270,7 +270,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($value == 'entity') { + elseif ($value == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql.=","; @@ -318,7 +318,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($field == 'entity') { + elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql.=","; @@ -535,7 +535,7 @@ if ($id) { print '
'; } @@ -729,14 +729,14 @@ if ($id) { $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; } - else if ($value == 'source') + elseif ($value == 'source') { $valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow; } - else if ($valuetoshow=='all') { + elseif ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } - else if ($fieldlist[$field]=='country') { + elseif ($fieldlist[$field]=='country') { if (empty($obj->country_code)) { $valuetoshow='-'; @@ -747,7 +747,7 @@ if ($id) $valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country); } } - else if ($fieldlist[$field]=='country_id') { + elseif ($fieldlist[$field]=='country_id') { $showfield=0; } diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index a2ec757b212..b8e6945b632 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -124,7 +124,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) exit; } } -} else if ($action == 'edit' && $user->rights->accounting->chartofaccount) { +} elseif ($action == 'edit' && $user->rights->accounting->chartofaccount) { if (! $cancel) { $result = $object->fetch($id); @@ -177,7 +177,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) header("Location: " . $urltogo); exit(); } -} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) { +} elseif ($action == 'delete' && $user->rights->accounting->chartofaccount) { $result = $object->fetch($id); if (! empty($object->id)) { @@ -272,7 +272,7 @@ if ($action == 'create') { print ''; } -else if ($id > 0 || $ref) { +elseif ($id > 0 || $ref) { $result = $object->fetch($id, $ref, 1); diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 1f10403f798..1f4748266b1 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -268,7 +268,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) if ($field == 'fk_country' && $_POST['country'] > 0) { $_POST[$listfieldvalue[$i]] = $_POST['country']; } - else if ($field == 'entity') { + elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql.=","; @@ -492,7 +492,7 @@ if ($id) { print ''; } @@ -699,10 +699,10 @@ if ($id) { $valuetoshow = yn($valuetoshow); } - else if ($valuetoshow=='all') { + elseif ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } - else if ($fieldlist[$field]=='country') { + elseif ($fieldlist[$field]=='country') { if (empty($obj->country_code)) { $valuetoshow='-'; @@ -713,20 +713,20 @@ if ($id) $valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country); } } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { $key=$langs->trans("Country".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') { $langs->loadLangs(array("propal")); $key=$langs->trans("AvailabilityType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') { $key=$langs->trans("Action".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { + elseif ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 297a3026b02..42a6710c3c1 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -73,7 +73,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") { } } -else if ($action == 'add') { +elseif ($action == 'add') { if (! GETPOST('cancel', 'alpha')) { $error = 0; @@ -118,7 +118,7 @@ else if ($action == 'add') { } // Update record -else if ($action == 'update') { +elseif ($action == 'update') { if (! GETPOST('cancel', 'alpha')) { $result = $object->fetch($id); @@ -198,7 +198,7 @@ if ($action == 'create') print ''; print ''; -} else if ($id) { +} elseif ($id) { $result = $object->fetch($id); if ($result > 0) { $head = fiscalyear_prepare_head($object); diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 49745676eb3..111a707d51d 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -270,7 +270,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($field == 'entity') { + elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql.=","; @@ -441,7 +441,7 @@ if ($id) { print ''; } @@ -611,11 +611,11 @@ if ($id) if ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } - else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { + elseif ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { $key=$langs->trans("AccountingJournalType".strtoupper($obj->nature)); $valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature))?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') { $valuetoshow=$langs->trans($obj->label); } @@ -630,8 +630,8 @@ if ($id) if (isset($obj->code) && $id != 10) { if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } + elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } + elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } } $canbemodified=$iserasable; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 36ed261f20f..4cc03f7a529 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -140,7 +140,7 @@ if ($action == "confirm_update") { } } -else if ($action == "add") { +elseif ($action == "add") { $error = 0; if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) @@ -201,7 +201,7 @@ else if ($action == "add") { } } -else if ($action == "confirm_delete") { +elseif ($action == "confirm_delete") { $object = new BookKeeping($db); $result = $object->fetch($id, null, $mode); @@ -218,7 +218,7 @@ else if ($action == "confirm_delete") { $action = ''; } -else if ($action == "confirm_create") { +elseif ($action == "confirm_create") { $error = 0; $object = new BookKeeping($db); diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 46ebb8b4bc8..4a4cfa928ac 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -219,12 +219,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index c6c12a26f31..79ff0d07ae6 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -257,12 +257,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index c617f984af3..c6fa1202171 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -190,12 +190,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 6977d76845d..078a91bc96e 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -219,12 +219,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 24bf2097b67..b6b5137fe34 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -290,18 +290,18 @@ if ($result) { $paymentstatic->ref = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2, '', ''); // TODO Do not include list of invoice in tooltip, the dol_string_nohtmltag is ko with this $tabpay[$obj->rowid]["paymentid"] = $paymentstatic->id; - } else if ($links[$key]['type'] == 'payment_supplier') { + } elseif ($links[$key]['type'] == 'payment_supplier') { $paymentsupplierstatic->id = $links[$key]['url_id']; $paymentsupplierstatic->ref = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentsupplierid"] = $paymentsupplierstatic->id; - } else if ($links[$key]['type'] == 'company') { + } elseif ($links[$key]['type'] == 'company') { $societestatic->id = $links[$key]['url_id']; $societestatic->name = $links[$key]['label']; $societestatic->email = $tabcompany[$obj->rowid]['email']; $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); if ($compta_soc) $tabtp[$obj->rowid][$compta_soc] += $obj->amount; - } else if ($links[$key]['type'] == 'user') { + } elseif ($links[$key]['type'] == 'user') { $userstatic->id = $links[$key]['url_id']; $userstatic->name = $links[$key]['label']; $userstatic->email = $tabuser[$obj->rowid]['email']; @@ -310,7 +310,7 @@ if ($result) { if ($userstatic->id > 0) $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30); else $tabpay[$obj->rowid]["soclib"] = '???'; // Should not happen, but happens with old data when id of user was not saved on expense report payment. if ($compta_user) $tabtp[$obj->rowid][$compta_user] += $obj->amount; - } else if ($links[$key]['type'] == 'sc') { + } elseif ($links[$key]['type'] == 'sc') { $chargestatic->id = $links[$key]['url_id']; $chargestatic->ref = $links[$key]['url_id']; @@ -339,14 +339,14 @@ if ($result) { $objmid = $db->fetch_object($resultmid); $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; } - } else if ($links[$key]['type'] == 'payment_donation') { + } elseif ($links[$key]['type'] == 'payment_donation') { $paymentdonstatic->id = $links[$key]['url_id']; $paymentdonstatic->ref = $links[$key]['url_id']; $paymentdonstatic->fk_donation = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentdonstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentdonationid"] = $paymentdonstatic->id; $tabtp[$obj->rowid][$account_pay_donation] += $obj->amount; - } else if ($links[$key]['type'] == 'member') { + } elseif ($links[$key]['type'] == 'member') { $paymentsubscriptionstatic->id = $links[$key]['url_id']; $paymentsubscriptionstatic->ref = $links[$key]['url_id']; $paymentsubscriptionstatic->label = $links[$key]['label']; @@ -354,24 +354,24 @@ if ($result) { $tabpay[$obj->rowid]["paymentsubscriptionid"] = $paymentsubscriptionstatic->id; $paymentsubscriptionstatic->fetch($paymentsubscriptionstatic->id); $tabtp[$obj->rowid][$account_pay_subscription] += $obj->amount; - } else if ($links[$key]['type'] == 'payment_vat') { // Payment VAT + } elseif ($links[$key]['type'] == 'payment_vat') { // Payment VAT $paymentvatstatic->id = $links[$key]['url_id']; $paymentvatstatic->ref = $links[$key]['url_id']; $paymentvatstatic->label = $links[$key]['label']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentvatid"] = $paymentvatstatic->id; $tabtp[$obj->rowid][$account_pay_vat] += $obj->amount; - } else if ($links[$key]['type'] == 'payment_salary') { + } elseif ($links[$key]['type'] == 'payment_salary') { $paymentsalstatic->id = $links[$key]['url_id']; $paymentsalstatic->ref = $links[$key]['url_id']; $paymentsalstatic->label = $links[$key]['label']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentsalid"] = $paymentsalstatic->id; - } else if ($links[$key]['type'] == 'payment_expensereport') { + } elseif ($links[$key]['type'] == 'payment_expensereport') { $paymentexpensereportstatic->id = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= $paymentexpensereportstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentexpensereport"] = $paymentexpensereportstatic->id; - } else if ($links[$key]['type'] == 'payment_various') { + } elseif ($links[$key]['type'] == 'payment_various') { $paymentvariousstatic->id = $links[$key]['url_id']; $paymentvariousstatic->ref = $links[$key]['url_id']; $paymentvariousstatic->label = $links[$key]['label']; @@ -380,7 +380,7 @@ if ($result) { $paymentvariousstatic->fetch($paymentvariousstatic->id); $account_various = (! empty($paymentvariousstatic->accountancy_code) ? $paymentvariousstatic->accountancy_code : 'NotDefined'); // NotDefined is a reserved word $tabtp[$obj->rowid][$account_various] += $obj->amount; - } else if ($links[$key]['type'] == 'payment_loan') { + } elseif ($links[$key]['type'] == 'payment_loan') { $paymentloanstatic->id = $links[$key]['url_id']; $paymentloanstatic->ref = $links[$key]['url_id']; $paymentloanstatic->fk_loan = $links[$key]['url_id']; @@ -399,7 +399,7 @@ if ($result) { $tabtp[$obj->rowid][$objmid->accountancy_account_insurance] -= $objmid->amount_insurance; $tabtp[$obj->rowid][$objmid->accountancy_account_interest] -= $objmid->amount_interest; } - } else if ($links[$key]['type'] == 'banktransfert') { + } elseif ($links[$key]['type'] == 'banktransfert') { $accountLinestatic->fetch($links[$key]['url_id']); $tabpay[$obj->rowid]["lib"] .= ' '.$langs->trans("BankTransfer").'- ' .$accountLinestatic ->getNomUrl(1); $tabtp[$obj->rowid][$account_transfer] += $obj->amount; @@ -567,68 +567,68 @@ if (! $error && $action == 'writebookkeeping') { $accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice + } elseif ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice $bookkeeping->subledger_account = $tabcompany[$key]['code_compta']; $bookkeeping->subledger_label = $tabcompany[$key]['name']; $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; $accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_expensereport') { + } elseif ($tabtype[$key] == 'payment_expensereport') { $bookkeeping->subledger_account = $tabuser[$key]['accountancy_code']; $bookkeeping->subledger_label = $tabuser[$key]['name']; $bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; $accountingaccount->fetch(null, $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_salary') { + } elseif ($tabtype[$key] == 'payment_salary') { $bookkeeping->subledger_account = $tabuser[$key]['accountancy_code']; $bookkeeping->subledger_label = $tabuser[$key]['name']; $bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; $accountingaccount->fetch(null, $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution + } elseif (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $objmid->labelc; - } else if ($tabtype[$key] == 'payment_vat') { + } elseif ($tabtype[$key] == 'payment_vat') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_donation') { + } elseif ($tabtype[$key] == 'payment_donation') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'member') { + } elseif ($tabtype[$key] == 'member') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_loan') { + } elseif ($tabtype[$key] == 'payment_loan') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'payment_various') { + } elseif ($tabtype[$key] == 'payment_various') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; - } else if ($tabtype[$key] == 'banktransfert') { + } elseif ($tabtype[$key] == 'banktransfert') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; @@ -845,11 +845,11 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; if ($tabtype[$key] == 'payment_supplier') { print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep; - } else if($tabtype[$key] == 'payment') { + } elseif($tabtype[$key] == 'payment') { print '"' . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . '"' . $sep; - } else if($tabtype[$key] == 'payment_expensereport') { + } elseif($tabtype[$key] == 'payment_expensereport') { print '"' . $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT . '"' . $sep; - } else if($tabtype[$key] == 'payment_salary') { + } elseif($tabtype[$key] == 'payment_salary') { print '"' . $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT . '"' . $sep; } else { print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 051562c656e..585c8400680 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -214,12 +214,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 4ca53d4bcab..1a315897f02 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -256,12 +256,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 3a698c6b042..826e1ddef1d 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2487,7 +2487,7 @@ class Adherent extends CommonObject if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass, 4); // Create OpenLDAP MD5 password (TODO add type of encryption) } // Set LDAP password if possible - else if ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password + elseif ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password { if (! empty($conf->global->DATABASE_PWD_ENCRYPTED)) { @@ -2502,7 +2502,7 @@ class Adherent extends CommonObject } } // Use $this->pass_indatabase value if exists - else if (! empty($this->pass_indatabase)) + elseif (! empty($this->pass_indatabase)) { if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass_indatabase, 4); // md5 for OpenLdap TODO add type of encryption diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index 2da35df7e2c..7db60a11003 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -213,7 +213,7 @@ class Members extends DolibarrApi if ($result < 0) { throw new RestException(500, 'Error when resiliating member: '.$member->error); } - } else if ($value == '1') { + } elseif ($value == '1') { $result = $member->validate(DolibarrApiAccess::$user); if ($result < 0) { throw new RestException(500, 'Error when validating member: '.$member->error); diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 8da764179a4..1a52c9226f5 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -210,9 +210,9 @@ if ($mode && ! count($data)) else { if ($mode == 'memberbycountry') print $langs->trans("MembersByCountryDesc").'
'; - else if ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'
'; - else if ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'
'; - else if ($mode == 'memberbyregion') print $langs->trans("MembersByRegion").'
';//+ + elseif ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'
'; + elseif ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'
'; + elseif ($mode == 'memberbyregion') print $langs->trans("MembersByRegion").'
';//+ else { print $langs->trans("MembersStatisticsDesc").'
'; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index e476492fdfa..86c31e6cd04 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -793,8 +793,8 @@ if ($rowid > 0) else { if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $bankviainvoice=1; - else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1; - else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $invoiceonly=1; + elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1; + elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $invoiceonly=1; } print "\n\n\n"; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index c1ce5c2c294..86b149fe2b9 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -538,11 +538,11 @@ if ($rowid > 0) if ($status != '') { if ($status == '-1,1') { $titre=$langs->trans("MembersListQualified"); } - else if ($status == '-1') { $titre=$langs->trans("MembersListToValid"); } - else if ($status == '1' && ! $filter) { $titre=$langs->trans("MembersListValid"); } - else if ($status == '1' && $filter=='uptodate') { $titre=$langs->trans("MembersListUpToDate"); } - else if ($status == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); } - else if ($status == '0') { $titre=$langs->trans("MembersListResiliated"); } + elseif ($status == '-1') { $titre=$langs->trans("MembersListToValid"); } + elseif ($status == '1' && ! $filter) { $titre=$langs->trans("MembersListValid"); } + elseif ($status == '1' && $filter=='uptodate') { $titre=$langs->trans("MembersListUpToDate"); } + elseif ($status == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); } + elseif ($status == '0') { $titre=$langs->trans("MembersListResiliated"); } } elseif ($action == 'search') { diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 72097057149..f16226c812b 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -86,7 +86,7 @@ if ($action == 'set') dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity); } -else if ($action == 'specimen') // For orders +elseif ($action == 'specimen') // For orders { $modele=GETPOST('module','alpha'); @@ -133,13 +133,13 @@ else if ($action == 'specimen') // For orders } // Activate a model -else if ($action == 'setmodel') +elseif ($action == 'setmodel') { //print "sssd".$value; $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -149,7 +149,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 856d6f19668..10d716a1af6 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -81,7 +81,7 @@ if ($action == 'set') dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity); } -else if ($action == 'specimen') // For orders +elseif ($action == 'specimen') // For orders { $modele=GETPOST('module','alpha'); @@ -128,13 +128,13 @@ else if ($action == 'specimen') // For orders } // Activate a model -else if ($action == 'setmodel') +elseif ($action == 'setmodel') { //print "sssd".$value; $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -144,7 +144,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 031e4200268..34becb49ada 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -133,7 +133,7 @@ if ($action == 'specimen') { if ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') { +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { if ($conf->global->BANKADDON_PDF == "$value") @@ -141,7 +141,7 @@ else if ($action == 'del') { } } // Set default model -else if ($action == 'setdoc') { +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // The constant that was read before the new set diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index c0480bb7e50..c5bc3f596b4 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -289,14 +289,14 @@ if ($resql) $sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'"; $resql = $db->query($sql); } - else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1))) + elseif (preg_match("/[02468]{1}/",substr($record['box_order'],-1))) { $box_order = "B0".$record['box_order']; $sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'"; $resql = $db->query($sql); } } - else if (dol_strlen($record['box_order']) == 2) + elseif (dol_strlen($record['box_order']) == 2) { if (preg_match("/[13579]{1}/",substr($record['box_order'],-1))) { @@ -304,7 +304,7 @@ if ($resql) $sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'"; $resql = $db->query($sql); } - else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1))) + elseif (preg_match("/[02468]{1}/",substr($record['box_order'],-1))) { $box_order = "B".$record['box_order']; $sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'"; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 2360c1f7b6e..42ea60d0f9f 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -73,7 +73,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); @@ -119,12 +119,12 @@ else if ($action == 'specimen') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -134,7 +134,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -151,7 +151,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Check if numbering module chosen can be activated // by calling method canBeActivated @@ -159,7 +159,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'set_COMMANDE_DRAFT_WATERMARK') +elseif ($action == 'set_COMMANDE_DRAFT_WATERMARK') { $draft = GETPOST("COMMANDE_DRAFT_WATERMARK"); $res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); @@ -176,7 +176,7 @@ else if ($action == 'set_COMMANDE_DRAFT_WATERMARK') } } -else if ($action == 'set_ORDER_FREE_TEXT') +elseif ($action == 'set_ORDER_FREE_TEXT') { $freetext = GETPOST("ORDER_FREE_TEXT",'none'); // No alpha here, we want exact string @@ -195,7 +195,7 @@ else if ($action == 'set_ORDER_FREE_TEXT') } // Activate Set Shippable Icon In List -else if ($action=="setshippableiconinlist") { +elseif ($action=="setshippableiconinlist") { $setshippableiconinlist = GETPOST('value','int'); $res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist,'yesno',0,'',$conf->entity); if (! $res > 0) $error++; @@ -207,7 +207,7 @@ else if ($action=="setshippableiconinlist") { } // Activate ask for payment bank -else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER') +elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ORDER",$value,'chaine',0,'',$conf->entity); @@ -224,7 +224,7 @@ else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER') } // Activate ask for warehouse -else if ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') +elseif ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') { $res = dolibarr_set_const($db, "WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER",$value,'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index f0a0cde4c92..41786c2c55b 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -137,7 +137,7 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha')) } else dol_syslog("ErrorImageFormatNotSupported",LOG_WARNING); } - else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result)) + elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result)) { $error++; $langs->load("errors"); @@ -821,7 +821,7 @@ else { print '  '; } - else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + elseif ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { print ''; } @@ -1097,11 +1097,11 @@ else { print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc"); } - else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==1) + elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==1) { print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"); } - else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){ + elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){ print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"); } @@ -1151,11 +1151,11 @@ else { print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc"); } - else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==1) + elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==1) { print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"); } - else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==2) + elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==2) { print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"); } diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index 660f7c7c500..a54e1eb7aeb 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -71,7 +71,7 @@ if ($action == 'activate_delivery') header("Location: confexped.php"); exit; } -else if ($action == 'disable_delivery') +elseif ($action == 'disable_delivery') { dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON",$conf->entity); header("Location: confexped.php"); diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index cfda870e9da..fedccb49642 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -233,7 +233,7 @@ $sql.= ", entity"; $sql.= " FROM ".MAIN_DB_PREFIX."const"; $sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")"; if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug -else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits +elseif (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name')); $sql.= " ORDER BY entity, name ASC"; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 60be9e062ba..0a704ce5ee8 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -69,7 +69,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For contract +elseif ($action == 'specimen') // For contract { $modele= GETPOST('module','alpha'); @@ -115,12 +115,12 @@ else if ($action == 'specimen') // For contract } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -130,7 +130,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -147,7 +147,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -155,7 +155,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "CONTRACT_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'set_other') +elseif ($action == 'set_other') { $freetext= GETPOST('CONTRACT_FREE_TEXT','none'); // No alpha here, we want exact string $res1 = dolibarr_set_const($db, "CONTRACT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fc3b8f15f39..a77583b44b8 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -728,7 +728,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($value == 'entity') { + elseif ($value == 'entity') { $_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]); } if ($i) $sql.=","; @@ -780,7 +780,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU'); } - else if ($field == 'entity') { + elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]); } if ($i) $sql.=","; @@ -1125,7 +1125,7 @@ if ($id) { print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; } @@ -1409,14 +1409,14 @@ if ($id) { $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; } - else if ($value == 'source') + elseif ($value == 'source') { $valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow; } - else if ($valuetoshow=='all') { + elseif ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } - else if ($fieldlist[$field]=='country') { + elseif ($fieldlist[$field]=='country') { if (empty($obj->country_code)) { $valuetoshow='-'; @@ -1427,143 +1427,143 @@ if ($id) $valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country); } } - else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { + elseif ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { $valuetoshow=yn($valuetoshow); $align="center"; } - else if ($fieldlist[$field]=='type_cdr') { + elseif ($fieldlist[$field]=='type_cdr') { if(empty($valuetoshow)) $valuetoshow = $langs->trans('None'); elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth'); elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext'); $align="center"; } - else if ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) { + elseif ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) { $valuetoshow=price($valuetoshow); } if ($value == 'private') { $valuetoshow = yn($elementList[$valuetoshow]); } - else if ($fieldlist[$field]=='libelle_facture') { + elseif ($fieldlist[$field]=='libelle_facture') { $langs->load("bills"); $key=$langs->trans("PaymentCondition".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); $valuetoshow=nl2br($valuetoshow); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { $key=$langs->trans("Country".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') { $langs->load("propal"); $key=$langs->trans("AvailabilityType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') { $key=$langs->trans("Action".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') { + elseif (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') { $key=$langs->trans("Currency".strtoupper($obj->code_iso)); $valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') { $key=$langs->trans(strtoupper($obj->code)); $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') { $key=$langs->trans(strtoupper($obj->code)); $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') { $key=$langs->trans("Civility".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') { $langs->load('agenda'); $key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') { $langs->load("bills"); $key=$langs->trans("PaymentConditionShort".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') { $langs->load("bills"); $key=$langs->trans("PaymentType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') { + elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') { $key=$langs->trans("DemandReasonType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') { $langs->load("orders"); $key=$langs->trans($obj->code); $valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->{$fieldlist[$field]}; } - else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') { + elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') { $langs->load("sendings"); $key=$langs->trans("SendingMethod".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format') + elseif ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format') { $key = $langs->trans('PaperFormat'.strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') + elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') { $langs->load('trips'); $key = $langs->trans(strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { + elseif ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } - else if ($fieldlist[$field]=='unicode') { + elseif ($fieldlist[$field]=='unicode') { $valuetoshow = $langs->getCurrencySymbol($obj->code,1); } - else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { + elseif ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { $langs->load("products"); $valuetoshow=$langs->trans($obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { + elseif ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { $langs->load("products"); $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); } - else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) + elseif (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) { $key = $langs->trans('SizeUnit'.strtolower($obj->unit)); $valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]}); } - else if ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') { + elseif ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') { $align="center"; } - else if ($fieldlist[$field]=='localtax1_type') { + elseif ($fieldlist[$field]=='localtax1_type') { if ($obj->localtax1 != 0) $valuetoshow=$localtax_typeList[$valuetoshow]; else $valuetoshow = ''; $align="center"; } - else if ($fieldlist[$field]=='localtax2_type') { + elseif ($fieldlist[$field]=='localtax2_type') { if ($obj->localtax2 != 0) $valuetoshow=$localtax_typeList[$valuetoshow]; else $valuetoshow = ''; $align="center"; } - else if ($fieldlist[$field]=='taux') { + elseif ($fieldlist[$field]=='taux') { $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); $align="center"; } - else if (in_array($fieldlist[$field],array('recuperableonly'))) + elseif (in_array($fieldlist[$field],array('recuperableonly'))) { $align="center"; } - else if ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') { + elseif ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') { $valuetoshow = length_accountg($valuetoshow); } elseif ($fieldlist[$field] == 'fk_tva') @@ -1604,8 +1604,8 @@ if ($id) if (isset($obj->code) && $id != 10) { if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } - else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } + elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } + elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } } if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; } @@ -1639,8 +1639,8 @@ if ($id) else { if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive"); - else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated"); - else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption"); + elseif (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated"); + elseif (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption"); else print $langs->trans("AlwaysActive"); } print ""; diff --git a/htdocs/admin/dolistore/ajax/image.php b/htdocs/admin/dolistore/ajax/image.php index c1bb4e997dc..1fac509705c 100644 --- a/htdocs/admin/dolistore/ajax/image.php +++ b/htdocs/admin/dolistore/ajax/image.php @@ -53,6 +53,6 @@ try { // Here we are dealing with errors $trace = $e->getTrace(); if ($trace[0]['args'][0] == 404) die('Bad ID'); - else if ($trace[0]['args'][0] == 401) die('Bad auth key'); + elseif ($trace[0]['args'][0] == 401) die('Bad auth key'); else die('Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV); } diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 553ce2e54e0..92f776b9ea9 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -154,7 +154,7 @@ class Dolistore // Here we are dealing with errors $trace = $e->getTrace(); if ($trace[0]['args'][0] == 404) die('Bad ID'); - else if ($trace[0]['args'][0] == 401) die('Bad auth key'); + elseif ($trace[0]['args'][0] == 401) die('Bad auth key'); else { print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'
'; diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index 3126f432938..e058778155a 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -100,7 +100,7 @@ else { print ''.img_picto($langs->trans("Disabled"),'off').''; } - else if(! empty($conf->global->USER_MAIL_REQUIRED)) + elseif(! empty($conf->global->USER_MAIL_REQUIRED)) { print ''.img_picto($langs->trans("Enabled"),'on').''; } diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 2ae3a7cad99..2dec14f0a24 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -74,7 +74,7 @@ if ($action == 'updateMask') } } -else if ($action == 'set_param') +elseif ($action == 'set_param') { $freetext=GETPOST('SHIPPING_FREE_TEXT','none'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); @@ -98,7 +98,7 @@ else if ($action == 'set_param') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); @@ -144,12 +144,12 @@ else if ($action == 'specimen') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -159,7 +159,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -176,7 +176,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmodel') +elseif ($action == 'setmodel') { dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity); } diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index f8429069611..23d2571b256 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -70,7 +70,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For fiche inter +elseif ($action == 'specimen') // For fiche inter { $modele= GETPOST('module','alpha'); @@ -118,7 +118,7 @@ else if ($action == 'specimen') // For fiche inter } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); if ($ret > 0 && empty($conf->global->EXPENSEREPORT_ADDON_PDF)) @@ -127,7 +127,7 @@ else if ($action == 'set') } } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -137,7 +137,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "EXPENSEREPORT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -154,7 +154,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -162,7 +162,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "EXPENSEREPORT_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'setoptions') +elseif ($action == 'setoptions') { $db->begin(); diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index fe78e5aa5b6..6e9ccf792b0 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -124,12 +124,12 @@ if ($action == 'specimen') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -139,7 +139,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "FACTURE_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -156,7 +156,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 8751d906918..e975a2f0ff8 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -167,7 +167,7 @@ else { print ''.img_picto($langs->trans("Disabled"),'switch_off').''; } - else if ($value == 1) + elseif ($value == 1) { print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 9a259fd3c0d..7e263a5e285 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -70,7 +70,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For fiche inter +elseif ($action == 'specimen') // For fiche inter { $modele= GETPOST('module','alpha'); @@ -116,12 +116,12 @@ else if ($action == 'specimen') // For fiche inter } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -131,7 +131,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -148,7 +148,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -156,7 +156,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "FICHEINTER_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'set_FICHINTER_FREE_TEXT') +elseif ($action == 'set_FICHINTER_FREE_TEXT') { $freetext= GETPOST('FICHINTER_FREE_TEXT','none'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); @@ -173,7 +173,7 @@ else if ($action == 'set_FICHINTER_FREE_TEXT') } } -else if ($action == 'set_FICHINTER_DRAFT_WATERMARK') +elseif ($action == 'set_FICHINTER_DRAFT_WATERMARK') { $draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha'); $res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index c687a6fbc2d..62fe6631a60 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -71,7 +71,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For contract +elseif ($action == 'specimen') // For contract { $modele= GETPOST('module','alpha'); @@ -117,12 +117,12 @@ else if ($action == 'specimen') // For contract } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -132,7 +132,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "HOLIDAY_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -149,7 +149,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -157,7 +157,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "HOLIDAY_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'set_other') +elseif ($action == 'set_other') { $freetext= GETPOST('HOLIDAY_FREE_TEXT','none'); // No alpha here, we want exact string $res1 = dolibarr_set_const($db, "HOLIDAY_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index e2168ec2d76..84ce38f9757 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -173,7 +173,7 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND",$original_file,'chaine',0,'',$conf->entity); } - else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result)) + elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result)) { $error++; $langs->load("errors"); diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 33b6d83e0da..d7eb804fa4d 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -673,11 +673,11 @@ else { print $langs->trans('RobotEmail'); } - else if ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user') + elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user') { print $langs->trans('UserEmail'); } - else if ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company') + elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company') { print $langs->trans('CompanyEmail').' '.dol_escape_htmltag('<'.$mysoc->email.'>'); } diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index da31a794374..afda116772c 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -479,7 +479,7 @@ foreach ($fieldlist as $field => $value) { print '
\n"; } - else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) + elseif (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) { print ''; } @@ -783,7 +783,7 @@ if ($mode == 'common') { // Should never happened } - else if (! empty($objMod->disabled)) + elseif (! empty($objMod->disabled)) { print $langs->trans("Disabled"); } diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index af2aed5a744..4a4e07d35f9 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -71,7 +71,7 @@ if ($action == 'setvalue' && $user->admin) $newval=GETPOST($shortkey.'_key'); //print $newkey.' - '.$newval.'
'; } - else if (preg_match('/^NOTIF_(.*)_new_key/',$key,$reg)) + elseif (preg_match('/^NOTIF_(.*)_new_key/',$key,$reg)) { // Add a new entry $newkey='NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount')); diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 37c836043a0..3d9a6984f88 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -86,7 +86,7 @@ if ($action == 'activate_pdfsecurity') header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } -else if ($action == 'disable_pdfsecurity') +elseif ($action == 'disable_pdfsecurity') { dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION",$conf->entity); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index e0caadc9677..a6c5c54a40f 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -96,9 +96,7 @@ if ($action == "set") { $res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"),'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - } else - - if (! $error) + } elseif (! $error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index beb63b8eb0c..b9fe6bca9d0 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -188,7 +188,7 @@ if ($action == 'set') $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -197,7 +197,7 @@ else if ($action == 'del') } } -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "PROPALE_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -212,7 +212,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 4aa362932af..07781551eb6 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -80,7 +80,7 @@ if ($action == 'updateMask') } } -else if ($action == 'set_param') +elseif ($action == 'set_param') { $freetext=GETPOST('RECEPTION_FREE_TEXT','none'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "RECEPTION_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); @@ -104,7 +104,7 @@ else if ($action == 'set_param') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); @@ -150,12 +150,12 @@ else if ($action == 'specimen') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -165,7 +165,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "RECEPTION_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -182,7 +182,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmodel') +elseif ($action == 'setmodel') { dolibarr_set_const($db, "RECEPTION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity); } diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 26dcdc85b8d..7a4581ac8ec 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -108,7 +108,7 @@ if ($action == 'activate_encrypt') dol_print_error($db,''); } } -else if ($action == 'disable_encrypt') +elseif ($action == 'disable_encrypt') { //On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas etre decodes //Do not allow "disable encryption" as passwords cannot be decrypted @@ -137,7 +137,7 @@ if ($action == 'activate_encryptdbpassconf') setEventMessages($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)), null, 'warnings'); } } -else if ($action == 'disable_encryptdbpassconf') +elseif ($action == 'disable_encryptdbpassconf') { $result = encodedecode_dbpassconf(0); if ($result > 0) @@ -161,7 +161,7 @@ if ($action == 'activate_MAIN_SECURITY_DISABLEFORGETPASSLINK') header("Location: security.php"); exit; } -else if ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') +elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_del_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK",$conf->entity); header("Location: security.php"); diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index f551aafaaff..f3449e12885 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -67,7 +67,7 @@ if ($action == 'updateform') // Delete file -else if ($action == 'delete') +elseif ($action == 'delete') { $langs->load("other"); $file = $conf->admin->dir_temp . '/' . GETPOST('urlfile','alpha'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index e26fcf900be..99684305cec 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -57,7 +57,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) } } -else if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) +elseif (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) @@ -71,7 +71,7 @@ else if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) } } -else if ($action == 'updateform') +elseif ($action == 'updateform') { $res1=dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity); $res2=dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index c3c25c9e4e6..a4446f1f8fb 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -122,12 +122,12 @@ if ($action == 'specimen') // For invoices } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -137,7 +137,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "INVOICE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -153,7 +153,7 @@ else if ($action == 'setdoc') $ret = addDocumentModel($value, $type, $label, $scandir); } } -else if ($action == 'unsetdoc') +elseif ($action == 'unsetdoc') { dolibarr_del_const($db, "INVOICE_SUPPLIER_ADDON_PDF", $conf->entity); } diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index b23e821b31e..69d582ff90a 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -73,7 +73,7 @@ if ($action == 'updateMask') } } -else if ($action == 'specimen') // For orders +elseif ($action == 'specimen') // For orders { $modele=GETPOST('module','alpha'); @@ -120,12 +120,12 @@ else if ($action == 'specimen') // For orders } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -135,7 +135,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -152,7 +152,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -160,13 +160,13 @@ else if ($action == 'setmod') dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'addcat') +elseif ($action == 'addcat') { $fourn = new Fournisseur($db); $fourn->CreateCategory($user,$_POST["cat"]); } -else if ($action == 'set_SUPPLIER_ORDER_OTHER') +elseif ($action == 'set_SUPPLIER_ORDER_OTHER') { $freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT','none'); // No alpha here, we want exact string $doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED','alpha'); @@ -206,7 +206,7 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER') } // Activate ask for payment bank -else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER') +elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER",$value,'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 77f2a95070e..ecb7b455657 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -61,18 +61,18 @@ if ($action == 'updateMask') { setEventMessages($langs->trans("Error"), null, 'errors'); } -}else if ($action == 'setmod') +}elseif ($action == 'setmod') { dolibarr_set_const($db, "SUPPLIER_PAYMENT_ADDON", $value, 'chaine', 0, '', $conf->entity); } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -82,7 +82,7 @@ else if ($action == 'del') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "SUPPLIER_PAYMENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -99,7 +99,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 1756974379c..7c18a1b8e19 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -169,7 +169,7 @@ if ($action == 'set') $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -178,7 +178,7 @@ else if ($action == 'del') } } -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -193,7 +193,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 0eaa7161d5e..9c857964a3c 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -230,7 +230,7 @@ foreach ($syslogModules as $moduleName) if (! empty($tmpoption)) { if (isset($_POST[$tmpoption])) $value=$_POST[$tmpoption]; - else if (! empty($conf->global->$tmpoption)) $value = $conf->global->$tmpoption; + elseif (! empty($conf->global->$tmpoption)) $value = $conf->global->$tmpoption; } else $value = (isset($option['default']) ? $option['default'] : ''); diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index fef49bd5c12..645abf36ce8 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -183,7 +183,7 @@ foreach($configfileparameters as $key) // Value print "
"; diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index c19c7075784..2436807b584 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -56,17 +56,17 @@ if (preg_match('/mysql/i',$conf->db->type)) $sql = "SHOW TABLE STATUS"; $base=1; } -else if ($conf->db->type == 'pgsql') +elseif ($conf->db->type == 'pgsql') { $sql = "SELECT conname, contype FROM pg_constraint;"; $base=2; } -else if ($conf->db->type == 'mssql') +elseif ($conf->db->type == 'mssql') { //$sqls[0] = ""; //$base=3; } -else if ($conf->db->type == 'sqlite' || $conf->db->type == 'sqlite3') +elseif ($conf->db->type == 'sqlite' || $conf->db->type == 'sqlite3') { //$sql = "SELECT name, type FROM sqlite_master"; $base = 4; diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index 2cf249c0f74..9f9cc63505d 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -50,7 +50,7 @@ if (preg_match('/mysql/i',$conf->db->type)) $sql = "SHOW TABLE STATUS LIKE '".$db->escape($table)."'"; $base=1; } -else if ($conf->db->type == 'pgsql') +elseif ($conf->db->type == 'pgsql') { $sql = "SELECT conname,contype FROM pg_constraint"; $base=2; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index f81053e1631..a8b5b2da401 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -374,8 +374,8 @@ foreach($configfileparameters as $key => $value) // Value print "'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 05d5fa43c86..0e9463cd43c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -293,7 +293,7 @@ class ActionComm extends CommonObject $this->type_id=$cactioncomm->id; $this->type_code=$cactioncomm->code; } - else if ($result == 0) + elseif ($result == 0) { $this->error='Failed to get record with id '.$this->type_id.' code '.$this->type_code.' from dictionary "type of events"'; return -1; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a73731699f2..5eaf2c5a6a5 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -779,7 +779,7 @@ if (count($listofextcals)) $datecurstart=dol_stringtotime($icalevent['DTSTART;VALUE=DATE'],1); $datecurend=dol_stringtotime($icalevent['DTEND;VALUE=DATE'],1)-1; // We remove one second to get last second of day } - else if (is_array($icalevent['DTSTART']) && ! empty($icalevent['DTSTART']['unixtime'])) + elseif (is_array($icalevent['DTSTART']) && ! empty($icalevent['DTSTART']['unixtime'])) { $datecurstart=$icalevent['DTSTART']['unixtime']; $datecurend=$icalevent['DTEND']['unixtime']; @@ -1365,7 +1365,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; } - else if ($event->type_code == 'ICALEVENT') // Event come from external ical file + elseif ($event->type_code == 'ICALEVENT') // Event come from external ical file { $numical++; if (! empty($event->icalname)) { @@ -1378,7 +1378,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $color=($event->icalcolor?$event->icalcolor:-1); $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); } - else if ($event->type_code == 'BIRTHDAY') + elseif ($event->type_code == 'BIRTHDAY') { $numbirthday++; $colorindex=2; $cssclass='family_birthday unmovable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); } @@ -1425,11 +1425,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa { $cssclass.= " unmovable"; } - else if ($event->type_code == 'ICALEVENT') + elseif ($event->type_code == 'ICALEVENT') { $cssclass.= " unmovable"; } - else if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar)) + elseif ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar)) { $tmpyearend = date('Y',$event->date_end_in_calendar); $tmpmonthend = date('m',$event->date_end_in_calendar); diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 67a4534ca14..789ef82daa3 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -809,7 +809,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s $nummytasks++; $cssclass='family_mytasks'; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color; } - else if ($event->type_code == 'ICALEVENT') + elseif ($event->type_code == 'ICALEVENT') { $numical++; if (! empty($event->icalname)) @@ -823,7 +823,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s $color=$event->icalcolor; $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable'); } - else if ($event->type_code == 'BIRTHDAY') + elseif ($event->type_code == 'BIRTHDAY') { $numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); } @@ -1026,7 +1026,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string']; if ($output[0]['color']) $color1 = $output[0]['color']; } - else if (count($cases1[$h]) > 1) + elseif (count($cases1[$h]) > 1) { $title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:''); $color1='222222'; @@ -1039,7 +1039,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string']; if ($output[0]['color']) $color2 = $output[0]['color']; } - else if (count($cases2[$h]) > 1) + elseif (count($cases2[$h]) > 1) { $title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:''); $color2='222222'; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 9e2a7278a27..075e5997fbd 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -970,7 +970,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & if (! empty($conf->global->AGENDA_USE_COLOR_PER_EVENT_TYPE)) $color=$event->type_color; } - else if ($event->type_code == 'ICALEVENT') + elseif ($event->type_code == 'ICALEVENT') { $numical++; if (! empty($event->icalname)) @@ -984,7 +984,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $color=$event->icalcolor; $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable'); } - else if ($event->type_code == 'BIRTHDAY') + elseif ($event->type_code == 'BIRTHDAY') { $numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); } @@ -1201,7 +1201,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string']; if ($output[0]['color']) $color1 = $output[0]['color']; } - else if (count($cases1[$h]) > 1) + elseif (count($cases1[$h]) > 1) { $title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:''); $color1='222222'; @@ -1214,7 +1214,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string']; if ($output[0]['color']) $color2 = $output[0]['color']; } - else if (count($cases2[$h]) > 1) + elseif (count($cases2[$h]) > 1) { $title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:''); $color2='222222'; diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index f9cf7dc5bf1..04b7cd3ad63 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -83,7 +83,7 @@ if ($action == 'add' || $action == 'update') header("Location: ".$backtopage); exit; } - else if ($origin == 'commande') + elseif ($origin == 'commande') { header("Location: ../commande/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid); exit; @@ -112,7 +112,7 @@ if ($action == 'add' || $action == 'update') } // Update address - else if ($action == 'update') + elseif ($action == 'update') { $result = $object->update($id, $socid, $user); @@ -123,7 +123,7 @@ if ($action == 'add' || $action == 'update') header("Location: ".$backtopage); exit; } - else if ($origin == 'commande') + elseif ($origin == 'commande') { header("Location: ../commande/contact.php?id=".$originid); exit; @@ -153,7 +153,7 @@ if ($action == 'add' || $action == 'update') } } -else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) +elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) { $result = $object->delete($id, $socid); diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index e0b60a87753..bee64fb41d1 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -496,7 +496,7 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) print ''; print ''; print ''; @@ -759,7 +759,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) { print '"; } - else if ($total>0) + elseif ($total>0) { print '"; } @@ -863,7 +863,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { print '"; } - else if ($total>0) + elseif ($total>0) { print '"; } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 233f32d26be..5ce2b5c2f61 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -122,7 +122,7 @@ if (empty($reshook)) setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); $action=''; } - else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) + elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings'); $action=''; @@ -525,13 +525,13 @@ if (empty($reshook)) $upload_dir = $conf->mailing->dir_output . "/" . get_exdir($object->id,2,0,1,$object,'mailing'); if ($action == 'settitre') $object->titre = trim(GETPOST('titre','alpha')); - else if ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from','alpha')); - else if ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto','alpha')); - else if ($action == 'setemail_errorsto') $object->email_errorsto = trim(GETPOST('email_errorsto','alpha')); - else if ($action == 'settitre' && empty($object->titre)) { + elseif ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from','alpha')); + elseif ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto','alpha')); + elseif ($action == 'setemail_errorsto') $object->email_errorsto = trim(GETPOST('email_errorsto','alpha')); + elseif ($action == 'settitre' && empty($object->titre)) { $mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTitle")); } - else if ($action == 'setfrom' && empty($object->email_from)) { + elseif ($action == 'setfrom' && empty($object->email_from)) { $mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailFrom")); } @@ -803,12 +803,12 @@ else print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); } // Confirm reset - else if ($action == 'reset') + elseif ($action == 'reset') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); } // Confirm delete - else if ($action == 'delete') + elseif ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); } @@ -842,7 +842,7 @@ else if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings'); $_GET["action"]=''; } - else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) + elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings'); if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings'); @@ -1008,7 +1008,7 @@ else { print ''.$langs->trans("ValidMailing").''; } - else if (empty($user->rights->mailing->valider)) + elseif (empty($user->rights->mailing->valider)) { print ''.$langs->trans("ValidMailing").''; } @@ -1024,7 +1024,7 @@ else { print ''.$langs->trans("SendMailing").''; } - else if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! $user->rights->mailing->mailing_advance->send) + elseif (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! $user->rights->mailing->mailing_advance->send) { print ''.$langs->trans("SendMailing").''; } diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index ac23177652f..0cb414be421 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -557,7 +557,7 @@ if ($object->fetch($id) >= 0) $objectstatic->fetch($obj->source_id); print $objectstatic->getNomUrl(1); } - else if ($obj->source_type == 'user') + elseif ($obj->source_type == 'user') { include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $objectstatic=new User($db); @@ -565,14 +565,14 @@ if ($object->fetch($id) >= 0) $objectstatic->id=$obj->source_id; print $objectstatic->getNomUrl(1); } - else if ($obj->source_type == 'thirdparty') + elseif ($obj->source_type == 'thirdparty') { include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $objectstatic=new Societe($db); $objectstatic->fetch($obj->source_id); print $objectstatic->getNomUrl(1); } - else if ($obj->source_type == 'contact') + elseif ($obj->source_type == 'contact') { include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $objectstatic=new Contact($db); diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 83833304d44..84d20180f20 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -785,12 +785,12 @@ class AdvanceTargetingMailing extends CommonObject if (!empty($arrayquery['options_'.$key.'_max'.'_cnct'])) { $sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max'.'_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'.'_cnct'].")"; } - } else if (($extrafields->attribute_type[$key] == 'date') || + } elseif (($extrafields->attribute_type[$key] == 'date') || ($extrafields->attribute_type[$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt'.'_cnct'])){ $sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'.'_cnct'])."')"; } - }else if ($extrafields->attribute_type[$key] == 'boolean') { + }elseif ($extrafields->attribute_type[$key] == 'boolean') { if ($arrayquery['options_'.$key.'_cnct']!=''){ if ($arrayquery['options_'.$key.'_cnct']==0) { $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key.'_cnct']." OR ((te.".$key." IS NULL) AND (te.fk_object IS NOT NULL)))"; @@ -885,12 +885,12 @@ class AdvanceTargetingMailing extends CommonObject if (!empty($arrayquery['options_'.$key.'_max'])) { $sqlwhere[]= " (tse.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND tse.".$key." <= ".$arrayquery['options_'.$key.'_min'].")"; } - } else if (($extrafields->attribute_type[$key] == 'date') || + } elseif (($extrafields->attribute_type[$key] == 'date') || ($extrafields->attribute_type[$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt'])){ $sqlwhere[]= " (tse.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND tse.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')"; } - }else if ($extrafields->attribute_type[$key] == 'boolean') { + }elseif ($extrafields->attribute_type[$key] == 'boolean') { if ($arrayquery['options_'.$key]!=''){ $sqlwhere[]= " (tse.".$key." = ".$arrayquery['options_'.$key].")"; } diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index c6ba6781423..93511ce0513 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -205,7 +205,7 @@ if (empty($reshook)) } // Delete proposal - else if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { $result = $object->delete($user); if ($result > 0) { @@ -218,7 +218,7 @@ if (empty($reshook)) } // Remove line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $result = $object->deleteline($lineid); // reorder lines @@ -242,7 +242,7 @@ if (empty($reshook)) } // Validation - else if ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) + elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { $result = $object->valid($user); if ($result >= 0) @@ -269,7 +269,7 @@ if (empty($reshook)) } } - else if ($action == 'setdate' && $usercancreate) + elseif ($action == 'setdate' && $usercancreate) { $datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); @@ -284,13 +284,13 @@ if (empty($reshook)) dol_print_error($db, $object->error); } } - else if ($action == 'setecheance' && $usercancreate) + elseif ($action == 'setecheance' && $usercancreate) { $result = $object->set_echeance($user, dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear'])); if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setdate_livraison' && $usercancreate) + elseif ($action == 'setdate_livraison' && $usercancreate) { $result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['date_livraisonmonth'], $_POST['date_livraisonday'], $_POST['date_livraisonyear'])); if ($result < 0) @@ -298,7 +298,7 @@ if (empty($reshook)) } // Positionne ref client - else if ($action == 'setref_client' && $usercancreate) + elseif ($action == 'setref_client' && $usercancreate) { $result = $object->set_ref_client($user, GETPOST('ref_client')); if ($result < 0) @@ -314,7 +314,7 @@ if (empty($reshook)) } // Create proposal - else if ($action == 'add' && $usercancreate) + elseif ($action == 'add' && $usercancreate) { $object->socid = $socid; $object->fetch_thirdparty(); @@ -619,7 +619,7 @@ if (empty($reshook)) } // Classify billed - else if ($action == 'classifybilled' && $usercanclose) + elseif ($action == 'classifybilled' && $usercanclose) { $db->begin(); @@ -641,7 +641,7 @@ if (empty($reshook)) } // Close proposal - else if ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel','alpha')) + elseif ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel','alpha')) { if (! (GETPOST('statut','int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors'); @@ -672,7 +672,7 @@ if (empty($reshook)) } // Reopen proposal - else if ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel','alpha')) + elseif ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel','alpha')) { // prevent browser refresh from reopening proposal several times if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) @@ -808,7 +808,7 @@ if (empty($reshook)) } } - else if ($action == "setabsolutediscount" && $usercancreate) { + elseif ($action == "setabsolutediscount" && $usercancreate) { if ($_POST["remise_id"]) { if ($object->id > 0) { $result = $object->insert_discount($_POST["remise_id"]); @@ -820,7 +820,7 @@ if (empty($reshook)) } // Add line - else if ($action == 'addline' && $usercancreate) { + elseif ($action == 'addline' && $usercancreate) { // Set if we used free entry or predefined product $predef=''; @@ -1184,7 +1184,7 @@ if (empty($reshook)) } // Update a line within proposal - else if ($action == 'updateline' && $usercancreate && GETPOST('save')) + elseif ($action == 'updateline' && $usercancreate && GETPOST('save')) { // Define info_bits $info_bits = 0; @@ -1320,66 +1320,66 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $usercancreate && GETPOST('cancel','alpha')) + elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel','alpha')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } // Set project - else if ($action == 'classin' && $usercancreate) { + elseif ($action == 'classin' && $usercancreate) { $object->setProject(GETPOST('projectid','int')); } // Delai de livraison - else if ($action == 'setavailability' && $usercancreate) { + elseif ($action == 'setavailability' && $usercancreate) { $result = $object->set_availability($user, GETPOST('availability_id','int')); } // Origine de la propale - else if ($action == 'setdemandreason' && $usercancreate) { + elseif ($action == 'setdemandreason' && $usercancreate) { $result = $object->set_demand_reason($user, GETPOST('demand_reason_id','int')); } // Conditions de reglement - else if ($action == 'setconditions' && $usercancreate) { + elseif ($action == 'setconditions' && $usercancreate) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } - else if ($action == 'setremisepercent' && $usercancreate) { + elseif ($action == 'setremisepercent' && $usercancreate) { $result = $object->set_remise_percent($user, $_POST['remise_percent']); } - else if ($action == 'setremiseabsolue' && $usercancreate) { + elseif ($action == 'setremiseabsolue' && $usercancreate) { $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); } // Mode de reglement - else if ($action == 'setmode' && $usercancreate) { + elseif ($action == 'setmode' && $usercancreate) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $usercancreate) { + elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $usercancreate) { + elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); } // bank account - else if ($action == 'setbankaccount' && $usercancreate) { + elseif ($action == 'setbankaccount' && $usercancreate) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); } // shipping method - else if ($action == 'setshippingmethod' && $usercancreate) { + elseif ($action == 'setshippingmethod' && $usercancreate) { $result=$object->setShippingMethod(GETPOST('shipping_method_id', 'int')); } - else if ($action == 'update_extras') { + elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form @@ -1421,7 +1421,7 @@ if (empty($reshook)) } // Bascule du statut d'un contact - else if ($action == 'swapstatut') { + elseif ($action == 'swapstatut') { if ($object->fetch($id) > 0) { $result = $object->swapContactStatus(GETPOST('ligne')); } else { @@ -1430,7 +1430,7 @@ if (empty($reshook)) } // Efface un contact - else if ($action == 'deletecontact') { + elseif ($action == 'deletecontact') { $object->fetch($id); $result = $object->delete_contact($lineid); @@ -1909,22 +1909,22 @@ if ($action == 'create') } // Confirm delete - else if ($action == 'delete') { + elseif ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); } // Confirm reopen - else if ($action == 'reopen') { + elseif ($action == 'reopen') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); } // Confirmation delete product/service line - else if ($action == 'ask_deleteline') { + elseif ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Confirm validate proposal - else if ($action == 'validate') { + elseif ($action == 'validate') { $error = 0; // We verifie whether the object is provisionally numbering diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 55dd950abf2..12de0610ad4 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2706,7 +2706,7 @@ class Propal extends CommonObject { $ga[$obj->propalid] = $obj->ref; } - else if ($shortlist == 2) + elseif ($shortlist == 2) { $ga[$obj->propalid] = $obj->ref.' ('.$obj->name.')'; } diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 7fc556a3b12..dc14324c293 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -56,7 +56,7 @@ if ($id > 0 || ! empty($ref)) setEventMessages($langs->trans('ErrorRecordNotFound'), null, 'errors'); $error++; } - else if ($ret < 0) + elseif ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -105,7 +105,7 @@ if ($action == 'addcontact' && $user->rights->propale->creer) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->propale->creer) +elseif ($action == 'swapstatut' && $user->rights->propale->creer) { if ($object->id > 0) { @@ -114,7 +114,7 @@ else if ($action == 'swapstatut' && $user->rights->propale->creer) } // Deletes a contact -else if ($action == 'deletecontact' && $user->rights->propale->creer) +elseif ($action == 'deletecontact' && $user->rights->propale->creer) { $result = $object->delete_contact($lineid); diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index b96a95d8e64..e708e0dac15 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -367,7 +367,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) { print '"; } - else if ($total>0) + elseif ($total>0) { print '"; } diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 61fa1d548d7..193859cdd70 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -940,7 +940,7 @@ if ($resql) print $nbofsalesrepresentative; print ''; } - else if ($nbofsalesrepresentative > 0) + elseif ($nbofsalesrepresentative > 0) { $userstatic=new User($db); $j=0; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 36dac7431af..08da5786589 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -159,7 +159,7 @@ if (empty($reshook)) } // Reopen a closed order - else if ($action == 'reopen' && $user->rights->commande->creer) + elseif ($action == 'reopen' && $user->rights->commande->creer) { if ($object->statut == Commande::STATUS_CANCELED || $object->statut == Commande::STATUS_CLOSED) { @@ -176,7 +176,7 @@ if (empty($reshook)) } // Remove order - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->commande->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->commande->supprimer) { $result = $object->delete($user); if ($result > 0) @@ -191,7 +191,7 @@ if (empty($reshook)) } // Remove a product line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->commande->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->commande->creer) { $result = $object->deleteline($user, $lineid); if ($result > 0) @@ -222,13 +222,13 @@ if (empty($reshook)) } // Link to a project - else if ($action == 'classin' && $user->rights->commande->creer) + elseif ($action == 'classin' && $user->rights->commande->creer) { $object->setProject(GETPOST('projectid','int')); } // Add order - else if ($action == 'add' && $user->rights->commande->creer) + elseif ($action == 'add' && $user->rights->commande->creer) { $datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $datelivraison = dol_mktime(12, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); @@ -481,7 +481,7 @@ if (empty($reshook)) } } - else if ($action == 'classifybilled' && $user->rights->commande->creer) + elseif ($action == 'classifybilled' && $user->rights->commande->creer) { $ret=$object->classifyBilled($user); @@ -489,7 +489,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - else if ($action == 'classifyunbilled' && $user->rights->commande->creer) + elseif ($action == 'classifyunbilled' && $user->rights->commande->creer) { $ret=$object->classifyUnBilled(); if ($ret < 0) { @@ -498,7 +498,7 @@ if (empty($reshook)) } // Positionne ref commande client - else if ($action == 'setref_client' && $user->rights->commande->creer) { + elseif ($action == 'setref_client' && $user->rights->commande->creer) { $result = $object->set_ref_client($user, GETPOST('ref_client')); if ($result < 0) { @@ -506,7 +506,7 @@ if (empty($reshook)) } } - else if ($action == 'setremise' && $user->rights->commande->creer) { + elseif ($action == 'setremise' && $user->rights->commande->creer) { $result = $object->set_remise($user, GETPOST('remise')); if ($result < 0) { @@ -514,7 +514,7 @@ if (empty($reshook)) } } - else if ($action == 'setabsolutediscount' && $user->rights->commande->creer) { + elseif ($action == 'setabsolutediscount' && $user->rights->commande->creer) { if (GETPOST('remise_id')) { if ($object->id > 0) { $object->insert_discount(GETPOST('remise_id')); @@ -524,7 +524,7 @@ if (empty($reshook)) } } - else if ($action == 'setdate' && $user->rights->commande->creer) { + elseif ($action == 'setdate' && $user->rights->commande->creer) { // print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $date = dol_mktime(0, 0, 0, GETPOST('order_month'), GETPOST('order_day'), GETPOST('order_year')); @@ -534,7 +534,7 @@ if (empty($reshook)) } } - else if ($action == 'setdate_livraison' && $user->rights->commande->creer) { + elseif ($action == 'setdate_livraison' && $user->rights->commande->creer) { // print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $datelivraison = dol_mktime(0, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); @@ -544,35 +544,35 @@ if (empty($reshook)) } } - else if ($action == 'setmode' && $user->rights->commande->creer) { + elseif ($action == 'setmode' && $user->rights->commande->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $user->rights->commande->creer) { + elseif ($action == 'setmulticurrencycode' && $user->rights->commande->creer) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) { + elseif ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); } - else if ($action == 'setavailability' && $user->rights->commande->creer) { + elseif ($action == 'setavailability' && $user->rights->commande->creer) { $result = $object->availability(GETPOST('availability_id')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } - else if ($action == 'setdemandreason' && $user->rights->commande->creer) { + elseif ($action == 'setdemandreason' && $user->rights->commande->creer) { $result = $object->demand_reason(GETPOST('demand_reason_id')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } - else if ($action == 'setconditions' && $user->rights->commande->creer) { + elseif ($action == 'setconditions' && $user->rights->commande->creer) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); if ($result < 0) { dol_print_error($db, $object->error); @@ -604,7 +604,7 @@ if (empty($reshook)) } // bank account - else if ($action == 'setbankaccount' && $user->rights->commande->creer) { + elseif ($action == 'setbankaccount' && $user->rights->commande->creer) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -612,7 +612,7 @@ if (empty($reshook)) } // shipping method - else if ($action == 'setshippingmethod' && $user->rights->commande->creer) { + elseif ($action == 'setshippingmethod' && $user->rights->commande->creer) { $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -620,23 +620,23 @@ if (empty($reshook)) } // warehouse - else if ($action == 'setwarehouse' && $user->rights->commande->creer) { + elseif ($action == 'setwarehouse' && $user->rights->commande->creer) { $result = $object->setWarehouse(GETPOST('warehouse_id', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } - else if ($action == 'setremisepercent' && $user->rights->commande->creer) { + elseif ($action == 'setremisepercent' && $user->rights->commande->creer) { $result = $object->set_remise($user, GETPOST('remise_percent')); } - else if ($action == 'setremiseabsolue' && $user->rights->commande->creer) { + elseif ($action == 'setremiseabsolue' && $user->rights->commande->creer) { $result = $object->set_remise_absolue($user, GETPOST('remise_absolue')); } // Add a new line - else if ($action == 'addline' && $user->rights->commande->creer) + elseif ($action == 'addline' && $user->rights->commande->creer) { $langs->load('errors'); $error = 0; @@ -998,7 +998,7 @@ if (empty($reshook)) /* * Update a line */ - else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('save')) + elseif ($action == 'updateline' && $user->rights->commande->creer && GETPOST('save')) { // Clean parameters $date_start=''; @@ -1134,12 +1134,12 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { + elseif ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } - else if ($action == 'confirm_validate' && $confirm == 'yes' && + elseif ($action == 'confirm_validate' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate))) ) @@ -1196,7 +1196,7 @@ if (empty($reshook)) } // Go back to draft status - else if ($action == 'confirm_modif' && $user->rights->commande->creer) { + elseif ($action == 'confirm_modif' && $user->rights->commande->creer) { $idwarehouse = GETPOST('idwarehouse'); $qualified_for_stock_change=0; @@ -1244,14 +1244,14 @@ if (empty($reshook)) } } - else if ($action == 'confirm_shipped' && $confirm == 'yes' && $user->rights->commande->cloturer) { + elseif ($action == 'confirm_shipped' && $confirm == 'yes' && $user->rights->commande->cloturer) { $result = $object->cloture($user); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } - else if ($action == 'confirm_cancel' && $confirm == 'yes' && + elseif ($action == 'confirm_cancel' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate))) ) @@ -1441,7 +1441,7 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut') + elseif ($action == 'swapstatut') { if ($object->id > 0) { $result = $object->swapContactStatus(GETPOST('ligne')); @@ -1451,7 +1451,7 @@ if (empty($reshook)) } // Efface un contact - else if ($action == 'deletecontact') + elseif ($action == 'deletecontact') { $result = $object->delete_contact($lineid); diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 1135a5c2502..7005f495481 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -565,7 +565,7 @@ class Orders extends DolibarrApi $result = $this->commande->set_reopen(DolibarrApiAccess::$user); if( $result < 0) { throw new RestException(405, $this->commande->error); - }else if( $result == 0) { + }elseif( $result == 0) { throw new RestException(304); } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8934e293973..1ec2f5d8ef8 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2533,7 +2533,7 @@ class Commande extends CommonOrder { $ga[$obj->cid] = $obj->ref; } - else if ($shortlist == 2) + elseif ($shortlist == 2) { $ga[$obj->cid] = $obj->ref.' ('.$obj->name.')'; } diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index b40a284e728..9c5c1c183b0 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -79,7 +79,7 @@ if ($action == 'addcontact' && $user->rights->commande->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->commande->creer) +elseif ($action == 'swapstatut' && $user->rights->commande->creer) { if ($object->fetch($id)) { @@ -92,7 +92,7 @@ else if ($action == 'swapstatut' && $user->rights->commande->creer) } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->commande->creer) +elseif ($action == 'deletecontact' && $user->rights->commande->creer) { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 4e33a8c0aae..b63136c8581 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -364,7 +364,7 @@ if ($action == 'create') { $selectedcode=$_POST["account_country_id"]?$_POST["account_country_id"]:$object->country_code; } - else if (empty($selectedcode)) $selectedcode=$mysoc->country_code; + elseif (empty($selectedcode)) $selectedcode=$mysoc->country_code; $object->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules print ''; @@ -610,7 +610,7 @@ else print ''; @@ -846,7 +846,7 @@ else $object->country_id=$object->country_id?$object->country_id:$mysoc->country_id; $selectedcode=$object->country_code; if (isset($_POST["account_country_id"])) $selectedcode=$_POST["account_country_id"]; - else if (empty($selectedcode)) $selectedcode=$mysoc->country_code; + elseif (empty($selectedcode)) $selectedcode=$mysoc->country_code; $object->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules print ''; @@ -872,7 +872,7 @@ else print ''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 80a0c6f819b..6d34c965871 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1358,7 +1358,7 @@ class Account extends CommonObject { $url = DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$this->id; } - else if ($mode == 'receipts') + elseif ($mode == 'receipts') { $url = DOL_URL_ROOT.'/compta/bank/releve.php?account='.$this->id; } @@ -1783,7 +1783,7 @@ class AccountLine extends CommonObject $sql.= " WHERE b.fk_account = ba.rowid"; $sql.= " AND ba.entity IN (".getEntity('bank_account').")"; if ($num) $sql.= " AND b.num_chq='".$this->db->escape($num)."'"; - else if ($ref) $sql.= " AND b.rowid='".$this->db->escape($ref)."'"; + elseif ($ref) $sql.= " AND b.rowid='".$this->db->escape($ref)."'"; else $sql.= " AND b.rowid=".$rowid; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index d98db0ea998..d359a5c814f 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -351,7 +351,7 @@ if ($result) print '';*/ print $paymenttmp->getNomUrl(1); } - else if ($links[$key]['type']=='payment_supplier') { + elseif ($links[$key]['type']=='payment_supplier') { require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; $paymenttmp=new PaiementFourn($db); $paymenttmp->fetch($links[$key]['url_id']); @@ -362,72 +362,72 @@ if ($result) print '';*/ print $paymenttmp->getNomUrl(1); } - else if ($links[$key]['type']=='company') { + elseif ($links[$key]['type']=='company') { $societe=new Societe($db); $societe->fetch($links[$key]['url_id']); print $societe->getNomUrl(1); } - else if ($links[$key]['type']=='sc') { + elseif ($links[$key]['type']=='sc') { print ''; print img_object($langs->trans('ShowSocialContribution'),'bill').' '; print $langs->trans("SocialContribution").($links[$key]['label']?' - '.$links[$key]['label']:''); print ''; } - else if ($links[$key]['type']=='payment_sc') { + elseif ($links[$key]['type']=='payment_sc') { print ''; print img_object($langs->trans('ShowPayment'),'payment').' '; print $langs->trans("SocialContributionPayment"); print ''; } - else if ($links[$key]['type']=='payment_vat') { + elseif ($links[$key]['type']=='payment_vat') { print ''; print img_object($langs->trans('ShowVAT'),'payment').' '; print $langs->trans("VATPayment"); print ''; } - else if ($links[$key]['type']=='payment_salary') { + elseif ($links[$key]['type']=='payment_salary') { print ''; print img_object($langs->trans('ShowPaymentSalary'),'payment').' '; print $langs->trans("SalaryPayment"); print ''; } - else if ($links[$key]['type']=='payment_loan') { + elseif ($links[$key]['type']=='payment_loan') { print ''; print img_object($langs->trans('ShowLoanPayment'),'payment').' '; print $langs->trans("PaymentLoan"); print ''; } - else if ($links[$key]['type']=='loan') { + elseif ($links[$key]['type']=='loan') { print ''; print img_object($langs->trans('ShowLoan'),'bill').' '; print $langs->trans("Loan"); print ''; } - else if ($links[$key]['type']=='member') { + elseif ($links[$key]['type']=='member') { print ''; print img_object($langs->trans('ShowMember'),'user').' '; print $links[$key]['label']; print ''; } - else if ($links[$key]['type']=='payment_donation') { + elseif ($links[$key]['type']=='payment_donation') { print ''; print img_object($langs->trans('ShowDonation'),'payment').' '; print $langs->trans("DonationPayment"); print ''; } - else if ($links[$key]['type']=='banktransfert') { + elseif ($links[$key]['type']=='banktransfert') { print ''; print img_object($langs->trans('ShowTransaction'),'payment').' '; print $langs->trans("TransactionOnTheOtherAccount"); print ''; } - else if ($links[$key]['type']=='user') { + elseif ($links[$key]['type']=='user') { print ''; print img_object($langs->trans('ShowUser'),'user').' '; print $langs->trans("User"); print ''; } - else if ($links[$key]['type']=='payment_various') { + elseif ($links[$key]['type']=='payment_various') { print ''; print img_object($langs->trans('ShowVariousPayment'),'payment').' '; print $langs->trans("VariousPayment"); diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 922df54c147..94f66f2552e 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -78,7 +78,7 @@ if ($action == 'validate' && $user->rights->deplacement->creer) } } -else if ($action == 'classifyrefunded' && $user->rights->deplacement->creer) +elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer) { $object->fetch($id); if ($object->statut == 1) @@ -96,7 +96,7 @@ else if ($action == 'classifyrefunded' && $user->rights->deplacement->creer) } } -else if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) +elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) { $result=$object->delete($id); if ($result >= 0) @@ -110,7 +110,7 @@ else if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->depl } } -else if ($action == 'add' && $user->rights->deplacement->creer) +elseif ($action == 'add' && $user->rights->deplacement->creer) { if (! GETPOST('cancel','alpha')) { @@ -169,7 +169,7 @@ else if ($action == 'add' && $user->rights->deplacement->creer) } // Update record -else if ($action == 'update' && $user->rights->deplacement->creer) +elseif ($action == 'update' && $user->rights->deplacement->creer) { if (! GETPOST('cancel','alpha')) { @@ -203,7 +203,7 @@ else if ($action == 'update' && $user->rights->deplacement->creer) } // Set into a project -else if ($action == 'classin' && $user->rights->deplacement->creer) +elseif ($action == 'classin' && $user->rights->deplacement->creer) { $object->fetch($id); $result=$object->setProject(GETPOST('projectid','int')); @@ -211,14 +211,14 @@ else if ($action == 'classin' && $user->rights->deplacement->creer) } // Set fields -else if ($action == 'setdated' && $user->rights->deplacement->creer) +elseif ($action == 'setdated' && $user->rights->deplacement->creer) { $dated=dol_mktime(GETPOST('datedhour','int'), GETPOST('datedmin','int'), GETPOST('datedsec','int'), GETPOST('datedmonth','int'), GETPOST('datedday','int'), GETPOST('datedyear','int')); $object->fetch($id); $result=$object->setValueFrom('dated', $dated, '', '', 'date', '', $user, 'DEPLACEMENT_MODIFY'); if ($result < 0) dol_print_error($db, $object->error); } -else if ($action == 'setkm' && $user->rights->deplacement->creer) +elseif ($action == 'setkm' && $user->rights->deplacement->creer) { $object->fetch($id); $result=$object->setValueFrom('km', GETPOST('km','int'), '', null, 'text', '', $user, 'DEPLACEMENT_MODIFY'); @@ -314,7 +314,7 @@ if ($action == 'create') print ''; } -else if ($id) +elseif ($id) { $result = $object->fetch($id); if ($result > 0) diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index ae93eb094d9..5baea1c866a 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -69,7 +69,7 @@ class DeplacementStats extends Stats $this->where.=" AND fk_soc = ".$this->socid; } if (is_array($this->userid) && count($this->userid) > 0) $this->where.=' AND fk_user IN ('.join(',',$this->userid).')'; - else if ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid; + elseif ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid; } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 1fd2906c26f..92d8cf629c7 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -178,7 +178,7 @@ if (empty($reshook)) } // Change status of invoice - else if ($action == 'reopen' && $usercancreate) { + elseif ($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); @@ -192,7 +192,7 @@ if (empty($reshook)) } // Delete invoice - else if ($action == 'confirm_delete' && $confirm == 'yes') { + elseif ($action == 'confirm_delete' && $confirm == 'yes') { $result = $object->fetch($id); $object->fetch_thirdparty(); @@ -222,7 +222,7 @@ if (empty($reshook)) } // Delete line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); $object->fetch_thirdparty(); @@ -256,7 +256,7 @@ if (empty($reshook)) } // Delete link of credit note to invoice - else if ($action == 'unlinkdiscount' && $usercancreate) + elseif ($action == 'unlinkdiscount' && $usercancreate) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("discountid")); @@ -264,7 +264,7 @@ if (empty($reshook)) } // Validation - else if ($action == 'valid' && $usercancreate) + elseif ($action == 'valid' && $usercancreate) { $object->fetch($id); @@ -284,7 +284,7 @@ if (empty($reshook)) } } - else if ($action == 'set_thirdparty' && $usercancreate) + elseif ($action == 'set_thirdparty' && $usercancreate) { $object->fetch($id); $object->setValueFrom('fk_soc', $socid, '', null, 'int', '', $user, 'BILL_MODIFY'); @@ -293,13 +293,13 @@ if (empty($reshook)) exit(); } - else if ($action == 'classin' && $usercancreate) + elseif ($action == 'classin' && $usercancreate) { $object->fetch($id); $object->setProject($_POST['projectid']); } - else if ($action == 'setmode' && $usercancreate) + elseif ($action == 'setmode' && $usercancreate) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); @@ -308,16 +308,16 @@ if (empty($reshook)) } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $usercancreate) { + elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $usercancreate) { + elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); } - else if ($action == 'setinvoicedate' && $usercancreate) + elseif ($action == 'setinvoicedate' && $usercancreate) { $object->fetch($id); $old_date_lim_reglement = $object->date_lim_reglement; @@ -336,7 +336,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setdate_pointoftax' && $usercancreate) + elseif ($action == 'setdate_pointoftax' && $usercancreate) { $object->fetch($id); $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']); @@ -345,7 +345,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setconditions' && $usercancreate) + elseif ($action == 'setconditions' && $usercancreate) { $object->fetch($id); $object->cond_reglement_code = 0; // To clean property @@ -361,7 +361,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setpaymentterm' && $usercancreate) + elseif ($action == 'setpaymentterm' && $usercancreate) { $object->fetch($id); $object->date_lim_reglement = dol_mktime(12, 0, 0, $_POST['paymenttermmonth'], $_POST['paymenttermday'], $_POST['paymenttermyear']); @@ -374,7 +374,7 @@ if (empty($reshook)) dol_print_error($db, $object->error); } - else if ($action == 'setrevenuestamp' && $usercancreate) + elseif ($action == 'setrevenuestamp' && $usercancreate) { $object->fetch($id); $object->revenuestamp = GETPOST('revenuestamp'); @@ -391,18 +391,18 @@ if (empty($reshook)) } // bank account - else if ($action == 'setbankaccount' && $usercancreate) + elseif ($action == 'setbankaccount' && $usercancreate) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); } - else if ($action == 'setremisepercent' && $usercancreate) + elseif ($action == 'setremisepercent' && $usercancreate) { $object->fetch($id); $result = $object->set_remise($user, $_POST['remise_percent']); } - else if ($action == "setabsolutediscount" && $usercancreate) + elseif ($action == "setabsolutediscount" && $usercancreate) { // POST[remise_id] or POST[remise_id_for_payment] @@ -460,14 +460,14 @@ if (empty($reshook)) } } - else if ($action == 'setref_client' && $usercancreate) + elseif ($action == 'setref_client' && $usercancreate) { $object->fetch($id); $object->set_ref_client(GETPOST('ref_client')); } // Classify to validated - else if ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) + elseif ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { $idwarehouse = GETPOST('idwarehouse','int'); @@ -567,7 +567,7 @@ if (empty($reshook)) } // Go back to draft status (unvalidate) - else if ($action == 'confirm_modif' && $usercanunvalidate) + elseif ($action == 'confirm_modif' && $usercanunvalidate) { $idwarehouse = GETPOST('idwarehouse','int'); @@ -647,13 +647,13 @@ if (empty($reshook)) } // Classify "paid" - else if ($action == 'confirm_paid' && $confirm == 'yes' && $usercanissuepayment) + elseif ($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' && $usercanissuepayment) + elseif ($action == 'confirm_paid_partially' && $confirm == 'yes' && $usercanissuepayment) { $object->fetch($id); $close_code = GETPOST("close_code",'none'); @@ -665,7 +665,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); } } // Classify "abandoned" - else if ($action == 'confirm_canceled' && $confirm == 'yes') { + elseif ($action == 'confirm_canceled' && $confirm == 'yes') { $object->fetch($id); $close_code = GETPOST("close_code",'none'); $close_note = GETPOST("close_note",'none'); @@ -678,7 +678,7 @@ if (empty($reshook)) } // Convertir en reduc - else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $usercancreate) + elseif ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); $object->fetch_thirdparty(); @@ -824,7 +824,7 @@ if (empty($reshook)) /* * Insert new invoice in database */ - else if ($action == 'add' && $usercancreate) + elseif ($action == 'add' && $usercancreate) { if ($socid > 0) $object->socid = GETPOST('socid', 'int'); @@ -1648,7 +1648,7 @@ if (empty($reshook)) } // Add a new line - else if ($action == 'addline' && $usercancreate) + elseif ($action == 'addline' && $usercancreate) { $langs->load('errors'); $error = 0; @@ -2172,7 +2172,7 @@ if (empty($reshook)) } } - else if ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier')) + elseif ($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') != "") @@ -2189,7 +2189,7 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $usercancreate && $_POST['cancel'] == $langs->trans('Cancel')) { + elseif ($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(); } @@ -3283,7 +3283,7 @@ if ($action == 'create') print '
'; } -else if ($id > 0 || ! empty($ref)) +elseif ($id > 0 || ! empty($ref)) { /* * Show object in view mode @@ -4540,7 +4540,7 @@ else if ($id > 0 || ! empty($ref)) } else { print '
' . $langs->trans('Modify') . '
'; } - } else if (!$object->is_last_in_cycle()) { + } elseif (!$object->is_last_in_cycle()) { print '
' . $langs->trans('Modify') . '
'; } else { print '
' . $langs->trans('Modify') . '
'; @@ -4758,7 +4758,7 @@ else if ($id > 0 || ! empty($ref)) 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()) { + } elseif (!$object->is_last_in_cycle()) { print ''; } else { print ''; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 5090132632e..bc0e4289289 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1398,7 +1398,7 @@ class FactureRec extends CommonInvoice $line->total_ttc=-119.6; $line->total_tva=-19.6; } - else if ($xnbp == 2) // UP is negative (free line) + elseif ($xnbp == 2) // UP is negative (free line) { $line->subprice=-100; $line->total_ht=-100; @@ -1406,7 +1406,7 @@ class FactureRec extends CommonInvoice $line->total_tva=-19.6; $line->remise_percent=0; } - else if ($xnbp == 3) // Discount is 50% (product line) + elseif ($xnbp == 3) // Discount is 50% (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3e4335774c9..dd90b466d30 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2313,7 +2313,7 @@ class Facture extends CommonInvoice { $num = $force_number; } - else if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life + elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life { if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) // If option enabled, we force invoice date { @@ -3337,8 +3337,8 @@ class Facture extends CommonInvoice // Clean parameters (if not defined or using deprecated value) if (empty($conf->global->FACTURE_ADDON)) $conf->global->FACTURE_ADDON='mod_facture_terre'; - else if ($conf->global->FACTURE_ADDON=='terre') $conf->global->FACTURE_ADDON='mod_facture_terre'; - else if ($conf->global->FACTURE_ADDON=='mercure') $conf->global->FACTURE_ADDON='mod_facture_mercure'; + elseif ($conf->global->FACTURE_ADDON=='terre') $conf->global->FACTURE_ADDON='mod_facture_terre'; + elseif ($conf->global->FACTURE_ADDON=='mercure') $conf->global->FACTURE_ADDON='mod_facture_mercure'; if (! empty($conf->global->FACTURE_ADDON)) { @@ -3511,7 +3511,7 @@ class Facture extends CommonInvoice { $ga[$obj->fid] = $obj->ref; } - else if ($shortlist == 2) + elseif ($shortlist == 2) { $ga[$obj->fid] = $obj->ref.' ('.$obj->name.')'; } @@ -3971,7 +3971,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc=-239.2; $line->multicurrency_total_tva=-39.2; } - else if ($xnbp == 2) // UP is negative (free line) + elseif ($xnbp == 2) // UP is negative (free line) { $line->subprice=-100; $line->total_ht=-100; @@ -3982,7 +3982,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc=-239.2; $line->multicurrency_total_tva=-39.2; } - else if ($xnbp == 3) // Discount is 50% (product line) + elseif ($xnbp == 3) // Discount is 50% (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 80277e14741..4e0c52589de 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -85,7 +85,7 @@ if ($action == 'addcontact' && $user->rights->facture->creer) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->facture->creer) +elseif ($action == 'swapstatut' && $user->rights->facture->creer) { if ($object->fetch($id)) { @@ -98,7 +98,7 @@ else if ($action == 'swapstatut' && $user->rights->facture->creer) } // Deletes a contact -else if ($action == 'deletecontact' && $user->rights->facture->creer) +elseif ($action == 'deletecontact' && $user->rights->facture->creer) { $object->fetch($id); $result = $object->delete_contact($lineid); diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index c048737b156..7cc63b10e72 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -405,7 +405,7 @@ if (empty($reshook)) setEventMessages($line->error, $line->errors, 'errors'); } } - else if ($action == 'update_extras') + elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); @@ -1145,7 +1145,7 @@ if ($action == 'create') $title = $langs->trans("ProductsAndServices"); if (empty($conf->service->enabled)) $title = $langs->trans("Products"); - else if (empty($conf->product->enabled)) + elseif (empty($conf->product->enabled)) $title = $langs->trans("Services"); print load_fiche_titre($title, '', ''); diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index be372e8a570..1b70c50c8f4 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -247,12 +247,12 @@ if ($search_month > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND f.date_last_gen BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND f.date_last_gen BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(f.date_last_gen, '%m') = '".$db->escape($search_month)."'"; } -else if ($search_year > 0) +elseif ($search_year > 0) { $sql.= " AND f.date_last_gen BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } @@ -260,12 +260,12 @@ if ($search_month_date_when > 0) { if ($search_year_date_when > 0 && empty($search_day_date_when)) $sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($search_year_date_when,$search_month_date_when,false))."' AND '".$db->idate(dol_get_last_day($search_year_date_when,$search_month_date_when,false))."'"; - else if ($search_year_date_when > 0 && ! empty($search_day_date_when)) + elseif ($search_year_date_when > 0 && ! empty($search_day_date_when)) $sql.= " AND f.date_date_when_reglement BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month_date_when, $search_day_date_when, $search_year_date_when))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month_date_when, $search_day_date_when, $search_year_date_when))."'"; else $sql.= " AND date_format(f.date_when, '%m') = '".$db->escape($search_month_date_when)."'"; } -else if ($search_year_date_when > 0) +elseif ($search_year_date_when > 0) { $sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($search_year_date_when,1,false))."' AND '".$db->idate(dol_get_last_day($search_year_date_when,12,false))."'"; } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7a06e6f66df..c3aeb8f6608 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -273,7 +273,7 @@ if ($massaction == 'withdrawrequest') if($objecttmp->paye || $objecttmp->resteapayer==0){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("AlreadyPaid"), $objecttmp->errors, 'errors'); - } else if($objecttmp->resteapayer<0){ + } elseif($objecttmp->resteapayer<0){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("AmountMustBePositive"), $objecttmp->errors, 'errors'); } @@ -303,7 +303,7 @@ if ($massaction == 'withdrawrequest') $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); } - else if (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){ + elseif (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); } diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 574c7103c61..924c6bf3a09 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -58,8 +58,8 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } else @@ -229,7 +229,7 @@ if($calc ==0 || $calc == 2) $langs->load("errors"); if ($coll_list == -1) print '
'; - else if ($coll_list == -2) + elseif ($coll_list == -2) print ''; else print ''; @@ -305,7 +305,7 @@ if($calc ==0 || $calc == 1){ $langs->load("errors"); if ($coll_list == -1) print ''; - else if ($coll_list == -2) + elseif ($coll_list == -2) print ''; else print ''; diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 73a9f77341a..6875083901b 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -68,8 +68,8 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } else diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index c19d51b5891..e186dfce4cd 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -270,7 +270,7 @@ if ($action == 'builddoc' && $user->rights->banque->cheque) } // Remove file in doc form -else if ($action == 'remove_file' && $user->rights->banque->cheque) +elseif ($action == 'remove_file' && $user->rights->banque->cheque) { if ($object->fetch($id) > 0) { diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 28973d3c4e2..b69b1788eda 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -423,8 +423,8 @@ class RemiseCheque extends CommonObject // Clean parameters (if not defined or using deprecated value) if (empty($conf->global->CHEQUERECEIPTS_ADDON)) $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_mint'; - else if ($conf->global->CHEQUERECEIPTS_ADDON=='thyme') $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_thyme'; - else if ($conf->global->CHEQUERECEIPTS_ADDON=='mint') $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_mint'; + elseif ($conf->global->CHEQUERECEIPTS_ADDON=='thyme') $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_thyme'; + elseif ($conf->global->CHEQUERECEIPTS_ADDON=='mint') $conf->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_mint'; if (! empty($conf->global->CHEQUERECEIPTS_ADDON)) { diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index d9ac1ab11eb..d84b26f78b2 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -100,12 +100,12 @@ if ($month > 0) { if ($year > 0 && empty($day)) $sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; - else if ($year > 0 && ! empty($day)) + elseif ($year > 0 && ! empty($day)) $sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; else $sql.= " AND date_format(bc.date_bordereau, '%m') = '".$month."'"; } -else if ($year > 0) +elseif ($year > 0) { $sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index c4cb529d895..657a29cebbe 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -168,9 +168,9 @@ class Paiement extends CommonObject $sql.= ' WHERE p.entity IN (' . getEntity('invoice').')'; if ($id > 0) $sql.= ' AND p.rowid = '.$id; - else if ($ref) + elseif ($ref) $sql.= " AND p.ref = '".$ref."'"; - else if ($fk_bank) + elseif ($fk_bank) $sql.= ' AND p.fk_bank = '.$fk_bank; $resql = $this->db->query($sql); @@ -357,7 +357,7 @@ class Paiement extends CommonObject ); if (!in_array($invoice->type, $affected_types)) dol_syslog("Invoice ".$facid." is not a standard, nor replacement invoice, nor credit note, nor deposit invoice, nor situation invoice. We do nothing more."); - else if ($remaintopay) dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); + elseif ($remaintopay) dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); //else if ($mustwait) dol_syslog("There is ".$mustwait." differed payment to process, we do nothing more."); else { @@ -1034,8 +1034,8 @@ class Paiement extends CommonObject // Clean parameters (if not defined or using deprecated value) if (empty($conf->global->PAYMENT_ADDON)) $conf->global->PAYMENT_ADDON='mod_payment_cicada'; - else if ($conf->global->PAYMENT_ADDON=='ant') $conf->global->PAYMENT_ADDON='mod_payment_ant'; - else if ($conf->global->PAYMENT_ADDON=='cicada') $conf->global->PAYMENT_ADDON='mod_payment_cicada'; + elseif ($conf->global->PAYMENT_ADDON=='ant') $conf->global->PAYMENT_ADDON='mod_payment_ant'; + elseif ($conf->global->PAYMENT_ADDON=='cicada') $conf->global->PAYMENT_ADDON='mod_payment_cicada'; if (! empty($conf->global->PAYMENT_ADDON)) { diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 3a3ba57cb18..38888110d79 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -134,7 +134,7 @@ if ($modecompta == 'CREANCES-DETTES') $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="RECETTES-DEPENSES") { +elseif ($modecompta=="RECETTES-DEPENSES") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; @@ -146,7 +146,7 @@ else if ($modecompta=="RECETTES-DEPENSES") { $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear"); $calcmode=$langs->trans("CalcModeBookkeeping"); @@ -191,7 +191,7 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo if (! empty($date_start) && ! empty($date_end)) $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -232,7 +232,7 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo dol_print_error($db); } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -278,12 +278,12 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo dol_print_error($db); } } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { // Nothing from this table } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -307,7 +307,7 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo if (! empty($date_start) && ! empty($date_end)) $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { $sql = "SELECT sum(pf.amount) as amount_ttc, date_format(p.datep,'%Y-%m') as dm"; $sql.= " FROM ".MAIN_DB_PREFIX."paiementfourn as p"; @@ -347,7 +347,7 @@ if (! empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo dol_print_error($db); } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -429,7 +429,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco dol_print_error($db); } } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { // TVA reellement deja payee $sql = "SELECT sum(t.amount) as amount, date_format(t.datev,'%Y-%m') as dm"; @@ -493,7 +493,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco } } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -516,7 +516,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco if (! empty($date_start) && ! empty($date_end)) $sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { $sql = "SELECT c.libelle as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -554,7 +554,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco dol_print_error($db); } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } @@ -578,7 +578,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco if (! empty($date_start) && ! empty($date_end)) $sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; } - else if ($modecompta=="RECETTES-DEPENSES") + elseif ($modecompta=="RECETTES-DEPENSES") { $sql = "SELECT c.libelle as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -616,7 +616,7 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco dol_print_error($db); } } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Nothing from this table } diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php index 82a8d094148..eaf5ff362ae 100644 --- a/htdocs/compta/salaries/class/salariesstats.class.php +++ b/htdocs/compta/salaries/class/salariesstats.class.php @@ -67,7 +67,7 @@ class SalariesStats extends Stats $this->where.=" AND fk_soc = ".$this->socid; } if (is_array($this->userid) && count($this->userid) > 0) $this->where.=' AND fk_user IN ('.join(',',$this->userid).')'; - else if ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid; + elseif ($this->userid > 0) $this->where.=' AND fk_user = '.$this->userid; } diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index df199d2e23e..4e1e429f0e5 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -210,7 +210,7 @@ if ($modecompta=="CREANCES-DETTES") { $builddate=dol_now(); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected").', '.$langs->trans("ByVatRate"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -221,12 +221,12 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { } -else if ($modecompta=="BOOKKEEPINGCOLLECTED") +elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 701fe86f10e..388ae43eb1e 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -178,7 +178,7 @@ if ($modecompta=="CREANCES-DETTES") { $builddate=dol_now(); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected").', '.$langs->trans("ByProductsAndServices"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -189,12 +189,12 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { } -else if ($modecompta=="BOOKKEEPINGCOLLECTED") +elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { @@ -231,7 +231,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; } - else if ($selected_cat) // Into a specific category + elseif ($selected_cat) // Into a specific category { $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } @@ -253,7 +253,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sql.=" AND cp.fk_product is null"; } - else if ($selected_cat) { // Into a specific category + elseif ($selected_cat) { // Into a specific category $sql.= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat; $sql.= ")"; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index ba9556dd2ac..397538d2ac1 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -158,7 +158,7 @@ if ($modecompta=="CREANCES-DETTES") { $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -168,12 +168,12 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { } -else if ($modecompta=="BOOKKEEPINGCOLLECTED") +elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index eec3bbcfbac..727f65a8b68 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -184,7 +184,7 @@ if ($modecompta=="CREANCES-DETTES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -194,12 +194,12 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { } -else if ($modecompta=="BOOKKEEPINGCOLLECTED") +elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { @@ -228,7 +228,7 @@ if ($modecompta == 'CREANCES-DETTES') { { $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; } - else if ($selected_cat) // Into a specific category + elseif ($selected_cat) // Into a specific category { $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -246,7 +246,7 @@ if ($modecompta == 'CREANCES-DETTES') { { $sql.=" AND cs.fk_soc is null"; } - else if ($selected_cat) { // Into a specific category + elseif ($selected_cat) { // Into a specific category $sql.= " AND (c.rowid = ".$db->escape($selected_cat); if ($subcat) $sql.=" OR c.fk_parent = " . $db->escape($selected_cat); $sql.= ")"; @@ -266,7 +266,7 @@ if ($modecompta == 'CREANCES-DETTES') { { $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; } - else if ($selected_cat) // Into a specific category + elseif ($selected_cat) // Into a specific category { $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -280,7 +280,7 @@ if ($modecompta == 'CREANCES-DETTES') { { $sql.=" AND cs.fk_soc is null"; } - else if ($selected_cat) { // Into a specific category + elseif ($selected_cat) { // Into a specific category $sql.= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat; $sql.= ")"; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 79ff8ff5df5..b700905183c 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -128,7 +128,7 @@ if ($modecompta=="CREANCES-DETTES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("TurnoverCollected"); $calcmode=$langs->trans("CalcModeEngagement"); @@ -141,7 +141,7 @@ else if ($modecompta=="RECETTES-DEPENSES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { $name=$langs->trans("Turnover"); $calcmode=$langs->trans("CalcModeBookkeeping"); @@ -174,7 +174,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql.= " AND f.entity IN (".getEntity('invoice').")"; if ($socid) $sql.= " AND f.fk_soc = ".$socid; } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -189,7 +189,7 @@ else if ($modecompta=="RECETTES-DEPENSES") $sql.= " AND f.entity IN (".getEntity('invoice').")"; if ($socid) $sql.= " AND f.fk_soc = ".$socid; } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { $sql = "SELECT date_format(b.doc_date,'%Y-%m') as dm, sum(b.credit) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_journal as aj"; diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 45b93692e3a..172b66c170c 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -66,8 +66,8 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } else @@ -217,7 +217,7 @@ if (! is_array($x_coll) || ! is_array($x_paye)) $langs->load("errors"); if ($x_coll == -1) { print '
'; - } else if ($x_coll == -2) { + } elseif ($x_coll == -2) { print ''; } else { print ''; diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index f0bb433c65c..0d3b7ec135d 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -115,7 +115,7 @@ if ($month > 0) else $sql.= " AND date_format(t.datev, '%m') = '$month'"; } -else if ($year > 0) +elseif ($year > 0) { $sql.= " AND t.datev BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index a8e22815ea4..b98b3791c8b 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -66,8 +66,8 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $date_start=dol_get_first_day($year_start,empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START,false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end=dol_time_plus_duree($date_start, 3, 'm') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; - else if ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end=dol_time_plus_duree($date_start, 1, 'y') - 1; + elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end=dol_time_plus_duree($date_start, 1, 'm') - 1; } } else @@ -209,7 +209,7 @@ if (! is_array($x_coll) || ! is_array($x_paye)) $langs->load("errors"); if ($x_coll == -1) { print ''; - } else if ($x_coll == -2) { + } elseif ($x_coll == -2) { print ''; } else { print ''; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index a5297750386..b8e82e78632 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -344,7 +344,7 @@ class Contact extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET "; if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',"; - else if ($this->socid == -1) $sql .= " fk_soc=null,"; + elseif ($this->socid == -1) $sql .= " fk_soc=null,"; $sql .= " civility='".$this->db->escape($this->civility_id)."'"; $sql .= ", lastname='".$this->db->escape($this->lastname)."'"; $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; @@ -874,7 +874,7 @@ class Contact extends CommonObject unset($this->gender); if (in_array($this->civility_id, array('MR'))) { $this->gender = 'man'; - } else if(in_array($this->civility_id, array('MME','MLE'))) { + } elseif(in_array($this->civility_id, array('MME','MLE'))) { $this->gender = 'woman'; } } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index af15d873acb..087db5ddea6 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -113,13 +113,13 @@ if ($type == "c") $titre.=' ('.$langs->trans("ThirdPartyCustomers").')'; $urlfiche="card.php"; } -else if ($type == "f") +elseif ($type == "f") { if (empty($contextpage) || $contextpage == 'contactlist') $contextpage='contactsupplierlist'; $titre.=' ('.$langs->trans("ThirdPartySuppliers").')'; $urlfiche="card.php"; } -else if ($type == "o") +elseif ($type == "o") { if (empty($contextpage) || $contextpage == 'contactlist') $contextpage='contactotherlist'; $titre.=' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; @@ -330,15 +330,15 @@ if ($type == "o") // filtre sur type { $sql .= " AND p.fk_soc IS NULL"; } -else if ($type == "f") // filtre sur type +elseif ($type == "f") // filtre sur type { $sql .= " AND s.fournisseur = 1"; } -else if ($type == "c") // filtre sur type +elseif ($type == "c") // filtre sur type { $sql .= " AND s.client IN (1, 3)"; } -else if ($type == "p") // filtre sur type +elseif ($type == "p") // filtre sur type { $sql .= " AND s.client IN (2, 3)"; } @@ -487,7 +487,7 @@ if (! empty($conf->categorie->enabled)) { $moreforfilter.='
'; if ($type == 'c') $moreforfilter.=$langs->trans('CustomersCategoriesShort'). ': '; - else if ($type == 'p') $moreforfilter.=$langs->trans('ProspectsCategoriesShort'). ': '; + elseif ($type == 'p') $moreforfilter.=$langs->trans('ProspectsCategoriesShort'). ': '; else $moreforfilter.=$langs->trans('CustomersProspectsCategoriesShort'). ': '; $moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ_thirdparty,'search_categ_thirdparty',1); $moreforfilter.='
'; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 8e74c33cd14..da5a8d4eaa8 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -293,7 +293,7 @@ else $ageyear=convertSecondToTime($now-$object->birthday,'year')-1970; $agemonth=convertSecondToTime($now-$object->birthday,'month')-1; if ($ageyear >= 2) print '('.$ageyear.' '.$langs->trans("DurationYears").')'; - else if ($agemonth >= 2) print '('.$agemonth.' '.$langs->trans("DurationMonths").')'; + elseif ($agemonth >= 2) print '('.$agemonth.' '.$langs->trans("DurationMonths").')'; else print '('.$agemonth.' '.$langs->trans("DurationMonth").')'; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 844cd4321a4..d0e928ff7cd 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -119,7 +119,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) + elseif ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) { if (! GETPOST('dateend')) { @@ -408,13 +408,13 @@ if (empty($reshook)) } } - else if ($action == 'classin' && $user->rights->contrat->creer) + elseif ($action == 'classin' && $user->rights->contrat->creer) { $object->setProject(GETPOST('projectid')); } // Add a new line - else if ($action == 'addline' && $user->rights->contrat->creer) + elseif ($action == 'addline' && $user->rights->contrat->creer) { // Set if we used free entry or predefined product $predef=''; @@ -653,7 +653,7 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel','alpha')) + elseif ($action == 'updateline' && $user->rights->contrat->creer && ! GETPOST('cancel','alpha')) { $error = 0; @@ -761,7 +761,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->deleteline(GETPOST('lineid'),$user); @@ -776,7 +776,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->validate($user); @@ -805,7 +805,7 @@ if (empty($reshook)) } } - else if ($action == 'reopen' && $user->rights->contrat->creer) + elseif ($action == 'reopen' && $user->rights->contrat->creer) { $result = $object->reopen($user); if ($result < 0) @@ -815,7 +815,7 @@ if (empty($reshook)) } // Close all lines - else if ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->closeAll($user); if ($result < 0) @@ -825,7 +825,7 @@ if (empty($reshook)) } // Close all lines - else if ($action == 'confirm_activate' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->activateAll($user); if ($result < 0) @@ -834,7 +834,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) { $result=$object->delete($user); if ($result >= 0) @@ -848,7 +848,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) + elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) { if (GETPOST('newcid') > 0) { @@ -871,7 +871,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefNewContract")), null, 'errors'); } } - else if ($action == 'update_extras') + elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); @@ -1042,13 +1042,13 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut') + elseif ($action == 'swapstatut') { $result=$object->swapContactStatus(GETPOST('ligne')); } // Efface un contact - else if ($action == 'deletecontact') + elseif ($action == 'deletecontact') { $result = $object->delete_contact(GETPOST('lineid')); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 5929ec034d1..635d7c5851e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -445,7 +445,7 @@ class Contrat extends CommonObject { $num = $force_number; } - else if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life + elseif (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($this->thirdparty); } diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index c1d21426f83..3272d7ed908 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -241,12 +241,12 @@ if ($month > 0) { if ($year > 0 && empty($day)) $sql.= " AND c.date_contrat BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; - else if ($year > 0 && ! empty($day)) + elseif ($year > 0 && ! empty($day)) $sql.= " AND c.date_contrat BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; else $sql.= " AND date_format(c.date_contrat, '%m') = '".$month."'"; } -else if ($year > 0) +elseif ($year > 0) { $sql.= " AND c.date_contrat BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } @@ -711,7 +711,7 @@ while ($i < min($num,$limit)) print $nbofsalesrepresentative; print ''; } - else if ($nbofsalesrepresentative > 0) + elseif ($nbofsalesrepresentative > 0) { $userstatic=new User($db); $j=0; diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 9d33def496c..d585ace7cd2 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -60,7 +60,7 @@ if ($action == 'builddoc' && $permissioncreate) //{ if (GETPOST('fk_bank','int')) { // this field may come from an external module $object->fk_bank = GETPOST('fk_bank','int'); - } else if (! empty($object->fk_account)) { + } elseif (! empty($object->fk_account)) { $object->fk_bank = $object->fk_account; } //} diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 183585d986b..655c3e62efd 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -121,17 +121,17 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $thirdparty=$object->thirdparty; $sendtosocid=$thirdparty->id; } - else if ($object->element == 'member' || $object->element == 'user') + elseif ($object->element == 'member' || $object->element == 'user') { $thirdparty=$object; if ($thirdparty->id > 0) $sendtosocid=$thirdparty->id; } - else if ($object->element == 'societe') + elseif ($object->element == 'societe') { $thirdparty=$object; if ($thirdparty->id > 0) $sendtosocid=$thirdparty->id; } - else if ($object->element == 'contact') + elseif ($object->element == 'contact') { $contact=$object; if ($contact->id > 0) $sendtosocid=$contact->fetch_thirdparty()->id; diff --git a/htdocs/core/actions_setnotes.inc.php b/htdocs/core/actions_setnotes.inc.php index ec253d5ef4a..511adbf9e3e 100644 --- a/htdocs/core/actions_setnotes.inc.php +++ b/htdocs/core/actions_setnotes.inc.php @@ -61,7 +61,7 @@ if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel } } // Set public note -else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel','alpha')) +elseif ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel','alpha')) { if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before'); if (empty($object->id)) $object->fetch($id); // Fetch may not be already done diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index bfbf35b019c..4164b2e41de 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -185,33 +185,33 @@ if ($type == 'directory') // Auto area for suppliers invoices if ($module == 'company') $upload_dir = $conf->societe->dir_output; // Auto area for suppliers invoices - else if ($module == 'invoice') $upload_dir = $conf->facture->dir_output; + elseif ($module == 'invoice') $upload_dir = $conf->facture->dir_output; // Auto area for suppliers invoices - else if ($module == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output; + elseif ($module == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output; // Auto area for customers proposal - else if ($module == 'propal') $upload_dir = $conf->propal->dir_output; + elseif ($module == 'propal') $upload_dir = $conf->propal->dir_output; // Auto area for suppliers proposal - else if ($module == 'supplier_proposal') $upload_dir = $conf->supplier_proposal->dir_output; + elseif ($module == 'supplier_proposal') $upload_dir = $conf->supplier_proposal->dir_output; // Auto area for customers orders - else if ($module == 'order') $upload_dir = $conf->commande->dir_output; + elseif ($module == 'order') $upload_dir = $conf->commande->dir_output; // Auto area for suppliers orders - else if ($module == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output; + elseif ($module == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output; // Auto area for suppliers invoices - else if ($module == 'contract') $upload_dir = $conf->contrat->dir_output; + elseif ($module == 'contract') $upload_dir = $conf->contrat->dir_output; // Auto area for products - else if ($module == 'product') $upload_dir = $conf->product->dir_output; + elseif ($module == 'product') $upload_dir = $conf->product->dir_output; // Auto area for suppliers invoices - else if ($module == 'tax') $upload_dir = $conf->tax->dir_output; + elseif ($module == 'tax') $upload_dir = $conf->tax->dir_output; // Auto area for projects - else if ($module == 'project') $upload_dir = $conf->projet->dir_output; + elseif ($module == 'project') $upload_dir = $conf->projet->dir_output; // Auto area for interventions - else if ($module == 'fichinter') $upload_dir = $conf->ficheinter->dir_output; + elseif ($module == 'fichinter') $upload_dir = $conf->ficheinter->dir_output; // Auto area for users - else if ($module == 'user') $upload_dir = $conf->user->dir_output; + elseif ($module == 'user') $upload_dir = $conf->user->dir_output; // Auto area for expense report - else if ($module == 'expensereport') $upload_dir = $conf->expensereport->dir_output; + elseif ($module == 'expensereport') $upload_dir = $conf->expensereport->dir_output; // Auto area for holiday - else if ($module == 'holiday') $upload_dir = $conf->holiday->dir_output; + elseif ($module == 'holiday') $upload_dir = $conf->holiday->dir_output; // Automatic list if (in_array($module, $automodules)) @@ -280,7 +280,7 @@ if ($type == 'directory') $textifempty = $langs->trans('NoFileFound'); } - else if ($section === '0') + elseif ($section === '0') { if ($module == 'ecm') $textifempty='
'.$langs->trans("DirNotSynchronizedSyncFirst").'

'; else $textifempty = $langs->trans('NoFileFound'); diff --git a/htdocs/core/ajax/constantonoff.php b/htdocs/core/ajax/constantonoff.php index 0f733f4df5c..4977b526cc2 100644 --- a/htdocs/core/ajax/constantonoff.php +++ b/htdocs/core/ajax/constantonoff.php @@ -58,7 +58,7 @@ if (! empty($action) && ! empty($name)) { dolibarr_set_const($db, $name, $value, 'chaine', 0, '', $entity); } - else if ($action == 'del') + elseif ($action == 'del') { dolibarr_del_const($db, $name, $entity); } diff --git a/htdocs/core/ajax/extraparams.php b/htdocs/core/ajax/extraparams.php index e5972d29d70..5d06bb338ef 100644 --- a/htdocs/core/ajax/extraparams.php +++ b/htdocs/core/ajax/extraparams.php @@ -52,18 +52,18 @@ if(! empty($id) && ! empty($element) && ! empty($htmlelement) && ! empty($type)) // For compatibility if ($element == 'order' || $element == 'commande') { $classpath = $subelement = 'commande'; } - else if ($element == 'propal') { $classpath = 'comm/propal'; $subelement = 'propal'; } - else if ($element == 'facture') { $classpath = 'compta/facture'; $subelement = 'facture'; } - else if ($element == 'contract') { $classpath = $subelement = 'contrat'; } - else if ($element == 'shipping') { $classpath = $subelement = 'expedition'; } - else if ($element == 'deplacement') { $classpath = 'compta/deplacement'; $subelement = 'deplacement'; } - else if ($element == 'order_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.commande'; } - else if ($element == 'invoice_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.facture'; } + elseif ($element == 'propal') { $classpath = 'comm/propal'; $subelement = 'propal'; } + elseif ($element == 'facture') { $classpath = 'compta/facture'; $subelement = 'facture'; } + elseif ($element == 'contract') { $classpath = $subelement = 'contrat'; } + elseif ($element == 'shipping') { $classpath = $subelement = 'expedition'; } + elseif ($element == 'deplacement') { $classpath = 'compta/deplacement'; $subelement = 'deplacement'; } + elseif ($element == 'order_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.commande'; } + elseif ($element == 'invoice_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.facture'; } dol_include_once('/'.$classpath.'/class/'.$subelement.'.class.php'); if ($element == 'order_supplier') { $classname = 'CommandeFournisseur'; } - else if ($element == 'invoice_supplier') { $classname = 'FactureFournisseur'; } + elseif ($element == 'invoice_supplier') { $classname = 'FactureFournisseur'; } else $classname = ucfirst($subelement); $object = new $classname($db); diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index abf3efba7db..918d1920759 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -56,14 +56,14 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ } if ($element == 'propal') $element = 'propale'; - else if ($element == 'fichinter') $element = 'ficheinter'; - else if ($element == 'product') $element = 'produit'; - else if ($element == 'member') $element = 'adherent'; - else if ($element == 'order_supplier') { + elseif ($element == 'fichinter') $element = 'ficheinter'; + elseif ($element == 'product') $element = 'produit'; + elseif ($element == 'member') $element = 'adherent'; + elseif ($element == 'order_supplier') { $element = 'fournisseur'; $subelement = 'commande'; } - else if ($element == 'invoice_supplier') { + elseif ($element == 'invoice_supplier') { $element = 'fournisseur'; $subelement = 'facture'; } @@ -84,7 +84,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ $ret = $form->$methodname(); if ($ret > 0) echo json_encode($form->$cachename); } - else if (! empty($ext_element)) + elseif (! empty($ext_element)) { $module = $subelement = $ext_element; if (preg_match('/^([^_]+)_([^_]+)/i',$ext_element,$regs)) diff --git a/htdocs/core/ajax/price.php b/htdocs/core/ajax/price.php index 3eab18216d1..3b5585837d6 100644 --- a/htdocs/core/ajax/price.php +++ b/htdocs/core/ajax/price.php @@ -53,7 +53,7 @@ if (! empty($output) && isset($amount) && isset($tva_tx)) $return['price_ht'] = $amount; $return['price_ttc'] = (isset($price) && $price != '' ? price($price) : ''); } - else if ($output == 'price_ht') { + elseif ($output == 'price_ht') { $price = price2num($amount / (1 + ($tva_tx/100)), 'MU'); $return['price_ht'] = (isset($price) && $price != '' ? price($price) : ''); diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index 188dcbb29da..8715997d778 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -79,14 +79,14 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ } if ($element == 'propal') $newelement = 'propale'; - else if ($element == 'fichinter') $newelement = 'ficheinter'; - else if ($element == 'product') $newelement = 'produit'; - else if ($element == 'member') $newelement = 'adherent'; - else if ($element == 'order_supplier') { + elseif ($element == 'fichinter') $newelement = 'ficheinter'; + elseif ($element == 'product') $newelement = 'produit'; + elseif ($element == 'member') $newelement = 'adherent'; + elseif ($element == 'order_supplier') { $newelement = 'fournisseur'; $subelement = 'commande'; } - else if ($element == 'invoice_supplier') { + elseif ($element == 'invoice_supplier') { $newelement = 'fournisseur'; $subelement = 'facture'; } @@ -131,13 +131,13 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ $return['error'] = $langs->trans('ErrorBadValue'); } } - else if ($type == 'datepicker') + elseif ($type == 'datepicker') { $timestamp = GETPOST('timestamp','int',2); $format = 'date'; $newvalue = ($timestamp / 1000); } - else if ($type == 'select') + elseif ($type == 'select') { $loadmethodname = 'load_cache_'.$loadmethod; $loadcachename = 'cache_'.$loadmethod; @@ -211,7 +211,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ if ($ret > 0) { if ($type == 'numeric') $value = price($newvalue); - else if ($type == 'textarea') $value = dol_nl2br($newvalue); + elseif ($type == 'textarea') $value = dol_nl2br($newvalue); $return['value'] = $value; $return['view'] = (! empty($view) ? $view : $value); diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 9dc4c162e0f..5eff8a7405d 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -368,17 +368,17 @@ class box_graph_product_distribution extends ModeleBoxes if ($nbofgraph == 1) { if ($showinvoicenb) $stringtoshow.=$px1->show(); - else if ($showpropalnb) $stringtoshow.=$px2->show(); + elseif ($showpropalnb) $stringtoshow.=$px2->show(); else $stringtoshow.=$px3->show(); } if ($nbofgraph == 2) { $stringtoshow.='
'; if ($showinvoicenb) $stringtoshow.=$px1->show(); - else if ($showpropalnb) $stringtoshow.=$px2->show(); + elseif ($showpropalnb) $stringtoshow.=$px2->show(); $stringtoshow.='
'; if ($showordernb) $stringtoshow.=$px3->show(); - else if ($showpropalnb) $stringtoshow.=$px2->show(); + elseif ($showpropalnb) $stringtoshow.=$px2->show(); $stringtoshow.='
'; } if ($nbofgraph == 3) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 52d98790dcc..868d9b27039 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -294,7 +294,7 @@ class CMailFile $this->message.= $text_body . $files_encoded; $this->message.= "--" . $this->mixed_boundary . "--" . $this->eol; } - else if ($this->sendmode == 'smtps') + elseif ($this->sendmode == 'smtps') { // Use SMTPS library // ------------------------------------------ @@ -349,7 +349,7 @@ class CMailFile $this->smtps=$smtps; } - else if ($this->sendmode == 'swiftmailer') + elseif ($this->sendmode == 'swiftmailer') { // Use Swift Mailer library // ------------------------------------------ @@ -670,7 +670,7 @@ class CMailFile if (! empty($conf->global->$keyforsmtpserver)) ini_restore('SMTP'); if (! empty($conf->global->$keyforsmtpport)) ini_restore('smtp_port'); } - else if ($this->sendmode == 'smtps') + elseif ($this->sendmode == 'smtps') { if (! is_object($this->smtps)) { @@ -750,7 +750,7 @@ class CMailFile } } } - else if ($this->sendmode == 'swiftmailer') + elseif ($this->sendmode == 'swiftmailer') { // Use Swift Mailer library // ------------------------------------------ diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index 86ffed48551..c3aa2e23417 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -139,7 +139,7 @@ class CSMSFile if (! empty($conf->global->MAIN_SMS_DEBUG)) $this->dump_sms_result($res); } } - else if (! empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' + elseif (! empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' { $tmp=explode('@',$conf->global->MAIN_SMS_SENDMODE); $classfile=$tmp[0]; $module=(empty($tmp[1])?$tmp[0]:$tmp[1]); diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 726e95214cb..d6a0e5845eb 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -230,7 +230,7 @@ abstract class CommonDocGenerator { $object->array_options['options_'.$key] = price($object->array_options['options_'.$key],0,$outputlangs,0,0,-1,$conf->currency); } - else if($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') + elseif($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') { $object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]]; } @@ -760,11 +760,11 @@ abstract class CommonDocGenerator //Add value to store price with currency $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency'])); } - else if($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') + elseif($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') { $object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]]; } - else if($extrafields->attribute_type[$key] == 'date') + elseif($extrafields->attribute_type[$key] == 'date') { if (strlen($object->array_options['options_'.$key])>0) { @@ -782,7 +782,7 @@ abstract class CommonDocGenerator $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); } - else if($extrafields->attribute_type[$key] == 'datetime') + elseif($extrafields->attribute_type[$key] == 'datetime') { $datetime = $object->array_options['options_'.$key]; $object->array_options['options_'.$key] = ($datetime!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour'):''); // using company output language @@ -791,7 +791,7 @@ abstract class CommonDocGenerator $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); } - else if($extrafields->attribute_type[$key] == 'link') + elseif($extrafields->attribute_type[$key] == 'link') { $id = $object->array_options['options_'.$key]; if ($id != "") diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 945d257b8eb..f9fd88513c8 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -426,8 +426,8 @@ abstract class CommonObject $sql.= " WHERE entity IN (".getEntity($element).")" ; if ($id > 0) $sql.= " AND rowid = ".$db->escape($id); - else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'"; - else if ($ref_ext) $sql.= " AND ref_ext = '".$db->escape($ref_ext)."'"; + elseif ($ref) $sql.= " AND ref = '".$db->escape($ref)."'"; + elseif ($ref_ext) $sql.= " AND ref_ext = '".$db->escape($ref_ext)."'"; else { $error='ErrorWrongParameters'; dol_print_error(get_class()."::isExistingObject ".$error, LOG_ERR); @@ -1207,7 +1207,7 @@ abstract class CommonObject if($this->element=='shipping' && $this->origin_id != 0) { $id=$this->origin_id; $element='commande'; - } else if($this->element=='reception' && $this->origin_id != 0) { + } elseif($this->element=='reception' && $this->origin_id != 0) { $id=$this->origin_id; $element='order_supplier'; } else { @@ -1353,7 +1353,7 @@ abstract class CommonObject if (empty($idtype) && $idtype != '0') // If type of barcode no set, we try to guess. If set to '0' it means we forced to have type remain not defined { if ($this->element == 'product') $idtype = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; - else if ($this->element == 'societe') $idtype = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY; + elseif ($this->element == 'societe') $idtype = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY; else dol_syslog('Call fetch_barcode with barcode_type not defined and cant be guessed', LOG_WARNING); } @@ -1562,8 +1562,8 @@ abstract class CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX.$table." SET "; if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'"; - else if ($format == 'int') $sql.= $field." = ".$this->db->escape($value); - else if ($format == 'date') $sql.= $field." = ".($value ? "'".$this->db->idate($value)."'" : "null"); + elseif ($format == 'int') $sql.= $field." = ".$this->db->escape($value); + elseif ($format == 'date') $sql.= $field." = ".($value ? "'".$this->db->idate($value)."'" : "null"); if ($fk_user_field) { @@ -1648,8 +1648,8 @@ abstract class CommonObject $sql.= ",".MAIN_DB_PREFIX."usergroup_user as ug"; } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 2) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to entity - else if ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid - else if ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid if ($this->restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$alias.".rowid = sc.fk_soc"; $sql.= " WHERE te.".$fieldid." < '".$this->db->escape($this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) if ($this->restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) $sql.= " AND sc.fk_user = " .$user->id; @@ -1660,7 +1660,7 @@ abstract class CommonObject $sql.=$filter; } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 2) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to entity - else if ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { if ($this->element == 'user' && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { if (! empty($user->admin) && empty($user->entity) && $conf->entity == 1) { @@ -1694,8 +1694,8 @@ abstract class CommonObject $sql.= ",".MAIN_DB_PREFIX."usergroup_user as ug"; } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 2) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to entity - else if ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid - else if ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid if ($this->restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$alias.".rowid = sc.fk_soc"; $sql.= " WHERE te.".$fieldid." > '".$this->db->escape($this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) if ($this->restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) $sql.= " AND sc.fk_user = " .$user->id; @@ -1706,7 +1706,7 @@ abstract class CommonObject $sql.=$filter; } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 2) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to entity - else if ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid + elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql.= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { if ($this->element == 'user' && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { if (! empty($user->admin) && empty($user->entity) && $conf->entity == 1) { @@ -2675,7 +2675,7 @@ abstract class CommonObject if ($this->db->query($sql)) { if ($suffix == '_public') $this->note_public = $note; - else if ($suffix == '_private') $this->note_private = $note; + elseif ($suffix == '_private') $this->note_private = $note; else { $this->note = $note; // deprecated @@ -3059,7 +3059,7 @@ abstract class CommonObject $sql.= "fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."'"; if ($withtargettype) $sql.= " AND targettype = '".$targettype."'"; } - else if ($justtarget) + elseif ($justtarget) { $sql.= "fk_target = ".$targetid." AND targettype = '".$targettype."'"; if ($withsourcetype) $sql.= " AND sourcetype = '".$sourcetype."'"; @@ -3087,7 +3087,7 @@ abstract class CommonObject { $this->linkedObjectsIds[$obj->targettype][$obj->rowid]=$obj->fk_target; } - else if ($justtarget) + elseif ($justtarget) { $this->linkedObjectsIds[$obj->sourcetype][$obj->rowid]=$obj->fk_source; } @@ -3125,28 +3125,28 @@ abstract class CommonObject if ($objecttype == 'facture') { $classpath = 'compta/facture/class'; } - else if ($objecttype == 'facturerec') { + elseif ($objecttype == 'facturerec') { $classpath = 'compta/facture/class'; $module = 'facture'; } - else if ($objecttype == 'propal') { + elseif ($objecttype == 'propal') { $classpath = 'comm/propal/class'; } - else if ($objecttype == 'supplier_proposal') { + elseif ($objecttype == 'supplier_proposal') { $classpath = 'supplier_proposal/class'; } - else if ($objecttype == 'shipping') { + elseif ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; } - else if ($objecttype == 'delivery') { + elseif ($objecttype == 'delivery') { $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; } - else if ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { + elseif ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { $classpath = 'fourn/class'; $module = 'fournisseur'; } - else if ($objecttype == 'fichinter') { + elseif ($objecttype == 'fichinter') { $classpath = 'fichinter/class'; $subelement = 'fichinter'; $module = 'ficheinter'; } - else if ($objecttype == 'subscription') { + elseif ($objecttype == 'subscription') { $classpath = 'adherents/class'; $module = 'adherent'; } @@ -3156,19 +3156,19 @@ abstract class CommonObject if ($objecttype == 'order') { $classfile = 'commande'; $classname = 'Commande'; } - else if ($objecttype == 'invoice_supplier') { + elseif ($objecttype == 'invoice_supplier') { $classfile = 'fournisseur.facture'; $classname = 'FactureFournisseur'; } - else if ($objecttype == 'order_supplier') { + elseif ($objecttype == 'order_supplier') { $classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur'; } - else if ($objecttype == 'supplier_proposal') { + elseif ($objecttype == 'supplier_proposal') { $classfile = 'supplier_proposal'; $classname = 'SupplierProposal'; } - else if ($objecttype == 'facturerec') { + elseif ($objecttype == 'facturerec') { $classfile = 'facture-rec'; $classname = 'FactureRec'; } - else if ($objecttype == 'subscription') { + elseif ($objecttype == 'subscription') { $classfile = 'subscription'; $classname = 'Subscription'; } @@ -3224,7 +3224,7 @@ abstract class CommonObject $updatetarget=false; if (! empty($sourceid) && ! empty($sourcetype) && empty($targetid) && empty($targettype)) $updatesource=true; - else if (empty($sourceid) && empty($sourcetype) && ! empty($targetid) && ! empty($targettype)) $updatetarget=true; + elseif (empty($sourceid) && empty($sourcetype) && ! empty($targetid) && ! empty($targettype)) $updatetarget=true; $sql = "UPDATE ".MAIN_DB_PREFIX."element_element SET "; if ($updatesource) @@ -3234,7 +3234,7 @@ abstract class CommonObject $sql.= " WHERE fk_target = ".$this->id; $sql.= " AND targettype = '".$this->db->escape($this->element)."'"; } - else if ($updatetarget) + elseif ($updatetarget) { $sql.= "fk_target = ".$targetid; $sql.= ", targettype = '".$this->db->escape($targettype)."'"; @@ -3271,7 +3271,7 @@ abstract class CommonObject $deletetarget=false; if (! empty($sourceid) && ! empty($sourcetype) && empty($targetid) && empty($targettype)) $deletesource=true; - else if (empty($sourceid) && empty($sourcetype) && ! empty($targetid) && ! empty($targettype)) $deletetarget=true; + elseif (empty($sourceid) && empty($sourcetype) && ! empty($targetid) && ! empty($targettype)) $deletetarget=true; $sourceid = (! empty($sourceid) ? $sourceid : $this->id); $sourcetype = (! empty($sourcetype) ? $sourcetype : $this->element); @@ -3291,7 +3291,7 @@ abstract class CommonObject $sql.= " fk_source = ".$sourceid." AND sourcetype = '".$this->db->escape($sourcetype)."'"; $sql.= " AND fk_target = ".$this->id." AND targettype = '".$this->db->escape($this->element)."'"; } - else if ($deletetarget) + elseif ($deletetarget) { $sql.= " fk_target = ".$targetid." AND targettype = '".$this->db->escape($targettype)."'"; $sql.= " AND fk_source = ".$this->id." AND sourcetype = '".$this->db->escape($this->element)."'"; @@ -3626,7 +3626,7 @@ abstract class CommonObject { if (empty($totalToShip)) $totalToShip=0; // Avoid warning because $totalToShip is '' $totalToShip+=$line->qty_shipped; // defined for shipment only - }else if ($line->element == 'commandefournisseurdispatch' && isset($line->qty)) + }elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty)) { if (empty($totalToShip)) $totalToShip=0; $totalToShip+=$line->qty; // defined for reception only @@ -4240,7 +4240,7 @@ abstract class CommonObject $discount->fk_soc = $this->socid; $this->tpl['label'].= $discount->getNomUrl(0,'discount'); } - else if (! empty($line->fk_product)) + elseif (! empty($line->fk_product)) { $productstatic = new Product($this->db); $productstatic->id = $line->fk_product; @@ -5437,7 +5437,7 @@ abstract class CommonObject { $morecss = 'minwidth100'; } - else if (round($size) <= 48) + elseif (round($size) <= 48) { $morecss = 'minwidth200'; } @@ -6035,7 +6035,7 @@ abstract class CommonObject { $showsize = 'minwidth100'; } - else if (round($size) <= 48) + elseif (round($size) <= 48) { $showsize = 'minwidth200'; } @@ -6589,12 +6589,12 @@ abstract class CommonObject { $buyPrice = $product->cost_price; } - else if ($product->pmp > 0) + elseif ($product->pmp > 0) { $buyPrice = $product->pmp; } } - else if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') + elseif (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $product = new Product($this->db); @@ -6618,7 +6618,7 @@ abstract class CommonObject { $buyPrice = $productFournisseur->fourn_unitprice; } - else if ($result < 0) + elseif ($result < 0) { $this->errors[] = $productFournisseur->error; return -2; @@ -6740,7 +6740,7 @@ abstract class CommonObject if ($nbphoto % $nbbyrow == 1) $return.= '
'; $return.= ''; if (($nbphoto % $nbbyrow) == 0) $return.= ''; } - else if ($nbbyrow < 0) $return.=''; + elseif ($nbbyrow < 0) $return.=''; } if (empty($size)) { // Format origine @@ -7003,7 +7003,7 @@ abstract class CommonObject $queryarray[$field] = $this->db->idate($this->{$field}); } } - else if($this->isArray($info)) + elseif($this->isArray($info)) { if(! empty($this->{$field})) { if(! is_array($this->{$field})) { @@ -7014,7 +7014,7 @@ abstract class CommonObject $queryarray[$field] = null; } } - else if($this->isInt($info)) + elseif($this->isInt($info)) { if ($field == 'entity' && is_null($this->{$field})) $queryarray[$field]=$conf->entity; else @@ -7023,7 +7023,7 @@ abstract class CommonObject if (empty($queryarray[$field])) $queryarray[$field]=0; // May be reset to null later if property 'notnull' is -1 for this field. } } - else if($this->isFloat($info)) + elseif($this->isFloat($info)) { $queryarray[$field] = (double) price2num($this->{$field}); if (empty($queryarray[$field])) $queryarray[$field]=0; @@ -7111,7 +7111,7 @@ abstract class CommonObject protected function quote($value, $fieldsentry) { if (is_null($value)) return 'NULL'; - else if (preg_match('/^(int|double|real)/i', $fieldsentry['type'])) return $this->db->escape("$value"); + elseif (preg_match('/^(int|double|real)/i', $fieldsentry['type'])) return $this->db->escape("$value"); else return "'".$this->db->escape($value)."'"; } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index de39260e007..d25d3b13f36 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -180,10 +180,10 @@ class Conf if (! isset($this->modules_parts[$partname]) || ! is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } $arrValue = json_decode($value,true); if (is_array($arrValue) && ! empty($arrValue)) $value = $arrValue; - else if (in_array($partname,array('login','menus','substitutions','triggers','tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/'; - else if (in_array($partname,array('models','theme'))) $value = '/'.$modulename.'/'; - else if (in_array($partname,array('sms'))) $value = '/'.$modulename.'/'; - else if ($value == 1) $value = '/'.$modulename.'/core/modules/'.$partname.'/'; // ex: partname = societe + elseif (in_array($partname,array('login','menus','substitutions','triggers','tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/'; + elseif (in_array($partname,array('models','theme'))) $value = '/'.$modulename.'/'; + elseif (in_array($partname,array('sms'))) $value = '/'.$modulename.'/'; + elseif ($value == 1) $value = '/'.$modulename.'/core/modules/'.$partname.'/'; // ex: partname = societe $this->modules_parts[$partname] = array_merge($this->modules_parts[$partname], array($modulename => $value)); // $value may be a string or an array } // If this is a module constant (must be at end) @@ -252,7 +252,7 @@ class Conf if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones // Clean var use vat for company if (! isset($this->global->FACTURE_TVAOPTION)) $this->global->FACTURE_TVAOPTION=1; - else if (! empty($this->global->FACTURE_TVAOPTION) && ! is_numeric($this->global->FACTURE_TVAOPTION)) + elseif (! empty($this->global->FACTURE_TVAOPTION) && ! is_numeric($this->global->FACTURE_TVAOPTION)) { // Old value of option, we clean to use new value (0 or 1) if ($this->global->FACTURE_TVAOPTION != "franchise") $this->global->FACTURE_TVAOPTION=1; diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index 5129ac54ece..a77b1cc8793 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -416,15 +416,15 @@ class CoreObject extends CommonObject { $this->setDate($key, $value); } - else if( $this->checkFieldType($key, 'array')) + elseif( $this->checkFieldType($key, 'array')) { $this->{$key} = $value; } - else if( $this->checkFieldType($key, 'float') ) + elseif( $this->checkFieldType($key, 'float') ) { $this->{$key} = (double) price2num($value); } - else if( $this->checkFieldType($key, 'int') ) { + elseif( $this->checkFieldType($key, 'int') ) { $this->{$key} = (int) price2num($value); } else diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 48c426a830f..bb1e10e7a43 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -538,7 +538,7 @@ class DiscountAbsolute $sql.= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql.= ' AND f.type = 3'; } - else if ($invoice->element == 'invoice_supplier') + elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; @@ -584,7 +584,7 @@ class DiscountAbsolute $sql.= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql.= ' AND (f.type = 2 OR f.type = 0)'; // Find discount coming from credit note or excess received } - else if ($invoice->element == 'invoice_supplier') + elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index a57e4e844ec..871951e3df0 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -48,7 +48,7 @@ class DolGeoIP // geoip may have been already included with PEAR if (! function_exists('geoip_country_code_by_name')) $res=include_once GEOIP_PATH.'geoip.inc'; } - else if ($type == 'city') + elseif ($type == 'city') { // geoip may have been already included with PEAR if (! function_exists('geoip_country_code_by_name')) $res=include_once GEOIP_PATH.'geoipcity.inc'; diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 42386494a37..29d49c0ff9a 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -704,7 +704,7 @@ class DolGraph // Create graph $classname=''; if (! isset($this->type[0]) || $this->type[0] == 'bars') $classname='BarPlot'; // Only one type (first one) is supported by artichow - else if ($this->type[0] == 'lines' || $this->type[0] == 'linesnopoint') $classname='LinePlot'; + elseif ($this->type[0] == 'lines' || $this->type[0] == 'linesnopoint') $classname='LinePlot'; else $classname='TypeUnknown'; include_once ARTICHOW_PATH.$classname.'.class.php'; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index cc1fae502b3..b09b48e1d3d 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -979,7 +979,7 @@ class ExtraFields { $morecss = 'minwidth100'; } - else if (round($size) <= 48) + elseif (round($size) <= 48) { $morecss = 'minwidth200'; } @@ -1333,7 +1333,7 @@ class ExtraFields // current object id can be use into filter if (strpos($InfoFieldList[4], '$ID$')!==false && !empty($objectid)) { $InfoFieldList[4]=str_replace('$ID$',$objectid,$InfoFieldList[4]); - } else if (preg_match("#^.*list.php$#",$_SERVER["DOCUMENT_URI"])) { + } elseif (preg_match("#^.*list.php$#",$_SERVER["DOCUMENT_URI"])) { // Pattern for word=$ID$ $word = '\b[a-zA-Z0-9-\.-_]+\b=\$ID\$'; @@ -1371,7 +1371,7 @@ class ExtraFields $boolCond =(( $matchCondition[1] == "AND" )?' AND 1 ':' OR 0 '); $InfoFieldList[4]=str_replace($matchCondition[0],$boolCond.$matchCondition[3],$InfoFieldList[4]); } - else if (! empty($matchCondition[3])) { + elseif (! empty($matchCondition[3])) { $boolCond =(( $matchCondition[3] == "AND" )?' 1 AND ':' 0 OR'); $InfoFieldList[4]=str_replace($matchCondition[0],$boolCond,$InfoFieldList[4]); } @@ -1945,7 +1945,7 @@ class ExtraFields // TODO GMT date in memory must be GMT so we should add gm=true in parameters $value_key=dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]); } - else if (in_array($key_type,array('checkbox','chkbxlst'))) + elseif (in_array($key_type,array('checkbox','chkbxlst'))) { $value_arr=GETPOST("options_".$key, 'array'); // check if an array if (!empty($value_arr)) { @@ -1954,7 +1954,7 @@ class ExtraFields $value_key=''; } } - else if (in_array($key_type,array('price','double'))) + elseif (in_array($key_type,array('price','double'))) { $value_arr=GETPOST("options_".$key, 'alpha'); $value_key=price2num($value_arr); @@ -2020,14 +2020,14 @@ class ExtraFields // Clean parameters $value_key=dol_mktime($_POST[$keysuffix."options_".$key.$keyprefix."hour"], $_POST[$keysuffix."options_".$key.$keyprefix."min"], 0, $_POST[$keysuffix."options_".$key.$keyprefix."month"], $_POST[$keysuffix."options_".$key.$keyprefix."day"], $_POST[$keysuffix."options_".$key.$keyprefix."year"]); } - else if (in_array($key_type,array('checkbox', 'chkbxlst'))) + elseif (in_array($key_type,array('checkbox', 'chkbxlst'))) { $value_arr=GETPOST($keysuffix."options_".$key.$keyprefix); // Make sure we get an array even if there's only one checkbox $value_arr=(array) $value_arr; $value_key=implode(',', $value_arr); } - else if (in_array($key_type,array('price','double'))) + elseif (in_array($key_type,array('price','double'))) { $value_arr=GETPOST($keysuffix."options_".$key.$keyprefix); $value_key=price2num($value_arr); diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index 027fdda0514..bf1045aaa35 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -136,7 +136,7 @@ class FileUpload $object_ref = dol_sanitizeFileName($object->ref); if ($element == 'invoice_supplier') { $object_ref = get_exdir($object->id,2,0,0,$object,'invoice_supplier') . $object_ref; - } else if ($element == 'project_task') { + } elseif ($element == 'project_task') { $object_ref = $object->project->ref . '/' . $object_ref; } @@ -456,7 +456,7 @@ class FileUpload } } } - else if ($this->options['discard_aborted_uploads']) + elseif ($this->options['discard_aborted_uploads']) { unlink($file_path); $file->error = 'abort'; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 228c9fa1538..1b9b54f2bc3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -194,13 +194,13 @@ class Form $tmp=explode(':',$typeofdata); $ret.=''; } - else if (preg_match('/^(numeric|amount)/',$typeofdata)) + elseif (preg_match('/^(numeric|amount)/',$typeofdata)) { $tmp=explode(':',$typeofdata); $valuetoshow=price2num($editvalue?$editvalue:$value); $ret.=''; } - else if (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) + elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) { $tmp=explode(':',$typeofdata); $cols=$tmp[2]; @@ -217,15 +217,15 @@ class Form $ret.=dol_string_neverthesehtmltags($valuetoshow, array('textarea')); $ret.=''; } - else if ($typeofdata == 'day' || $typeofdata == 'datepicker') + elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') { $ret.=$this->selectDate($value,$htmlname,0,0,1,'form'.$htmlname,1,0); } - else if ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') + elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') { $ret.=$this->selectDate($value,$htmlname,1,1,1,'form'.$htmlname,1,0); } - else if (preg_match('/^select;/',$typeofdata)) + elseif (preg_match('/^select;/',$typeofdata)) { $arraydata=explode(',',preg_replace('/^select;/','',$typeofdata)); foreach($arraydata as $val) @@ -235,7 +235,7 @@ class Form } $ret.=$this->selectarray($htmlname,$arraylist,$value); } - else if (preg_match('/^ckeditor/',$typeofdata)) + elseif (preg_match('/^ckeditor/',$typeofdata)) { $tmp=explode(':',$typeofdata); // Example: ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -261,7 +261,7 @@ class Form elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value); elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day'); elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') $ret.=dol_print_date($value,'dayhour'); - else if (preg_match('/^select;/',$typeofdata)) + elseif (preg_match('/^select;/',$typeofdata)) { $arraydata=explode(',',preg_replace('/^select;/','',$typeofdata)); foreach($arraydata as $val) @@ -271,7 +271,7 @@ class Form } $ret.=$arraylist[$value]; } - else if (preg_match('/^ckeditor/',$typeofdata)) + elseif (preg_match('/^ckeditor/',$typeofdata)) { $tmpcontent=dol_htmlentitiesbr($value); if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) @@ -314,8 +314,8 @@ class Form // Check parameters if (preg_match('/^text/',$inputType)) $value = dol_nl2br($value); - else if (preg_match('/^numeric/',$inputType)) $value = price($value); - else if ($inputType == 'day' || $inputType == 'datepicker') $value = dol_print_date($value, 'day'); + elseif (preg_match('/^numeric/',$inputType)) $value = price($value); + elseif ($inputType == 'day' || $inputType == 'datepicker') $value = dol_print_date($value, 'day'); if ($condition) { @@ -348,7 +348,7 @@ class Form if (! empty($tmp[2])) $savemethod=$tmp[2]; $out.= ''."\n"; } - else if ((preg_match('/^day$/',$inputType)) || (preg_match('/^datepicker/',$inputType)) || (preg_match('/^datehourpicker/',$inputType))) + elseif ((preg_match('/^day$/',$inputType)) || (preg_match('/^datepicker/',$inputType)) || (preg_match('/^datehourpicker/',$inputType))) { $tmp=explode(':',$inputType); $inputType=$tmp[0]; @@ -357,21 +357,21 @@ class Form $out.= ''."\n"; // Use for timestamp format } - else if (preg_match('/^(select|autocomplete)/',$inputType)) + elseif (preg_match('/^(select|autocomplete)/',$inputType)) { $tmp=explode(':',$inputType); $inputType=$tmp[0]; $loadmethod=$tmp[1]; if (! empty($tmp[2])) $savemethod=$tmp[2]; if (! empty($tmp[3])) $button_only=true; } - else if (preg_match('/^textarea/',$inputType)) + elseif (preg_match('/^textarea/',$inputType)) { $tmp=explode(':',$inputType); $inputType=$tmp[0]; $rows=(empty($tmp[1])?'8':$tmp[1]); $cols=(empty($tmp[2])?'80':$tmp[2]); } - else if (preg_match('/^ckeditor/',$inputType)) + elseif (preg_match('/^ckeditor/',$inputType)) { $tmp=explode(':',$inputType); $inputType=$tmp[0]; $toolbar=$tmp[1]; @@ -1081,7 +1081,7 @@ class Form $out.= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); $out.=''; if (empty($hidelabel)) print $langs->trans("RefOrLabel").' : '; - else if ($hidelabel > 1) { + elseif ($hidelabel > 1) { $placeholder=' placeholder="'.$langs->trans("RefOrLabel").'"'; if ($hidelabel == 2) { $out.= img_picto($langs->trans("Search"), 'search'); @@ -1131,7 +1131,7 @@ class Form $outarray=array(); if ($selected === '') $selected = array(); - else if (!is_array($selected)) $selected = array($selected); + elseif (!is_array($selected)) $selected = array($selected); // Clean $filter that may contains sql conditions so sql code if (function_exists('testSqlAndScriptInject')) { @@ -1421,7 +1421,7 @@ class Form if (empty($htmlid)) $htmlid = $htmlname; if ($selected === '') $selected = array(); - else if (!is_array($selected)) $selected = array($selected); + elseif (!is_array($selected)) $selected = array($selected); $out=''; if (! is_object($hookmanager)) @@ -1598,7 +1598,7 @@ class Form if ((is_numeric($selected) && ($selected < -2 || empty($selected))) && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) $selected=$user->id; if ($selected === '') $selected = array(); - else if (!is_array($selected)) $selected = array($selected); + elseif (!is_array($selected)) $selected = array($selected); $excludeUsers=null; $includeUsers=null; @@ -1607,12 +1607,12 @@ class Form if (is_array($exclude)) $excludeUsers = implode(",",$exclude); // Permettre l'inclusion d'utilisateurs if (is_array($include)) $includeUsers = implode(",",$include); - else if ($include == 'hierarchy') + elseif ($include == 'hierarchy') { // Build list includeUsers to have only hierarchy $includeUsers = implode(",",$user->getAllChildIds(0)); } - else if ($include == 'hierarchyme') + elseif ($include == 'hierarchyme') { // Build list includeUsers to have only hierarchy and current user $includeUsers = implode(",",$user->getAllChildIds(1)); @@ -1991,7 +1991,7 @@ class Form trans("RefOrLabel").' : '; - else if ($hidelabel > 1) { + elseif ($hidelabel > 1) { $placeholder=' placeholder="'.$langs->trans("RefOrLabel").'"'; if ($hidelabel == 2) { print img_picto($langs->trans("Search"), 'search'); @@ -2367,7 +2367,7 @@ class Form if (! empty($conf->stock->enabled) && $objp->fk_product_type == 0 && isset($objp->stock)) { if ($objp->stock > 0) $opt.= ' class="product_line_stock_ok"'; - else if ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"'; + elseif ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"'; } $opt.= '>'; $opt.= $objp->ref; @@ -4906,7 +4906,7 @@ class Form $code_country.=",'".$societe_acheteuse->country_code."'"; } } - else if (! $idprod) // We don't know type of product + elseif (! $idprod) // We don't know type of product { $code_country.=",'".$societe_acheteuse->country_code."'"; } @@ -6370,40 +6370,40 @@ class Form $tplpath = 'compta/'.$element; if (empty($conf->facture->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'facturerec') { + elseif ($objecttype == 'facturerec') { $tplpath = 'compta/facture'; $tplname = 'linkedobjectblockForRec'; if (empty($conf->facture->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'propal') { + elseif ($objecttype == 'propal') { $tplpath = 'comm/'.$element; if (empty($conf->propal->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'supplier_proposal') { + elseif ($objecttype == 'supplier_proposal') { if (empty($conf->supplier_proposal->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'shipping' || $objecttype == 'shipment') { + elseif ($objecttype == 'shipping' || $objecttype == 'shipment') { $tplpath = 'expedition'; if (empty($conf->expedition->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'reception') { + elseif ($objecttype == 'reception') { $tplpath = 'reception'; if (empty($conf->reception->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'delivery') { + elseif ($objecttype == 'delivery') { $tplpath = 'livraison'; if (empty($conf->expedition->enabled)) continue; // Do not show if module disabled } - else if ($objecttype == 'invoice_supplier') { + elseif ($objecttype == 'invoice_supplier') { $tplpath = 'fourn/facture'; } - else if ($objecttype == 'order_supplier') { + elseif ($objecttype == 'order_supplier') { $tplpath = 'fourn/commande'; } - else if ($objecttype == 'expensereport') { + elseif ($objecttype == 'expensereport') { $tplpath = 'expensereport'; } - else if ($objecttype == 'subscription') { + elseif ($objecttype == 'subscription') { $tplpath = 'adherents'; } @@ -6509,7 +6509,7 @@ class Form $possiblelinks=array_merge($possiblelinks, $hookmanager->resArray); } } - else if ($reshook > 0) + elseif ($reshook > 0) { if (is_array($hookmanager->resArray) && count($hookmanager->resArray)) { @@ -6832,7 +6832,7 @@ class Form { $ret.=dol_htmlentities($object->name); } - else if ($object->element == 'member') + elseif ($object->element == 'member') { $ret.=$object->ref.'
'; $fullname=$object->getFullName($langs); @@ -6842,23 +6842,23 @@ class Form $ret.= dol_htmlentities($fullname) . ((! empty($object->societe) && $object->societe != $fullname)?' ('.dol_htmlentities($object->societe).')':''); } } - else if (in_array($object->element, array('contact', 'user', 'usergroup'))) + elseif (in_array($object->element, array('contact', 'user', 'usergroup'))) { $ret.=dol_htmlentities($object->getFullName($langs)); } - else if (in_array($object->element, array('action', 'agenda'))) + elseif (in_array($object->element, array('action', 'agenda'))) { $ret.=$object->ref.'
'.$object->label; } - else if (in_array($object->element, array('adherent_type'))) + elseif (in_array($object->element, array('adherent_type'))) { $ret.=$object->label; } - else if ($object->element == 'ecm_directories') + elseif ($object->element == 'ecm_directories') { $ret.=''; } - else if ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref); + elseif ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref); if ($morehtmlref) @@ -6931,32 +6931,32 @@ class Form if (! empty($object->logo)) { if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.getImageFileNameForSize($object->logo, '_mini'); // getImageFileNameForSize include the thumbs - else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.getImageFileNameForSize($object->logo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.getImageFileNameForSize($object->logo, '_small'); else $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.$object->logo; $originalfile=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.$object->logo; } $email=$object->email; } - else if ($modulepart=='contact') + elseif ($modulepart=='contact') { $dir=$conf->societe->multidir_output[$entity].'/contact'; if (! empty($object->photo)) { if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.getImageFileNameForSize($object->photo, '_mini'); - else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.getImageFileNameForSize($object->photo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.$object->photo; $originalfile=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.$object->photo; } $email=$object->email; $capture='user'; } - else if ($modulepart=='userphoto') + elseif ($modulepart=='userphoto') { $dir=$conf->user->dir_output; if (! empty($object->photo)) { if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'user').$object->id.'/'.getImageFileNameForSize($object->photo, '_mini'); - else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'user').$object->id.'/'.getImageFileNameForSize($object->photo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'user').$object->id.'/'.getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id.'/'.$object->photo; $originalfile=get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id.'/'.$object->photo; } @@ -6964,13 +6964,13 @@ class Form $email=$object->email; $capture='user'; } - else if ($modulepart=='memberphoto') + elseif ($modulepart=='memberphoto') { $dir=$conf->adherent->dir_output; if (! empty($object->photo)) { if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_mini'); - else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.$object->photo; $originalfile=get_exdir(0, 0, 0, 0, $object, 'member').'photos/'.$object->photo; } @@ -6985,7 +6985,7 @@ class Form if (! empty($object->photo)) { if ((string) $imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.getImageFileNameForSize($object->photo, '_mini'); - else if ((string) $imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.getImageFileNameForSize($object->photo, '_small'); + elseif ((string) $imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.$object->photo; $originalfile=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.$object->photo; } @@ -7008,7 +7008,7 @@ class Form $ret.='Photo'; if ($addlinktofullsize) $ret.=''; } - else if ($altfile && file_exists($dir."/".$altfile)) + elseif ($altfile && file_exists($dir."/".$altfile)) { if ($addlinktofullsize) { diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 32a421a7b61..350c3c747ee 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -100,7 +100,7 @@ class FormAdmin $out.= ''; } } - else if ($selected == $key) + elseif ($selected == $key) { $out.= ''; } @@ -167,7 +167,7 @@ class FormAdmin $prefix=''; // 0=Recommanded, 1=Experimental, 2=Developpement, 3=Other if (preg_match('/^eldy/i',$file)) $prefix='0'; - else if (preg_match('/^smartphone/i',$file)) $prefix='2'; + elseif (preg_match('/^smartphone/i',$file)) $prefix='2'; else $prefix='3'; if ($file == $selected) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 9d0bded74b6..edeab6a5983 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -816,12 +816,12 @@ class FormCompany { if (isset($idprof)) { if ($idprof==1) $formlength=9; - else if ($idprof==2) $formlength=14; - else if ($idprof==3) $formlength=5; // 4 chiffres et 1 lettre depuis janvier - else if ($idprof==4) $formlength=32; // No maximum as we need to include a town name in this id + elseif ($idprof==2) $formlength=14; + elseif ($idprof==3) $formlength=5; // 4 chiffres et 1 lettre depuis janvier + elseif ($idprof==4) $formlength=32; // No maximum as we need to include a town name in this id } } - else if ($country_code == 'ES') + elseif ($country_code == 'ES') { if ($idprof==1) $formlength=9; //CIF/NIF/NIE 9 digits if ($idprof==2) $formlength=12; //NASS 12 digits without / @@ -833,9 +833,9 @@ class FormCompany $selected=$preselected; if (! $selected && isset($idprof)) { if ($idprof==1 && ! empty($this->idprof1)) $selected=$this->idprof1; - else if ($idprof==2 && ! empty($this->idprof2)) $selected=$this->idprof2; - else if ($idprof==3 && ! empty($this->idprof3)) $selected=$this->idprof3; - else if ($idprof==4 && ! empty($this->idprof4)) $selected=$this->idprof4; + elseif ($idprof==2 && ! empty($this->idprof2)) $selected=$this->idprof2; + elseif ($idprof==3 && ! empty($this->idprof3)) $selected=$this->idprof3; + elseif ($idprof==4 && ! empty($this->idprof4)) $selected=$this->idprof4; } $maxlength=$formlength; diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index 5bdb00cfc40..be028b5fe14 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -78,7 +78,7 @@ class FormContract // CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)"; - else if ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') + elseif ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') { $sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") "; $sql.= " OR c.fk_soc IS NULL)"; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index d8af718bb04..5bb922d43ed 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -380,7 +380,7 @@ class FormFile $modellist=ModeleThirdPartyDoc::liste_modeles($this->db); } } - else if ($modulepart == 'propal') + elseif ($modulepart == 'propal') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -389,7 +389,7 @@ class FormFile $modellist=ModelePDFPropales::liste_modeles($this->db); } } - else if ($modulepart == 'supplier_proposal') + elseif ($modulepart == 'supplier_proposal') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -398,7 +398,7 @@ class FormFile $modellist=ModelePDFSupplierProposal::liste_modeles($this->db); } } - else if ($modulepart == 'commande') + elseif ($modulepart == 'commande') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -434,7 +434,7 @@ class FormFile $modellist=ModelePDFDeliveryOrder::liste_modeles($this->db); } } - else if ($modulepart == 'ficheinter') + elseif ($modulepart == 'ficheinter') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -524,7 +524,7 @@ class FormFile $modellist=ModeleExports::liste_modeles($this->db); } } - else if ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') + elseif ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -533,7 +533,7 @@ class FormFile $modellist=ModelePDFSuppliersOrders::liste_modeles($this->db); } } - else if ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') + elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -542,7 +542,7 @@ class FormFile $modellist=ModelePDFSuppliersInvoices::liste_modeles($this->db); } } - else if ($modulepart == 'supplier_payment') + elseif ($modulepart == 'supplier_payment') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -551,7 +551,7 @@ class FormFile $modellist=ModelePDFSuppliersPayments::liste_modeles($this->db); } } - else if ($modulepart == 'remisecheque') + elseif ($modulepart == 'remisecheque') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -587,7 +587,7 @@ class FormFile $modellist=ModeleAction::liste_modeles($this->db); } } - else if ($modulepart == 'expensereport') + elseif ($modulepart == 'expensereport') { if (is_array($genallowed)) $modellist=$genallowed; else @@ -596,7 +596,7 @@ class FormFile $modellist=ModeleExpenseReport::liste_modeles($this->db); } } - else if ($modulepart == 'unpaid') + elseif ($modulepart == 'unpaid') { $modellist=''; } @@ -1465,72 +1465,72 @@ class FormFile include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $object_instance=new Societe($this->db); } - else if ($modulepart == 'invoice') + elseif ($modulepart == 'invoice') { include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object_instance=new Facture($this->db); } - else if ($modulepart == 'invoice_supplier') + elseif ($modulepart == 'invoice_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $object_instance=new FactureFournisseur($this->db); } - else if ($modulepart == 'propal') + elseif ($modulepart == 'propal') { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $object_instance=new Propal($this->db); } - else if ($modulepart == 'supplier_proposal') + elseif ($modulepart == 'supplier_proposal') { include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; $object_instance=new SupplierProposal($this->db); } - else if ($modulepart == 'order') + elseif ($modulepart == 'order') { include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $object_instance=new Commande($this->db); } - else if ($modulepart == 'order_supplier') + elseif ($modulepart == 'order_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $object_instance=new CommandeFournisseur($this->db); } - else if ($modulepart == 'contract') + elseif ($modulepart == 'contract') { include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $object_instance=new Contrat($this->db); } - else if ($modulepart == 'product') + elseif ($modulepart == 'product') { include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $object_instance=new Product($this->db); } - else if ($modulepart == 'tax') + elseif ($modulepart == 'tax') { include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; $object_instance=new ChargeSociales($this->db); } - else if ($modulepart == 'project') + elseif ($modulepart == 'project') { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $object_instance=new Project($this->db); } - else if ($modulepart == 'fichinter') + elseif ($modulepart == 'fichinter') { include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; $object_instance=new Fichinter($this->db); } - else if ($modulepart == 'user') + elseif ($modulepart == 'user') { include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $object_instance=new User($this->db); } - else if ($modulepart == 'expensereport') + elseif ($modulepart == 'expensereport') { include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; $object_instance=new ExpenseReport($this->db); } - else if ($modulepart == 'holiday') + elseif ($modulepart == 'holiday') { include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; $object_instance=new Holiday($this->db); diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 2cb10056cc3..4c0f4bd2953 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -614,7 +614,7 @@ class FormMail extends Form $soc->fetch($this->toid); $out.= $soc->getNomUrl(1); } - else if ($this->totype == 'contact') + elseif ($this->totype == 'contact') { $contact=new Contact($this->db); $contact->fetch($this->toid); @@ -841,7 +841,7 @@ class FormMail extends Form $out.= '
'; } } - else if (empty($this->withmaindocfile)) // Do not show message if we asked to show the checkbox + elseif (empty($this->withmaindocfile)) // Do not show message if we asked to show the checkbox { $out.= $langs->trans("NoAttachedFiles").'
'; } @@ -924,7 +924,7 @@ class FormMail extends Form // Deal with format differences between message and signature (text / HTML) if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__USER_SIGNATURE__'])) { $this->substit['__USER_SIGNATURE__'] = dol_nl2br($this->substit['__USER_SIGNATURE__']); - } else if(!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) { + } elseif(!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) { $defaultmessage = dol_nl2br($defaultmessage); } diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index dea04047405..299de827dca 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -171,7 +171,7 @@ class FormProjets if ($socid > 0) { if (empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)"; - else if ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. + elseif ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. { $sql.= " AND (p.fk_soc IN (".$socid.", ".$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") OR p.fk_soc IS NULL)"; } @@ -233,12 +233,12 @@ class FormProjets $disabled=1; $labeltoshow.=' - '.$langs->trans("Draft"); } - else if ($obj->fk_statut == 2) + elseif ($obj->fk_statut == 2) { if ($discard_closed == 2) $disabled=1; $labeltoshow.=' - '.$langs->trans("Closed"); } - else if ( empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY) && $socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) + elseif ( empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY) && $socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) { $disabled=1; $labeltoshow.=' - '.$langs->trans("LinkedToAnotherCompany"); @@ -416,12 +416,12 @@ class FormProjets $disabled=1; $labeltoshow.=' - '.$langs->trans("Draft"); } - else if ($obj->fk_statut == Project::STATUS_CLOSED) + elseif ($obj->fk_statut == Project::STATUS_CLOSED) { if ($discard_closed == 2) $disabled=1; $labeltoshow.=' - '.$langs->trans("Closed"); } - else if ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) + elseif ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) { $disabled=1; $labeltoshow.=' - '.$langs->trans("LinkedToAnotherCompany"); diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 4ef6208723d..cde7d0b61d2 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -208,7 +208,7 @@ function limitChars(textarea, limit, infodiv) dol_print_error('','Error to get list of senders: '.$e->getMessage()); } } - else if (!empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' + elseif (!empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' { $tmp=explode('@',$conf->global->MAIN_SMS_SENDMODE); $classfile=$tmp[0]; $module=(empty($tmp[1])?$tmp[0]:$tmp[1]); diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 6f43643eeb7..7a19546dfb3 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -212,7 +212,7 @@ class Interfaces $nbtotal++; $nbko++; if (! empty($objMod->errors)) $this->errors=array_merge($this->errors,$objMod->errors); - else if (! empty($objMod->error)) $this->errors[]=$objMod->error; + elseif (! empty($objMod->error)) $this->errors[]=$objMod->error; //dol_syslog("Error in trigger ".$action." - Nb of error string returned = ".count($this->errors), LOG_ERR); } } @@ -338,7 +338,7 @@ class Interfaces $module=preg_replace('/^mod/i','',$reg[2]); $constparam='MAIN_MODULE_'.strtoupper($module); if (strtolower($module) == 'all') $disabledbymodule=0; - else if (empty($conf->global->$constparam)) $disabledbymodule=2; + elseif (empty($conf->global->$constparam)) $disabledbymodule=2; $triggers[$j]['module']=strtolower($module); } diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 86b27948389..15c22116d46 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -634,7 +634,7 @@ class Menubase $tab_titre = explode("/",$menu['titre']); $title = $langs->trans($tab_titre[0])."/".$langs->trans($tab_titre[1]); } - else if (preg_match('/\|\|/',$menu['titre'])) // To manage different translation (Title||AltTitle@ConditionForAltTitle) + elseif (preg_match('/\|\|/',$menu['titre'])) // To manage different translation (Title||AltTitle@ConditionForAltTitle) { $tab_title = explode("||",$menu['titre']); $alt_title = explode("@",$tab_title[1]); diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index fd37476a26e..454d8281770 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -342,7 +342,7 @@ class RssParser else $items=$rss->items; // With xmlparse //var_dump($items);exit; } - else if ($rss->_format == 'atom') + elseif ($rss->_format == 'atom') { //var_dump($rss); if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) @@ -410,7 +410,7 @@ class RssParser } } } - else if ($rss->_format == 'atom') + elseif ($rss->_format == 'atom') { if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) { diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 1ade95098fa..780be1ba441 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1413,7 +1413,7 @@ class SMTPs die ("Sorry, no content"); // If we have ONE, we can use the simple format - else if( $keyCount === 1 && empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) + elseif( $keyCount === 1 && empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) { $_msgData = $this->_msgContent; $_msgData = $_msgData[$_types[0]]; @@ -1431,7 +1431,7 @@ class SMTPs } // If we have more than ONE, we use the multi-part format - else if( $keyCount >= 1 || ! empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) + elseif( $keyCount >= 1 || ! empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) { // Since this is an actual multi-part message // We need to define a content message Boundary @@ -1479,7 +1479,7 @@ class SMTPs } } // @CHANGE LDR - else if ( $type == 'image' ) + elseif ( $type == 'image' ) { // loop through all images foreach ( $_content as $_image => $_data ) @@ -1751,8 +1751,8 @@ class SMTPs function _getBoundary($type='mixed') { if ($type == 'mixed') return $this->_smtpsBoundary; - else if ($type == 'related') return $this->_smtpsRelatedBoundary; - else if ($type == 'alternative') return $this->_smtpsAlternativeBoundary; + elseif ($type == 'related') return $this->_smtpsRelatedBoundary; + elseif ($type == 'alternative') return $this->_smtpsAlternativeBoundary; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index a8d22b61257..2c1683fd68c 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -105,7 +105,7 @@ class Translate $longforshort=array('ar'=>'ar_SA'); $longforshortexcep=array('ar_EG'); if (isset($longforshort[strtolower($langpart[0])]) && ! in_array($codetouse, $longforshortexcep)) $srclang=$longforshort[strtolower($langpart[0])]; - else if (! is_numeric($langpart[1])) { // Second part YY may be a numeric with some Chrome browser + elseif (! is_numeric($langpart[1])) { // Second part YY may be a numeric with some Chrome browser $srclang=strtolower($langpart[0])."_".strtoupper($langpart[1]); $longforlong=array('no_nb'=>'nb_NO'); if (isset($longforlong[strtolower($srclang)])) $srclang=$longforlong[strtolower($srclang)]; @@ -116,7 +116,7 @@ class Translate // Array to convert short lang code into long code. $longforshort=array('ar'=>'ar_SA', 'el'=>'el_GR', 'ca'=>'ca_ES', 'en'=>'en_US', 'nb'=>'nb_NO', 'no'=>'nb_NO'); if (isset($longforshort[strtolower($langpart[0])])) $srclang=$longforshort[strtolower($langpart[0])]; - else if (! empty($langpart[0])) $srclang=strtolower($langpart[0])."_".strtoupper($langpart[0]); + elseif (! empty($langpart[0])) $srclang=strtolower($langpart[0])."_".strtoupper($langpart[0]); else $srclang='en_US'; } @@ -247,7 +247,7 @@ class Translate $usecachekey=$newdomain.'_'.$langofdir.'_'.md5($file_lang); // Should not contains special chars } // Using cache with shmop. Speed gain: 40ms - Memory overusage: 200ko (Size of session cache file) - else if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) + elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { $usecachekey=$newdomain; } @@ -441,7 +441,7 @@ class Translate $usecachekey=$newdomain.'_'.$langofdir; // Should not contains special chars } // Using cache with shmop. Speed gain: 40ms - Memory overusage: 200ko (Size of session cache file) - else if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) + elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { $usecachekey=$newdomain; } diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index f9e982961c9..0f2ca55c0e8 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -832,19 +832,19 @@ class DoliDBMssql extends DoliDB $sqlfields[$i] .= $field_desc['type']; if( preg_match("/^[^\s]/i",$field_desc['value'])) $sqlfields[$i] .= "(".$field_desc['value'].")"; - else if( preg_match("/^[^\s]/i",$field_desc['attribute'])) + elseif( preg_match("/^[^\s]/i",$field_desc['attribute'])) $sqlfields[$i] .= " ".$field_desc['attribute']; - else if( preg_match("/^[^\s]/i",$field_desc['default'])) + elseif( preg_match("/^[^\s]/i",$field_desc['default'])) { if(preg_match("/null/i",$field_desc['default'])) $sqlfields[$i] .= " default ".$field_desc['default']; else $sqlfields[$i] .= " default '".$field_desc['default']."'"; } - else if( preg_match("/^[^\s]/i",$field_desc['null'])) + elseif( preg_match("/^[^\s]/i",$field_desc['null'])) $sqlfields[$i] .= " ".$field_desc['null']; - else if( preg_match("/^[^\s]/i",$field_desc['extra'])) + elseif( preg_match("/^[^\s]/i",$field_desc['extra'])) $sqlfields[$i] .= " ".$field_desc['extra']; $i++; } diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 185ebe1a56f..07d915f8c0d 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -509,7 +509,7 @@ class DoliDBMysqli extends DoliDB { $return = 'AES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } - else if ($cryptType == 1) + elseif ($cryptType == 1) { $return = 'DES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } @@ -542,7 +542,7 @@ class DoliDBMysqli extends DoliDB { $return = 'AES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } - else if ($cryptType == 1) + elseif ($cryptType == 1) { $return = 'DES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 85abdf2b004..c5cac435b08 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -173,8 +173,8 @@ class DoliDBPgsql extends DoliDB if ($type == 'auto') { if (preg_match('/ALTER TABLE/i',$line)) $type='dml'; - else if (preg_match('/CREATE TABLE/i',$line)) $type='dml'; - else if (preg_match('/DROP TABLE/i',$line)) $type='dml'; + elseif (preg_match('/CREATE TABLE/i',$line)) $type='dml'; + elseif (preg_match('/DROP TABLE/i',$line)) $type='dml'; } $line=preg_replace('/ as signed\)/i',' as integer)',$line); @@ -973,19 +973,19 @@ class DoliDBPgsql extends DoliDB $sqlfields[$i] .= $field_desc['type']; if( preg_match("/^[^\s]/i",$field_desc['value'])) $sqlfields[$i] .= "(".$field_desc['value'].")"; - else if( preg_match("/^[^\s]/i",$field_desc['attribute'])) + elseif( preg_match("/^[^\s]/i",$field_desc['attribute'])) $sqlfields[$i] .= " ".$field_desc['attribute']; - else if( preg_match("/^[^\s]/i",$field_desc['default'])) + elseif( preg_match("/^[^\s]/i",$field_desc['default'])) { if(preg_match("/null/i",$field_desc['default'])) $sqlfields[$i] .= " default ".$field_desc['default']; else $sqlfields[$i] .= " default '".$field_desc['default']."'"; } - else if( preg_match("/^[^\s]/i",$field_desc['null'])) + elseif( preg_match("/^[^\s]/i",$field_desc['null'])) $sqlfields[$i] .= " ".$field_desc['null']; - else if( preg_match("/^[^\s]/i",$field_desc['extra'])) + elseif( preg_match("/^[^\s]/i",$field_desc['extra'])) $sqlfields[$i] .= " ".$field_desc['extra']; $i++; } diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index bbd5853f95f..6a4b11317e5 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -150,8 +150,8 @@ class DoliDBSqlite3 extends DoliDB if ($type == 'auto') { if (preg_match('/ALTER TABLE/i',$line)) $type='dml'; - else if (preg_match('/CREATE TABLE/i',$line)) $type='dml'; - else if (preg_match('/DROP TABLE/i',$line)) $type='dml'; + elseif (preg_match('/CREATE TABLE/i',$line)) $type='dml'; + elseif (preg_match('/DROP TABLE/i',$line)) $type='dml'; } if ($type == 'dml') @@ -742,7 +742,7 @@ class DoliDBSqlite3 extends DoliDB { $return = 'AES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } - else if ($cryptType == 1) + elseif ($cryptType == 1) { $return = 'DES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } @@ -775,7 +775,7 @@ class DoliDBSqlite3 extends DoliDB { $return = 'AES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } - else if ($cryptType == 1) + elseif ($cryptType == 1) { $return = 'DES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } @@ -915,19 +915,19 @@ class DoliDBSqlite3 extends DoliDB $sqlfields[$i] .= $field_desc['type']; if( preg_match("/^[^\s]/i",$field_desc['value'])) $sqlfields[$i] .= "(".$field_desc['value'].")"; - else if( preg_match("/^[^\s]/i",$field_desc['attribute'])) + elseif( preg_match("/^[^\s]/i",$field_desc['attribute'])) $sqlfields[$i] .= " ".$field_desc['attribute']; - else if( preg_match("/^[^\s]/i",$field_desc['default'])) + elseif( preg_match("/^[^\s]/i",$field_desc['default'])) { if(preg_match("/null/i",$field_desc['default'])) $sqlfields[$i] .= " default ".$field_desc['default']; else $sqlfields[$i] .= " default '".$field_desc['default']."'"; } - else if( preg_match("/^[^\s]/i",$field_desc['null'])) + elseif( preg_match("/^[^\s]/i",$field_desc['null'])) $sqlfields[$i] .= " ".$field_desc['null']; - else if( preg_match("/^[^\s]/i",$field_desc['extra'])) + elseif( preg_match("/^[^\s]/i",$field_desc['extra'])) $sqlfields[$i] .= " ".$field_desc['extra']; $i++; } diff --git a/htdocs/core/filemanagerdol/connectors/php/commands.php b/htdocs/core/filemanagerdol/connectors/php/commands.php index 34e32fa5f99..e35d8d328ab 100644 --- a/htdocs/core/filemanagerdol/connectors/php/commands.php +++ b/htdocs/core/filemanagerdol/connectors/php/commands.php @@ -290,7 +290,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') @unlink($sFilePath); $sErrorNumber = '202' ; } - else if ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml($sFilePath) === true ) + elseif ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml($sFilePath) === true ) { @unlink($sFilePath); $sErrorNumber = '202' ; diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 28845122f0d..c03cd09ff16 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -292,7 +292,7 @@ function checkBanForAccount($account) if ($country_code == 'AU') { // Australian if (strlen($account->code_banque) > 7) return false; // Sould be 6 but can be 123-456 - else if (strlen($account->code_banque) < 6) + elseif (strlen($account->code_banque) < 6) return false; // Sould be 6 else return true; diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index efd245209d2..ebd87e5bcde 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -128,7 +128,7 @@ function barcode_encode($code,$encoding) dol_syslog("barcode.lib.php::barcode_encode Use barcode_encode_ean"); $bars=barcode_encode_ean($code, $encoding); } - else if (file_exists($genbarcode_loc)) // For example C39 + elseif (file_exists($genbarcode_loc)) // For example C39 { /* use genbarcode */ dol_syslog("barcode.lib.php::barcode_encode Use genbarcode ".$genbarcode_loc." code=".$code." encoding=".$encoding); @@ -219,7 +219,7 @@ function barcode_encode_ean($ean, $encoding = "EAN-13") if ($a>0) $text.=" "; $text.="$pos:12:{$ean[$a]}"; if ($a==0) $pos+=12; - else if ($a==6) $pos+=12; + elseif ($a==6) $pos+=12; else $pos+=7; } @@ -397,12 +397,12 @@ function barcode_outimage($text, $bars, $scale = 1, $mode = "png", $total_y = 0, header("Content-Type: image/jpeg; name=\"barcode.jpg\""); imagejpeg($im); } - else if ($mode=='gif') + elseif ($mode=='gif') { header("Content-Type: image/gif; name=\"barcode.gif\""); imagegif($im); } - else if (! empty($filebarcode)) // To wxrite into afile onto disk + elseif (! empty($filebarcode)) // To wxrite into afile onto disk { imagepng($im,$filebarcode); } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 41b0f1af3ef..f05a8a3f58b 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -459,9 +459,9 @@ function getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entc else $label=($obj->code && ($outputlangs->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code))?$outputlangs->transnoentitiesnoconv("Country".$obj->code):$label; } if ($withcode == 1) $result=$label?"$obj->code - $label":"$obj->code"; - else if ($withcode == 2) $result=$obj->code; - else if ($withcode == 3) $result=$obj->rowid; - else if ($withcode === 'all') $result=array('id'=>$obj->rowid,'code'=>$obj->code,'label'=>$label); + elseif ($withcode == 2) $result=$obj->code; + elseif ($withcode == 3) $result=$obj->rowid; + elseif ($withcode === 'all') $result=array('id'=>$obj->rowid,'code'=>$obj->code,'label'=>$label); else $result=$label; } else @@ -525,7 +525,7 @@ function getState($id,$withcode='',$dbtouse=0,$withregion=0,$outputlangs='',$ent return $label = $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:'')); } } - else if ($withcode == 2) { + elseif ($withcode == 2) { if ($withregion == 1) { return $label = $obj->region_name . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:'')); } @@ -533,7 +533,7 @@ function getState($id,$withcode='',$dbtouse=0,$withregion=0,$outputlangs='',$ent return $label = ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:'')); } } - else if ($withcode === 'all') { + elseif ($withcode === 'all') { if ($withregion == 1) { return array('id'=>$obj->id,'code'=>$obj->code,'label'=>$label,'region_code'=>$obj->region_code,'region'=>$obj->region_name); } diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 0f84f46497e..19d3b3fb7ae 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -246,11 +246,11 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt return sprintf("%02d",($sWeek*$lengthOfWeek*24 + $sDay*24 + (int) floor($iSecond/3600))); } } - else if ($format == 'hour') // only hour part + elseif ($format == 'hour') // only hour part { $sTime=dol_print_date($iSecond,'%H',true); } - else if ($format == 'fullhour') + elseif ($format == 'fullhour') { if (!empty($iSecond)) { $iSecond=$iSecond/3600; @@ -260,19 +260,19 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt } $sTime=$iSecond; } - else if ($format == 'min') // only min part + elseif ($format == 'min') // only min part { $sTime=dol_print_date($iSecond,'%M',true); } - else if ($format == 'sec') // only sec part + elseif ($format == 'sec') // only sec part { $sTime=dol_print_date($iSecond,'%S',true); } - else if ($format == 'month') // only month part + elseif ($format == 'month') // only month part { $sTime=dol_print_date($iSecond,'%m',true); } - else if ($format == 'year') // only year part + elseif ($format == 'year') // only year part { $sTime=dol_print_date($iSecond,'%Y',true); } @@ -297,12 +297,12 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date) if ($year_date > 0 && empty($day_date)) { $sqldate.= " AND ".$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, $month_date, false)); $sqldate.= "' AND '".$db->idate(dol_get_last_day($year_date, $month_date, false))."'"; - } else if ($year_date > 0 && ! empty($day_date)) { + } elseif ($year_date > 0 && ! empty($day_date)) { $sqldate.= " AND ".$datefield." BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month_date, $day_date, $year_date)); $sqldate.= "' AND '".$db->idate(dol_mktime(23, 59, 59, $month_date, $day_date, $year_date))."'"; } else $sqldate.= " AND date_format( ".$datefield.", '%m') = '".$db->escape($month_date)."'"; - } else if ($year_date > 0){ + } elseif ($year_date > 0){ $sqldate.= " AND ".$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, 1, false)); $sqldate.= "' AND '".$db->idate(dol_get_last_day($year_date, 12, false))."'"; } @@ -345,7 +345,7 @@ function dol_stringtotime($string, $gm=1) if ($syear >= 50 && $syear < 100) $syear+=2000; $string=sprintf("%04d%02d%02d%02d%02d%02d",$syear,$smonth,$sday,$shour,$smin,$ssec); } - else if ( + elseif ( preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$/i',$string,$reg) // Convert date with format YYYY-MM-DDTHH:MM:SSZ (RFC3339) || preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})$/i',$string,$reg) // Convert date with format YYYY-MM-DD HH:MM:SS || preg_match('/^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z$/i',$string,$reg) // Convert date with format YYYYMMDDTHHMMSSZ diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index ae80d371e33..9985c537809 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -118,7 +118,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil { $excludefilterarray=array_merge($excludefilterarray,$excludefilter); } - else if ($excludefilter) $excludefilterarray[]=$excludefilter; + elseif ($excludefilter) $excludefilterarray[]=$excludefilter; // Check if file is qualified foreach($excludefilterarray as $filt) { @@ -167,7 +167,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil } } } - else if (! $isdir && (($types == "files") || ($types == "all"))) + elseif (! $isdir && (($types == "files") || ($types == "all"))) { // Add file into file_list array if ($loaddate || $sortcriteria == 'date') $filedate=dol_filemtime($path."/".$file); @@ -1608,7 +1608,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio { setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); } - else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus + elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus { setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); } @@ -2358,7 +2358,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for users - else if ($modulepart == 'user' && !empty($conf->user->dir_output)) + elseif ($modulepart == 'user' && !empty($conf->user->dir_output)) { $canreaduser=(! empty($fuser->admin) || $fuser->rights->user->user->{$lire}); if ($fuser->id == (int) $refname) { $canreaduser=1; } // A user can always read its own card @@ -2370,7 +2370,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for third parties - else if (($modulepart == 'company' || $modulepart == 'societe') && !empty($conf->societe->dir_output)) + elseif (($modulepart == 'company' || $modulepart == 'societe') && !empty($conf->societe->dir_output)) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->societe->{$lire} || preg_match('/^specimen/i',$original_file)) @@ -2382,7 +2382,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for contact - else if ($modulepart == 'contact' && !empty($conf->societe->dir_output)) + elseif ($modulepart == 'contact' && !empty($conf->societe->dir_output)) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->societe->{$lire}) @@ -2393,7 +2393,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for invoices - else if (($modulepart == 'facture' || $modulepart == 'invoice') && !empty($conf->facture->dir_output)) + elseif (($modulepart == 'facture' || $modulepart == 'invoice') && !empty($conf->facture->dir_output)) { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2403,7 +2403,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; } // Wrapping for mass actions - else if ($modulepart == 'massfilesarea_proposals' && !empty($conf->propal->multidir_output[$entity])) + elseif ($modulepart == 'massfilesarea_proposals' && !empty($conf->propal->multidir_output[$entity])) { if ($fuser->rights->propal->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2411,7 +2411,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->propal->multidir_output[$entity].'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_orders') + elseif ($modulepart == 'massfilesarea_orders') { if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2419,7 +2419,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->commande->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_invoices') + elseif ($modulepart == 'massfilesarea_invoices') { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2427,7 +2427,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->facture->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_expensereport') + elseif ($modulepart == 'massfilesarea_expensereport') { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2435,7 +2435,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->expensereport->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_interventions') + elseif ($modulepart == 'massfilesarea_interventions') { if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2443,7 +2443,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->ficheinter->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_supplier_proposal' && !empty($conf->supplier_proposal->dir_output)) + elseif ($modulepart == 'massfilesarea_supplier_proposal' && !empty($conf->supplier_proposal->dir_output)) { if ($fuser->rights->supplier_proposal->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2451,7 +2451,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->supplier_proposal->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_supplier_order') + elseif ($modulepart == 'massfilesarea_supplier_order') { if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2459,7 +2459,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->fournisseur->commande->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_supplier_invoice') + elseif ($modulepart == 'massfilesarea_supplier_invoice') { if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2467,7 +2467,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file=$conf->fournisseur->facture->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_contract' && !empty($conf->contrat->dir_output)) + elseif ($modulepart == 'massfilesarea_contract' && !empty($conf->contrat->dir_output)) { if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2477,7 +2477,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for interventions - else if (($modulepart == 'fichinter' || $modulepart == 'ficheinter') && !empty($conf->ficheinter->dir_output)) + elseif (($modulepart == 'fichinter' || $modulepart == 'ficheinter') && !empty($conf->ficheinter->dir_output)) { if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2488,7 +2488,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les deplacements et notes de frais - else if ($modulepart == 'deplacement' && !empty($conf->deplacement->dir_output)) + elseif ($modulepart == 'deplacement' && !empty($conf->deplacement->dir_output)) { if ($fuser->rights->deplacement->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2498,7 +2498,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; } // Wrapping pour les propales - else if (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) + elseif (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) { if ($fuser->rights->propale->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2509,7 +2509,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les commandes - else if (($modulepart == 'commande' || $modulepart == 'order') && !empty($conf->commande->dir_output)) + elseif (($modulepart == 'commande' || $modulepart == 'order') && !empty($conf->commande->dir_output)) { if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2520,7 +2520,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les projets - else if ($modulepart == 'project' && !empty($conf->projet->dir_output)) + elseif ($modulepart == 'project' && !empty($conf->projet->dir_output)) { if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2529,7 +2529,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $original_file=$conf->projet->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('project').")"; } - else if ($modulepart == 'project_task' && !empty($conf->projet->dir_output)) + elseif ($modulepart == 'project_task' && !empty($conf->projet->dir_output)) { if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2540,7 +2540,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les commandes fournisseurs - else if (($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier') && !empty($conf->fournisseur->commande->dir_output)) + elseif (($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier') && !empty($conf->fournisseur->commande->dir_output)) { if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2551,7 +2551,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les factures fournisseurs - else if (($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') && !empty($conf->fournisseur->facture->dir_output)) + elseif (($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') && !empty($conf->fournisseur->facture->dir_output)) { if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2561,7 +2561,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture_fourn WHERE facnumber='".$db->escape($refname)."' AND entity=".$conf->entity; } // Wrapping pour les rapport de paiements - else if ($modulepart == 'supplier_payment') + elseif ($modulepart == 'supplier_payment') { if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2572,7 +2572,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les rapport de paiements - else if ($modulepart == 'facture_paiement' && !empty($conf->facture->dir_output)) + elseif ($modulepart == 'facture_paiement' && !empty($conf->facture->dir_output)) { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2583,7 +2583,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for accounting exports - else if ($modulepart == 'export_compta' && !empty($conf->accounting->dir_output)) + elseif ($modulepart == 'export_compta' && !empty($conf->accounting->dir_output)) { if ($fuser->rights->accounting->bind->write || preg_match('/^specimen/i',$original_file)) { @@ -2593,7 +2593,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les expedition - else if ($modulepart == 'expedition' && !empty($conf->expedition->dir_output)) + elseif ($modulepart == 'expedition' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2602,7 +2602,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $original_file=$conf->expedition->dir_output."/sending/".$original_file; } // Wrapping pour les bons de livraison - else if ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) + elseif ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->livraison->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2612,7 +2612,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les actions - else if ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) + elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) { if ($fuser->rights->agenda->myactions->{$read} || preg_match('/^specimen/i',$original_file)) { @@ -2622,7 +2622,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les actions - else if ($modulepart == 'actionsreport' && !empty($conf->agenda->dir_temp)) + elseif ($modulepart == 'actionsreport' && !empty($conf->agenda->dir_temp)) { if ($fuser->rights->agenda->allactions->{$read} || preg_match('/^specimen/i',$original_file)) { @@ -2632,7 +2632,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les produits et services - else if ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service' || $modulepart == 'produit|service') + elseif ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service' || $modulepart == 'produit|service') { if (empty($entity) || (empty($conf->product->multidir_output[$entity]) && empty($conf->service->multidir_output[$entity]))) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if (($fuser->rights->produit->{$lire} || $fuser->rights->service->{$lire}) || preg_match('/^specimen/i',$original_file)) @@ -2644,7 +2644,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les lots produits - else if ($modulepart == 'product_batch' || $modulepart == 'produitlot') + elseif ($modulepart == 'product_batch' || $modulepart == 'produitlot') { if (empty($entity) || (empty($conf->productbatch->multidir_output[$entity]))) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if (($fuser->rights->produit->{$lire} ) || preg_match('/^specimen/i',$original_file)) @@ -2655,7 +2655,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les contrats - else if ($modulepart == 'contract' && !empty($conf->contrat->dir_output)) + elseif ($modulepart == 'contract' && !empty($conf->contrat->dir_output)) { if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2666,7 +2666,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les dons - else if ($modulepart == 'donation' && !empty($conf->don->dir_output)) + elseif ($modulepart == 'donation' && !empty($conf->don->dir_output)) { if ($fuser->rights->don->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2676,7 +2676,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les dons - else if ($modulepart == 'dolresource' && !empty($conf->resource->dir_output)) + elseif ($modulepart == 'dolresource' && !empty($conf->resource->dir_output)) { if ($fuser->rights->resource->{$read} || preg_match('/^specimen/i',$original_file)) { @@ -2686,7 +2686,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les remises de cheques - else if ($modulepart == 'remisecheque' && !empty($conf->banque->dir_output)) + elseif ($modulepart == 'remisecheque' && !empty($conf->banque->dir_output)) { if ($fuser->rights->banque->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2697,7 +2697,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for bank - else if ($modulepart == 'bank' && !empty($conf->bank->dir_output)) + elseif ($modulepart == 'bank' && !empty($conf->bank->dir_output)) { if ($fuser->rights->banque->{$lire}) { @@ -2707,7 +2707,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for export module - else if ($modulepart == 'export' && !empty($conf->export->dir_temp)) + elseif ($modulepart == 'export' && !empty($conf->export->dir_temp)) { // Aucun test necessaire car on force le rep de download sur // le rep export qui est propre a l'utilisateur @@ -2716,35 +2716,35 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for import module - else if ($modulepart == 'import' && !empty($conf->import->dir_temp)) + elseif ($modulepart == 'import' && !empty($conf->import->dir_temp)) { $accessallowed=1; $original_file=$conf->import->dir_temp.'/'.$original_file; } // Wrapping pour l'editeur wysiwyg - else if ($modulepart == 'editor' && !empty($conf->fckeditor->dir_output)) + elseif ($modulepart == 'editor' && !empty($conf->fckeditor->dir_output)) { $accessallowed=1; $original_file=$conf->fckeditor->dir_output.'/'.$original_file; } // Wrapping for backups - else if ($modulepart == 'systemtools' && !empty($conf->admin->dir_output)) + elseif ($modulepart == 'systemtools' && !empty($conf->admin->dir_output)) { if ($fuser->admin) $accessallowed=1; $original_file=$conf->admin->dir_output.'/'.$original_file; } // Wrapping for upload file test - else if ($modulepart == 'admin_temp' && !empty($conf->admin->dir_temp)) + elseif ($modulepart == 'admin_temp' && !empty($conf->admin->dir_temp)) { if ($fuser->admin) $accessallowed=1; $original_file=$conf->admin->dir_temp.'/'.$original_file; } // Wrapping pour BitTorrent - else if ($modulepart == 'bittorrent' && !empty($conf->bittorrent->dir_output)) + elseif ($modulepart == 'bittorrent' && !empty($conf->bittorrent->dir_output)) { $accessallowed=1; $dir='files'; @@ -2753,7 +2753,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour Foundation module - else if ($modulepart == 'member' && !empty($conf->adherent->dir_output)) + elseif ($modulepart == 'member' && !empty($conf->adherent->dir_output)) { if ($fuser->rights->adherent->{$lire} || preg_match('/^specimen/i',$original_file)) { @@ -2763,7 +2763,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for Scanner - else if ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp)) + elseif ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp)) { $accessallowed=1; $original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file; @@ -2790,7 +2790,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed=1; $original_file=$conf->{$reg[1]}->dir_temp.'/'.$fuser->id.'/'.$original_file; } - else if (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg)) + elseif (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg)) { if (empty($conf->{$reg[1]}->dir_temp)) // modulepart not supported { @@ -2800,7 +2800,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed=1; $original_file=$conf->{$reg[1]}->dir_temp.'/'.$original_file; } - else if (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg)) + elseif (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg)) { if (empty($conf->{$reg[1]}->dir_output)) // modulepart not supported { @@ -2810,7 +2810,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed=1; $original_file=$conf->{$reg[1]}->dir_output.'/'.$fuser->id.'/'.$original_file; } - else if (preg_match('/^massfilesarea_([a-z]+)$/i', $modulepart, $reg)) + elseif (preg_match('/^massfilesarea_([a-z]+)$/i', $modulepart, $reg)) { if (empty($conf->{$reg[1]}->dir_output)) // modulepart not supported { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 690a3ff5152..a68e83f09cd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -496,7 +496,7 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu // '"' is dangerous because param in url can close the href= or src= and add javascript functions. // '../' is dangerous because it allows dir transversals if (preg_match('/"/',$out)) $out=''; - else if (preg_match('/\.\.\//',$out)) $out=''; + elseif (preg_match('/\.\.\//',$out)) $out=''; } break; case 'san_alpha': @@ -536,7 +536,7 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu // '"' is dangerous because param in url can close the href= or src= and add javascript functions. // '../' is dangerous because it allows dir transversals if (preg_match('/"/',$out)) $out=''; - else if (preg_match('/\.\.\//',$out)) $out=''; + elseif (preg_match('/\.\.\//',$out)) $out=''; $out=dol_string_nohtmltag($out); } break; @@ -590,7 +590,7 @@ if (! function_exists('dol_getprefix')) if (! empty($conf->global->MAIL_PREFIX_FOR_EMAIL_ID)) // If MAIL_PREFIX_FOR_EMAIL_ID is set (a value initialized with a random value is recommended) { if ($conf->global->MAIL_PREFIX_FOR_EMAIL_ID != 'SERVER_NAME') return $conf->global->MAIL_PREFIX_FOR_EMAIL_ID; - else if (isset($_SERVER["SERVER_NAME"])) return $_SERVER["SERVER_NAME"]; + elseif (isset($_SERVER["SERVER_NAME"])) return $_SERVER["SERVER_NAME"]; } return dol_hash(DOL_DOCUMENT_ROOT.DOL_URL_ROOT, '3'); } @@ -911,9 +911,9 @@ function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0) //$substitjs[''.$_SERVER['REMOTE_ADDR']); // This is when server run normally on a server - else if (! empty($_SERVER["REMOTE_ADDR"])) $data['ip'] = $_SERVER['REMOTE_ADDR']; + elseif (! empty($_SERVER["REMOTE_ADDR"])) $data['ip'] = $_SERVER['REMOTE_ADDR']; // This is when PHP session is ran inside a web server but not inside a client request (example: init code of apache) - else if (! empty($_SERVER['SERVER_ADDR'])) $data['ip'] = $_SERVER['SERVER_ADDR']; + elseif (! empty($_SERVER['SERVER_ADDR'])) $data['ip'] = $_SERVER['SERVER_ADDR']; // This is when PHP session is ran outside a web server, like from Windows command line (Not always defined, but useful if OS defined it). - else if (! empty($_SERVER['COMPUTERNAME'])) $data['ip'] = $_SERVER['COMPUTERNAME'].(empty($_SERVER['USERNAME'])?'':'@'.$_SERVER['USERNAME']); + elseif (! empty($_SERVER['COMPUTERNAME'])) $data['ip'] = $_SERVER['COMPUTERNAME'].(empty($_SERVER['USERNAME'])?'':'@'.$_SERVER['USERNAME']); // This is when PHP session is ran outside a web server, like from Linux command line (Not always defined, but usefull if OS defined it). - else if (! empty($_SERVER['LOGNAME'])) $data['ip'] = '???@'.$_SERVER['LOGNAME']; + elseif (! empty($_SERVER['LOGNAME'])) $data['ip'] = '???@'.$_SERVER['LOGNAME']; // Loop on each log handler and send output foreach ($conf->loghandlers as $loghandlerinstance) { @@ -1162,7 +1162,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi $out.=''.$links[$i][1].''."\n"; } } - else if (! empty($links[$i][1])) + elseif (! empty($links[$i][1])) { //print "x $i $active ".$links[$i][2]." z"; if ($isactive) @@ -1196,7 +1196,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi else $outmore.=''.$links[$i][1].''."\n"; } - else if (! empty($links[$i][1])) + elseif (! empty($links[$i][1])) { $outmore.=''; $outmore.=preg_replace('/([a-z])\/([a-z])/i', '\\1 / \\2', $links[$i][1]); // Replace x/y with x / y to allow wrap on long composed texts. @@ -1425,7 +1425,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r } } } - else if (! $phototoshow) + elseif (! $phototoshow) { $phototoshow = $form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos); } @@ -1627,7 +1627,7 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', } if ($object->zip) $ret .= ($ret?", ":'').$object->zip; } - else if (in_array($object->country_code,array('GB','UK'))) // UK: title firstname name \n address lines \n town state \n zip \n country + elseif (in_array($object->country_code,array('GB','UK'))) // UK: title firstname name \n address lines \n town state \n zip \n country { $ret .= ($ret ? $sep : '' ).$object->town; if ($object->state) @@ -1636,7 +1636,7 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', } if ($object->zip) $ret .= ($ret ? $sep : '' ).$object->zip; } - else if (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country + elseif (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country { $ret .= ($ret ? $sep : '' ).$object->zip; $ret .= ($object->town?(($object->zip?' ':'').$object->town):''); @@ -1645,7 +1645,7 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', $ret.="\n".$object->state; } } - else if (in_array($object->country_code,array('IT'))) // IT: tile firstname name\n address lines \n zip (Code Departement) \n country + elseif (in_array($object->country_code,array('IT'))) // IT: tile firstname name\n address lines \n zip (Code Departement) \n country { $ret .= ($ret ? $sep : '' ).$object->zip; $ret .= ($object->town?(($object->zip?' ':'').$object->town):''); @@ -1746,22 +1746,22 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e // Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default. // TODO Add format daysmallyear and dayhoursmallyear if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short); - else if ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short); - else if ($format == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration); - else if ($format == 'daytext') $format=($outputlangs->trans("FormatDateText")!="FormatDateText"?$outputlangs->trans("FormatDateText"):$conf->format_date_text); - else if ($format == 'daytextshort') $format=($outputlangs->trans("FormatDateTextShort")!="FormatDateTextShort"?$outputlangs->trans("FormatDateTextShort"):$conf->format_date_text_short); - else if ($format == 'dayhour') $format=($outputlangs->trans("FormatDateHourShort")!="FormatDateHourShort"?$outputlangs->trans("FormatDateHourShort"):$conf->format_date_hour_short); - else if ($format == 'dayhoursec') $format=($outputlangs->trans("FormatDateHourSecShort")!="FormatDateHourSecShort"?$outputlangs->trans("FormatDateHourSecShort"):$conf->format_date_hour_sec_short); - else if ($format == 'dayhourtext') $format=($outputlangs->trans("FormatDateHourText")!="FormatDateHourText"?$outputlangs->trans("FormatDateHourText"):$conf->format_date_hour_text); - else if ($format == 'dayhourtextshort') $format=($outputlangs->trans("FormatDateHourTextShort")!="FormatDateHourTextShort"?$outputlangs->trans("FormatDateHourTextShort"):$conf->format_date_hour_text_short); + elseif ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short); + elseif ($format == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration); + elseif ($format == 'daytext') $format=($outputlangs->trans("FormatDateText")!="FormatDateText"?$outputlangs->trans("FormatDateText"):$conf->format_date_text); + elseif ($format == 'daytextshort') $format=($outputlangs->trans("FormatDateTextShort")!="FormatDateTextShort"?$outputlangs->trans("FormatDateTextShort"):$conf->format_date_text_short); + elseif ($format == 'dayhour') $format=($outputlangs->trans("FormatDateHourShort")!="FormatDateHourShort"?$outputlangs->trans("FormatDateHourShort"):$conf->format_date_hour_short); + elseif ($format == 'dayhoursec') $format=($outputlangs->trans("FormatDateHourSecShort")!="FormatDateHourSecShort"?$outputlangs->trans("FormatDateHourSecShort"):$conf->format_date_hour_sec_short); + elseif ($format == 'dayhourtext') $format=($outputlangs->trans("FormatDateHourText")!="FormatDateHourText"?$outputlangs->trans("FormatDateHourText"):$conf->format_date_hour_text); + elseif ($format == 'dayhourtextshort') $format=($outputlangs->trans("FormatDateHourTextShort")!="FormatDateHourTextShort"?$outputlangs->trans("FormatDateHourTextShort"):$conf->format_date_hour_text_short); // Format not sensitive to language - else if ($format == 'dayhourlog') $format='%Y%m%d%H%M%S'; - else if ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ'; - else if ($format == 'dayhourxcard') $format='%Y%m%dT%H%M%SZ'; - else if ($format == 'dayxcard') $format='%Y%m%d'; - else if ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339 - else if ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339 - else if ($format == 'standard') $format='%Y-%m-%d %H:%M:%S'; + elseif ($format == 'dayhourlog') $format='%Y%m%d%H%M%S'; + elseif ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ'; + elseif ($format == 'dayhourxcard') $format='%Y%m%dT%H%M%SZ'; + elseif ($format == 'dayxcard') $format='%Y%m%d'; + elseif ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339 + elseif ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339 + elseif ($format == 'standard') $format='%Y-%m-%d %H:%M:%S'; if ($reduceformat) { @@ -1953,7 +1953,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) $default_timezone=@date_default_timezone_get(); // Example 'Europe/Berlin' $localtz = new DateTimeZone($default_timezone); } - else if ($gm === 'user') + elseif ($gm === 'user') { // We use dol_tz_string first because it is more reliable. $default_timezone=(empty($_SESSION["dol_tz_string"])?@date_default_timezone_get():$_SESSION["dol_tz_string"]); // Example 'Europe/Berlin' @@ -1966,7 +1966,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) $default_timezone=@date_default_timezone_get(); } } - else if (strrpos($gm, "tz,") !== false) + elseif (strrpos($gm, "tz,") !== false) { $timezone=str_replace("tz,", "", $gm); // Example 'tz,Europe/Berlin' try @@ -2015,7 +2015,7 @@ function dol_now($mode='gmt') // Note that gmmktime and mktime return same value (GMT) when used without parameters //if ($mode == 'gmt') $ret=gmmktime(); // Strict Standards: gmmktime(): You should be using the time() function instead if ($mode == 'gmt') $ret=time(); // Time for now at greenwich. - else if ($mode == 'tzserver') // Time for now with PHP server timezone added + elseif ($mode == 'tzserver') // Time for now with PHP server timezone added { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $tzsecond=getServerTimeZoneInt('now'); // Contains tz+dayling saving time @@ -2027,7 +2027,7 @@ function dol_now($mode='gmt') $tzsecond=getParentCompanyTimeZoneInt(); // Contains tz+dayling saving time $ret=dol_now('gmt')+($tzsecond*3600); }*/ - else if ($mode == 'tzuser') // Time for now with user timezone added + elseif ($mode == 'tzuser') // Time for now with user timezone added { //print 'time: '.time().'-'.mktime().'-'.gmmktime(); $offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60; @@ -2527,7 +2527,7 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep $newphone =''; } - else if (! empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url + elseif (! empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url { if (empty($user->clicktodial_loaded)) $user->fetch_clicktodial(); @@ -3101,10 +3101,10 @@ function img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath = false, $sr if (! empty($conf->global->MAIN_OVERWRITE_THEME_PATH)) { $path = $conf->global->MAIN_OVERWRITE_THEME_PATH.'/theme/'.$theme; // If the theme does not have the same name as the module } - else if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { + elseif (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path = $conf->global->MAIN_OVERWRITE_THEME_RES.'/theme/'.$conf->global->MAIN_OVERWRITE_THEME_RES; // To allow an external module to overwrite image resources whatever is activated theme } - else if (! empty($conf->modules_parts['theme']) && array_key_exists($theme, $conf->modules_parts['theme'])) { + elseif (! empty($conf->modules_parts['theme']) && array_key_exists($theme, $conf->modules_parts['theme'])) { $path = $theme.'/theme/'.$theme; // If the theme have the same name as the module } @@ -4137,7 +4137,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so { $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>1'; if ($cpt > 2) $pagelist.='dol_use_jmobile != 4)?' class="pagination"':'').'>dol_use_jmobile != 4)?'class="inactive"':'').'>...'; - else if ($cpt == 2) $pagelist.='dol_use_jmobile != 4)?' class="pagination"':'').'>2'; + elseif ($cpt == 2) $pagelist.='dol_use_jmobile != 4)?' class="pagination"':'').'>2'; } do @@ -4157,7 +4157,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so if ($cpt<$nbpages) { if ($cpt<$nbpages-2) $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>dol_use_jmobile != 4)?'class="inactive"':'').'>...'; - else if ($cpt == $nbpages-2) $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>'.($nbpages - 1).''; + elseif ($cpt == $nbpages-2) $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>'.($nbpages - 1).''; $pagelist.= 'dol_use_jmobile != 4)?' class="pagination"':'').'>'.$nbpages.''; } } @@ -4341,7 +4341,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou if ($outlangs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") $dec=$outlangs->transnoentitiesnoconv("SeparatorDecimal"); if ($outlangs->transnoentitiesnoconv("SeparatorThousand")!= "SeparatorThousand") $thousand=$outlangs->transnoentitiesnoconv("SeparatorThousand"); if ($thousand == 'None') $thousand=''; - else if ($thousand == 'Space') $thousand=' '; + elseif ($thousand == 'Space') $thousand=' '; //print "outlangs=".$outlangs->defaultlang." amount=".$amount." html=".$form." trunc=".$trunc." nbdecimal=".$nbdecimal." dec='".$dec."' thousand='".$thousand."'
"; //print "amount=".$amount."-"; @@ -6294,7 +6294,7 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1) if ($firstname && $lastname) $ret.=' '; $ret.=$lastname; } - else if ($nameorder == 2 || $nameorder == 3) + elseif ($nameorder == 2 || $nameorder == 3) { $ret.=$firstname; if (empty($ret) && $nameorder == 3) @@ -6518,8 +6518,8 @@ function dol_htmloutput_mesg($mesgstring = '',$mesgarray = array(), $style = 'ok if ($val && preg_match('/class="warning"/i',$val)) { $iswarning++; break; } } } - else if ($mesgstring && preg_match('/class="error"/i',$mesgstring)) $iserror++; - else if ($mesgstring && preg_match('/class="warning"/i',$mesgstring)) $iswarning++; + elseif ($mesgstring && preg_match('/class="error"/i',$mesgstring)) $iserror++; + elseif ($mesgstring && preg_match('/class="warning"/i',$mesgstring)) $iswarning++; if ($style=='error') $iserror++; if ($style=='warning') $iswarning++; @@ -7082,7 +7082,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode= $h++; } } - else if (count($values) == 5) // deprecated + elseif (count($values) == 5) // deprecated { dol_syslog('Passing 5 values in tabs module_parts is deprecated. Please update to 6 with permissions.', LOG_WARNING); @@ -7102,7 +7102,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode= $h++; } } - else if ($mode == 'remove' && preg_match('/^\-/',$values[1])) + elseif ($mode == 'remove' && preg_match('/^\-/',$values[1])) { if ($values[0] != $type) continue; $tabname=str_replace('-','',$values[1]); @@ -7459,12 +7459,12 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0) $i2++; // a criteria was added to string } } - else if ($mode == 2) + elseif ($mode == 2) { $newres .= ($i2 > 0 ? ' OR ' : '') . $field . " IN (" . $db->escape(trim($crit)) . ")"; $i2++; // a criteria was added to string } - else if ($mode == 3) + elseif ($mode == 3) { $tmparray=explode(',',trim($crit)); if (count($tmparray)) @@ -7482,7 +7482,7 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0) $i2++; // a criteria was added to string } } - else if ($mode == 4) + elseif ($mode == 4) { $tmparray=explode(',',trim($crit)); if (count($tmparray)) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index aae70adfb62..d94477579dc 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -717,7 +717,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m global $conf,$user; if (! is_object($objsoc)) $valueforccc=$objsoc; - else if ($table == "commande_fournisseur" || $table == "facture_fourn" ) $valueforccc=$objsoc->code_fournisseur; + elseif ($table == "commande_fournisseur" || $table == "facture_fourn" ) $valueforccc=$objsoc->code_fournisseur; else $valueforccc=$objsoc->code_client; $sharetable = $table; @@ -859,7 +859,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m //print "yearoffset=".$yearoffset." yearoffsettype=".$yearoffsettype; if (is_numeric($yearoffsettype) && $yearoffsettype >= 1) $maskraz=$yearoffsettype; // For backward compatibility - else if ($yearoffsettype === '0' || (! empty($yearoffsettype) && ! is_numeric($yearoffsettype) && $conf->global->SOCIETE_FISCAL_MONTH_START > 1)) + elseif ($yearoffsettype === '0' || (! empty($yearoffsettype) && ! is_numeric($yearoffsettype) && $conf->global->SOCIETE_FISCAL_MONTH_START > 1)) $maskraz = $conf->global->SOCIETE_FISCAL_MONTH_START; //print "maskraz=".$maskraz; // -1=no reset @@ -882,8 +882,8 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m else // if reset is for a specific month in year, we need year { if (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=3; $posm=2; } - else if (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=3; } - else if (preg_match('/^(.*)\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=0; } + elseif (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=3; } + elseif (preg_match('/^(.*)\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=0; } else return 'ErrorCantUseRazIfNoYearInMask'; } // Define length @@ -917,10 +917,10 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m if ($date < $nextnewyeardate && $yearoffsettype == '+') $yearoffset=1; } // If after or equal of current new year date - else if ($date >= $newyeardate && $yearoffsettype == '-') $yearoffset=-1; + elseif ($date >= $newyeardate && $yearoffsettype == '-') $yearoffset=-1; } // For backward compatibility - else if (date("m",$date) < $maskraz && empty($resetEveryMonth)) { $yearoffset=-1; } // If current month lower that month of return to zero, year is previous year + elseif (date("m",$date) < $maskraz && empty($resetEveryMonth)) { $yearoffset=-1; } // If current month lower that month of return to zero, year is previous year if ($yearlen == 4) $yearcomp=sprintf("%04d",date("Y",$date)+$yearoffset); elseif ($yearlen == 2) $yearcomp=sprintf("%02d",date("y",$date)+$yearoffset); @@ -938,7 +938,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $sqlwhere.=" AND SUBSTRING(".$field.", ".$monthpos.", ".$monthlen.") < '".str_pad($monthcomp, $monthlen, '0', STR_PAD_LEFT)."') "; $sqlwhere.=')'; } - else if ($resetEveryMonth) + elseif ($resetEveryMonth) { $sqlwhere.="(SUBSTRING(".$field.", ".$yearpos.", ".$yearlen.") = '".$yearcomp."'"; $sqlwhere.=" AND SUBSTRING(".$field.", ".$monthpos.", ".$monthlen.") = '".str_pad($monthcomp, $monthlen, '0', STR_PAD_LEFT)."')"; @@ -989,7 +989,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $sql.= " AND ".$field." NOT LIKE '(PROV%)'"; if ($bentityon) // only if entity enable $sql.= " AND entity IN (".getEntity($sharetable).")"; - else if (! empty($forceentity)) + elseif (! empty($forceentity)) $sql.= " AND entity IN (".$forceentity.")"; if ($where) $sql.=$where; if ($sqlwhere) $sql.=' AND '.$sqlwhere; @@ -1006,12 +1006,12 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m // Check if we must force counter to maskoffset if (empty($counter)) $counter=$maskoffset; - else if (preg_match('/[^0-9]/i',$counter)) + elseif (preg_match('/[^0-9]/i',$counter)) { $counter=0; dol_syslog("Error, the last counter found is '".$counter."' so is not a numeric value. We will restart to 1.", LOG_ERR); } - else if ($counter < $maskoffset && empty($conf->global->MAIN_NUMBERING_OFFSET_ONLY_FOR_FIRST)) $counter=$maskoffset; + elseif ($counter < $maskoffset && empty($conf->global->MAIN_NUMBERING_OFFSET_ONLY_FOR_FIRST)) $counter=$maskoffset; if ($mode == 'last') // We found value for counter = last counter value. Now need to get corresponding ref of invoice. { @@ -1038,7 +1038,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $sql.= " AND ".$field." NOT LIKE '%PROV%'"; if ($bentityon) // only if entity enable $sql.= " AND entity IN (".getEntity($sharetable).")"; - else if (! empty($forceentity)) + elseif (! empty($forceentity)) $sql.= " AND entity IN (".$forceentity.")"; if ($where) $sql.=$where; if ($sqlwhere) $sql.=' AND '.$sqlwhere; @@ -1054,7 +1054,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $numFinal=$ref; } - else if ($mode == 'next') + elseif ($mode == 'next') { $counter++; @@ -1094,7 +1094,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $maskrefclient_sql.= " WHERE ".$field." LIKE '".$maskrefclient_maskLike."'"; if ($bentityon) // only if entity enable $maskrefclient_sql.= " AND entity IN (".getEntity($sharetable).")"; - else if (! empty($forceentity)) + elseif (! empty($forceentity)) $sql.= " AND entity IN (".$forceentity.")"; if ($where) $maskrefclient_sql.=$where; //use the same optional where as general mask if ($sqlwhere) $maskrefclient_sql.=' AND '.$sqlwhere; //use the same sqlwhere as general mask @@ -1357,9 +1357,9 @@ function numero_semaine($time) // Definition du Jeudi de la semaine if (date("w",mktime(12,0,0,$mois,$jour,$annee))==0) // Dimanche $jeudiSemaine = mktime(12,0,0,$mois,$jour,$annee)-3*24*60*60; - else if (date("w",mktime(12,0,0,$mois,$jour,$annee))<4) // du Lundi au Mercredi + elseif (date("w",mktime(12,0,0,$mois,$jour,$annee))<4) // du Lundi au Mercredi $jeudiSemaine = mktime(12,0,0,$mois,$jour,$annee)+(4-date("w",mktime(12,0,0,$mois,$jour,$annee)))*24*60*60; - else if (date("w",mktime(12,0,0,$mois,$jour,$annee))>4) // du Vendredi au Samedi + elseif (date("w",mktime(12,0,0,$mois,$jour,$annee))>4) // du Vendredi au Samedi $jeudiSemaine = mktime(12,0,0,$mois,$jour,$annee)-(date("w",mktime(12,0,0,$mois,$jour,$annee))-4)*24*60*60; else // Jeudi $jeudiSemaine = mktime(12,0,0,$mois,$jour,$annee); @@ -1369,11 +1369,11 @@ function numero_semaine($time) { $premierJeudiAnnee = mktime(12,0,0,1,1,date("Y",$jeudiSemaine))+4*24*60*60; } - else if (date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))<4) // du Lundi au Mercredi + elseif (date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))<4) // du Lundi au Mercredi { $premierJeudiAnnee = mktime(12,0,0,1,1,date("Y",$jeudiSemaine))+(4-date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine))))*24*60*60; } - else if (date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))>4) // du Vendredi au Samedi + elseif (date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))>4) // du Vendredi au Samedi { $premierJeudiAnnee = mktime(12,0,0,1,1,date("Y",$jeudiSemaine))+(7-(date("w",mktime(12,0,0,1,1,date("Y",$jeudiSemaine)))-4))*24*60*60; } diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index 418cc1418b5..cbbfaaf89ef 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -78,7 +78,7 @@ function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addhea curl_setopt($ch, CURLOPT_POST, 1); // POST curl_setopt($ch, CURLOPT_POSTFIELDS, $param); // Setting param x=a&y=z as POST fields } - else if ($postorget == 'PUT') + elseif ($postorget == 'PUT') { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT' if (! is_array($param)) parse_str($param, $array_param); @@ -89,17 +89,17 @@ function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addhea } curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($array_param)); // Setting param x=a&y=z as PUT fields } - else if ($postorget == 'PUTALREADYFORMATED') + elseif ($postorget == 'PUTALREADYFORMATED') { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT' curl_setopt($ch, CURLOPT_POSTFIELDS, $param); // param = content of post, like a xml string } - else if ($postorget == 'HEAD') + elseif ($postorget == 'HEAD') { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD'); // HTTP request is 'HEAD' curl_setopt($ch, CURLOPT_NOBODY, true); } - else if ($postorget == 'DELETE') + elseif ($postorget == 'DELETE') { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); // POST } diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index 9f2e55153d0..d54bdd6ac0f 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -113,11 +113,11 @@ function show_ldap_test_button($butlabel,$testlabel,$key,$dn,$objectclass) { print ''.$butlabel.''; } - else if (empty($conf->global->LDAP_SERVER_HOST)) + elseif (empty($conf->global->LDAP_SERVER_HOST)) { print ''.$butlabel.''; } - else if (empty($key) || empty($dn) || empty($objectclass)) + elseif (empty($key) || empty($dn) || empty($objectclass)) { $langs->load("errors"); print ''.$butlabel.''; @@ -172,7 +172,7 @@ function show_ldap_content($result,$level,$count,$var,$hide=0,$subcount=0) } show_ldap_content($val,$level+1,$count,$var,$hide,$val["count"]); } - else if ($subcount) + elseif ($subcount) { $subcount--; $newstring=dol_htmlentitiesbr($val); diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index 69c127f915c..ca21ed606f3 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -69,7 +69,7 @@ function dol_setcache($memoryid,$data) return -$rescode; } } - else if (! empty($conf->memcached->enabled) && class_exists('Memcache')) + elseif (! empty($conf->memcached->enabled) && class_exists('Memcache')) { global $dolmemcache; if (empty($dolmemcache) || ! is_object($dolmemcache)) @@ -93,7 +93,7 @@ function dol_setcache($memoryid,$data) } } // Using shmop - else if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) + elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { $result=dol_setshmop($memoryid,$data); } @@ -139,7 +139,7 @@ function dol_getcache($memoryid) return -$rescode; } } - else if (! empty($conf->memcached->enabled) && class_exists('Memcache')) + elseif (! empty($conf->memcached->enabled) && class_exists('Memcache')) { global $m; if (empty($m) || ! is_object($m)) @@ -165,7 +165,7 @@ function dol_getcache($memoryid) } } // Using shmop - else if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) + elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { $data=dol_getshmop($memoryid); return $data; diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index 4981e0fffd0..34cccd6bb91 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -263,8 +263,8 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='', $type = preg_replace('/:.*$/', '', $type); // For case type = 'integer:Societe:societe/class/societe.class.php' if ($type == 'html') $type = 'text'; // html modulebuilder type is a text type in database - else if ($type == 'price') $type = 'double'; // html modulebuilder type is a text type in database - else if ($type == 'link' || $type == 'sellist') $type = 'integer'; + elseif ($type == 'price') $type = 'double'; // html modulebuilder type is a text type in database + elseif ($type == 'link' || $type == 'sellist') $type = 'integer'; $texttoinsert.= "\t".$key." ".$type; if ($key == 'rowid') $texttoinsert.= ' AUTO_INCREMENT PRIMARY KEY'; if ($key == 'entity') $texttoinsert.= ' DEFAULT 1'; @@ -273,7 +273,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='', if ($val['default'] != '') { if (preg_match('/^null$/i', $val['default'])) $texttoinsert.= " DEFAULT NULL"; - else if (preg_match('/varchar/', $type )) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'"; + elseif (preg_match('/varchar/', $type )) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'"; else $texttoinsert.= (($val['default'] > 0)?' DEFAULT '.$val['default']:''); } } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 056796032d4..f2e82bb066a 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -461,7 +461,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) { $stringaddress.= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->country_code)); } - else if (empty($targetcontact->country_code) && !empty($targetcompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) { + elseif (empty($targetcontact->country_code) && !empty($targetcompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) { $stringaddress.= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code)); } @@ -820,7 +820,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default $cur+=1; } - else if (! $usedetailedbban) $cury+=1; + elseif (! $usedetailedbban) $cury+=1; // Use correct name of bank id according to country $ibankey = FormBank::getIBANLabel($account); @@ -2030,7 +2030,7 @@ function pdf_getTotalQty($object,$type,$outputlangs) { $total += $object->lines[$i]->qty; } - else if ($type==9 && is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line))) + elseif ($type==9 && is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line))) { $special_code = $object->lines[$i]->special_code; if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); @@ -2039,11 +2039,11 @@ function pdf_getTotalQty($object,$type,$outputlangs) $reshook = $hookmanager->executeHooks('pdf_getTotalQty',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks return $hookmanager->resPrint; } - else if ($type==0 && $object->lines[$i]->product_type == 0) + elseif ($type==0 && $object->lines[$i]->product_type == 0) { $total += $object->lines[$i]->qty; } - else if ($type==1 && $object->lines[$i]->product_type == 1) + elseif ($type==1 && $object->lines[$i]->product_type == 1) { $total += $object->lines[$i]->qty; } @@ -2087,7 +2087,7 @@ function pdf_getLinkedObjects($object,$outputlangs) $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date,'day','',$outputlangs); } } - else if ($objecttype == 'commande' || $objecttype == 'supplier_order') + elseif ($objecttype == 'commande' || $objecttype == 'supplier_order') { $outputlangs->load('orders'); foreach($objects as $elementobject) @@ -2098,7 +2098,7 @@ function pdf_getLinkedObjects($object,$outputlangs) $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date,'day','',$outputlangs); } } - else if ($objecttype == 'contrat') + elseif ($objecttype == 'contrat') { $outputlangs->load('contracts'); foreach($objects as $elementobject) @@ -2109,7 +2109,7 @@ function pdf_getLinkedObjects($object,$outputlangs) $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date_contrat,'day','',$outputlangs); } } - else if ($objecttype == 'shipping') + elseif ($objecttype == 'shipping') { $outputlangs->loadLangs(array("orders", "sendings")); diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 68e78a29d76..0e702e89e39 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -484,7 +484,7 @@ function measuring_units_string($unit,$measuring_style='') $measuring_units[98] = $langs->transnoentitiesnoconv("WeightUnitounce"); $measuring_units[99] = $langs->transnoentitiesnoconv("WeightUnitpound"); } - else if ($measuring_style == 'size') + elseif ($measuring_style == 'size') { $measuring_units[0] = $langs->transnoentitiesnoconv("SizeUnitm"); $measuring_units[-1] = $langs->transnoentitiesnoconv("SizeUnitdm"); @@ -493,7 +493,7 @@ function measuring_units_string($unit,$measuring_style='') $measuring_units[98] = $langs->transnoentitiesnoconv("SizeUnitfoot"); $measuring_units[99] = $langs->transnoentitiesnoconv("SizeUnitinch"); } - else if ($measuring_style == 'surface') + elseif ($measuring_style == 'surface') { $measuring_units[0] = $langs->transnoentitiesnoconv("SurfaceUnitm2"); $measuring_units[-2] = $langs->transnoentitiesnoconv("SurfaceUnitdm2"); @@ -502,7 +502,7 @@ function measuring_units_string($unit,$measuring_style='') $measuring_units[98] = $langs->transnoentitiesnoconv("SurfaceUnitfoot2"); $measuring_units[99] = $langs->transnoentitiesnoconv("SurfaceUnitinch2"); } - else if ($measuring_style == 'volume') + elseif ($measuring_style == 'volume') { $measuring_units[0] = $langs->transnoentitiesnoconv("VolumeUnitm3"); $measuring_units[-3] = $langs->transnoentitiesnoconv("VolumeUnitdm3"); diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 8b6ca6a5ca3..837c8bc2cca 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -1105,7 +1105,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr // Warning print '
'; } - else if ($don->modepaymentcode=='LIQ'){ + elseif ($don->modepaymentcode=='LIQ'){ $ModePaiement = ''; } - else if ($don->modepaymentcode=='VIR' || $don->modepaymentcode=='PRE' || $don->modepaymentcode=='CB'){ + elseif ($don->modepaymentcode=='VIR' || $don->modepaymentcode=='PRE' || $don->modepaymentcode=='CB'){ $ModePaiement = ''; } else @@ -316,11 +316,11 @@ class html_cerfafr extends ModeleDon $secon[$i]=''; $prim[$i]=$chif[$unite[$i]]; } - else if($dix[$i]==1){ + elseif($dix[$i]==1){ $secon[$i]=''; $prim[$i]=$chif[($unite[$i]+10)]; } - else if($dix[$i]==2){ + elseif($dix[$i]==2){ if($unite[$i]==1){ $secon[$i]='vingt et'; $prim[$i]=$chif[$unite[$i]]; @@ -330,7 +330,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==3){ + elseif($dix[$i]==3){ if($unite[$i]==1){ $secon[$i]='trente et'; $prim[$i]=$chif[$unite[$i]]; @@ -340,7 +340,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==4){ + elseif($dix[$i]==4){ if($unite[$i]==1){ $secon[$i]='quarante et'; $prim[$i]=$chif[$unite[$i]]; @@ -350,7 +350,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==5){ + elseif($dix[$i]==5){ if($unite[$i]==1){ $secon[$i]='cinquante et'; $prim[$i]=$chif[$unite[$i]]; @@ -360,7 +360,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==6){ + elseif($dix[$i]==6){ if($unite[$i]==1){ $secon[$i]='soixante et'; $prim[$i]=$chif[$unite[$i]]; @@ -370,7 +370,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==7){ + elseif($dix[$i]==7){ if($unite[$i]==1){ $secon[$i]='soixante et'; $prim[$i]=$chif[$unite[$i]+10]; @@ -380,7 +380,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]+10]; } } - else if($dix[$i]==8){ + elseif($dix[$i]==8){ if($unite[$i]==1){ $secon[$i]='quatre-vingts et'; $prim[$i]=$chif[$unite[$i]]; @@ -390,7 +390,7 @@ class html_cerfafr extends ModeleDon $prim[$i]=$chif[$unite[$i]]; } } - else if($dix[$i]==9){ + elseif($dix[$i]==9){ if($unite[$i]==1){ $secon[$i]='quatre-vingts et'; $prim[$i]=$chif[$unite[$i]+10]; @@ -401,25 +401,25 @@ class html_cerfafr extends ModeleDon } } if($cent[$i]==1) $trio[$i]='cent'; - else if($cent[$i]!=0 || $cent[$i]!='') $trio[$i]=$chif[$cent[$i]] .' cents'; + elseif($cent[$i]!=0 || $cent[$i]!='') $trio[$i]=$chif[$cent[$i]] .' cents'; } $chif2=array('', 'dix', 'vingt', 'trente', 'quarante', 'cinquante', 'soixante', 'soixante-dix', 'quatre-vingts', 'quatre-vingts dix'); $secon_c=$chif2[$dix_c]; if($cent_c==1) $trio_c='cent'; - else if($cent_c!=0 || $cent_c!='') $trio_c=$chif[$cent_c] .' cents'; + elseif($cent_c!=0 || $cent_c!='') $trio_c=$chif[$cent_c] .' cents'; if(($cent[3]==0 || $cent[3]=='') && ($dix[3]==0 || $dix[3]=='') && ($unite[3]==1)) $somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' million '; - else if(($cent[3]!=0 && $cent[3]!='') || ($dix[3]!=0 && $dix[3]!='') || ($unite[3]!=0 && $unite[3]!='')) + elseif(($cent[3]!=0 && $cent[3]!='') || ($dix[3]!=0 && $dix[3]!='') || ($unite[3]!=0 && $unite[3]!='')) $somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' millions '; else $somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]; if(($cent[2]==0 || $cent[2]=='') && ($dix[2]==0 || $dix[2]=='') && ($unite[2]==1)) $somme = $somme.' mille '; - else if(($cent[2]!=0 && $cent[2]!='') || ($dix[2]!=0 && $dix[2]!='') || ($unite[2]!=0 && $unite[2]!='')) + elseif(($cent[2]!=0 && $cent[2]!='') || ($dix[2]!=0 && $dix[2]!='') || ($unite[2]!=0 && $unite[2]!='')) $somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2]. ' milles '; else $somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2]; diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 9851e1781e2..99980e081fe 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -780,7 +780,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->MultiCell(96,4,$outputlangs->transnoentities("DATE_REFUS")." : ".dol_print_date($object->date_refuse,"day",false,$outputlangs),0,'L'); } } - else if($object->fk_statut==4) + elseif($object->fk_statut==4) { if ($object->fk_user_cancel > 0) { $userfee=new User($this->db); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index ab2ffb3bd2a..ee0e2adfb4c 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -572,7 +572,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->MultiCell($this->posxprogress-$this->posxqty-0.8, 4, $qty, 0, 'R'); } - else if($conf->global->PRODUCT_USE_UNITS) + elseif($conf->global->PRODUCT_USE_UNITS) { $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); } @@ -590,7 +590,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->MultiCell($this->posxunit-$this->posxprogress-1, 3, $progress, 0, 'R'); } - else if ($this->atleastonediscount) + elseif ($this->atleastonediscount) { $pdf->MultiCell($this->posxdiscount-$this->posxprogress-1, 3, $progress, 0, 'R'); } @@ -1486,7 +1486,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->MultiCell($this->posxprogress-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } - else if($conf->global->PRODUCT_USE_UNITS) + elseif($conf->global->PRODUCT_USE_UNITS) { $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } @@ -1507,7 +1507,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->MultiCell($this->posxunit-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C'); } - else if ($this->atleastonediscount) + elseif ($this->atleastonediscount) { $pdf->MultiCell($this->posxdiscount-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C'); } diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 7057fda20ee..eaab6d1b40e 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -155,8 +155,8 @@ class mod_facture_mars extends ModeleNumRefFactures $prefix=$this->prefixinvoice; if ($invoice->type == 1) $prefix=$this->prefixreplacement; - else if ($invoice->type == 2) $prefix=$this->prefixcreditnote; - else if ($invoice->type == 3) $prefix=$this->prefixdeposit; + elseif ($invoice->type == 2) $prefix=$this->prefixcreditnote; + elseif ($invoice->type == 3) $prefix=$this->prefixdeposit; else $prefix=$this->prefixinvoice; // D'abord on recupere la valeur max @@ -201,7 +201,7 @@ class mod_facture_mars extends ModeleNumRefFactures return $ref; } - else if ($mode == 'next') + elseif ($mode == 'next') { $date=$invoice->date; // This is invoice date (not creation date) $yymm = strftime("%y%m",$date); diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index c454b200004..5b5e01a7c71 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -151,8 +151,8 @@ class mod_facture_mercure extends ModeleNumRefFactures $mask=$conf->global->FACTURE_MERCURE_MASK_INVOICE; } } - else if (is_object($invoice) && $invoice->type == 2) $mask=$conf->global->FACTURE_MERCURE_MASK_CREDIT; - else if (is_object($invoice) && $invoice->type == 3) $mask=$conf->global->FACTURE_MERCURE_MASK_DEPOSIT; + elseif (is_object($invoice) && $invoice->type == 2) $mask=$conf->global->FACTURE_MERCURE_MASK_CREDIT; + elseif (is_object($invoice) && $invoice->type == 3) $mask=$conf->global->FACTURE_MERCURE_MASK_DEPOSIT; else $mask=$conf->global->FACTURE_MERCURE_MASK_INVOICE; if (! $mask) { diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 454a1588f27..a8e2a2c15bc 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -172,7 +172,7 @@ class mod_facture_terre extends ModeleNumRefFactures global $db; if ($invoice->type == 2) $prefix=$this->prefixcreditnote; - else if ($invoice->type == 3) $prefix=$this->prefixdeposit; + elseif ($invoice->type == 3) $prefix=$this->prefixdeposit; else $prefix=$this->prefixinvoice; // D'abord on recupere la valeur max $posindice=8; @@ -216,7 +216,7 @@ class mod_facture_terre extends ModeleNumRefFactures return $ref; } - else if ($mode == 'next') + elseif ($mode == 'next') { $date=$invoice->date; // This is invoice date (not creation date) $yymm = strftime("%y%m",$date); diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 6db495e9f04..19b11fd1d83 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -458,7 +458,7 @@ class ImportCsv extends ModeleImports else { if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldValueNotIn',$key,$newval,'code',$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else if (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldRefNotIn',$key,$newval,$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); + elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldRefNotIn',$key,$newval,$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); else $this->errors[$error]['lib']='ErrorFieldValueNotIn'; $this->errors[$error]['type']='FOREIGNKEY'; $errorforthistable++; @@ -577,7 +577,7 @@ class ImportCsv extends ModeleImports } } // If test is just a static regex - else if (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval)) + elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval)) { //if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."
"; $this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField',$key,$newval,$objimport->array_import_regex[0][$val]); @@ -664,7 +664,7 @@ class ImportCsv extends ModeleImports if($resql->num_rows == 1) { $lastinsertid = $res->rowid; $last_insert_id_array[$tablename] = $lastinsertid; - } else if($resql->num_rows > 1) { + } elseif($resql->num_rows > 1) { $this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode($filters, ', ')); $this->errors[$error]['type']='SQL'; $error++; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index d96dc18104f..fe8808e95ac 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -485,7 +485,7 @@ class ImportXlsx extends ModeleImports else { if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldValueNotIn',$key,$newval,'code',$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else if (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldRefNotIn',$key,$newval,$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); + elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib']=$langs->trans('ErrorFieldRefNotIn',$key,$newval,$langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); else $this->errors[$error]['lib']='ErrorFieldValueNotIn'; $this->errors[$error]['type']='FOREIGNKEY'; $errorforthistable++; @@ -604,7 +604,7 @@ class ImportXlsx extends ModeleImports } } // If test is just a static regex - else if (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval)) + elseif (! preg_match('/'.$objimport->array_import_regex[0][$val].'/i',$newval)) { //if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."
"; $this->errors[$error]['lib']=$langs->transnoentitiesnoconv('ErrorWrongValueForField',$key,$newval,$objimport->array_import_regex[0][$val]); @@ -686,7 +686,7 @@ class ImportXlsx extends ModeleImports if($resql->num_rows == 1) { $lastinsertid = $res->rowid; $last_insert_id_array[$tablename] = $lastinsertid; - } else if($resql->num_rows > 1) { + } elseif($resql->num_rows > 1) { $this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode($filters, ', ')); $this->errors[$error]['type']='SQL'; $error++; diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index a4caef12af8..bd05f90198b 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -206,7 +206,7 @@ class mailing_xinputfile extends MailingTargets { $this->error = '
'.$langs->trans("ErrorFileNotUploaded").'
'; } - else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus + elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus { $this->error = '
'.$langs->trans("ErrorFileIsInfectedWithAVirus").'
'; } diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 524d1446427..5a9da91e9c5 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -165,26 +165,26 @@ class pdf_standard extends CommonStickerGenerator { // Output left area if ($textleft == '__LOGO__' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } } - else if ($textleft!='' && $textright!='') // + elseif ($textleft!='' && $textright!='') // { if ($textleft == '__LOGO__' || $textleft == '__PHOTO__') { if ($textleft == '__LOGO__' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); $pdf->SetXY($_PosX+$xleft+$widthtouse+1, $_PosY+$ytop); $pdf->MultiCell($this->_Width-$xleft-$xleft-$widthtouse-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } - else if ($textright == '__LOGO__' || $textright == '__PHOTO__') + elseif ($textright == '__LOGO__' || $textright == '__PHOTO__') { if ($textright == '__LOGO__' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textright == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textright == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($this->_Width-$widthtouse-$xleft-$xleft-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } @@ -200,7 +200,7 @@ class pdf_standard extends CommonStickerGenerator { // Output right area if ($textright == '__LOGO__' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textright == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textright == '__PHOTO__' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index 0047dda7669..28ed3f344a6 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -152,26 +152,26 @@ class pdf_standardlabel extends CommonStickerGenerator { // Output left area if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } } - else if ($textleft!='' && $textright!='') // + elseif ($textleft!='' && $textright!='') // { if ($textleft == '%LOGO%' || $textleft == '%PHOTO%') { if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); $pdf->SetXY($_PosX+$xleft+$widthtouse+1, $_PosY+$ytop); $pdf->MultiCell($this->_Width-$xleft-$xleft-$widthtouse-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } - else if ($textright == '%LOGO%' || $textright == '%PHOTO%') + elseif ($textright == '%LOGO%' || $textright == '%PHOTO%') { if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($this->_Width-$widthtouse-$xleft-$xleft-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } @@ -187,7 +187,7 @@ class pdf_standardlabel extends CommonStickerGenerator { // Output right area if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); - else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php index de1aa1b5d5e..5826a1f2a49 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php @@ -163,7 +163,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator { // Output left area if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, 0, $logoHeight); - else if ($code && !empty($encoding)) + elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft, $_PosY+$ytop, $widthtouse, $heighttouse); } @@ -173,29 +173,29 @@ class pdf_tcpdflabel extends CommonStickerGenerator $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } } - else if ($textleft!='' && $textright!='') // left and right part + elseif ($textleft!='' && $textright!='') // left and right part { if (($textleft == '%LOGO%' || $textleft == '%PHOTO%' || $textleft == '%BARCODE%') && !strstr($textright, '%') ) // left part logo/barcode right part text { if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, $widthtouse/2, 0); - else if ($code && !empty($encoding)) + elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft, $_PosY+$ytop, $widthtouse/2, $heighttouse); } $pdf->SetXY($_PosX+($widthtouse/2), $_PosY+$ytop); $pdf->MultiCell($widthtouse/2, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); } - else if (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) // right part logo/barcode left part text + elseif (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) // right part logo/barcode left part text { if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+($widthtouse/2), $_PosY+$ytop, $widthtouse/2, 0); - else if ($code && !empty($encoding)) + elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+($widthtouse/2), $_PosY+$ytop, $widthtouse/2, $heighttouse); } $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($widthtouse/2, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } - else if ($textleft == '%LOGO%') // left part logo right part text/barcode + elseif ($textleft == '%LOGO%') // left part logo right part text/barcode { if ($logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, 0, $logoHeight); if ($code && !empty($encoding)) @@ -206,7 +206,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator $pdf->MultiCell($widthtouse-$logoWidth1-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } } - else if ($textright == '%LOGO%') // right part logo left part text/barcode + elseif ($textright == '%LOGO%') // right part logo left part text/barcode { if ($logo) $pdf->Image($logo, $_PosX+$xleft+$widthtouse-$logoWidth+1, $_PosY+$ytop, 0, $logoHeight); if ($code && !empty($encoding)) @@ -229,7 +229,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator { // Output right area if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, 0, $logoHeight); - else if ($code && !empty($encoding)) + elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse); } diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 1b455743cb2..c1577efc837 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -189,7 +189,7 @@ class mod_codeproduct_elephant extends ModeleProductCode $mask = ''; if ($type == 0 && ! empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)) $mask = $conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT; - else if ($type == 1 && ! empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)) + elseif ($type == 1 && ! empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)) $mask = $conf->global->PRODUCT_ELEPHANT_MASK_SERVICE; if (empty($mask)) @@ -204,7 +204,7 @@ class mod_codeproduct_elephant extends ModeleProductCode $field = 'ref'; //$where = ' AND client in (1,2)'; } - else if ($type == 1) + elseif ($type == 1) { $field = 'ref'; //$where = ' AND fournisseur = 1'; @@ -267,7 +267,7 @@ class mod_codeproduct_elephant extends ModeleProductCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 815e383d900..46cffd7aef6 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -131,7 +131,7 @@ class mod_codeproduct_leopard extends ModeleProductCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index e0d6a186879..b551b5c8476 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -222,7 +222,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode $field = 'code_client'; //$where = ' AND client in (1,2)'; } - else if ($type == 1) + elseif ($type == 1) { $field = 'code_fournisseur'; //$where = ' AND fournisseur = 1'; @@ -285,7 +285,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index 9bdd27d5bee..89be9bdb05d 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -130,7 +130,7 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 77bb7c54a64..c0ace6f074a 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -188,7 +188,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index b117c948d69..8af95273d40 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -147,7 +147,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode $codetouse=(! empty($societe->code_client)?$societe->code_client:'CUSTCODE'); $prefix = $this->prefixcustomeraccountancycode; } - else if ($type == 'supplier') + elseif ($type == 'supplier') { $codetouse=(! empty($societe->code_fournisseur)?$societe->code_fournisseur:'SUPPCODE'); $prefix = $this->prefixsupplieraccountancycode; @@ -200,11 +200,11 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode { $sql = "SELECT "; if ($type == 'customer') $sql.= "code_compta"; - else if ($type == 'supplier') $sql.= "code_compta_fournisseur"; + elseif ($type == 'supplier') $sql.= "code_compta_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."societe"; $sql.= " WHERE "; if ($type == 'customer') $sql.= "code_compta"; - else if ($type == 'supplier') $sql.= "code_compta_fournisseur"; + elseif ($type == 'supplier') $sql.= "code_compta_fournisseur"; $sql.= " = '".$db->escape($code)."'"; if (! empty($societe->id)) $sql.= " AND rowid <> ".$societe->id; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 3ea7e184e35..f55ecc18bb3 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -287,7 +287,7 @@ class pdf_stdmovement extends ModelePDFMovement else $sql.= " AND date_format(m.datem, '%m') = '$month'"; } - else if ($year > 0) + elseif ($year > 0) { $sql.= " AND m.datem BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 908b3c8ba41..389b845d0a2 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -175,7 +175,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices global $db,$conf; if ($object->type == 2) $prefix=$this->prefixcreditnote; - else if ($facture->type == 3) $prefix=$this->prefixdeposit; + elseif ($facture->type == 3) $prefix=$this->prefixdeposit; else $prefix=$this->prefixinvoice; // D'abord on recupere la valeur max @@ -220,7 +220,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices return $ref; } - else if ($mode == 'next') + elseif ($mode == 'next') { $date=$object->date; // This is invoice date (not creation date) $yymm = strftime("%y%m",$date); diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index a3cb291263a..208e2ac0908 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -169,8 +169,8 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices $mask=$conf->global->SUPPLIER_INVOICE_TULIP_MASK; } } - else if (is_object($object) && $object->type == 2) $mask=$conf->global->SUPPLIER_CREDIT_TULIP_MASK; - else if (is_object($object) && $object->type == 3) $mask=$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK; + elseif (is_object($object) && $object->type == 2) $mask=$conf->global->SUPPLIER_CREDIT_TULIP_MASK; + elseif (is_object($object) && $object->type == 3) $mask=$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK; else $mask=$conf->global->SUPPLIER_INVOICE_TULIP_MASK; if (! $mask) { diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index c8e6d984539..a863d839a0c 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -212,14 +212,14 @@ else { if (empty($backtourl)) { if (in_array($modulepart, array('product','produit','service','produit|service'))) $backtourl=DOL_URL_ROOT."/product/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('expensereport'))) $backtourl=DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('holiday'))) $backtourl=DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('member'))) $backtourl=DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('project'))) $backtourl=DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('societe'))) $backtourl=DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('tax'))) $backtourl=DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('ticket'))) $backtourl=DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]); - else if (in_array($modulepart, array('user'))) $backtourl=DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('expensereport'))) $backtourl=DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('holiday'))) $backtourl=DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('member'))) $backtourl=DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('project'))) $backtourl=DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('societe'))) $backtourl=DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('tax'))) $backtourl=DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('ticket'))) $backtourl=DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('user'))) $backtourl=DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($_POST["file"]); } diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index db3514d7778..5eb2d629a66 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -81,7 +81,7 @@ if ($action == 'presend') $topicmail=''; if (empty($object->ref_client)) { $topicmail = $outputlangs->trans($defaulttopic, '__REF__'); - } else if (! empty($object->ref_client)) { + } elseif (! empty($object->ref_client)) { $topicmail = $outputlangs->trans($defaulttopic, '__REF__ (__REFCLIENT__)'); } diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 96510b85617..4f50f55b4ba 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -325,7 +325,7 @@ if (! empty($morelogincontent) && is_array($morelogincontent)) { } } } -else if (! empty($moreloginextracontent)) { +elseif (! empty($moreloginextracontent)) { echo ''; echo $moreloginextracontent; } diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index ff29f6999a4..2cd38500d8d 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -186,7 +186,7 @@ else { if ($object->element == 'contrat') { if (empty($conf->product->enabled) && empty($conf->service->enabled) && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=-1; // With contract, by default, no choice at all, except if CONTRACT_SUPPORT_PRODUCTS is set - else if (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=3; + elseif (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=3; } // Free line @@ -231,13 +231,13 @@ else { if (empty($senderissupplier)) { if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToSell'); - else if ((empty($conf->product->enabled) && ! empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) echo $langs->trans('PredefinedServicesToSell'); + elseif ((empty($conf->product->enabled) && ! empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) echo $langs->trans('PredefinedServicesToSell'); else echo $langs->trans('PredefinedProductsAndServicesToSell'); } else { if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToPurchase'); - else if (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase'); + elseif (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase'); else echo $langs->trans('PredefinedProductsAndServicesToPurchase'); } echo ''; diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index 4d5e1ad948b..bf74231eb03 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -214,7 +214,7 @@ if (! empty($morelogincontent)) { } } } -else if (! empty($moreloginextracontent)) { +elseif (! empty($moreloginextracontent)) { echo ''; echo $moreloginextracontent; } diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 56a02ed5b14..9acdc897d78 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -738,7 +738,7 @@ else { print ''.$langs->trans("CronExecute").''; } - else if (empty($object->status)) + elseif (empty($object->status)) { print ''.$langs->trans("CronExecute").''; } diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index 69736fdaca9..99a801e9e25 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -85,7 +85,7 @@ if ($action == 'specimen') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "DON_ADDON_MODEL",$value,'chaine',0,'',$conf->entity)) { @@ -103,12 +103,12 @@ else if ($action == 'setdoc') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 6a63074166c..95438b6bf75 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -239,7 +239,7 @@ if ($action == 'set_paid') setEventMessages($object->error, $object->errors, 'errors'); } } -else if ($action == 'classin' && $user->rights->don->creer) +elseif ($action == 'classin' && $user->rights->don->creer) { $object->fetch($id); $object->setProject($projectid); diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index c3941059e64..9cacf5162fe 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -651,7 +651,7 @@ class Don extends CommonObject { $sql.= " AND d.rowid=".$id; } - else if (! empty($ref)) + elseif (! empty($ref)) { $sql.= " AND d.ref='".$this->db->escape($ref)."'"; } diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 3d1ecac9088..05df1724438 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -306,8 +306,8 @@ class EcmDirectory // extends CommonObject else { if (preg_match('/[0-9]+/', $value)) $this->cachenbofdoc = (int) $value; - else if ($value == '+') $this->cachenbofdoc++; - else if ($value == '-') $this->cachenbofdoc--; + elseif ($value == '+') $this->cachenbofdoc++; + elseif ($value == '-') $this->cachenbofdoc--; } return 1; diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index c8e8d79046b..a2c0762321c 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -201,7 +201,7 @@ if ($action == 'add' && $permtoadd) } // Deleting file -else if ($action == 'confirm_deletesection' && $confirm == 'yes') +elseif ($action == 'confirm_deletesection' && $confirm == 'yes') { $result=$ecmdir->delete($user); setEventMessages($langs->trans("ECMSectionWasRemoved", $ecmdir->label), null, 'mesgs'); diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index ac744cc42e1..db6b6abf0f3 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -118,7 +118,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) { setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); } - else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus + elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus { setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); } diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index e99f04415b3..4f08da56365 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -281,7 +281,7 @@ if (empty($reshook)) } } } - else if (isset($_POST[$stockLocation])) + elseif (isset($_POST[$stockLocation])) { //shipment line from multiple stock locations $qty .= '_'.$j; @@ -416,7 +416,7 @@ if (empty($reshook)) /* * Build a receiving receipt */ - else if ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer) + elseif ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer) { $result = $object->create_delivery($user); if ($result > 0) @@ -430,7 +430,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_valid' && $confirm == 'yes' && + elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->shipping_advance->validate))) ) @@ -466,7 +466,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer) { $result = $object->delete(); if ($result > 0) @@ -489,7 +489,7 @@ if (empty($reshook)) } }*/ - else if ($action == 'setdate_livraison' && $user->rights->expedition->creer) + elseif ($action == 'setdate_livraison' && $user->rights->expedition->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $datedelivery=dol_mktime(GETPOST('liv_hour','int'), GETPOST('liv_min','int'), 0, GETPOST('liv_month','int'), GETPOST('liv_day','int'), GETPOST('liv_year','int')); @@ -503,7 +503,7 @@ if (empty($reshook)) } // Action update - else if ( + elseif ( ($action == 'settracking_number' || $action == 'settracking_url' || $action == 'settrueWeight' @@ -614,7 +614,7 @@ if (empty($reshook)) /* * Update a line */ - else if ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('save')) + elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('save')) { // Clean parameters $qty=0; @@ -701,7 +701,7 @@ if (empty($reshook)) $lineIdToAddLot = $line_id; } } - else if (count($lines[$i]->details_entrepot) > 1) + elseif (count($lines[$i]->details_entrepot) > 1) { // multi warehouse shipment lines foreach ($lines[$i]->details_entrepot as $detail_entrepot) @@ -776,7 +776,7 @@ if (empty($reshook)) unset($_POST[$stockLocation]); unset($_POST[$qty]); } - else if (count($lines[$i]->details_entrepot) > 1) + elseif (count($lines[$i]->details_entrepot) > 1) { // multi warehouse shipment lines foreach ($lines[$i]->details_entrepot as $detail_entrepot) @@ -844,7 +844,7 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { + elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } @@ -940,7 +940,7 @@ if ($action == 'create') // Ref client print '
'; print ''; } - else if (! empty($conf->stock->enabled)) + elseif (! empty($conf->stock->enabled)) { if ($lines[$i]->fk_product > 0) { @@ -2269,7 +2269,7 @@ else if ($id || $ref) print ''; print ''; } - else if (count($lines[$i]->details_entrepot) > 1) + elseif (count($lines[$i]->details_entrepot) > 1) { print ''; foreach ($lines[$i]->details_entrepot as $detail_entrepot) @@ -2320,7 +2320,7 @@ else if ($id || $ref) $entrepot->fetch($lines[$i]->entrepot_id); print $entrepot->getNomUrl(1); } - else if (count($lines[$i]->details_entrepot) > 1) + elseif (count($lines[$i]->details_entrepot) > 1) { $detail = ''; foreach ($lines[$i]->details_entrepot as $detail_entrepot) @@ -2389,7 +2389,7 @@ else if ($id || $ref) print '
'; print '
'; } - else if ($object->statut == 0) + elseif ($object->statut == 0) { // edit-delete buttons print '
'; - }else if(!empty($conf->reception->enabled)){ + }elseif(!empty($conf->reception->enabled)){ print '"; } - else if ($result < 0) print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'
'; + elseif ($result < 0) print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'
'; } } } diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 48fdb15b655..7a1946bf495 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -546,11 +546,11 @@ if (! $error && $db->connected && $action == "set") { $databasefortest='mysql'; } - else if ($conf->db->type == 'pgsql') + elseif ($conf->db->type == 'pgsql') { $databasefortest='postgres'; } - else if ($conf->db->type == 'mssql') + elseif ($conf->db->type == 'mssql') { $databasefortest='master'; } diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 14856d8b6b7..1b2e6e7e18d 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -347,7 +347,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 { $filelist[]=$file; } - else if (preg_match('/'.$to.'/i',$file)) // First test may be false if we migrate from x.y.* to x.y.* + elseif (preg_match('/'.$to.'/i',$file)) // First test may be false if we migrate from x.y.* to x.y.* { $filelist[]=$file; } diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index cf6cbf28e45..2b6fe3f3e40 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -4175,7 +4175,7 @@ function migrate_remise_except_entity($db,$langs,$conf) $sqlSelect2.= " FROM ".MAIN_DB_PREFIX."facture as f"; $sqlSelect2.= " WHERE f.rowid = " . $fk_facture; } - else if (!empty($obj->fk_facture_line)) + elseif (!empty($obj->fk_facture_line)) { $sqlSelect2 = "SELECT f.entity"; $sqlSelect2.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as fd"; diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index b6e9c904f80..183810b7ab0 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -130,7 +130,7 @@ if ($action == 'add') } } -else if ($action == 'confirm_valid' && $confirm == 'yes' && +elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->livraison->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->livraison_advance->validate))) ) diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index cec094ef04d..3bab5474b08 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -162,7 +162,7 @@ if (empty($reshook)) } // Update record - else if ($action == 'update' && $user->rights->loan->write) + elseif ($action == 'update' && $user->rights->loan->write) { if (! $cancel) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index e7bdbe07f67..6253fd86be2 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1226,7 +1226,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''; $titletoshow=''; if ($title && ! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/noapp/',$conf->global->MAIN_HTML_TITLE)) $titletoshow = dol_htmlentities($title); - else if ($title) $titletoshow = dol_htmlentities($appli.' - '.$title); + elseif ($title) $titletoshow = dol_htmlentities($appli.' - '.$title); else $titletoshow = dol_htmlentities($appli); $parameters=array('title'=>$titletoshow); diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 10ff15fbabf..80e9e8c4e2e 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -148,15 +148,15 @@ if (session_id() && ! empty($_SESSION["dol_entity"])) // Entity inside an open { $conf->entity = $_SESSION["dol_entity"]; } -else if (! empty($_ENV["dol_entity"])) // Entity inside a CLI script +elseif (! empty($_ENV["dol_entity"])) // Entity inside a CLI script { $conf->entity = $_ENV["dol_entity"]; } -else if (isset($_POST["loginfunction"]) && GETPOST("entity",'int')) // Just after a login page +elseif (isset($_POST["loginfunction"]) && GETPOST("entity",'int')) // Just after a login page { $conf->entity = GETPOST("entity",'int'); } -else if (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module +elseif (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module { $conf->entity = DOLENTITY; } diff --git a/htdocs/opensurvey/exportcsv.php b/htdocs/opensurvey/exportcsv.php index b36a5256059..787aaa3042b 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -109,7 +109,7 @@ if ($resql) $input.='OK;'; $somme[$k]++; } - else if ($car == "2") + elseif ($car == "2") { $input.='KO;'; $somme[$k]++; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 34945504943..8720accfe90 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -71,7 +71,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout { $nouveauchoix.="1"; } - else if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') + elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') { $nouveauchoix.="2"; } @@ -136,7 +136,7 @@ if ($testmodifier) { $nouveauchoix.="1"; } - else if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') + elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') { $nouveauchoix.="2"; } @@ -821,7 +821,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("Yes").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -832,7 +832,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -886,7 +886,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -897,7 +897,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 334640e87d3..124b7af40ee 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -277,7 +277,7 @@ if (empty($conf->produit->enabled)) $title = $langs->trans('ServiceSetup'); $tab = $langs->trans('Services'); } -else if (empty($conf->service->enabled)) +elseif (empty($conf->service->enabled)) { $title = $langs->trans('ProductSetup'); $tab = $langs->trans('Products'); diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index 23780df895e..a71bfb9cf42 100644 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -66,7 +66,7 @@ if (empty($conf->produit->enabled)) $title = $langs->trans('ServiceSetup'); $textobject = $langs->trans('Services'); } -else if (empty($conf->service->enabled)) +elseif (empty($conf->service->enabled)) { $title = $langs->trans('ProductSetup'); $textobject = $langs->trans('Products'); diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index cf9fcff98c8..11336d0417f 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -409,16 +409,16 @@ class ActionsCardProduct $this->entity = $obj->entity; $datas[$alias] = $this->getNomUrl(1,'',24); } - else if ($alias == 'stock') + elseif ($alias == 'stock') { $this->load_stock(); if ($this->stock_reel < $obj->seuil_stock_alerte) $datas[$alias] = $this->stock_reel.' '.img_warning($langs->trans("StockTooLow")); else $datas[$alias] = $this->stock_reel; } - else if ($alias == 'label') $datas[$alias] = dol_trunc($obj->$alias,40); - else if (preg_match('/price/i',$alias)) $datas[$alias] = price($obj->$alias); - else if ($alias == 'datem') $datas[$alias] = dol_print_date($this->db->jdate($obj->$alias),'day'); - else if ($alias == 'status') $datas[$alias] = $this->LibStatut($obj->$alias,5); + elseif ($alias == 'label') $datas[$alias] = dol_trunc($obj->$alias,40); + elseif (preg_match('/price/i',$alias)) $datas[$alias] = price($obj->$alias); + elseif ($alias == 'datem') $datas[$alias] = dol_print_date($this->db->jdate($obj->$alias),'day'); + elseif ($alias == 'status') $datas[$alias] = $this->LibStatut($obj->$alias,5); else $datas[$alias] = $obj->$alias; } } diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 7ba746af06e..06ab6de21e0 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -206,7 +206,7 @@ class ActionsCardService { $dur=array("h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years")); } - else if ($this->object->duration_value > 0) + elseif ($this->object->duration_value > 0) { $dur=array("h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 698d65795f1..d9fc881ce7b 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -175,8 +175,8 @@ if (empty($reshook)) { $langs->load("errors"); if ($result == -1) $errors[] = 'ErrorBadBarCodeSyntax'; - else if ($result == -2) $errors[] = 'ErrorBarCodeRequired'; - else if ($result == -3) $errors[] = 'ErrorBarCodeAlreadyUsed'; + elseif ($result == -2) $errors[] = 'ErrorBarCodeRequired'; + elseif ($result == -3) $errors[] = 'ErrorBarCodeAlreadyUsed'; else $errors[] = 'FailedToValidateBarCode'; $error++; @@ -1248,7 +1248,7 @@ else * Product card */ - else if ($object->id > 0) + elseif ($object->id > 0) { // Fiche en mode edition if ($action == 'edit' && $usercancreate) @@ -1826,7 +1826,7 @@ else { $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years")); } - else if ($object->duration_value > 0) + elseif ($object->duration_value > 0) { $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); } @@ -1943,7 +1943,7 @@ else dol_fiche_end(); } } - else if ($action != 'create') + elseif ($action != 'create') { exit; } diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 9a22c93d042..025317a288f 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -104,7 +104,7 @@ class FormProduct $sql.= ", ps.reel as stock"; } } - else if ($sumStock) + elseif ($sumStock) { $sql.= ", sum(ps.reel) as stock"; } @@ -318,9 +318,9 @@ class FormProduct $measuring_units=array(); if ($measuring_style == 'weight') $measuring_units=array(-6=>1,-3=>1,0=>1,3=>1,98=>1,99=>1); - else if ($measuring_style == 'size') $measuring_units=array(-3=>1,-2=>1,-1=>1,0=>1,98=>1,99=>1); - else if ($measuring_style == 'surface') $measuring_units=array(-6=>1,-4=>1,-2=>1,0=>1,98=>1,99=>1); - else if ($measuring_style == 'volume') $measuring_units=array(-9=>1,-6=>1,-3=>1,0=>1,88=>1,89=>1,97=>1,99=>1,/* 98=>1 */); // Liter is not used as already available with dm3 + elseif ($measuring_style == 'size') $measuring_units=array(-3=>1,-2=>1,-1=>1,0=>1,98=>1,99=>1); + elseif ($measuring_style == 'surface') $measuring_units=array(-6=>1,-4=>1,-2=>1,0=>1,98=>1,99=>1); + elseif ($measuring_style == 'volume') $measuring_units=array(-9=>1,-6=>1,-3=>1,0=>1,88=>1,89=>1,97=>1,99=>1,/* 98=>1 */); // Liter is not used as already available with dm3 $return.= '<select class="flat" name="'.$name.'">'; if ($adddefault) $return.= '<option value="0">'.$langs->trans("Default").'</option>'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e299921488b..583ce3acaa3 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1269,7 +1269,7 @@ class Product extends CommonObject return -1; } } - else if (isset($this->multilangs[$key])) { + elseif (isset($this->multilangs[$key])) { $sql = "SELECT rowid"; $sql.= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql.= " WHERE fk_product=".$this->id; @@ -2009,8 +2009,8 @@ class Product extends CommonObject { $sql.= " WHERE entity IN (".getEntity($this->element).")"; if ($ref) { $sql.= " AND ref = '".$this->db->escape($ref)."'"; - } else if ($ref_ext) { $sql.= " AND ref_ext = '".$this->db->escape($ref_ext)."'"; - } else if ($barcode) { $sql.= " AND barcode = '".$this->db->escape($barcode)."'"; + } elseif ($ref_ext) { $sql.= " AND ref_ext = '".$this->db->escape($ref_ext)."'"; + } elseif ($barcode) { $sql.= " AND barcode = '".$this->db->escape($barcode)."'"; } } @@ -2178,7 +2178,7 @@ class Product extends CommonObject { // Nothing loaded by default. List may be very long. } - else if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) // prices per quantity + elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) // prices per quantity { $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; $sql.= " price_base_type, tva_tx, default_vat_code, tosell, price_by_qty, rowid"; @@ -2229,7 +2229,7 @@ class Product extends CommonObject return -1; } } - else if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) // prices per customer and quantity + elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) // prices per customer and quantity { for ($i=1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { @@ -3912,9 +3912,9 @@ class Product extends CommonObject if ($option == 'supplier' || $option == 'category') { $url = DOL_URL_ROOT.'/product/fournisseurs.php?id='.$this->id; - } else if ($option == 'stock') { + } elseif ($option == 'stock') { $url = DOL_URL_ROOT.'/product/stock/product.php?id='.$this->id; - } else if ($option == 'composition') { + } elseif ($option == 'composition') { $url = DOL_URL_ROOT.'/product/composition/card.php?id='.$this->id; } else { $url = DOL_URL_ROOT.'/product/card.php?id='.$this->id; diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 521b9dfeca7..001efe037f4 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -112,7 +112,7 @@ if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->se exit; } } -else if($action==='save_composed_product') +elseif($action==='save_composed_product') { $TProduct = GETPOST('TProduct', 'array'); if (!empty($TProduct)) diff --git a/htdocs/product/dynamic_price/class/price_parser.class.php b/htdocs/product/dynamic_price/class/price_parser.class.php index 3249671d173..dffb8ee0b2c 100644 --- a/htdocs/product/dynamic_price/class/price_parser.class.php +++ b/htdocs/product/dynamic_price/class/price_parser.class.php @@ -104,15 +104,15 @@ class PriceParser { return $langs->trans("ErrorPriceExpression".$code); } - else if (in_array($code, array(1, 2, 3, 4, 5, 8, 10, 11, 17, 21, 22))) //Errors which have 1 arg + elseif (in_array($code, array(1, 2, 3, 4, 5, 8, 10, 11, 17, 21, 22))) //Errors which have 1 arg { return $langs->trans("ErrorPriceExpression".$code, $info); } - else if (in_array($code, array(6, 23))) //Errors which have 2 args + elseif (in_array($code, array(6, 23))) //Errors which have 2 args { return $langs->trans("ErrorPriceExpression".$code, $info[0], $info[1]); } - else if (in_array($code, array(7, 12, 13, 15, 16, 18))) //Internal errors + elseif (in_array($code, array(7, 12, 13, 15, 16, 18))) //Internal errors { return $langs->trans("ErrorPriceExpressionInternal", $code); } diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index 3e4a87fe9f9..84440a3595a 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -55,7 +55,7 @@ if (empty($eid)) //This also disables fetch when eid == 0 { $eid = 0; } -else if ($action != 'delete') +elseif ($action != 'delete') { $price_expression->fetch($eid); } @@ -94,7 +94,7 @@ if ($action == 'add') } } } - else if ($result < 0) + elseif ($result < 0) { setEventMessages("add find: ".$price_expression->error, $price_expression->errors, 'errors'); } @@ -134,7 +134,7 @@ if ($action == 'update') } } } - else if ($result < 0) + elseif ($result < 0) { setEventMessages("update find: ".$price_expression->error, $price_expression->errors, 'errors'); } diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 8556160b767..e190e3a55d1 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -235,7 +235,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ReferenceSupplierIsAlreadyAssociatedWithAProduct",$productLink), null, 'errors'); } - else if ($ret < 0) + elseif ($ret < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 56519e6f46b..f3e8ce50037 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -36,7 +36,7 @@ if ($type =='' && !$user->rights->service->lire) $type='0'; // Force global page // Security check if ($type=='0') $result=restrictedArea($user,'produit'); -else if ($type=='1') $result=restrictedArea($user,'service'); +elseif ($type=='1') $result=restrictedArea($user,'service'); else $result=restrictedArea($user,'produit|service'); // Load translation files required by the page @@ -174,7 +174,7 @@ if ($type == '0') print $statProducts; $total=round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2]); } -else if ($type == '1') +elseif ($type == '1') { print $statServices; $total=round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2]); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index ca3691edd83..491a66f9562 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -115,7 +115,7 @@ if (! empty($canvas)) // Security check if ($search_type=='0') $result=restrictedArea($user,'produit','','','','','',$objcanvas); -else if ($search_type=='1') $result=restrictedArea($user,'service','','','','','',$objcanvas); +elseif ($search_type=='1') $result=restrictedArea($user,'service','','','','','',$objcanvas); else $result=restrictedArea($user,'produit|service','','','','','',$objcanvas); // Define virtualdiffersfromphysical @@ -381,7 +381,7 @@ if ($resql) { $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; } - else if ($search_type == 1) + elseif ($search_type == 1) { $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; } @@ -787,7 +787,7 @@ if ($resql) { $dur=array("i"=>$langs->trans("Minutes"),"h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years")); } - else if ((float) $duration_value > 0) + elseif ((float) $duration_value > 0) { $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); } diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php index 687054d1cde..1c064922783 100644 --- a/htdocs/product/popuprop.php +++ b/htdocs/product/popuprop.php @@ -63,7 +63,7 @@ if ($type == '0') { $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; } -else if ($type == '1') +elseif ($type == '1') { $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; } diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 5c06bfee335..1c73758c5f2 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1958,7 +1958,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print $langs->trans('None'); } } - else if ($action != 'showlog_default_price' && $action != 'edit_price') + elseif ($action != 'showlog_default_price' && $action != 'edit_price') { // List of all prices by customers print '<!-- list of all prices per customer -->'."\n"; diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 40848e6bb81..af6d9336588 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -90,7 +90,7 @@ if (! $id && empty($ref)) //$title=$langs->trans("StatisticsOfProducts"); $title=$langs->trans("Statistics"); } - else if ($type == '1') + elseif ($type == '1') { $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; //$title=$langs->trans("StatisticsOfServices"); diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index e19df0aaa1a..674d859a0e3 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -433,7 +433,7 @@ class MouvementStock extends CommonObject //print "qty=".$qty." newpmp=".$newpmp; //exit; } - else if ($type == 1 || $type == 2) + elseif ($type == 1 || $type == 2) { // After a stock decrease, we don't change value of PMP for product. $newpmp = $oldpmp; @@ -465,7 +465,7 @@ class MouvementStock extends CommonObject $this->errors[]=$this->db->lasterror(); $error = -3; } - else if (empty($fk_product_stock)) + elseif (empty($fk_product_stock)) { $fk_product_stock = $this->db->last_insert_id(MAIN_DB_PREFIX."product_stock"); } @@ -822,7 +822,7 @@ class MouvementStock extends CommonObject $result = -2; } } - else if (is_array($dluo)) + elseif (is_array($dluo)) { if (isset($dluo['fk_product_stock'])) { diff --git a/htdocs/product/stock/lib/replenishment.lib.php b/htdocs/product/stock/lib/replenishment.lib.php index 486e8373255..86cb1a3d7ba 100644 --- a/htdocs/product/stock/lib/replenishment.lib.php +++ b/htdocs/product/stock/lib/replenishment.lib.php @@ -122,7 +122,7 @@ function ordered($product_id) $sql .= ' ON cfd.fk_commande = cf.rowid WHERE'; if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) { $sql .= ' cf.fk_statut < 3'; - } else if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) { + } elseif ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) { $sql .= ' cf.fk_statut < 6 AND cf.rowid NOT IN ' . dispatchedOrders(); } else { $sql .= ' cf.fk_statut < 5'; diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index f6a694c57fa..68ad4d96789 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -468,7 +468,7 @@ if ($month > 0) else $sql.= " AND date_format(m.datem, '%m') = '$month'"; } -else if ($year > 0) +elseif ($year > 0) { $sql.= " AND m.datem BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index c0e2973b4f8..76616bf06bc 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -136,12 +136,12 @@ if ($search_datemonth > 0) { if ($search_dateyear > 0 && empty($search_dateday)) $sql.= " AND cf.date_creation BETWEEN '".$db->idate(dol_get_first_day($search_dateyear,$search_datemonth,false))."' AND '".$db->idate(dol_get_last_day($search_dateyear,$search_datemonth,false))."'"; - else if ($search_dateyear > 0 && ! empty($search_dateday)) + elseif ($search_dateyear > 0 && ! empty($search_dateday)) $sql.= " AND cf.date_creation BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_datemonth, $search_dateday, $search_dateyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_datemonth, $search_dateday, $search_dateyear))."'"; else $sql.= " AND date_format(cf.date_creation, '%m') = '".$search_datemonth."'"; } -else if ($search_dateyear > 0) +elseif ($search_dateyear > 0) { $sql.= " AND cf.date_creation BETWEEN '".$db->idate(dol_get_first_day($search_dateyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_dateyear,12,false))."'"; } diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 855675be956..b6c99d23374 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -277,7 +277,7 @@ if ($action == 'edit') print '</form>'; } -else if ($action != 'add') +elseif ($action != 'add') { if (! empty($object->multilangs)) { diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 5665a2fb505..e00d4ca6730 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -81,7 +81,7 @@ $yearofday=GETPOST('addtimeyear'); $daytoparse = $now; if ($yearofday && $monthofday && $dayofday) $daytoparse=dol_mktime(0, 0, 0, $monthofday, $dayofday, $yearofday); // xxxofday is value of day after submit action 'addtime' -else if ($year && $month && $day) $daytoparse=dol_mktime(0, 0, 0, $month, $day, $year); // this are value submited after submit of action 'submitdateselect' +elseif ($year && $month && $day) $daytoparse=dol_mktime(0, 0, 0, $month, $day, $year); // this are value submited after submit of action 'submitdateselect' if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id) diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 71755fbdca3..fd0d78b6a27 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -61,7 +61,7 @@ if ($action == 'setmainoptions') else dolibarr_set_const($db, "PROJECT_HIDE_TASKS",1,'chaine',0,'',$conf->entity); } -else if ($action == 'updateMask') +elseif ($action == 'updateMask') { $maskconstproject=GETPOST('maskconstproject','alpha'); $maskproject=GETPOST('maskproject','alpha'); @@ -99,7 +99,7 @@ if ($action == 'updateMaskTask') } } -else if ($action == 'specimen') +elseif ($action == 'specimen') { $modele=GETPOST('module','alpha'); @@ -144,7 +144,7 @@ else if ($action == 'specimen') } } -else if ($action == 'specimentask') +elseif ($action == 'specimentask') { $modele=GETPOST('module','alpha'); @@ -190,17 +190,17 @@ else if ($action == 'specimentask') } // Activate a model -else if ($action == 'set') +elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } // Activate a model for task -else if ($action == 'settask') +elseif ($action == 'settask') { $ret = addDocumentModel($value,'project_task', $label, $scandir); } -else if ($action == 'del') +elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -218,7 +218,7 @@ if ($action == 'deltask') } // Set default model -else if ($action == 'setdoc') +elseif ($action == 'setdoc') { dolibarr_set_const($db, "PROJECT_ADDON_PDF",$value,'chaine',0,'',$conf->entity); @@ -230,7 +230,7 @@ else if ($action == 'setdoc') } } -else if ($action == 'setdoctask') +elseif ($action == 'setdoctask') { if (dolibarr_set_const($db, "PROJECT_TASK_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { @@ -247,7 +247,7 @@ else if ($action == 'setdoctask') } } -else if ($action == 'setmod') +elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -255,7 +255,7 @@ else if ($action == 'setmod') dolibarr_set_const($db, "PROJECT_ADDON",$value,'chaine',0,'',$conf->entity); } -else if ($action == 'setmodtask') +elseif ($action == 'setmodtask') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 6cb54cfb572..7dcafcff657 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -445,7 +445,7 @@ class Project extends CommonObject { $sql.= " WHERE rowid=".$id; } - else if (! empty($ref)) + elseif (! empty($ref)) { $sql.= " WHERE ref='".$this->db->escape($ref)."'"; $sql.= " AND entity IN (".getEntity('project').")"; @@ -1039,7 +1039,7 @@ class Project extends CommonObject if (preg_match('/\.php$/',$option)) { $url = dol_buildpath($option,1) . '?id=' . $this->id; } - else if ($option == 'task') + elseif ($option == 'task') { $url = DOL_URL_ROOT . '/projet/tasks.php?id=' . $this->id; } @@ -1155,7 +1155,7 @@ class Project extends CommonObject { $userAccess = 1; } - else if ($this->public && (($mode == 'read' && ! empty($user->rights->projet->lire)) || ($mode == 'write' && ! empty($user->rights->projet->creer)) || ($mode == 'delete' && ! empty($user->rights->projet->supprimer)))) + elseif ($this->public && (($mode == 'read' && ! empty($user->rights->projet->lire)) || ($mode == 'write' && ! empty($user->rights->projet->creer)) || ($mode == 'delete' && ! empty($user->rights->projet->supprimer)))) { $userAccess = 1; } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 96b21b09bf9..d4b0e4c8dae 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -604,7 +604,7 @@ foreach ($listofreferent as $key => $value) if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty(); if ($tablename == 'don' || $tablename == 'chargesociales') $total_ht_by_line=$element->amount; elseif ($tablename == 'stock_mouvement') $total_ht_by_line=$element->price*abs($element->qty); - else if($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); + elseif($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); elseif ($tablename == 'projet_task') { if ($idofelementuser) @@ -633,7 +633,7 @@ foreach ($listofreferent as $key => $value) if ($qualifiedfortotal) $total_ht = $total_ht + $total_ht_by_line; if ($tablename == 'don' || $tablename == 'chargesociales') $total_ttc_by_line=$element->amount; - else if($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); + elseif($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ttc_by_line=$element->price*abs($element->qty); elseif ($tablename == 'projet_task') { @@ -911,7 +911,7 @@ foreach ($listofreferent as $key => $value) $element_doc='commande_fournisseur'; $filedir = $conf->fournisseur->commande->multidir_output[$element->entity].'/'.dol_sanitizeFileName($element->ref); } - else if ($element_doc === 'invoice_supplier') { + elseif ($element_doc === 'invoice_supplier') { $element_doc='facture_fournisseur'; $filename = get_exdir($element->id,2,0,0,$element,'product').dol_sanitizeFileName($element->ref); $filedir = $conf->fournisseur->facture->multidir_output[$element->entity].'/'.get_exdir($element->id,2,0,0,$element,'invoice_supplier').dol_sanitizeFileName($element->ref); @@ -956,7 +956,7 @@ foreach ($listofreferent as $key => $value) print dol_print_date($element->datep,'dayhour'); if ($element->datef && $element->datef > $element->datep) print " - ".dol_print_date($element->datef,'dayhour'); } - else if (in_array($tablename, array('projet_task'))) + elseif (in_array($tablename, array('projet_task'))) { $tmpprojtime = $element->getSumOfAmount($elementuser, $dates, $datee); // $element is a task. $elementuser may be empty print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$idofelement.'&withproject=1">'; @@ -970,19 +970,19 @@ foreach ($listofreferent as $key => $value) // Third party or user print '<td class="left">'; if (is_object($element->thirdparty)) print $element->thirdparty->getNomUrl(1,'',48); - else if ($tablename == 'expensereport_det') + elseif ($tablename == 'expensereport_det') { $tmpuser=new User($db); $tmpuser->fetch($expensereport->fk_user_author); print $tmpuser->getNomUrl(1,'',48); } - else if ($tablename == 'payment_salary') + elseif ($tablename == 'payment_salary') { $tmpuser=new User($db); $tmpuser->fetch($element->fk_user); print $tmpuser->getNomUrl(1,'',48); } - else if ($tablename == 'don' || $tablename == 'stock_mouvement') + elseif ($tablename == 'don' || $tablename == 'stock_mouvement') { if ($element->fk_user_author > 0) { @@ -991,7 +991,7 @@ foreach ($listofreferent as $key => $value) print $tmpuser2->getNomUrl(1,'',48); } } - else if ($tablename == 'projet_task' && $key == 'project_task_time') // if $key == 'project_task', we don't want details per user + elseif ($tablename == 'projet_task' && $key == 'project_task_time') // if $key == 'project_task', we don't want details per user { print $elementuser->getNomUrl(1); } @@ -1004,7 +1004,7 @@ foreach ($listofreferent as $key => $value) $total_ht_by_line=null; $othermessage=''; if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ht_by_line=$element->amount; - else if($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); + elseif($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ht_by_line=$element->price*abs($element->qty); elseif (in_array($tablename, array('projet_task'))) { @@ -1045,7 +1045,7 @@ foreach ($listofreferent as $key => $value) { $total_ttc_by_line=null; if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ttc_by_line=$element->amount; - else if($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); + elseif($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ttc_by_line=$element->price*abs($element->qty); elseif ($tablename == 'projet_task') { @@ -1083,19 +1083,19 @@ foreach ($listofreferent as $key => $value) { print $expensereport->getLibStatut(5); } - else if ($element instanceof CommonInvoice) + elseif ($element instanceof CommonInvoice) { //This applies for Facture and FactureFournisseur print $element->getLibStatut(5, $element->getSommePaiement()); } - else if ($element instanceof Task) + elseif ($element instanceof Task) { if ($element->progress != '') { print $element->progress.' %'; } } - else if ($tablename == 'stock_mouvement') + elseif ($tablename == 'stock_mouvement') { print $element->getLibStatut(3); } diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 252942ced6c..0d944099de3 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -320,12 +320,12 @@ if ($search_smonth > 0) { if ($search_syear > 0 && empty($search_sday)) $sql.= " AND p.dateo BETWEEN '".$db->idate(dol_get_first_day($search_syear,$search_smonth,false))."' AND '".$db->idate(dol_get_last_day($search_syear,$search_smonth,false))."'"; - else if ($search_syear > 0 && ! empty($search_sday)) + elseif ($search_syear > 0 && ! empty($search_sday)) $sql.= " AND p.dateo BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_smonth, $search_sday, $search_syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_smonth, $search_sday, $search_syear))."'"; else $sql.= " AND date_format(p.dateo, '%m') = '".$search_smonth."'"; } -else if ($search_syear > 0) +elseif ($search_syear > 0) { $sql.= " AND p.dateo BETWEEN '".$db->idate(dol_get_first_day($search_syear,1,false))."' AND '".$db->idate(dol_get_last_day($search_syear,12,false))."'"; } @@ -333,12 +333,12 @@ if ($search_emonth > 0) { if ($search_eyear > 0 && empty($search_eday)) $sql.= " AND p.datee BETWEEN '".$db->idate(dol_get_first_day($search_eyear,$search_emonth,false))."' AND '".$db->idate(dol_get_last_day($search_eyear,$search_emonth,false))."'"; - else if ($search_eyear > 0 && ! empty($search_eday)) + elseif ($search_eyear > 0 && ! empty($search_eday)) $sql.= " AND p.datee BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_emonth, $search_eday, $search_eyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_emonth, $search_eday, $search_eyear))."'"; else $sql.= " AND date_format(p.datee, '%m') = '".$search_emonth."'"; } -else if ($search_eyear > 0) +elseif ($search_eyear > 0) { $sql.= " AND p.datee BETWEEN '".$db->idate(dol_get_first_day($search_eyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_eyear,12,false))."'"; } @@ -760,7 +760,7 @@ while ($i < min($num,$limit)) print $nbofsalesrepresentative; print '</a>'; } - else if ($nbofsalesrepresentative > 0) + elseif ($nbofsalesrepresentative > 0) { $userstatic=new User($db); $j=0; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index fb2399175c2..a17c42a3691 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -133,13 +133,13 @@ if ($search_dtstartmonth > 0) { if ($search_dtstartyear > 0 && empty($search_dtstartday)) { $morewherefilterarray[]= " (t.dateo BETWEEN '".$db->idate(dol_get_first_day($search_dtstartyear,$search_dtstartmonth,false))."' AND '".$db->idate(dol_get_last_day($search_dtstartyear,$search_dtstartmonth,false))."')"; - }else if ($search_dtstartyear > 0 && ! empty($search_dtstartday)) { + }elseif ($search_dtstartyear > 0 && ! empty($search_dtstartday)) { $morewherefilterarray[]= " (t.dateo BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_dtstartmonth, $search_dtstartday, $search_dtstartyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_dtstartmonth, $search_dtstartday, $search_dtstartyear))."')"; }else { $morewherefilterarray[]= " date_format(t.dateo, '%m') = '".$search_dtstartmonth."'"; } } -else if ($search_dtstartyear > 0) +elseif ($search_dtstartyear > 0) { $morewherefilterarray[]= " (t.dateo BETWEEN '".$db->idate(dol_get_first_day($search_dtstartyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_dtstartyear,12,false))."')"; } @@ -148,13 +148,13 @@ if ($search_dtendmonth > 0) { if ($search_dtendyear > 0 && empty($search_dtendday)) { $morewherefilterarray[]= " (t.datee BETWEEN '".$db->idate(dol_get_first_day($search_dtendyear,$search_dtendmonth,false))."' AND '".$db->idate(dol_get_last_day($search_dtendyear,$search_dtendmonth,false))."')"; - }else if ($search_dtendyear > 0 && ! empty($search_dtendday)) { + }elseif ($search_dtendyear > 0 && ! empty($search_dtendday)) { $morewherefilterarray[]= " (t.datee BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_dtendmonth, $search_dtendday, $search_dtendyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_dtendmonth, $search_dtendday, $search_dtendyear))."')"; }else { $morewherefilterarray[]= " date_format(t.datee, '%m') = '".$search_dtendmonth."'"; } } -else if ($search_dtendyear > 0) +elseif ($search_dtendyear > 0) { $morewherefilterarray[]= " (t.datee BETWEEN '".$db->idate(dol_get_first_day($search_dtendyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_dtendyear,12,false))."')"; } @@ -207,7 +207,7 @@ if ($action == 'createtask' && $user->rights->projet->creer) $action='create'; $error++; } - else if (empty($_POST['task_parent'])) + elseif (empty($_POST['task_parent'])) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ChildOfProjectTask")), null, 'errors'); $action='create'; @@ -268,7 +268,7 @@ if ($action == 'createtask' && $user->rights->projet->creer) header("Location: ".$backtopage); exit; } - else if (empty($projectid)) + elseif (empty($projectid)) { header("Location: ".DOL_URL_ROOT.'/projet/tasks/list.php'.(empty($mode)?'':'?mode='.$mode)); exit; @@ -283,7 +283,7 @@ if ($action == 'createtask' && $user->rights->projet->creer) header("Location: ".$backtopage); exit; } - else if (empty($id)) + elseif (empty($id)) { // We go back on task list header("Location: ".DOL_URL_ROOT.'/projet/tasks/list.php'.(empty($mode)?'':'?mode='.$mode)); @@ -563,7 +563,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print '</form>'; } } -else if ($id > 0 || ! empty($ref)) +elseif ($id > 0 || ! empty($ref)) { /* * Projet card in view mode diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 61ae1ce652e..a152000acaa 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -284,12 +284,12 @@ if ($search_smonth > 0) { if ($search_syear > 0 && empty($search_sday)) $sql.= " AND t.dateo BETWEEN '".$db->idate(dol_get_first_day($search_syear,$search_smonth,false))."' AND '".$db->idate(dol_get_last_day($search_syear,$search_smonth,false))."'"; - else if ($search_syear > 0 && ! empty($search_sday)) + elseif ($search_syear > 0 && ! empty($search_sday)) $sql.= " AND t.dateo BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_smonth, $search_sday, $search_syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_smonth, $search_sday, $search_syear))."'"; else $sql.= " AND date_format(t.dateo, '%m') = '".$search_smonth."'"; } -else if ($search_syear > 0) +elseif ($search_syear > 0) { $sql.= " AND t.dateo BETWEEN '".$db->idate(dol_get_first_day($search_syear,1,false))."' AND '".$db->idate(dol_get_last_day($search_syear,12,false))."'"; } @@ -297,12 +297,12 @@ if ($search_emonth > 0) { if ($search_eyear > 0 && empty($search_eday)) $sql.= " AND t.datee BETWEEN '".$db->idate(dol_get_first_day($search_eyear,$search_emonth,false))."' AND '".$db->idate(dol_get_last_day($search_eyear,$search_emonth,false))."'"; - else if ($search_eyear > 0 && ! empty($search_eday)) + elseif ($search_eyear > 0 && ! empty($search_eday)) $sql.= " AND t.datee BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_emonth, $search_eday, $search_eyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_emonth, $search_eday, $search_eyear))."'"; else $sql.= " AND date_format(t.datee, '%m') = '".$search_emonth."'"; } -else if ($search_eyear > 0) +elseif ($search_eyear > 0) { $sql.= " AND t.datee BETWEEN '".$db->idate(dol_get_first_day($search_eyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_eyear,12,false))."'"; } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 9433925d933..e2025812e65 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -837,12 +837,12 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) { if ($search_year > 0 && empty($search_day)) $sql.= " AND t.task_datehour BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'"; - else if ($search_year > 0 && ! empty($search_day)) + elseif ($search_year > 0 && ! empty($search_day)) $sql.= " AND t.task_datehour BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; else $sql.= " AND date_format(t.task_datehour, '%m') = '".$db->escape($search_month)."'"; } - else if ($search_year > 0) + elseif ($search_year > 0) { $sql.= " AND t.task_datehour BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'"; } @@ -1273,7 +1273,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print '<br>'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'">'; } - else if ($user->rights->projet->lire || $user->rights->projet->all->creer) // Read project and enter time consumed on assigned tasks + elseif ($user->rights->projet->lire || $user->rights->projet->all->creer) // Read project and enter time consumed on assigned tasks { if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->rights->projet->all->creer) { diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 79485ee9820..c6fbef4c552 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -353,7 +353,7 @@ if ($action == 'add') } if (! empty($backtopage)) $urlback=$backtopage; - else if (! empty($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)) + elseif (! empty($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)) { $urlback=$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION; // TODO Make replacement of __AMOUNT__, etc... @@ -379,7 +379,7 @@ if ($action == 'add') } } } - else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox') + elseif ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox') { $urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.urlencode($adh->ref); if (price2num(GETPOST('amount','alpha'))) $urlback.='&amount='.price2num(GETPOST('amount','alpha')); @@ -396,7 +396,7 @@ if ($action == 'add') } } } - else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal') + elseif ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal') { $urlback=DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?from=membernewform&source=membersubscription&ref='.urlencode($adh->ref); if (price2num(GETPOST('amount','alpha'))) $urlback.='&amount='.price2num(GETPOST('amount','alpha')); @@ -413,7 +413,7 @@ if ($action == 'add') } } } - else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'stripe') + elseif ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'stripe') { $urlback=DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref; if (price2num(GETPOST('amount','alpha'))) $urlback.='&amount='.price2num(GETPOST('amount','alpha')); diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index b580a508ed0..84ea1571cee 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -167,7 +167,7 @@ $logosmall=$mysoc->logo_small; $logo=$mysoc->logo; $paramlogo='ONLINE_SIGN_LOGO_'.$suffix; if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -else if (! empty($conf->global->ONLINE_SIGN_LOGO)) $logosmall=$conf->global->ONLINE_SIGN_LOGO; +elseif (! empty($conf->global->ONLINE_SIGN_LOGO)) $logosmall=$conf->global->ONLINE_SIGN_LOGO; //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo=''; diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index acf986bb226..dab212b663e 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -109,7 +109,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout { $nouveauchoix.="1"; } - else if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') + elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') { $nouveauchoix.="2"; } @@ -211,7 +211,7 @@ if ($testmodifier) { $nouveauchoix.="1"; } - else if (isset($_POST["choix".$i]) && $_POST["choix".$i] == '2') + elseif (isset($_POST["choix".$i]) && $_POST["choix".$i] == '2') { $nouveauchoix.="2"; } @@ -462,7 +462,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("Yes").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -473,7 +473,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -527,7 +527,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -538,7 +538,7 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - else if (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; else print '<td class="vide"> </td>'."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 2b5874005f3..910d63e0d0b 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -255,7 +255,7 @@ $creditor=$mysoc->name; $paramcreditor='ONLINE_PAYMENT_CREDITOR'; $paramcreditorlong='ONLINE_PAYMENT_CREDITOR_'.$suffix; if (! empty($conf->global->$paramcreditorlong)) $creditor=$conf->global->$paramcreditorlong; -else if (! empty($conf->global->$paramcreditor)) $creditor=$conf->global->$paramcreditor; +elseif (! empty($conf->global->$paramcreditor)) $creditor=$conf->global->$paramcreditor; @@ -699,7 +699,7 @@ $logosmall=$mysoc->logo_small; $logo=$mysoc->logo; $paramlogo='ONLINE_PAYMENT_LOGO_'.$suffix; if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -else if (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; +elseif (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo=''; diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 783493f375c..f9e83b4a5d6 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -216,7 +216,7 @@ $logosmall=$mysoc->logo_small; $logo=$mysoc->logo; $paramlogo='ONLINE_PAYMENT_LOGO_'.$suffix; if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -else if (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; +elseif (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo=''; diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index e48fc014749..2831da07b13 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -151,7 +151,7 @@ $logosmall=$mysoc->logo_small; $logo=$mysoc->logo; $paramlogo='ONLINE_PAYMENT_LOGO_'.$suffix; if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -else if (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; +elseif (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo=''; @@ -378,8 +378,8 @@ if ($ispaymentok) // Define default choice for complementary actions $option=''; if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $option='bankviainvoice'; - else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $option='bankdirect'; - else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $option='invoiceonly'; + elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $option='bankdirect'; + elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $option='invoiceonly'; if (empty($option)) $option='none'; $sendalsoemail = 1; diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 90082d638c2..68edf809fea 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -79,7 +79,7 @@ else { $result=restrictedArea($user, 'reception'); if($origin == 'supplierorder'){ if (empty($user->rights->fournisseur->commande->lire) && empty($user->rights->fournisseur->commande->read)) accessforbidden(); - }else if (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) accessforbidden(); + }elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) accessforbidden(); } $action = GETPOST('action','alpha'); @@ -209,7 +209,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } else if ($reshook < 0) + } elseif ($reshook < 0) $error++; } @@ -388,7 +388,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_valid' && $confirm == 'yes' && + elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->reception->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->reception->reception_advance->validate))) ) @@ -424,7 +424,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->reception->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->reception->supprimer) { $result = $object->delete($user); if ($result > 0) @@ -447,7 +447,7 @@ if (empty($reshook)) } }*/ - else if ($action == 'setdate_livraison' && $user->rights->reception->creer) + elseif ($action == 'setdate_livraison' && $user->rights->reception->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $datedelivery=dol_mktime(GETPOST('liv_hour','int'), GETPOST('liv_min','int'), 0, GETPOST('liv_month','int'), GETPOST('liv_day','int'), GETPOST('liv_year','int')); @@ -461,7 +461,7 @@ if (empty($reshook)) } // Action update - else if ($action == 'settracking_number' || $action == 'settracking_url' + elseif ($action == 'settracking_number' || $action == 'settracking_url' || $action == 'settrueWeight' || $action == 'settrueWidth' || $action == 'settrueHeight' @@ -498,7 +498,7 @@ if (empty($reshook)) } // Build document - else if ($action == 'builddoc') // En get ou en post + elseif ($action == 'builddoc') // En get ou en post { // Save last template used to generate document if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha')); @@ -590,7 +590,7 @@ if (empty($reshook)) /* * Update a line */ - else if ($action == 'updateline' && $user->rights->reception->creer && GETPOST('save')) + elseif ($action == 'updateline' && $user->rights->reception->creer && GETPOST('save')) { // Clean parameters $qty = 0; @@ -689,7 +689,7 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->reception->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { + elseif ($action == 'updateline' && $user->rights->reception->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } @@ -1218,7 +1218,7 @@ if ($action == 'create') } } } -else if ($id || $ref) +elseif ($id || $ref) /* *************************************************************************** */ /* */ /* Edit and view mode */ @@ -1979,7 +1979,7 @@ else if ($id || $ref) print '<input type="submit" class="button" id="savelinebutton" name="save" value="' . $langs->trans("Save") . '"><br>'; print '<input type="submit" class="button" id="cancellinebutton" name="cancel" value="' . $langs->trans("Cancel") . '"><br>'; } - else if ($object->statut == 0) + elseif ($object->statut == 0) { // edit-delete buttons print '<td class="linecoledit" align="center">'; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 4cddbb1134e..f97e22c7cfd 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -297,7 +297,7 @@ class Reception extends CommonObject } } } - else if ($reshook < 0) $error++; + elseif ($reshook < 0) $error++; if (! $error && ! $notrigger) { diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index 7fc1ed889f5..81379fa81ce 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -106,13 +106,13 @@ if ($action == 'addcontact' && $user->rights->reception->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->reception->creer) +elseif ($action == 'swapstatut' && $user->rights->reception->creer) { $result=$objectsrc->swapContactStatus(GETPOST('ligne')); } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->reception->creer) +elseif ($action == 'deletecontact' && $user->rights->reception->creer) { $result = $objectsrc->delete_contact(GETPOST("lineid")); diff --git a/htdocs/resource/contact.php b/htdocs/resource/contact.php index e4f588b7f0d..e4791a9970f 100644 --- a/htdocs/resource/contact.php +++ b/htdocs/resource/contact.php @@ -77,13 +77,13 @@ if ($action == 'addcontact' && $user->rights->resource->write) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->resource->write) +elseif ($action == 'swapstatut' && $user->rights->resource->write) { $result=$object->swapContactStatus(GETPOST('ligne','int')); } // Erase a contact -else if ($action == 'deletecontact' && $user->rights->resource->write) +elseif ($action == 'deletecontact' && $user->rights->resource->write) { $result = $object->delete_contact(GETPOST('lineid','int')); diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 4628f241728..74f24c36399 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -545,7 +545,7 @@ foreach ($dirsociete as $dirroot) $modulequalified=1; if (! empty($module->version)) { if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; - else if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; + elseif ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; } if ($modulequalified) diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index ffcd7c7a00f..2280c83635f 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -310,7 +310,7 @@ abstract class ActionsCardCommon $this->tpl['sales_representatives'].= $nbofsalesrepresentative; $this->tpl['sales_representatives'].= '</a>'; } - else if ($nbofsalesrepresentative > 0) + elseif ($nbofsalesrepresentative > 0) { $userstatic=new User($this->db); $i=0; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 617e9f9a1f7..dbb7fbcd91b 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -471,7 +471,7 @@ if (empty($reshook)) } if (GETPOST('deletephoto')) $object->logo = ''; - else if (! empty($_FILES['photo']['name'])) $object->logo = dol_sanitizeFileName($_FILES['photo']['name']); + elseif (! empty($_FILES['photo']['name'])) $object->logo = dol_sanitizeFileName($_FILES['photo']['name']); // Check parameters if (! GETPOST('cancel','alpha')) @@ -631,7 +631,7 @@ if (empty($reshook)) { $url=$_SERVER["PHP_SELF"]."?socid=".$object->id; if (($object->client == 1 || $object->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url=DOL_URL_ROOT."/comm/card.php?socid=".$object->id; - else if ($object->fournisseur == 1) $url=DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; + elseif ($object->fournisseur == 1) $url=DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; header("Location: ".$url); exit; @@ -1786,7 +1786,7 @@ else if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; } - else if ($object->codeclient_modifiable()) + elseif ($object->codeclient_modifiable()) { print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($object->code_client).'" maxlength="15">'; } @@ -1826,7 +1826,7 @@ else if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; } - else if ($object->codefournisseur_modifiable()) + elseif ($object->codefournisseur_modifiable()) { print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.$object->code_fournisseur.'" maxlength="15">'; } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 1e152331aff..34a8c0005da 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2332,7 +2332,7 @@ class Societe extends CommonObject { $obj = $this->db->fetch_object($resql); if ($mode == 'email') $property=$obj->email; - else if ($mode == 'mobile') $property=$obj->phone_mobile; + elseif ($mode == 'mobile') $property=$obj->phone_mobile; else $property=$obj->$mode; // Show all contact. If hidedisabled is 1, showonly contacts with status = 1 @@ -2341,7 +2341,7 @@ class Societe extends CommonObject if (empty($property)) { if ($mode == 'email') $property=$langs->transnoentitiesnoconv("NoEMail"); - else if ($mode == 'mobile') $property=$langs->transnoentitiesnoconv("NoMobilePhone"); + elseif ($mode == 'mobile') $property=$langs->transnoentitiesnoconv("NoMobilePhone"); } if (!empty($obj->poste)) @@ -2465,7 +2465,7 @@ class Societe extends CommonObject $obj = $this->db->fetch_object($resql); if ($mode == 'email') $contact_property = dol_string_nospecial(dolGetFirstLastname($obj->firstname, $obj->lastname), ' ', array(","))." <".$obj->email.">"; - else if ($mode == 'mobile') $contact_property = $obj->phone_mobile; + elseif ($mode == 'mobile') $contact_property = $obj->phone_mobile; } return $contact_property; } @@ -2787,7 +2787,7 @@ class Societe extends CommonObject $result = $mod->get_code($this->db, $this, $type); if ($type == 'customer') $this->code_compta = $mod->code; - else if ($type == 'supplier') $this->code_compta_fournisseur = $mod->code; + elseif ($type == 'supplier') $this->code_compta_fournisseur = $mod->code; return $result; } @@ -2800,7 +2800,7 @@ class Societe extends CommonObject else { if ($type == 'customer') $this->code_compta = ''; - else if ($type == 'supplier') $this->code_compta_fournisseur = ''; + elseif ($type == 'supplier') $this->code_compta_fournisseur = ''; return 0; } @@ -3225,7 +3225,7 @@ class Societe extends CommonObject // Define if third party is treated as company (or not) when nature is unknown $isacompany=empty($conf->global->MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES)?0:1; // 0 by default if (! empty($this->tva_intra)) $isacompany=1; - else if (! empty($this->typent_code) && $this->typent_code != 'TE_UNKNOWN') + elseif (! empty($this->typent_code) && $this->typent_code != 'TE_UNKNOWN') { // TODO Add a field is_a_company into dictionary if (preg_match('/^TE_PRIVATE/', $this->typent_code)) $isacompany=0; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index dd4134bae86..61292d4f4fe 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -313,7 +313,7 @@ if (!empty($sql_select)) } else { $sql.= " AND date_format(".$dateprint.", '%m') = '".sprintf('%02d',$month)."'"; } - } else if ($year > 0) { + } elseif ($year > 0) { $start = dol_mktime(0, 0, 0, 1, 1, $year); $end = dol_time_plus_duree($start,1,'y') - 1; $sql.= " AND ".$dateprint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'"; @@ -622,7 +622,7 @@ if ($sql_select) } $db->free($resql); } -else if (empty($type_element) || $type_element == -1) +elseif (empty($type_element) || $type_element == -1) { print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, '', ''); diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index 630b8fa4723..2144c11f3ed 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -82,7 +82,7 @@ if ($action == 'addcontact' && $user->rights->societe->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->societe->creer) +elseif ($action == 'swapstatut' && $user->rights->societe->creer) { if ($object->fetch($id)) { @@ -95,7 +95,7 @@ else if ($action == 'swapstatut' && $user->rights->societe->creer) } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->societe->creer) +elseif ($action == 'deletecontact' && $user->rights->societe->creer) { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 0affce21c93..ab08caa6d9f 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -151,7 +151,7 @@ if (empty($reshook)) } // Delete askprice - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->supplier_proposal->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->supplier_proposal->supprimer) { $result = $object->delete($user); if ($result > 0) { @@ -164,7 +164,7 @@ if (empty($reshook)) } // Remove line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->supplier_proposal->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->supplier_proposal->creer) { $result = $object->deleteline($lineid); // reorder lines @@ -188,7 +188,7 @@ if (empty($reshook)) } // Validation - else if ($action == 'confirm_validate' && $confirm == 'yes' && + elseif ($action == 'confirm_validate' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->supplier_proposal->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->supplier_proposal->validate_advance))) ) @@ -222,7 +222,7 @@ if (empty($reshook)) } } - else if ($action == 'setdate_livraison' && $user->rights->supplier_proposal->creer) + elseif ($action == 'setdate_livraison' && $user->rights->supplier_proposal->creer) { $result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year'])); if ($result < 0) @@ -230,7 +230,7 @@ if (empty($reshook)) } // Create askprice - else if ($action == 'add' && $user->rights->supplier_proposal->creer) + elseif ($action == 'add' && $user->rights->supplier_proposal->creer) { $object->socid = $socid; $object->fetch_thirdparty(); @@ -445,7 +445,7 @@ if (empty($reshook)) } // Reopen proposal - else if ($action == 'confirm_reopen' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { + elseif ($action == 'confirm_reopen' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { // prevent browser refresh from reopening proposal several times if ($object->statut == SupplierProposal::STATUS_SIGNED || $object->statut == SupplierProposal::STATUS_NOTSIGNED || $object->statut == SupplierProposal::STATUS_CLOSE) { $object->reopen($user, SupplierProposal::STATUS_VALIDATED); @@ -453,7 +453,7 @@ if (empty($reshook)) } // Close proposal - else if ($action == 'close' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { + elseif ($action == 'close' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { // prevent browser refresh from reopening proposal several times if ($object->statut == SupplierProposal::STATUS_SIGNED) { $object->setStatut(SupplierProposal::STATUS_CLOSE); @@ -461,7 +461,7 @@ if (empty($reshook)) } // Set accepted/refused - else if ($action == 'setstatut' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { + elseif ($action == 'setstatut' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel','alpha')) { if (! GETPOST('statut')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("CloseAs")), null, 'errors'); $action = 'statut'; @@ -507,7 +507,7 @@ if (empty($reshook)) } } - else if ($action == "setabsolutediscount" && $user->rights->supplier_proposal->creer) { + elseif ($action == "setabsolutediscount" && $user->rights->supplier_proposal->creer) { if ($_POST["remise_id"]) { if ($object->id > 0) { $result = $object->insert_discount($_POST["remise_id"]); @@ -688,7 +688,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'errors'); } } - else if((GETPOST('price_ht')!=='' || GETPOST('price_ttc')!=='') && empty($error)) // Free product. // $price_ht is already set + elseif((GETPOST('price_ht')!=='' || GETPOST('price_ttc')!=='') && empty($error)) // Free product. // $price_ht is already set { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); @@ -793,7 +793,7 @@ if (empty($reshook)) } // Mise a jour d'une ligne dans la demande de prix - else if ($action == 'updateline' && $user->rights->supplier_proposal->creer && GETPOST('save') == $langs->trans("Save")) { + elseif ($action == 'updateline' && $user->rights->supplier_proposal->creer && GETPOST('save') == $langs->trans("Save")) { // Define info_bits $info_bits = 0; @@ -919,50 +919,50 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->supplier_proposal->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { + elseif ($action == 'updateline' && $user->rights->supplier_proposal->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } // Set project - else if ($action == 'classin' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'classin' && $user->rights->supplier_proposal->creer) { $object->setProject(GETPOST('projectid'),'int'); } // Delai de livraison - else if ($action == 'setavailability' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setavailability' && $user->rights->supplier_proposal->creer) { $result = $object->availability($_POST['availability_id']); } // Conditions de reglement - else if ($action == 'setconditions' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setconditions' && $user->rights->supplier_proposal->creer) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } - else if ($action == 'setremisepercent' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setremisepercent' && $user->rights->supplier_proposal->creer) { $result = $object->set_remise_percent($user, $_POST['remise_percent']); } - else if ($action == 'setremiseabsolue' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setremiseabsolue' && $user->rights->supplier_proposal->creer) { $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); } // Mode de reglement - else if ($action == 'setmode' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setmode' && $user->rights->supplier_proposal->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setmulticurrencycode' && $user->rights->supplier_proposal->creer) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $user->rights->supplier_proposal->creer) { + elseif ($action == 'setmulticurrencyrate' && $user->rights->supplier_proposal->creer) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); } - else if ($action == 'update_extras') { + elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form @@ -1329,22 +1329,22 @@ if ($action == 'create') } // Confirm delete - else if ($action == 'delete') { + elseif ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAsk'), $langs->trans('ConfirmDeleteAsk', $object->ref), 'confirm_delete', '', 0, 1); } // Confirm reopen - else if ($action == 'reopen') { + elseif ($action == 'reopen') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenAsk', $object->ref), 'confirm_reopen', '', 0, 1); } // Confirmation delete product/service line - else if ($action == 'ask_deleteline') { + elseif ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Confirm validate askprice - else if ($action == 'validate') { + elseif ($action == 'validate') { $error = 0; // on verifie si l'objet est en numerotation provisoire diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index a32b973d00a..bf81aee86cb 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1953,7 +1953,7 @@ class SupplierProposal extends CommonObject { $ga[$obj->supplier_proposalid] = $obj->ref; } - else if ($shortlist == 2) + elseif ($shortlist == 2) { $ga[$obj->supplier_proposalid] = $obj->ref.' ('.$obj->name.')'; } diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php index 7e862e7682d..819618530be 100644 --- a/htdocs/supplier_proposal/contact.php +++ b/htdocs/supplier_proposal/contact.php @@ -81,7 +81,7 @@ if ($action == 'addcontact' && $permissiontoedit) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $permissiontoedit) +elseif ($action == 'swapstatut' && $permissiontoedit) { if ($object->fetch($id)) { @@ -94,7 +94,7 @@ else if ($action == 'swapstatut' && $permissiontoedit) } // Deleting a contact -else if ($action == 'deletecontact' && $permissiontoedit) +elseif ($action == 'deletecontact' && $permissiontoedit) { $object->fetch($id); $result = $object->delete_contact(GETPOST("lineid",'int')); diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index 82f5ad56416..6a9710a4b37 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -360,7 +360,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos { print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>"; } - else if ($total>0) + elseif ($total>0) { print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>"; } diff --git a/htdocs/takepos/customers.php b/htdocs/takepos/customers.php index 41738861702..e17cce187be 100644 --- a/htdocs/takepos/customers.php +++ b/htdocs/takepos/customers.php @@ -353,7 +353,7 @@ if ($search_level_from != '' && $search_level_to != '') $sortwhere = '(sortorder BETWEEN '.$search_level_from.' AND '.$search_level_to.') AS is_in_range'; } // If only "from" parameter is set, search for everything GREATER THAN it -else if ($search_level_from != '') +elseif ($search_level_from != '') { // Ensure that this parameter is a number $search_level_from = (int) $search_level_from; @@ -362,7 +362,7 @@ else if ($search_level_from != '') $sortwhere = '(sortorder >= '.$search_level_from.') AS is_in_range'; } // If only "to" parameter is set, search for everything LOWER THAN it -else if ($search_level_to != '') +elseif ($search_level_to != '') { // Ensure that this parameter is a number $search_level_to = (int) $search_level_to; diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php index ff1b368b743..c3e26345a09 100644 --- a/htdocs/takepos/genimg/index.php +++ b/htdocs/takepos/genimg/index.php @@ -83,7 +83,7 @@ if ($query=="cat") // Output imagejpeg($image_p, null, 100); } -else if ($query=="pro") +elseif ($query=="pro") { require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php"; diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 1701b82a770..789b2a1cc8a 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -66,8 +66,8 @@ if (!$placeid) { $placeid = 0; // not necesary if ($action == 'valid' && $user->rights->facture->creer) { if ($pay=="cash") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CASH; - else if ($pay=="card") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CB; - else if ($pay=="cheque") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE; + elseif ($pay=="card") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CB; + elseif ($pay=="cheque") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE; $now=dol_now(); $invoice = new Facture($db); $invoice->fetch($placeid); @@ -80,8 +80,8 @@ if ($action == 'valid' && $user->rights->facture->creer) $payment->amounts[$invoice->id]=$invoice->total_ttc; if ($pay=="cash") $payment->paiementid=4; - else if ($pay=="card") $payment->paiementid=6; - else if ($pay=="cheque") $payment->paiementid=7; + elseif ($pay=="card") $payment->paiementid=6; + elseif ($pay=="cheque") $payment->paiementid=7; $payment->num_paiement=$invoice->ref; $payment->create($user); @@ -125,8 +125,7 @@ if ($action == "deleteline") { $invoice->deleteline($idline); $invoice->fetch($placeid); } - else - if ($placeid > 0) { //If exist invoice, but no line selected, proced to delete last line + elseif ($placeid > 0) { //If exist invoice, but no line selected, proced to delete last line $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture='$placeid' order by rowid DESC"; $resql = $db->query($sql); $row = $db->fetch_array($resql); diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 83f21a506ea..40726265b01 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -430,7 +430,7 @@ foreach($menus as $menu) { echo '<button type="button" id="actionnext" class="actionbutton" onclick="MoreActions('.count($menus).');">'.$langs->trans("Next").'</button>'; echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; } - else if ($i>9) echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; + elseif ($i>9) echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; else echo '<button type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; } ?> @@ -442,7 +442,7 @@ foreach($menus as $menu) { while ($count<16) { ?> - <div class='wrapper' <?php if ($count==14) echo 'onclick="MoreCategories(\'less\');"'; else if ($count==15) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id='catdiv<?php echo $count;?>'> + <div class='wrapper' <?php if ($count==14) echo 'onclick="MoreCategories(\'less\');"'; elseif ($count==15) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id='catdiv<?php echo $count;?>'> <img class='imgwrapper' <?php if ($count==14) echo 'src="img/arrow-prev-top.png"'; if ($count==15) echo 'src="img/arrow-next-top.png"';?> width="98%" id='catimg<?php echo $count;?>'/> <div class='description'> <div class='description_content' id='catdesc<?php echo $count;?>'></div> diff --git a/htdocs/user/card.php b/htdocs/user/card.php index c5c2e77a4b8..f4799e7b17f 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -390,7 +390,7 @@ if (empty($reshook)) { { $object->entity = 0; } - else if (! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) + elseif (! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $object->entity = 1; // all users in master entity } @@ -1404,11 +1404,11 @@ else { $valuetoshow.=($valuetoshow?(' '.$langs->trans("or").' '):'').$langs->trans("LdapUacf_".$statutUACF); } - else if($userChangePassNextLogon) + elseif($userChangePassNextLogon) { $valuetoshow.=($valuetoshow?(' '.$langs->trans("or").' '):'').'<span class="warning">'.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).'</span>'; } - else if($userDisabled) + elseif($userDisabled) { $valuetoshow.=($valuetoshow?(' '.$langs->trans("or").' '):'').'<span class="warning">'.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).'</span>'; } @@ -1460,7 +1460,7 @@ else { print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin"); } - else if ($object->admin) + elseif ($object->admin) { print $form->textwithpicto(yn($object->admin),$langs->trans("AdministratorDesc"),1,"admin"); } @@ -1774,7 +1774,7 @@ else { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("SendNewPassword").'</a></div>'; } - else if (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && + elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { if ($object->email) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=passwordsend">'.$langs->trans("SendNewPassword").'</a></div>'; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 2c189ad07d1..f560e2413fa 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -279,7 +279,7 @@ class User extends CommonObject { $sql.= " AND (u.ldap_sid = '".$this->db->escape($sid)."' OR u.login = '".$this->db->escape($login)."') LIMIT 1"; } - else if ($login) + elseif ($login) { $sql.= " AND u.login = '".$this->db->escape($login)."'"; } @@ -538,7 +538,7 @@ class User extends CommonObject $whereforadd="id=".$this->db->escape($rid); // Ajout des droits induits if (! empty($subperms)) $whereforadd.=" OR (module='$module' AND perms='$perms' AND (subperms='lire' OR subperms='read'))"; - else if (! empty($perms)) $whereforadd.=" OR (module='$module' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; + elseif (! empty($perms)) $whereforadd.=" OR (module='$module' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; } else { // On a pas demande un droit en particulier mais une liste de droits @@ -3187,7 +3187,7 @@ class User extends CommonObject $obj = $this->db->fetch_object($resql); if ($mode == 'email') $user_property = dolGetFirstLastname($obj->firstname, $obj->lastname)." <".$obj->email.">"; - else if ($mode == 'mobile') $user_property = $obj->user_mobile; + elseif ($mode == 'mobile') $user_property = $obj->user_mobile; } return $user_property; } diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index f70f61e2ed6..c490aeddb3f 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -326,7 +326,7 @@ class UserGroup extends CommonObject $whereforadd="id=".$this->db->escape($rid); // Ajout des droits induits if ($subperms) $whereforadd.=" OR (module='$module' AND perms='$perms' AND (subperms='lire' OR subperms='read'))"; - else if ($perms) $whereforadd.=" OR (module='$module' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; + elseif ($perms) $whereforadd.=" OR (module='$module' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; // Pour compatibilite, si lowid = 0, on est en mode ajout de tout // TODO A virer quand sera gere par l'appelant diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 61c817a4c72..b940e6befe6 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -473,7 +473,7 @@ else print '<td>'; print $useringroup->getNomUrl(-1, '', 0, 0, 24, 0, 'login'); if ($useringroup->admin && ! $useringroup->entity) print img_picto($langs->trans("SuperAdministrator"),'redstar'); - else if ($useringroup->admin) print img_picto($langs->trans("Administrator"),'star'); + elseif ($useringroup->admin) print img_picto($langs->trans("Administrator"),'star'); print '</td>'; print '<td>'.$useringroup->lastname.'</td>'; print '<td>'.$useringroup->firstname.'</td>'; diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 65723b4d65d..f0673966f44 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -121,7 +121,7 @@ foreach($fulltree as $key => $val) { $li.=img_picto($langs->trans("SuperAdministrator"),'redstar'); } - else if ($userstatic->admin) + elseif ($userstatic->admin) { $li.=img_picto($langs->trans("Administrator"),'star'); } diff --git a/htdocs/user/home.php b/htdocs/user/home.php index fb97549e9a1..efb1ba33b78 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -156,7 +156,7 @@ if ($resql) { print img_picto($langs->trans("SuperAdministrator"),'redstar'); } - else if ($obj->admin) + elseif ($obj->admin) { print img_picto($langs->trans("Administrator"),'star'); } diff --git a/htdocs/user/list.php b/htdocs/user/list.php index dcede3a5576..ea8d340e0ae 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -504,7 +504,7 @@ while ($i < min($num,$limit)) { print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); } - else if ($obj->admin) + elseif ($obj->admin) { print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); } @@ -553,7 +553,7 @@ while ($i < min($num,$limit)) $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1); } - else if ($obj->ldap_sid) + elseif ($obj->ldap_sid) { print $langs->trans("DomainUser"); } @@ -604,7 +604,7 @@ while ($i < min($num,$limit)) { print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); } - else if ($obj->admin2) + elseif ($obj->admin2) { print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); } diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index c74178609aa..495cd3d913d 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -350,7 +350,7 @@ if ($result) print img_picto($langs->trans("Active"),'tick'); print '</td>'; } - else if (in_array($obj->id, $permsuser)) // Permission granted by user + elseif (in_array($obj->id, $permsuser)) // Permission granted by user { if ($caneditperms) { @@ -361,7 +361,7 @@ if ($result) print '</td>'; } - else if (is_array($permsgroupbyentity[$entity])) + elseif (is_array($permsgroupbyentity[$entity])) { if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission granted by group { diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 1e301350063..188ebdf09d2 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -903,7 +903,7 @@ function deleteProductOrService($authentication,$listofidstring) //$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'listofid'=>$listofiddeleted); $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'nbdeleted'=>0); } - else if (count($listofiddeleted) == 0) + elseif (count($listofiddeleted) == 0) { //$objectresp=array('result'=>array('result_code'=>'NOT_FOUND', 'result_label'=>'No product or service with id '.join(',',$listofid).' found'), 'listofid'=>$listofiddeleted); $objectresp=array('result'=>array('result_code'=>'NOT_FOUND', 'result_label'=>'No product or service with id '.join(',',$listofid).' found'), 'nbdeleted'=>0); diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 1433ae5324c..db253adafbf 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -677,7 +677,7 @@ if ($action == 'addcontainer') $error++; $action='createcontainer'; } - else if (! preg_match('/^[a-z0-9\-\_]+$/i', $objectpage->pageurl)) + elseif (! preg_match('/^[a-z0-9\-\_]+$/i', $objectpage->pageurl)) { $langs->load("errors"); setEventMessages($langs->transnoentities("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities('WEBSITE_PAGENAME')), null, 'errors'); diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index 4063d2f9321..d63f80f459e 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -197,7 +197,7 @@ if ($result >= 0) if($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_SID) { $fuser->fetch('','',$userKey[0]); // Chargement du user concerné par le SID - } else if($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) { + } elseif($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) { $fuser->fetch('',$userKey[0]); // Chargement du user concerné par le login } diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 320a1f495ad..6da28bc58f8 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -195,7 +195,7 @@ if ($result >= 0) if($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_SID) { $fuser->fetch('','',$ldapuser[$conf->global->LDAP_KEY_USERS]); // Chargement du user concerné par le SID - } else if($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) { + } elseif($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) { $fuser->fetch('',$ldapuser[$conf->global->LDAP_KEY_USERS]); // Chargement du user concerné par le login } From a6c40dc867562a7bc988ba27eae3d4ed36dd105d Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Sun, 27 Jan 2019 11:37:57 +0100 Subject: [PATCH 095/183] fix translations --- .../expensereport/modules_expensereport.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/core/modules/expensereport/modules_expensereport.php b/htdocs/core/modules/expensereport/modules_expensereport.php index 9ff7f671f9f..89df5dc4855 100644 --- a/htdocs/core/modules/expensereport/modules_expensereport.php +++ b/htdocs/core/modules/expensereport/modules_expensereport.php @@ -31,7 +31,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** - * Return list of active generation modules + * Return list of active models generation * * @param DoliDB $db Database handler * @param integer $maxfilenamelength Max length of value to show @@ -43,12 +43,12 @@ abstract class ModeleExpenseReport extends CommonDocGenerator global $conf; $type='expensereport'; - $liste=array(); + $list=array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste=getListOfModels($db,$type,$maxfilenamelength); + $list=getListOfModels($db,$type,$maxfilenamelength); - return $liste; + return $list; } } @@ -57,10 +57,10 @@ abstract class ModeleExpenseReport extends CommonDocGenerator * expensereport_pdf_create * * @param DoliDB $db Database handler - * @param ExpenseReport $object Object order + * @param ExpenseReport $object Object ExpenseReport * @param string $message Message - * @param string $modele Force le modele a utiliser ('' to not force) - * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param string $modele Force the model to use ('' to not force) + * @param Translate $outputlangs lang object to use for translation * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref @@ -85,9 +85,9 @@ abstract class ModeleNumRefExpenseReport public $error=''; /** - * Return if a module can be used or not + * Return if a model can be used or not * - * @return boolean true if module can be used + * @return boolean true if model can be used */ function isEnabled() { @@ -95,9 +95,9 @@ abstract class ModeleNumRefExpenseReport } /** - * Renvoie la description par defaut du modele de numerotation + * Returns the default description of the numbering model * - * @return string Texte descripif + * @return string Descriptive text */ function info() { @@ -107,7 +107,7 @@ abstract class ModeleNumRefExpenseReport } /** - * Renvoie un exemple de numerotation + * Returns an example of numbering * * @return string Example */ @@ -119,9 +119,9 @@ abstract class ModeleNumRefExpenseReport } /** - * Test si les numeros deja en vigueur dans la base ne provoquent pas de conflits qui empecheraient cette numerotation de fonctionner. + * Test whether the numbers already in force in the base do not cause conflicts that would prevent this numbering from working. * - * @return boolean false si conflit, true si ok + * @return boolean false if conflict, true if ok */ function canBeActivated() { @@ -129,10 +129,10 @@ abstract class ModeleNumRefExpenseReport } /** - * Renvoie prochaine valeur attribuee + * Returns next assigned value * * @param Object $object Object we need next value for - * @return string Valeur + * @return string Value */ function getNextValue($object) { @@ -141,9 +141,9 @@ abstract class ModeleNumRefExpenseReport } /** - * Renvoie version du module numerotation + * Returns the version of the numbering module * - * @return string Valeur + * @return string Value */ function getVersion() { From 95bbb46fdf761cce71ea09d5b7cc3cfab6f771d7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Sun, 27 Jan 2019 12:20:24 +0100 Subject: [PATCH 096/183] fix translations --- .../expensereport/mod_expensereport_jade.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 385a7558c4c..4690b64e0b5 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -19,12 +19,12 @@ /** * \file htdocs/core/modules/expensereport/mod_expensereport_jade.php * \ingroup expensereport - * \brief File of class to manage customer order numbering rules Jade + * \brief File of class to manage expensereport numbering rules Jade */ require_once DOL_DOCUMENT_ROOT .'/core/modules/expensereport/modules_expensereport.php'; /** - * Class to manage customer order numbering rules Jade + * Class to manage expensereport numbering rules Jade */ class mod_expensereport_jade extends ModeleNumRefExpenseReport { @@ -55,7 +55,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Return description of numbering module + * Return description of numbering model * * @return string Text with description */ @@ -67,7 +67,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Renvoi un exemple de numerotation + * Returns an example of numbering * * @return string Example */ @@ -78,8 +78,8 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Test si les numeros deje en vigueur dans la base ne provoquent pas de - * de conflits qui empechera cette numerotation de fonctionner. + * Test whether the numbers already in force in the base do not cause conflicts + * that would prevent this numbering from working. * * @return boolean false si conflit, true si ok */ @@ -174,7 +174,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport return $newref; } - // D'abord on recupere la valeur max + // First we get the max value $posindice=8; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; $sql.= " FROM ".MAIN_DB_PREFIX."expensereport"; From 88da5f25d845e02f97c7dde2ebde806f02a06bd3 Mon Sep 17 00:00:00 2001 From: tarrsalah <tarrsalah@gmail.com> Date: Sun, 27 Jan 2019 13:18:50 +0100 Subject: [PATCH 097/183] FIX css in the case of not showing topmenu images. --- htdocs/theme/eldy/style.css.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index ea24aaf20b0..819014e3adb 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1542,7 +1542,7 @@ div#tmenu_tooltip { <?php } ?> } -div.tmenusep { +div.topmenuimage { <?php if ($disableimages) { ?> display: none; <?php } ?> From 94d3f038eb6dbe5794d56a904cf85c8794f6ee79 Mon Sep 17 00:00:00 2001 From: Xebax <xebax@wanadoo.fr> Date: Sun, 27 Jan 2019 13:20:33 +0100 Subject: [PATCH 098/183] FIX 'statut' is ignored when updating a user with the REST API. --- htdocs/user/class/api_users.class.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index c30cacd72c0..6c5a15cc3cc 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -212,11 +212,22 @@ class Users extends DolibarrApi foreach ($request_data as $field => $value) { - if ($field == 'id') continue; - $this->useraccount->$field = $value; + if ($field == 'id') continue; + // The status must be updated using setstatus() because it + // is not handled by the update() method. + if ($field == 'statut') { + $result = $this->useraccount->setstatus($value); + if ($result < 0) { + throw new RestException(500, 'Error when updating status of user: '.$this->useraccount->error); + } + } else { + $this->useraccount->$field = $value; + } } - if ($this->useraccount->update(DolibarrApiAccess::$user) > 0) + // If there is no error, update() returns the number of affected + // rows so if the update is a no op, the return value is zezo. + if ($this->useraccount->update(DolibarrApiAccess::$user) >= 0) { return $this->get($id); } From 0aa98297f516f2c5d90a5e8439f92679589de4b0 Mon Sep 17 00:00:00 2001 From: Xebax <xebax@wanadoo.fr> Date: Sun, 27 Jan 2019 13:52:08 +0100 Subject: [PATCH 099/183] NEW Get the list of groups of a user with the REST API. --- htdocs/user/class/api_users.class.php | 38 ++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index 3b7d7ee5b00..3dff0d02f15 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -17,7 +17,8 @@ use Luracast\Restler\RestException; -//require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; /** * API class for users @@ -231,6 +232,41 @@ class Users extends DolibarrApi } } + + /** + * List the groups of a user + * + * @param int $id Id of user + * @return array Array of group objects + * + * @throws RestException + * + * @url GET {id}/groups + */ + function getGroups($id) + { + $obj_ret = array(); + + if (! DolibarrApiAccess::$user->rights->user->user->lire) { + throw new RestException(401); + } + + $user = new User($this->db); + $result = $user->fetch($id); + if( ! $result ) { + throw new RestException(404, 'user not found'); + } + + $usergroup = new UserGroup($this->db); + $groups = $usergroup->listGroupsForUser($id, false); + $obj_ret = array(); + foreach ($groups as $group) { + $obj_ret[] = $this->_cleanObjectDatas($group); + } + return $obj_ret; + } + + /** * Add a user into a group * From 496fa9b0fb018ce1a894183f7c8da3dce1254f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic.france@free.fr> Date: Sun, 27 Jan 2019 14:10:35 +0100 Subject: [PATCH 100/183] PSR2.Files.EndFileNewline.TooMany --- dev/initdata/generate-order.php | 1 - dev/initdata/generate-product.php | 2 -- dev/initdata/generate-thirdparty.php | 2 -- dev/initdata/purge-data.php | 1 - dev/setup/codesniffer/ruleset.xml | 9 +++++---- dev/translation/sanity_check_en_langfiles.php | 1 - htdocs/accountancy/admin/accountmodel.php | 1 - htdocs/accountancy/admin/categories_list.php | 1 - htdocs/accountancy/class/lettering.class.php | 1 - htdocs/admin/dict.php | 1 - htdocs/admin/ldap_contacts.php | 1 - htdocs/admin/livraison.php | 1 - htdocs/admin/mails_templates.php | 1 - htdocs/admin/supplier_proposal.php | 1 - htdocs/admin/tools/export.php | 1 - htdocs/admin/tools/export_files.php | 1 - htdocs/admin/website.php | 1 - htdocs/admin/website_options.php | 1 - htdocs/api/admin/explorer.php | 1 - htdocs/blockedlog/ajax/authority.php | 2 -- htdocs/bookmarks/bookmarks.lib.php | 1 - htdocs/bookmarks/list.php | 2 -- htdocs/cashdesk/class/Auth.class.php | 1 - htdocs/cashdesk/deconnexion.php | 1 - htdocs/cashdesk/facturation_verif.php | 1 - htdocs/cashdesk/include/environnement.php | 1 - htdocs/cashdesk/index_verif.php | 1 - htdocs/cashdesk/validation.php | 1 - htdocs/cashdesk/validation_ok.php | 1 - htdocs/cashdesk/validation_ticket.php | 1 - htdocs/commande/class/commandestats.class.php | 1 - htdocs/commande/customer.php | 1 - .../compta/deplacement/class/deplacementstats.class.php | 1 - htdocs/compta/facture/class/facturestats.class.php | 1 - htdocs/compta/prelevement/stats.php | 1 - htdocs/compta/salaries/class/salariesstats.class.php | 1 - htdocs/core/actions_builddoc.inc.php | 1 - htdocs/core/actions_changeselectedfields.inc.php | 2 -- htdocs/core/actions_dellink.inc.php | 1 - htdocs/core/actions_extrafields.inc.php | 1 - htdocs/core/actions_lineupdown.inc.php | 1 - htdocs/core/actions_massactions.inc.php | 3 --- htdocs/core/actions_setmoduleoptions.inc.php | 1 - htdocs/core/ajax/ajaxdirtree.php | 1 - htdocs/core/ajax/bankconciliate.php | 1 - htdocs/core/ajax/box.php | 1 - htdocs/core/ajax/check_notifications.php | 1 - htdocs/core/ajax/constantonoff.php | 1 - htdocs/core/ajax/contacts.php | 1 - htdocs/core/ajax/extraparams.php | 1 - htdocs/core/ajax/fileupload.php | 1 - htdocs/core/ajax/getaccountcurrency.php | 1 - htdocs/core/ajax/loadinplace.php | 1 - htdocs/core/ajax/price.php | 1 - htdocs/core/ajax/row.php | 1 - htdocs/core/ajax/saveinplace.php | 1 - htdocs/core/ajax/security.php | 1 - htdocs/core/ajax/selectsearchbox.php | 1 - htdocs/core/ajax/vatrates.php | 1 - htdocs/core/ajax/ziptown.php | 1 - htdocs/core/antispamimage.php | 1 - htdocs/core/boxes/box_actions.php | 1 - htdocs/core/boxes/box_bookmarks.php | 1 - htdocs/core/boxes/box_clients.php | 1 - htdocs/core/boxes/box_commandes.php | 1 - htdocs/core/boxes/box_comptes.php | 1 - htdocs/core/boxes/box_contacts.php | 1 - htdocs/core/boxes/box_contracts.php | 1 - htdocs/core/boxes/box_external_rss.php | 1 - htdocs/core/boxes/box_factures_fourn.php | 1 - htdocs/core/boxes/box_factures_fourn_imp.php | 1 - htdocs/core/boxes/box_ficheinter.php | 1 - htdocs/core/boxes/box_fournisseurs.php | 1 - htdocs/core/boxes/box_goodcustomers.php | 1 - htdocs/core/boxes/box_graph_invoices_permonth.php | 1 - .../core/boxes/box_graph_invoices_supplier_permonth.php | 1 - htdocs/core/boxes/box_graph_orders_permonth.php | 1 - htdocs/core/boxes/box_graph_orders_supplier_permonth.php | 1 - htdocs/core/boxes/box_graph_product_distribution.php | 1 - htdocs/core/boxes/box_graph_propales_permonth.php | 1 - htdocs/core/boxes/box_members.php | 1 - htdocs/core/boxes/box_produits.php | 1 - htdocs/core/boxes/box_produits_alerte_stock.php | 1 - htdocs/core/boxes/box_project.php | 1 - htdocs/core/boxes/box_propales.php | 1 - htdocs/core/boxes/box_prospect.php | 1 - htdocs/core/boxes/box_services_contracts.php | 1 - htdocs/core/boxes/box_services_expired.php | 1 - htdocs/core/boxes/box_supplier_orders.php | 1 - htdocs/core/boxes/modules_boxes.php | 2 -- htdocs/core/class/commonorder.class.php | 1 - htdocs/core/class/conf.class.php | 1 - htdocs/core/class/html.formbank.class.php | 1 - htdocs/core/class/html.formmargin.class.php | 1 - htdocs/core/class/html.formorder.class.php | 1 - htdocs/core/class/infobox.class.php | 1 - htdocs/core/class/stats.class.php | 1 - htdocs/core/db/DoliDB.class.php | 1 - htdocs/core/filemanagerdol/connectors/php/config.php | 1 - htdocs/core/filemanagerdol/connectors/php/upload.php | 2 -- htdocs/core/filemanagerdol/connectors/php/util.php | 1 - htdocs/core/lib/accounting.lib.php | 1 - htdocs/core/lib/agenda.lib.php | 1 - htdocs/core/lib/barcode.lib.php | 1 - htdocs/core/lib/categories.lib.php | 2 -- htdocs/core/lib/company.lib.php | 3 --- htdocs/core/lib/contact.lib.php | 1 - htdocs/core/lib/contract.lib.php | 1 - htdocs/core/lib/cron.lib.php | 2 -- htdocs/core/lib/doc.lib.php | 1 - htdocs/core/lib/doleditor.lib.php | 1 - htdocs/core/lib/ecm.lib.php | 1 - htdocs/core/lib/emailing.lib.php | 1 - htdocs/core/lib/expedition.lib.php | 2 -- htdocs/core/lib/files.lib.php | 1 - htdocs/core/lib/format_cards.lib.php | 1 - htdocs/core/lib/fourn.lib.php | 2 -- htdocs/core/lib/geturl.lib.php | 1 - htdocs/core/lib/hrm.lib.php | 1 - htdocs/core/lib/import.lib.php | 1 - htdocs/core/lib/invoice2.lib.php | 1 - htdocs/core/lib/ldap.lib.php | 1 - htdocs/core/lib/mailmanspip.lib.php | 1 - htdocs/core/lib/memory.lib.php | 1 - htdocs/core/lib/order.lib.php | 2 -- htdocs/core/lib/parsemd.lib.php | 1 - htdocs/core/lib/prelevement.lib.php | 1 - htdocs/core/lib/price.lib.php | 1 - htdocs/core/lib/propal.lib.php | 2 -- htdocs/core/lib/receiptprinter.lib.php | 2 -- htdocs/core/lib/reception.lib.php | 2 -- htdocs/core/lib/report.lib.php | 1 - htdocs/core/lib/sendings.lib.php | 1 - htdocs/core/lib/stock.lib.php | 1 - htdocs/core/lib/supplier_proposal.lib.php | 2 -- htdocs/core/lib/tax.lib.php | 1 - htdocs/core/lib/treeview.lib.php | 1 - htdocs/core/lib/ws.lib.php | 1 - htdocs/core/login/functions_ldap.php | 1 - htdocs/core/menus/standard/auguria_menu.php | 1 - htdocs/core/menus/standard/eldy_menu.php | 1 - htdocs/core/menus/standard/empty.php | 1 - htdocs/core/modules/barcode/modules_barcode.class.php | 1 - htdocs/core/modules/contract/mod_contract_olive.php | 1 - .../modules/expensereport/mod_expensereport_sand.php | 1 - htdocs/core/modules/facture/mod_facture_mars.php | 1 - htdocs/core/modules/facture/mod_facture_terre.php | 1 - htdocs/core/modules/fichinter/mod_arctic.php | 1 - htdocs/core/modules/modApi.class.php | 1 - htdocs/core/modules/modECM.class.php | 1 - htdocs/core/modules/modExternalSite.class.php | 1 - htdocs/core/modules/modFTP.class.php | 1 - htdocs/core/modules/modGravatar.class.php | 1 - htdocs/core/modules/modHoliday.class.php | 1 - htdocs/core/modules/modMargin.class.php | 1 - htdocs/core/modules/modMultiCurrency.class.php | 1 - htdocs/core/modules/modOpenSurvey.class.php | 1 - htdocs/core/modules/modPaybox.class.php | 1 - htdocs/core/modules/modPaypal.class.php | 1 - htdocs/core/modules/modProductBatch.class.php | 1 - htdocs/core/modules/modStripe.class.php | 1 - htdocs/core/modules/oauth/github_oauthcallback.php | 1 - htdocs/core/modules/oauth/google_oauthcallback.php | 1 - htdocs/core/modules/oauth/stripetest_oauthcallback.php | 1 - htdocs/core/modules/product/mod_codeproduct_leopard.php | 1 - .../security/generate/modGeneratePassNone.class.php | 1 - .../security/generate/modGeneratePassStandard.class.php | 1 - .../modules/security/generate/modules_genpassword.php | 1 - htdocs/core/modules/societe/mod_codeclient_leopard.php | 1 - .../supplier_invoice/mod_facture_fournisseur_cactus.php | 1 - .../supplier_invoice/mod_facture_fournisseur_tulip.php | 1 - htdocs/core/search.php | 1 - htdocs/core/tpl/card_presend.tpl.php | 1 - htdocs/core/tpl/object_discounts.tpl.php | 1 - htdocs/core/tpl/onlinepaymentlinks.tpl.php | 2 -- htdocs/dav/dav.lib.php | 1 - htdocs/ecm/ajax/ecmdatabase.php | 1 - htdocs/ecm/class/htmlecm.form.class.php | 1 - .../emailcollector/class/emailcollectorfilter.class.php | 1 - htdocs/expedition/class/expeditionstats.class.php | 1 - htdocs/expensereport/class/expensereportstats.class.php | 1 - htdocs/fichinter/class/fichinterstats.class.php | 1 - htdocs/filefunc.inc.php | 1 - htdocs/fourn/ajax/getSupplierPrices.php | 1 - htdocs/holiday/common.inc.php | 1 - htdocs/install/index.php | 1 - htdocs/install/lib/repair.lib.php | 1 - htdocs/install/phpinfo.php | 1 - htdocs/install/step5.php | 1 - htdocs/install/upgrade2.php | 1 - htdocs/loan/note.php | 1 - htdocs/margin/index.php | 1 - htdocs/master.inc.php | 1 - htdocs/modulebuilder/template/admin/setup.php | 1 - htdocs/paybox/lib/paybox.lib.php | 1 - htdocs/paypal/lib/paypal.lib.php | 1 - htdocs/paypal/lib/paypalfunctions.lib.php | 1 - htdocs/product/admin/product.php | 1 - htdocs/product/ajax/products.php | 1 - htdocs/product/index.php | 1 - htdocs/product/note.php | 1 - htdocs/product/stock/lib/replenishment.lib.php | 1 - htdocs/projet/ajax/projects.php | 1 - htdocs/public/agenda/index.php | 1 - htdocs/public/demo/index.php | 1 - htdocs/public/donations/index.php | 1 - htdocs/public/index.php | 1 - htdocs/public/members/index.php | 1 - htdocs/public/members/public_card.php | 1 - htdocs/public/notice.php | 1 - htdocs/public/paybox/index.php | 1 - htdocs/public/payment/index.php | 1 - htdocs/public/paypal/index.php | 1 - htdocs/public/stripe/index.php | 1 - htdocs/public/theme/common/index.php | 1 - htdocs/public/theme/index.php | 1 - htdocs/reception/class/receptionstats.class.php | 1 - htdocs/societe/ajax/company.php | 1 - htdocs/societe/ajaxcountries.php | 1 - htdocs/societe/class/companybankaccount.class.php | 1 - htdocs/societe/note.php | 1 - htdocs/societe/tpl/linesalesrepresentative.tpl.php | 1 - htdocs/stripe/lib/stripe.lib.php | 1 - htdocs/support/inc.php | 1 - htdocs/theme/eldy/graph-color.php | 1 - htdocs/theme/md/graph-color.php | 1 - htdocs/variants/ajax/orderAttribute.php | 1 - htdocs/webservices/index.php | 1 - scripts/contracts/email_expire_services_to_customers.php | 1 - .../email_expire_services_to_representatives.php | 1 - scripts/invoices/email_unpaid_invoices_to_customers.php | 1 - .../email_unpaid_invoices_to_representatives.php | 1 - scripts/members/sync_members_ldap2dolibarr.php | 1 - scripts/members/sync_members_types_ldap2dolibarr.php | 1 - scripts/modulebuilder/initmodule.php | 1 - scripts/user/sync_groups_ldap2dolibarr.php | 1 - scripts/user/sync_users_ldap2dolibarr.php | 1 - 237 files changed, 5 insertions(+), 261 deletions(-) diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php index 5e53fa752a2..e0adb2a256e 100755 --- a/dev/initdata/generate-order.php +++ b/dev/initdata/generate-order.php @@ -220,4 +220,3 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) dol_print_error($db,$object->error); } } - diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php index 393d5c5ce3d..f1b6c25e92a 100755 --- a/dev/initdata/generate-product.php +++ b/dev/initdata/generate-product.php @@ -96,5 +96,3 @@ for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++) if ($ret < 0) print "Error $ret - ".$produit->error."\n"; else print " OK with ref ".$produit->ref."\n"; } - - diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index 7f2c3e2055d..3744abeae7c 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -127,5 +127,3 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++) print "Error: ".$soc->error."\n"; } } - - diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index 2bdf200225b..63a10d84bc5 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -275,4 +275,3 @@ else } $db->close(); - diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 879d791b8e9..15c5c1def7d 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -65,7 +65,7 @@ <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed"> <severity>0</severity> </rule> - + <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" /> <!-- @@ -390,9 +390,6 @@ </rule> <rule ref="PEAR.NamingConventions.ValidVariableName" /> - <rule ref="PSR2.Classes.ClassDeclaration" /> - <rule ref="PSR2.Methods.FunctionClosingBrace" /> - <!-- This is not in PSR2 --> <rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore"> <severity>0</severity> @@ -419,4 +416,8 @@ <!-- The closing ?> tag MUST be omitted from files containing only PHP. --> <rule ref="Zend.Files.ClosingTag"/> + <rule ref="PSR2.Classes.ClassDeclaration" /> + <rule ref="PSR2.Methods.FunctionClosingBrace" /> + <rule ref="PSR2.Files.EndFileNewline.TooMany" /> + </ruleset> diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index 0e3b2c7513f..d053aa13bce 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -388,4 +388,3 @@ if ($web) } exit; - diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index e5f1d211f3b..0e59b0ab902 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -874,4 +874,3 @@ function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='') } } } - diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 1f10403f798..fad0cee65cd 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -873,4 +873,3 @@ function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $contex } } } - diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index 1130020b01d..2ba8b697bc9 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -314,4 +314,3 @@ class Lettering extends BookKeeping } } } - diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fc3b8f15f39..8e67983b55a 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1990,4 +1990,3 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') return $withentity; } - diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index cb4972e84b3..56866fdaea7 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -321,4 +321,3 @@ if (function_exists("ldap_connect")) // End of page llxFooter(); $db->close(); - diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index a7c38a95e1f..e49ef792700 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -481,4 +481,3 @@ print '</table>'; // End of page llxFooter(); $db->close(); - diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index da31a794374..f82ffc6f3ee 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -1065,4 +1065,3 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') } } } - diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 1756974379c..71ea0a6914b 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -585,4 +585,3 @@ print "</table>\n<br>"; // End of page llxFooter(); $db->close(); - diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 6b0ea790ab2..9f3caf91881 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -234,4 +234,3 @@ header("Location: dolibarr_export.php"); $time_end = time(); $db->close(); - diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 809cea3b271..0aae9083565 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -163,4 +163,3 @@ header("Location: dolibarr_export.php"); $time_end = time(); $db->close(); - diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index e36b8d59df3..7f7569caf17 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -695,4 +695,3 @@ function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='') } } } - diff --git a/htdocs/admin/website_options.php b/htdocs/admin/website_options.php index 9d724b86390..48c2bdcdd08 100644 --- a/htdocs/admin/website_options.php +++ b/htdocs/admin/website_options.php @@ -147,4 +147,3 @@ dol_fiche_end(); // End of page llxFooter(); $db->close(); - diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php index c3b54e36b6c..951e88f63fc 100644 --- a/htdocs/api/admin/explorer.php +++ b/htdocs/api/admin/explorer.php @@ -221,4 +221,3 @@ print $langs->trans("OnlyActiveElementsAreExposed", DOL_URL_ROOT.'/admin/modules llxFooter(); $db->close(); - diff --git a/htdocs/blockedlog/ajax/authority.php b/htdocs/blockedlog/ajax/authority.php index 1104eeb3c02..1b002dda574 100644 --- a/htdocs/blockedlog/ajax/authority.php +++ b/htdocs/blockedlog/ajax/authority.php @@ -69,5 +69,3 @@ elseif(!empty($newblock)){ else{ echo 'idontunderstandwhatihavetodo'; } - - diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index abe562c5ad9..5dd55a95873 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -150,4 +150,3 @@ function printBookmarksList($aDb, $aLangs) return $ret; } - diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index e26b38c2513..5cbd07393e3 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -212,5 +212,3 @@ else // End of page llxFooter(); $db->close(); - - diff --git a/htdocs/cashdesk/class/Auth.class.php b/htdocs/cashdesk/class/Auth.class.php index 78b76e20d11..343204e7870 100644 --- a/htdocs/cashdesk/class/Auth.class.php +++ b/htdocs/cashdesk/class/Auth.class.php @@ -139,4 +139,3 @@ class Auth return $ret; } } - diff --git a/htdocs/cashdesk/deconnexion.php b/htdocs/cashdesk/deconnexion.php index 0602b577378..67fc4e9cbb6 100644 --- a/htdocs/cashdesk/deconnexion.php +++ b/htdocs/cashdesk/deconnexion.php @@ -34,4 +34,3 @@ unset($_SESSION['uid']); header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php'); exit; - diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 6aa81d991df..160f0876ef5 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -233,4 +233,3 @@ $_SESSION['serObjFacturation'] = serialize($obj_facturation); //var_dump($_SESSION['serObjFacturation']); header('Location: '.$redirection); exit; - diff --git a/htdocs/cashdesk/include/environnement.php b/htdocs/cashdesk/include/environnement.php index 4490d4cf405..6442d1776e3 100644 --- a/htdocs/cashdesk/include/environnement.php +++ b/htdocs/cashdesk/include/environnement.php @@ -49,4 +49,3 @@ $conf_nbr_car_listes = 60; // Nombre max de caracteres par ligne dans les listes // Add hidden option to force decrease of stock whatever is user setup if (! empty($conf->global->CASHDESK_FORCE_STOCK_ON_BILL)) $conf->global->STOCK_CALCULATE_ON_BILL=1; - diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index cd354293022..8976434b559 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -140,4 +140,3 @@ else header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid); exit; } - diff --git a/htdocs/cashdesk/validation.php b/htdocs/cashdesk/validation.php index ff1219861e2..f52802f1f5d 100644 --- a/htdocs/cashdesk/validation.php +++ b/htdocs/cashdesk/validation.php @@ -25,4 +25,3 @@ $form=new Form($db); // Affichage des templates require 'tpl/validation1.tpl.php'; - diff --git a/htdocs/cashdesk/validation_ok.php b/htdocs/cashdesk/validation_ok.php index c8c83a91f18..78b66a3e502 100644 --- a/htdocs/cashdesk/validation_ok.php +++ b/htdocs/cashdesk/validation_ok.php @@ -23,4 +23,3 @@ // Affichage des templates require 'tpl/validation2.tpl.php'; - diff --git a/htdocs/cashdesk/validation_ticket.php b/htdocs/cashdesk/validation_ticket.php index a98b50b0bc9..9efad161821 100644 --- a/htdocs/cashdesk/validation_ticket.php +++ b/htdocs/cashdesk/validation_ticket.php @@ -40,4 +40,3 @@ if (empty($reshook)) $_SESSION['serObjFacturation'] = serialize($obj_facturation); - diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 3c6ec07c6cb..f931688c154 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -223,4 +223,3 @@ class CommandeStats extends Stats return $this->_getAllByProduct($sql); } } - diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 575c7985e3a..0b420eabac6 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -193,4 +193,3 @@ else // End of page llxFooter(); $db->close(); - diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index ae93eb094d9..ac7e9bc9dc7 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -166,4 +166,3 @@ class DeplacementStats extends Stats return $this->_getAllByYear($sql); } } - diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 4cf9477613e..459b13081b4 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -225,4 +225,3 @@ class FactureStats extends Stats return $this->_getAllByProduct($sql); } } - diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index e7bd8622fa2..ea4d91d6022 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -228,4 +228,3 @@ else // End of page llxFooter(); $db->close(); - diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php index 82a8d094148..6982d453408 100644 --- a/htdocs/compta/salaries/class/salariesstats.class.php +++ b/htdocs/compta/salaries/class/salariesstats.class.php @@ -164,4 +164,3 @@ class SalariesStats extends Stats return $this->_getAllByYear($sql); } } - diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 9d33def496c..6413dfdf297 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -133,4 +133,3 @@ if ($action == 'remove_file' && $permissioncreate) header('Location: '.$urltoredirect); exit; } - diff --git a/htdocs/core/actions_changeselectedfields.inc.php b/htdocs/core/actions_changeselectedfields.inc.php index 6d39272f74e..4cfc29209b1 100644 --- a/htdocs/core/actions_changeselectedfields.inc.php +++ b/htdocs/core/actions_changeselectedfields.inc.php @@ -44,5 +44,3 @@ if (GETPOST('formfilteraction') == 'listafterchangingselectedfields') //$action='list'; //var_dump($tabparam);exit; } - - diff --git a/htdocs/core/actions_dellink.inc.php b/htdocs/core/actions_dellink.inc.php index 7d20f124277..d2b8019a5e0 100644 --- a/htdocs/core/actions_dellink.inc.php +++ b/htdocs/core/actions_dellink.inc.php @@ -43,4 +43,3 @@ if ($action == 'dellink' && ! empty($permissiondellink) && ! GETPOST('cancel','a $result=$object->deleteObjectLinked(0, '', 0, '', $dellinkid); if ($result < 0) setEventMessages($object->error,$object->errors,'errors'); } - diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index bae5001b256..a50fadec1af 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -402,4 +402,3 @@ if ($action == 'delete') $mesg=$langs->trans("ErrorFieldCanNotContainSpecialCharacters",$langs->transnoentities("AttributeCode")); } } - diff --git a/htdocs/core/actions_lineupdown.inc.php b/htdocs/core/actions_lineupdown.inc.php index bcf251e0763..8b5e3e3a24c 100644 --- a/htdocs/core/actions_lineupdown.inc.php +++ b/htdocs/core/actions_lineupdown.inc.php @@ -70,4 +70,3 @@ if ($action == 'down' && $permissiontoedit) header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid')); exit(); } - diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 630c67e9979..a8fdec68f0d 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1249,6 +1249,3 @@ $parameters['uploaddir']=$uploaddir; $reshook=$hookmanager->executeHooks('doMassActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - - - diff --git a/htdocs/core/actions_setmoduleoptions.inc.php b/htdocs/core/actions_setmoduleoptions.inc.php index 03ff1491e49..fec4ef08c11 100644 --- a/htdocs/core/actions_setmoduleoptions.inc.php +++ b/htdocs/core/actions_setmoduleoptions.inc.php @@ -114,4 +114,3 @@ if ($action == 'setModuleOptions') if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupNotSaved"), null, 'errors'); } } - diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index d90a3f5f316..e74974240e3 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -491,4 +491,3 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, else print "PermissionDenied"; } } - diff --git a/htdocs/core/ajax/bankconciliate.php b/htdocs/core/ajax/bankconciliate.php index e5bfb674e8f..47e86864d89 100644 --- a/htdocs/core/ajax/bankconciliate.php +++ b/htdocs/core/ajax/bankconciliate.php @@ -94,4 +94,3 @@ if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $ exit; } - diff --git a/htdocs/core/ajax/box.php b/htdocs/core/ajax/box.php index 93b317a43c9..664af93822b 100644 --- a/htdocs/core/ajax/box.php +++ b/htdocs/core/ajax/box.php @@ -77,4 +77,3 @@ if ($boxorder && $zone != '' && $userid > 0) } } } - diff --git a/htdocs/core/ajax/check_notifications.php b/htdocs/core/ajax/check_notifications.php index a5c73655bab..35d465ae632 100644 --- a/htdocs/core/ajax/check_notifications.php +++ b/htdocs/core/ajax/check_notifications.php @@ -116,4 +116,3 @@ if ($time >= $_SESSION['auto_check_events_not_before']) } print json_encode($eventfound); - diff --git a/htdocs/core/ajax/constantonoff.php b/htdocs/core/ajax/constantonoff.php index 0f733f4df5c..2095ec88e5a 100644 --- a/htdocs/core/ajax/constantonoff.php +++ b/htdocs/core/ajax/constantonoff.php @@ -64,4 +64,3 @@ if (! empty($action) && ! empty($name)) } } } - diff --git a/htdocs/core/ajax/contacts.php b/htdocs/core/ajax/contacts.php index 777fa076639..b1c9d7a82fa 100644 --- a/htdocs/core/ajax/contacts.php +++ b/htdocs/core/ajax/contacts.php @@ -54,4 +54,3 @@ if (! empty($id) && ! empty($action) && ! empty($htmlname)) echo json_encode($return); } - diff --git a/htdocs/core/ajax/extraparams.php b/htdocs/core/ajax/extraparams.php index e5972d29d70..1b51dac0475 100644 --- a/htdocs/core/ajax/extraparams.php +++ b/htdocs/core/ajax/extraparams.php @@ -74,4 +74,3 @@ if(! empty($id) && ! empty($element) && ! empty($htmlelement) && ! empty($type)) $result=$object->setExtraParameters(); } - diff --git a/htdocs/core/ajax/fileupload.php b/htdocs/core/ajax/fileupload.php index 1cf5678cb00..dd7fcd88131 100644 --- a/htdocs/core/ajax/fileupload.php +++ b/htdocs/core/ajax/fileupload.php @@ -73,4 +73,3 @@ switch ($_SERVER['REQUEST_METHOD']) { } $db->close(); - diff --git a/htdocs/core/ajax/getaccountcurrency.php b/htdocs/core/ajax/getaccountcurrency.php index d58c81efdba..46244f8ec7a 100644 --- a/htdocs/core/ajax/getaccountcurrency.php +++ b/htdocs/core/ajax/getaccountcurrency.php @@ -54,4 +54,3 @@ if (! empty($id)) echo json_encode($return); } - diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index abf3efba7db..c7284d140c8 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -112,4 +112,3 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ echo $langs->transnoentities('NotEnoughPermissions'); } } - diff --git a/htdocs/core/ajax/price.php b/htdocs/core/ajax/price.php index 3eab18216d1..96eb42ba076 100644 --- a/htdocs/core/ajax/price.php +++ b/htdocs/core/ajax/price.php @@ -63,4 +63,3 @@ if (! empty($output) && isset($amount) && isset($tva_tx)) echo json_encode($return); } - diff --git a/htdocs/core/ajax/row.php b/htdocs/core/ajax/row.php index 5348f36976d..11c1d614304 100644 --- a/htdocs/core/ajax/row.php +++ b/htdocs/core/ajax/row.php @@ -73,4 +73,3 @@ if ((! empty($_POST['roworder'])) && (! empty($_POST['table_element_line'])) $result=$row->line_order(true); } } - diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index 188dcbb29da..88eb7b22b0a 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -229,4 +229,3 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ echo $langs->trans('NotEnoughPermissions'); } } - diff --git a/htdocs/core/ajax/security.php b/htdocs/core/ajax/security.php index d6bfe51b45c..0ed7545b4cf 100644 --- a/htdocs/core/ajax/security.php +++ b/htdocs/core/ajax/security.php @@ -49,4 +49,3 @@ if (isset($_GET['action']) && ! empty($_GET['action'])) echo getRandomPassword($generic); } } - diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index 8d6c4fe0c31..c8ca10b21b4 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -170,4 +170,3 @@ if (! isset($usedbyinclude) || empty($usedbyinclude)) print json_encode($arrayresult); if (is_object($db)) $db->close(); } - diff --git a/htdocs/core/ajax/vatrates.php b/htdocs/core/ajax/vatrates.php index 8fe38d02552..29070c57985 100644 --- a/htdocs/core/ajax/vatrates.php +++ b/htdocs/core/ajax/vatrates.php @@ -67,4 +67,3 @@ if (! empty($id) && ! empty($action) && ! empty($htmlname)) echo json_encode($return); } - diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index c1af6a2ac22..a7d40a69aba 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -135,4 +135,3 @@ else } $db->close(); - diff --git a/htdocs/core/antispamimage.php b/htdocs/core/antispamimage.php index 7f0f2bde12f..9d0f8e46ad2 100644 --- a/htdocs/core/antispamimage.php +++ b/htdocs/core/antispamimage.php @@ -65,4 +65,3 @@ $background_color = imagecolorallocate($img, 250, 250, 250); $ecriture_color = imagecolorallocate($img, 0, 0, 0); imagestring($img, 4, 24, 8, $string, $ecriture_color); imagepng($img); - diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index aea85fd111e..51577c4c40b 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -260,4 +260,3 @@ class box_actions extends ModeleBoxes return ''; } } - diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index c3a29877104..f9a8f4ee036 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -162,4 +162,3 @@ class box_bookmarks extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 9b1e4e34261..7ad87687761 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -178,4 +178,3 @@ class box_clients extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 3f86909f04a..1e4163d5a8c 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -203,4 +203,3 @@ class box_commandes extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 5a5c2f59986..0b0304ecaba 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -189,4 +189,3 @@ class box_comptes extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 2d9d7e9461b..ae4f82d9c06 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -190,4 +190,3 @@ class box_contacts extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 7239fa78919..adcea2b5425 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -194,4 +194,3 @@ class box_contracts extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php index fa7d35f6db0..4d2c8bb81d5 100644 --- a/htdocs/core/boxes/box_external_rss.php +++ b/htdocs/core/boxes/box_external_rss.php @@ -200,4 +200,3 @@ class box_external_rss extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 617f041d7d2..4656e26aba2 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -219,4 +219,3 @@ class box_factures_fourn extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index bd8fde32aab..8f5330eedb4 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -206,4 +206,3 @@ class box_factures_fourn_imp extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index 76d1414f53f..4fd4d69eb3a 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -171,4 +171,3 @@ class box_ficheinter extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index c66c7f674c2..b80aa461f09 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -165,4 +165,3 @@ class box_fournisseurs extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php index 138326d6c01..a9b9dd2ef4a 100644 --- a/htdocs/core/boxes/box_goodcustomers.php +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -174,4 +174,3 @@ class box_goodcustomers extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index fd0b4e593c0..e1495a9ca60 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -280,4 +280,3 @@ class box_graph_invoices_permonth extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index f13b19259c9..4c8740f3621 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -279,4 +279,3 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index fefa90c5fea..1ed8ba7046b 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -278,4 +278,3 @@ class box_graph_orders_permonth extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index e388d226fd2..ba88ea8524f 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -277,4 +277,3 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 9dc4c162e0f..64d7db079c2 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -417,4 +417,3 @@ class box_graph_product_distribution extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index f28b0ec2c99..8dfb55381a4 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -281,4 +281,3 @@ class box_graph_propales_permonth extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index b0f999f54f1..f33ca6c942e 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -183,4 +183,3 @@ class box_members extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 3dd66eb1da2..c6e80721710 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -231,4 +231,3 @@ class box_produits extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 896ceb93df6..5636113187d 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -243,4 +243,3 @@ class box_produits_alerte_stock extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index a48543a00f6..5afee313a9d 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -200,4 +200,3 @@ class box_project extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 2b3426f21b8..b7b97b03eb4 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -193,4 +193,3 @@ class box_propales extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index a4382f86048..264673fec2b 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -181,4 +181,3 @@ class box_prospect extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 708b781f092..3016fcd8892 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -246,4 +246,3 @@ class box_services_contracts extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index ed62e127816..2a94d5626c0 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -190,4 +190,3 @@ class box_services_expired extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index 4621950843e..3fa212057f5 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -189,4 +189,3 @@ class box_supplier_orders extends ModeleBoxes return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } - diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 9ae35403ec7..eaa63f82881 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -503,5 +503,3 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box return $widget; } } - - diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index 199b29b87cd..9d9445df91c 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -145,4 +145,3 @@ abstract class CommonOrderLine extends CommonObjectLine public $special_code = 0; } - diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index de39260e007..9f0c8a01d95 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -694,4 +694,3 @@ class Conf } } } - diff --git a/htdocs/core/class/html.formbank.class.php b/htdocs/core/class/html.formbank.class.php index 9cf60cc45b1..fff3e86755d 100644 --- a/htdocs/core/class/html.formbank.class.php +++ b/htdocs/core/class/html.formbank.class.php @@ -79,4 +79,3 @@ class FormBank return 'IBANNumber'; } } - diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index cdd827145b0..88b430e832b 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -281,4 +281,3 @@ class FormMargin print '</div>'; } } - diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index 781b3f76e4f..0954c08c034 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -101,4 +101,3 @@ class FormOrder extends Form return 1; } } - diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index dedf3ec384f..fccd7080bc2 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -282,4 +282,3 @@ class InfoBox } } } - diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index 90986e7b6da..59d8c21746c 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -605,4 +605,3 @@ abstract class Stats return $result; } } - diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index ecc27bf88dc..295494b16d7 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -298,4 +298,3 @@ abstract class DoliDB implements Database return $this->lastqueryerror; } } - diff --git a/htdocs/core/filemanagerdol/connectors/php/config.php b/htdocs/core/filemanagerdol/connectors/php/config.php index 8df350ef150..84f3b6cc41c 100644 --- a/htdocs/core/filemanagerdol/connectors/php/config.php +++ b/htdocs/core/filemanagerdol/connectors/php/config.php @@ -173,4 +173,3 @@ $Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ; $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ; $Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ; $Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ; - diff --git a/htdocs/core/filemanagerdol/connectors/php/upload.php b/htdocs/core/filemanagerdol/connectors/php/upload.php index 90230504705..3e019e38062 100644 --- a/htdocs/core/filemanagerdol/connectors/php/upload.php +++ b/htdocs/core/filemanagerdol/connectors/php/upload.php @@ -68,5 +68,3 @@ $CKEcallback = $_GET['CKEditorFuncNum']; //modify the next line adding in the new param FileUpload($sType, $sCurrentFolder, $sCommand, $CKEcallback); - - diff --git a/htdocs/core/filemanagerdol/connectors/php/util.php b/htdocs/core/filemanagerdol/connectors/php/util.php index f23ba45550a..5df4d778c2c 100644 --- a/htdocs/core/filemanagerdol/connectors/php/util.php +++ b/htdocs/core/filemanagerdol/connectors/php/util.php @@ -238,4 +238,3 @@ function IsImageValid( $filePath, $extension ) return true; } - diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index b0b6dc6855c..4a7c9cc9eb0 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -226,4 +226,3 @@ function journalHead($nom,$variante,$period,$periodlink,$description,$builddate, print "\n<!-- fin cartouche journal -->\n\n"; } - diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 6dab036193d..730df99904d 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -561,4 +561,3 @@ function calendars_prepare_head($param) return $head; } - diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index efd245209d2..15fa860a82f 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -412,4 +412,3 @@ function barcode_outimage($text, $bars, $scale = 1, $mode = "png", $total_y = 0, imagepng($im); } } - diff --git a/htdocs/core/lib/categories.lib.php b/htdocs/core/lib/categories.lib.php index 4d85c412bab..a7aebe22d6d 100644 --- a/htdocs/core/lib/categories.lib.php +++ b/htdocs/core/lib/categories.lib.php @@ -103,5 +103,3 @@ function categoriesadmin_prepare_head() return $head; } - - diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 41b0f1af3ef..48e26850ddc 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1836,6 +1836,3 @@ function show_subsidiaries($conf,$langs,$db,$object) return $i; } - - - diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index 3c61410230f..d4001ad0733 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -107,4 +107,3 @@ function contact_prepare_head(Contact $object) return $head; } - diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index c7434e80878..9c30e9cbef0 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -128,4 +128,3 @@ function contract_admin_prepare_head() return $head; } - diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php index 3392785a571..d865a9c6748 100644 --- a/htdocs/core/lib/cron.lib.php +++ b/htdocs/core/lib/cron.lib.php @@ -132,5 +132,3 @@ function dol_print_cron_urls() return 0; } - - diff --git a/htdocs/core/lib/doc.lib.php b/htdocs/core/lib/doc.lib.php index b5e607fbbc5..5da54a9e760 100644 --- a/htdocs/core/lib/doc.lib.php +++ b/htdocs/core/lib/doc.lib.php @@ -165,4 +165,3 @@ function doc_getlinedesc($line,$outputlangs,$hideref=0,$hidedesc=0,$issupplierli return $libelleproduitservice; } - diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index 459bb3e3f2b..9893a9bcd50 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -131,4 +131,3 @@ function show_skin($fuser,$edit=0) print '</table>'; } - diff --git a/htdocs/core/lib/ecm.lib.php b/htdocs/core/lib/ecm.lib.php index 05f16e767ba..e1c4ee731a8 100644 --- a/htdocs/core/lib/ecm.lib.php +++ b/htdocs/core/lib/ecm.lib.php @@ -140,4 +140,3 @@ function ecm_prepare_head_fm($object) return $head; } - diff --git a/htdocs/core/lib/emailing.lib.php b/htdocs/core/lib/emailing.lib.php index 06ceb2c96b0..dd12385e313 100644 --- a/htdocs/core/lib/emailing.lib.php +++ b/htdocs/core/lib/emailing.lib.php @@ -67,4 +67,3 @@ function emailing_prepare_head(Mailing $object) return $head; } - diff --git a/htdocs/core/lib/expedition.lib.php b/htdocs/core/lib/expedition.lib.php index 275970c41c1..c8023ebb75f 100644 --- a/htdocs/core/lib/expedition.lib.php +++ b/htdocs/core/lib/expedition.lib.php @@ -138,5 +138,3 @@ function expedition_admin_prepare_head() return $head; } - - diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index ae80d371e33..48d6e259b1b 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2973,4 +2973,3 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre return $file_list; } - diff --git a/htdocs/core/lib/format_cards.lib.php b/htdocs/core/lib/format_cards.lib.php index ecfce2108dd..5aa3856f21c 100644 --- a/htdocs/core/lib/format_cards.lib.php +++ b/htdocs/core/lib/format_cards.lib.php @@ -66,4 +66,3 @@ foreach($_Avery_Labels as $key => $val) { $_Avery_Labels[$key]['name'].=' ('.$_Avery_Labels[$key]['paper-size'].' - '.$_Avery_Labels[$key]['NX'].'x'.$_Avery_Labels[$key]['NY'].')'; } - diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php index 4f3351a4d86..996d27a058a 100644 --- a/htdocs/core/lib/fourn.lib.php +++ b/htdocs/core/lib/fourn.lib.php @@ -227,5 +227,3 @@ function supplierorder_admin_prepare_head() return $head; } - - diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index 418cc1418b5..30c8bacd7c0 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -208,4 +208,3 @@ function removeHtmlComment($content) $content = preg_replace('/<!--[^\-]+-->/', '', $content); return $content; } - diff --git a/htdocs/core/lib/hrm.lib.php b/htdocs/core/lib/hrm.lib.php index 08b0e3be01a..449127595fc 100644 --- a/htdocs/core/lib/hrm.lib.php +++ b/htdocs/core/lib/hrm.lib.php @@ -88,4 +88,3 @@ function hrm_admin_prepare_head() return $head; } - diff --git a/htdocs/core/lib/import.lib.php b/htdocs/core/lib/import.lib.php index c3b8beac249..ffcc8b19305 100644 --- a/htdocs/core/lib/import.lib.php +++ b/htdocs/core/lib/import.lib.php @@ -52,4 +52,3 @@ function import_prepare_head($param, $maxstep=0) return $head; } - diff --git a/htdocs/core/lib/invoice2.lib.php b/htdocs/core/lib/invoice2.lib.php index f511d12da21..04ac88444f0 100644 --- a/htdocs/core/lib/invoice2.lib.php +++ b/htdocs/core/lib/invoice2.lib.php @@ -280,4 +280,3 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte if ($error) return -1; else return $result; } - diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index 9f2e55153d0..ee6a81ef077 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -184,4 +184,3 @@ function show_ldap_content($result,$level,$count,$var,$hide=0,$subcount=0) } return 1; } - diff --git a/htdocs/core/lib/mailmanspip.lib.php b/htdocs/core/lib/mailmanspip.lib.php index ce7f2927630..5658e5b0e01 100644 --- a/htdocs/core/lib/mailmanspip.lib.php +++ b/htdocs/core/lib/mailmanspip.lib.php @@ -43,4 +43,3 @@ function mailmanspip_admin_prepare_head() ) ); } - diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index 69c127f915c..66f5d11145e 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -270,4 +270,3 @@ function dol_getshmop($memoryid) } return $data; } - diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 93a7aaa71e0..3bdb5adf305 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -148,5 +148,3 @@ function order_admin_prepare_head() return $head; } - - diff --git a/htdocs/core/lib/parsemd.lib.php b/htdocs/core/lib/parsemd.lib.php index 13334fd400c..9b81c9bccb5 100644 --- a/htdocs/core/lib/parsemd.lib.php +++ b/htdocs/core/lib/parsemd.lib.php @@ -53,4 +53,3 @@ function dolMd2Html($content, $parser='parsedown',$replaceimagepath=null) return $content; } - diff --git a/htdocs/core/lib/prelevement.lib.php b/htdocs/core/lib/prelevement.lib.php index e6393326c71..1f7fc427d01 100644 --- a/htdocs/core/lib/prelevement.lib.php +++ b/htdocs/core/lib/prelevement.lib.php @@ -83,4 +83,3 @@ function prelevement_check_config() if(empty($conf->global->PRELEVEMENT_USER)) return -1; return 0; } - diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 0b9f3a3b246..7a1f2a8e0dc 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -410,4 +410,3 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt return $result; } - diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index 3fc37196c71..385b69fe2ab 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -141,5 +141,3 @@ function propal_admin_prepare_head() return $head; } - - diff --git a/htdocs/core/lib/receiptprinter.lib.php b/htdocs/core/lib/receiptprinter.lib.php index d440acc5403..6e161c8c4af 100644 --- a/htdocs/core/lib/receiptprinter.lib.php +++ b/htdocs/core/lib/receiptprinter.lib.php @@ -68,5 +68,3 @@ function receiptprinteradmin_prepare_head($mode) return $head; } - - diff --git a/htdocs/core/lib/reception.lib.php b/htdocs/core/lib/reception.lib.php index 0fc71c555dd..a0498468052 100644 --- a/htdocs/core/lib/reception.lib.php +++ b/htdocs/core/lib/reception.lib.php @@ -125,5 +125,3 @@ function reception_admin_prepare_head() return $head; } - - diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index 5a8aa344240..704fc0d60e2 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -122,4 +122,3 @@ function report_header($reportname,$notused,$period,$periodlink,$description,$bu print "\n<!-- end banner of report -->\n\n"; } - diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index be8aeb890fc..249e6e84b48 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -435,4 +435,3 @@ function show_list_sending_receive($origin,$origin_id,$filter='') return 1; } - diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php index 579944117ab..b9ce743c458 100644 --- a/htdocs/core/lib/stock.lib.php +++ b/htdocs/core/lib/stock.lib.php @@ -78,4 +78,3 @@ function stock_prepare_head($object) return $head; } - diff --git a/htdocs/core/lib/supplier_proposal.lib.php b/htdocs/core/lib/supplier_proposal.lib.php index 53dcf1c443f..01dd1187440 100644 --- a/htdocs/core/lib/supplier_proposal.lib.php +++ b/htdocs/core/lib/supplier_proposal.lib.php @@ -130,5 +130,3 @@ function supplier_proposal_admin_prepare_head() return $head; } - - diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 7927bec0268..2d65c45cb51 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -1008,4 +1008,3 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire return $list; } - diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index 6c66079090a..937f62520c4 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -227,4 +227,3 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetal if ($rang == 0) print '</ul>'; } - diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index 533a13e1fb6..bbbbcfb62a9 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -95,4 +95,3 @@ function check_authentication($authentication,&$error,&$errorcode,&$errorlabel) return $fuser; } - diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 4587dbae11b..6625fabf993 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -245,4 +245,3 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) return $login; } - diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index f4cb98d9c4b..5c74f43f8a6 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -317,4 +317,3 @@ class MenuManager unset($this->menu); } } - diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 4992fc6d11c..3d4ce9931af 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -337,4 +337,3 @@ class MenuManager return 0; } } - diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 038167ae512..da9540ee2aa 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -602,4 +602,3 @@ function print_end_menu_array_empty() print '</div>'; print "\n"; } - diff --git a/htdocs/core/modules/barcode/modules_barcode.class.php b/htdocs/core/modules/barcode/modules_barcode.class.php index 44d7eccbb07..67dd824d1e0 100644 --- a/htdocs/core/modules/barcode/modules_barcode.class.php +++ b/htdocs/core/modules/barcode/modules_barcode.class.php @@ -177,4 +177,3 @@ abstract class ModeleNumRefBarCode return $s; } } - diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index 993f4bf9bfb..8b51dbed0e0 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -121,4 +121,3 @@ class mod_contract_olive extends ModelNumRefContracts return $result; } } - diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 95cc3d39c95..a1b1c716917 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -156,4 +156,3 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport return $numFinal; } } - diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 7057fda20ee..bcc2bff39f4 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -228,4 +228,3 @@ class mod_facture_mars extends ModeleNumRefFactures return $this->getNextValue($objsoc,$objforref,$mode); } } - diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 454a1588f27..3db7579af4d 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -243,4 +243,3 @@ class mod_facture_terre extends ModeleNumRefFactures return $this->getNextValue($objsoc,$objforref,$mode); } } - diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 86f25dc4078..663a96a930f 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -157,4 +157,3 @@ class mod_arctic extends ModeleNumRefFicheinter return $this->getNextValue($objsoc,$objforref); } } - diff --git a/htdocs/core/modules/modApi.class.php b/htdocs/core/modules/modApi.class.php index 45aedc11406..71eb0669d0e 100644 --- a/htdocs/core/modules/modApi.class.php +++ b/htdocs/core/modules/modApi.class.php @@ -252,4 +252,3 @@ class modApi extends DolibarrModules return $this->_remove($sql, $options); } } - diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php index 593f702ac52..b172376996f 100644 --- a/htdocs/core/modules/modECM.class.php +++ b/htdocs/core/modules/modECM.class.php @@ -179,4 +179,3 @@ class modECM extends DolibarrModules $r++; } } - diff --git a/htdocs/core/modules/modExternalSite.class.php b/htdocs/core/modules/modExternalSite.class.php index 088e93955ef..260524df139 100644 --- a/htdocs/core/modules/modExternalSite.class.php +++ b/htdocs/core/modules/modExternalSite.class.php @@ -115,4 +115,3 @@ class modExternalSite extends DolibarrModules $r++; } } - diff --git a/htdocs/core/modules/modFTP.class.php b/htdocs/core/modules/modFTP.class.php index bdd745437e1..089f33c6e2d 100644 --- a/htdocs/core/modules/modFTP.class.php +++ b/htdocs/core/modules/modFTP.class.php @@ -125,4 +125,3 @@ class modFTP extends DolibarrModules $r++; } } - diff --git a/htdocs/core/modules/modGravatar.class.php b/htdocs/core/modules/modGravatar.class.php index 7e1aec3efaa..9dbf4ee124f 100644 --- a/htdocs/core/modules/modGravatar.class.php +++ b/htdocs/core/modules/modGravatar.class.php @@ -194,4 +194,3 @@ class modGravatar extends DolibarrModules // $r++; } } - diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 5b26a795dda..19f333c5ffa 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -257,4 +257,3 @@ class modHoliday extends DolibarrModules // $r++; } } - diff --git a/htdocs/core/modules/modMargin.class.php b/htdocs/core/modules/modMargin.class.php index 58de64c8aad..e4cd53c49a0 100644 --- a/htdocs/core/modules/modMargin.class.php +++ b/htdocs/core/modules/modMargin.class.php @@ -145,4 +145,3 @@ class modMargin extends DolibarrModules $this->rights[$r][5] = 'all'; } } - diff --git a/htdocs/core/modules/modMultiCurrency.class.php b/htdocs/core/modules/modMultiCurrency.class.php index a12ddea6cb0..32bd1bd5980 100644 --- a/htdocs/core/modules/modMultiCurrency.class.php +++ b/htdocs/core/modules/modMultiCurrency.class.php @@ -315,4 +315,3 @@ class modMultiCurrency extends DolibarrModules } } } - diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index be0b67950d7..30861f13e73 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -183,4 +183,3 @@ class modOpenSurvey extends DolibarrModules return $this->_init($sql,$options); } } - diff --git a/htdocs/core/modules/modPaybox.class.php b/htdocs/core/modules/modPaybox.class.php index 5b1d96332da..6358fae8833 100644 --- a/htdocs/core/modules/modPaybox.class.php +++ b/htdocs/core/modules/modPaybox.class.php @@ -189,4 +189,3 @@ class modPayBox extends DolibarrModules // $r++; } } - diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index 01f90842ec5..8ca87fb01cc 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -195,4 +195,3 @@ class modPaypal extends DolibarrModules // $r++; } } - diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index 55a800bd366..898a54d5485 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -130,4 +130,3 @@ class modProductBatch extends DolibarrModules return $this->_init($sql, $options); } } - diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index 9a1584da477..6f12a96758c 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -155,4 +155,3 @@ class modStripe extends DolibarrModules $r=1; } } - diff --git a/htdocs/core/modules/oauth/github_oauthcallback.php b/htdocs/core/modules/oauth/github_oauthcallback.php index 052964eca66..ef61eaca1f0 100644 --- a/htdocs/core/modules/oauth/github_oauthcallback.php +++ b/htdocs/core/modules/oauth/github_oauthcallback.php @@ -172,4 +172,3 @@ else // If entry on page with no parameter, we arrive here // No view at all, just actions $db->close(); - diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php index b63aca5bdf6..df7127eb847 100644 --- a/htdocs/core/modules/oauth/google_oauthcallback.php +++ b/htdocs/core/modules/oauth/google_oauthcallback.php @@ -167,4 +167,3 @@ else // If entry on page with no parameter, we arrive here // No view at all, just actions $db->close(); - diff --git a/htdocs/core/modules/oauth/stripetest_oauthcallback.php b/htdocs/core/modules/oauth/stripetest_oauthcallback.php index 3a663cd7162..c811af92f33 100644 --- a/htdocs/core/modules/oauth/stripetest_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripetest_oauthcallback.php @@ -177,4 +177,3 @@ else // If entry on page with no parameter, we arrive here // No view at all, just actions $db->close(); - diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 815e383d900..b8bc866556c 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -140,4 +140,3 @@ class mod_codeproduct_leopard extends ModeleProductCode return $result; } } - diff --git a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php index d0e8c617217..b0caa7d0b15 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php @@ -109,4 +109,3 @@ class modGeneratePassNone extends ModeleGenPassword return 1; } } - diff --git a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php index 0ecf7d7ef38..124ecf32321 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php @@ -135,4 +135,3 @@ class modGeneratePassStandard extends ModeleGenPassword return 1; } } - diff --git a/htdocs/core/modules/security/generate/modules_genpassword.php b/htdocs/core/modules/security/generate/modules_genpassword.php index e1f73b134be..a22d19e0845 100644 --- a/htdocs/core/modules/security/generate/modules_genpassword.php +++ b/htdocs/core/modules/security/generate/modules_genpassword.php @@ -90,4 +90,3 @@ abstract class ModeleGenPassword return 1; } } - diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index 9bdd27d5bee..330782d3775 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -139,4 +139,3 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode return $result; } } - diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 908b3c8ba41..292cd2c8370 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -248,4 +248,3 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices return $this->getNextValue($objsoc,$objforref,$mode); } } - diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index a3cb291263a..7f42e3cca50 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -197,4 +197,3 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices return $this->getNextValue($objsoc,$objforref,$mode); } } - diff --git a/htdocs/core/search.php b/htdocs/core/search.php index 8e6017cdf3b..2fb0efdbe48 100644 --- a/htdocs/core/search.php +++ b/htdocs/core/search.php @@ -152,4 +152,3 @@ else { print 'The wrapper search.php was called without any search criteria'; } - diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index db3514d7778..88419d0ec16 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -228,4 +228,3 @@ if ($action == 'presend') dol_fiche_end(); } - diff --git a/htdocs/core/tpl/object_discounts.tpl.php b/htdocs/core/tpl/object_discounts.tpl.php index 70698bfa7eb..4b0c8489a04 100644 --- a/htdocs/core/tpl/object_discounts.tpl.php +++ b/htdocs/core/tpl/object_discounts.tpl.php @@ -105,4 +105,3 @@ if($absolute_discount <= 0 && $absolute_creditnote <= 0) { print ' (' . $addabsolutediscount . ')'; } } - diff --git a/htdocs/core/tpl/onlinepaymentlinks.tpl.php b/htdocs/core/tpl/onlinepaymentlinks.tpl.php index 37639a5f8e6..0a3603fbc80 100644 --- a/htdocs/core/tpl/onlinepaymentlinks.tpl.php +++ b/htdocs/core/tpl/onlinepaymentlinks.tpl.php @@ -161,5 +161,3 @@ if (! empty($conf->use_javascript_ajax)) print info_admin($langs->trans("YouCanAddTagOnUrl")); print '<!-- END PHP TEMPLATE ONLINEPAYMENTLINKS -->'; - - diff --git a/htdocs/dav/dav.lib.php b/htdocs/dav/dav.lib.php index 719fc2a5c99..a212209d81d 100644 --- a/htdocs/dav/dav.lib.php +++ b/htdocs/dav/dav.lib.php @@ -69,4 +69,3 @@ function dav_admin_prepare_head() return $head; } - diff --git a/htdocs/ecm/ajax/ecmdatabase.php b/htdocs/ecm/ajax/ecmdatabase.php index 9c4b9ffa952..2ab1060e3e6 100644 --- a/htdocs/ecm/ajax/ecmdatabase.php +++ b/htdocs/ecm/ajax/ecmdatabase.php @@ -180,4 +180,3 @@ if (isset($action) && ! empty($action)) $db->query($sql); } } - diff --git a/htdocs/ecm/class/htmlecm.form.class.php b/htdocs/ecm/class/htmlecm.form.class.php index b6000cad923..cce1201980d 100644 --- a/htdocs/ecm/class/htmlecm.form.class.php +++ b/htdocs/ecm/class/htmlecm.form.class.php @@ -105,4 +105,3 @@ class FormEcm return $output; } } - diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index cafde3a820c..64dd6cbbe67 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -490,4 +490,3 @@ class EmailCollectorFilter extends CommonObject $this->initAsSpecimenCommon(); } } - diff --git a/htdocs/expedition/class/expeditionstats.class.php b/htdocs/expedition/class/expeditionstats.class.php index 26f7bda7a2a..fed2aaa380a 100644 --- a/htdocs/expedition/class/expeditionstats.class.php +++ b/htdocs/expedition/class/expeditionstats.class.php @@ -143,4 +143,3 @@ class ExpeditionStats extends Stats return $this->_getAllByYear($sql); } } - diff --git a/htdocs/expensereport/class/expensereportstats.class.php b/htdocs/expensereport/class/expensereportstats.class.php index 7901e813edc..243a368d81a 100644 --- a/htdocs/expensereport/class/expensereportstats.class.php +++ b/htdocs/expensereport/class/expensereportstats.class.php @@ -177,4 +177,3 @@ class ExpenseReportStats extends Stats return $this->_getAllByYear($sql); } } - diff --git a/htdocs/fichinter/class/fichinterstats.class.php b/htdocs/fichinter/class/fichinterstats.class.php index 0475a2116eb..4d68fee365a 100644 --- a/htdocs/fichinter/class/fichinterstats.class.php +++ b/htdocs/fichinter/class/fichinterstats.class.php @@ -211,4 +211,3 @@ class FichinterStats extends Stats return $this->_getAllByProduct($sql); } } - diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 4edfa3d0623..069806e4588 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -294,4 +294,3 @@ if (preg_match('/crypted:/i',$dolibarr_main_db_pass) || ! empty($dolibarr_main_d } else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } - diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php index ae407d5544d..3224fbbce51 100644 --- a/htdocs/fourn/ajax/getSupplierPrices.php +++ b/htdocs/fourn/ajax/getSupplierPrices.php @@ -97,4 +97,3 @@ if ($idprod > 0) } echo json_encode($prices); - diff --git a/htdocs/holiday/common.inc.php b/htdocs/holiday/common.inc.php index 96111cf6df0..b9a42c55e58 100644 --- a/htdocs/holiday/common.inc.php +++ b/htdocs/holiday/common.inc.php @@ -40,4 +40,3 @@ if (empty($conf->holiday->enabled)) llxFooter(); exit(); } - diff --git a/htdocs/install/index.php b/htdocs/install/index.php index 46e60be52ec..3c66a317c3d 100644 --- a/htdocs/install/index.php +++ b/htdocs/install/index.php @@ -66,4 +66,3 @@ print '<br><br>'.$langs->trans("SomeTranslationAreUncomplete"); // If there's no error, we display the next step button if ($err == 0) pFooter(0); - diff --git a/htdocs/install/lib/repair.lib.php b/htdocs/install/lib/repair.lib.php index 43a6d2bce27..9eca3ab5081 100644 --- a/htdocs/install/lib/repair.lib.php +++ b/htdocs/install/lib/repair.lib.php @@ -142,4 +142,3 @@ function clean_data_ecm_directories() return; } - diff --git a/htdocs/install/phpinfo.php b/htdocs/install/phpinfo.php index b3817dcbde2..895436c2069 100644 --- a/htdocs/install/phpinfo.php +++ b/htdocs/install/phpinfo.php @@ -24,4 +24,3 @@ include_once 'inc.php'; phpinfo(); - diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index b39f67dd3ba..9a548928834 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -469,4 +469,3 @@ pFooter(1,$setuplang); // Return code if ran from command line if ($ret) exit($ret); - diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index cf6cbf28e45..b4e37b52859 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -4924,4 +4924,3 @@ On les corrige: update llx_facture set paye=1, fk_statut=2 where close_code is null and rowid in (...) */ - diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index e066ef07a8e..70eb7c6af7c 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -132,4 +132,3 @@ if ($id > 0) // End of page llxFooter(); $db->close(); - diff --git a/htdocs/margin/index.php b/htdocs/margin/index.php index 04a2ba0d544..c223caf775b 100644 --- a/htdocs/margin/index.php +++ b/htdocs/margin/index.php @@ -33,4 +33,3 @@ if ($user->rights->produit->lire) { } header('Location: '.dol_buildpath('/margin/'.$page.'.php', 1)); - diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 10ff15fbabf..45018b60902 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -246,4 +246,3 @@ $hookmanager=new HookManager($db); if (! defined('MAIN_LABEL_MENTION_NPR') ) define('MAIN_LABEL_MENTION_NPR','NPR'); - diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index 6e0be4d0011..68fccf07445 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -144,4 +144,3 @@ dol_fiche_end(); llxFooter(); $db->close(); - diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index 849d8a7129c..3cb75bf9741 100644 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -196,4 +196,3 @@ function print_paybox_redirect($PRICE,$CURRENCY,$EMAIL,$urlok,$urlko,$TAG) return; } - diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 37cc2fdbeba..4b3be81c256 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -739,4 +739,3 @@ function getApiError() return $errors; } - diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php index 00f67bfa1f0..63d19f9ded2 100644 --- a/htdocs/paypal/lib/paypalfunctions.lib.php +++ b/htdocs/paypal/lib/paypalfunctions.lib.php @@ -75,4 +75,3 @@ $PROXY_PORT = $conf->global->MAIN_PROXY_PORT; $PROXY_USER = $conf->global->MAIN_PROXY_USER; $PROXY_PASS = $conf->global->MAIN_PROXY_PASS; $USE_PROXY = empty($conf->global->MAIN_PROXY_USE)?false:true; - diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 334640e87d3..fefa04624e5 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -746,4 +746,3 @@ print '</form>'; // End of page llxFooter(); $db->close(); - diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 6a286d6e7d2..196b4b609aa 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -197,4 +197,3 @@ else if ($outjson) print json_encode($arrayresult); } - diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 56519e6f46b..6bcf561083b 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -507,4 +507,3 @@ function activitytrim($product_type) print '</table>'; } } - diff --git a/htdocs/product/note.php b/htdocs/product/note.php index e77360b46be..a595d344e37 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -118,4 +118,3 @@ if ($id > 0 || ! empty($ref)) // End of page llxFooter(); $db->close(); - diff --git a/htdocs/product/stock/lib/replenishment.lib.php b/htdocs/product/stock/lib/replenishment.lib.php index 486e8373255..a4002cc4ee2 100644 --- a/htdocs/product/stock/lib/replenishment.lib.php +++ b/htdocs/product/stock/lib/replenishment.lib.php @@ -172,4 +172,3 @@ function getProducts($order_id) } return $products; } - diff --git a/htdocs/projet/ajax/projects.php b/htdocs/projet/ajax/projects.php index 46699ba01dd..cbc57ca6f3f 100644 --- a/htdocs/projet/ajax/projects.php +++ b/htdocs/projet/ajax/projects.php @@ -70,4 +70,3 @@ $arrayresult=$form->select_projects_list($socid, '', $htmlname, 0, 0, 1, $discar $db->close(); print json_encode($arrayresult); - diff --git a/htdocs/public/agenda/index.php b/htdocs/public/agenda/index.php index 1c06e10b06d..112a07951b8 100644 --- a/htdocs/public/agenda/index.php +++ b/htdocs/public/agenda/index.php @@ -25,4 +25,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 0409e849df0..15926df3df2 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -482,4 +482,3 @@ function llxFooterVierge() print "</div></body>\n"; print "</html>\n"; } - diff --git a/htdocs/public/donations/index.php b/htdocs/public/donations/index.php index 23f8e0e4cdc..08e7650a152 100644 --- a/htdocs/public/donations/index.php +++ b/htdocs/public/donations/index.php @@ -25,4 +25,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/public/index.php b/htdocs/public/index.php index d02276ef269..e1030c9973a 100644 --- a/htdocs/public/index.php +++ b/htdocs/public/index.php @@ -25,4 +25,3 @@ require '../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/public/members/index.php b/htdocs/public/members/index.php index 1ec9a1d1833..42bfa7713cf 100644 --- a/htdocs/public/members/index.php +++ b/htdocs/public/members/index.php @@ -25,4 +25,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index c2df82fb2f2..a2a430afddd 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -156,4 +156,3 @@ function llxFooterVierge() print "</body>\n"; print "</html>\n"; } - diff --git a/htdocs/public/notice.php b/htdocs/public/notice.php index 6a55411ae3b..c4ab121db18 100644 --- a/htdocs/public/notice.php +++ b/htdocs/public/notice.php @@ -47,4 +47,3 @@ else if (GETPOST('transphrase','alphanohtml')) print GETPOST('transphrase','alphanohtml'); if (GETPOST('transkey','alphanohtml')) print $langs->trans(GETPOST('transkey','alphanohtml')); } - diff --git a/htdocs/public/paybox/index.php b/htdocs/public/paybox/index.php index 0b7ad1c82e4..58d748aba72 100644 --- a/htdocs/public/paybox/index.php +++ b/htdocs/public/paybox/index.php @@ -25,4 +25,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/public/payment/index.php b/htdocs/public/payment/index.php index cc491b860d3..21786830df6 100644 --- a/htdocs/public/payment/index.php +++ b/htdocs/public/payment/index.php @@ -25,4 +25,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/public/paypal/index.php b/htdocs/public/paypal/index.php index 2e7f2772687..0cba12e6aa2 100644 --- a/htdocs/public/paypal/index.php +++ b/htdocs/public/paypal/index.php @@ -25,4 +25,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/public/stripe/index.php b/htdocs/public/stripe/index.php index 6a86f3ed88e..6958940ea48 100644 --- a/htdocs/public/stripe/index.php +++ b/htdocs/public/stripe/index.php @@ -25,4 +25,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/public/theme/common/index.php b/htdocs/public/theme/common/index.php index 0d25c726b33..2a9d8b8c2a9 100644 --- a/htdocs/public/theme/common/index.php +++ b/htdocs/public/theme/common/index.php @@ -26,4 +26,3 @@ require '../../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/public/theme/index.php b/htdocs/public/theme/index.php index 1d8c522741d..6b5d38f5e94 100644 --- a/htdocs/public/theme/index.php +++ b/htdocs/public/theme/index.php @@ -26,4 +26,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); - diff --git a/htdocs/reception/class/receptionstats.class.php b/htdocs/reception/class/receptionstats.class.php index 3f60a9846fb..0823bfb6393 100644 --- a/htdocs/reception/class/receptionstats.class.php +++ b/htdocs/reception/class/receptionstats.class.php @@ -139,4 +139,3 @@ class ReceptionStats extends Stats return $this->_getAllByYear($sql); } } - diff --git a/htdocs/societe/ajax/company.php b/htdocs/societe/ajax/company.php index 2cfdce9c01c..633ac22663c 100644 --- a/htdocs/societe/ajax/company.php +++ b/htdocs/societe/ajax/company.php @@ -94,4 +94,3 @@ else if ($outjson) print json_encode($arrayresult); } - diff --git a/htdocs/societe/ajaxcountries.php b/htdocs/societe/ajaxcountries.php index f67d01facce..caf93fd6972 100644 --- a/htdocs/societe/ajaxcountries.php +++ b/htdocs/societe/ajaxcountries.php @@ -75,4 +75,3 @@ if (! empty($country)) print '</ul>'; } } - diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 2891724ac7e..822e4134384 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -415,4 +415,3 @@ class CompanyBankAccount extends Account $this->socid = 0; } } - diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 9f1adb16fc7..139265ba3a3 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -132,4 +132,3 @@ else // End of page llxFooter(); $db->close(); - diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index c2ea3d987a5..b35f85b0f15 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -49,4 +49,3 @@ if ($nbofsalesrepresentative > 0) } else print '<span class="opacitymedium">'.$langs->trans("NoSalesRepresentativeAffected").'</span>'; print '</td></tr>'; - diff --git a/htdocs/stripe/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php index fbafd47c3ab..f71012222ac 100644 --- a/htdocs/stripe/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -199,4 +199,3 @@ function html_print_stripe_footer($fromcompany,$langs) print $line2; print '</font></div>'."\n"; } - diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index c1cf83097b6..049ca294091 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -250,4 +250,3 @@ function pFooter($nonext=0,$setuplang='') print '</body>'."\n"; print '</html>'."\n"; } - diff --git a/htdocs/theme/eldy/graph-color.php b/htdocs/theme/eldy/graph-color.php index 920fa7833af..49091d810b1 100644 --- a/htdocs/theme/eldy/graph-color.php +++ b/htdocs/theme/eldy/graph-color.php @@ -31,4 +31,3 @@ $theme_bordercolor = array(235,235,224); $theme_datacolor = array(array(136,102,136), array(0,130,110), array(140,140,220), array(190,120,120), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); $theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); $theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); - diff --git a/htdocs/theme/md/graph-color.php b/htdocs/theme/md/graph-color.php index 72cc839043b..78a621ada1d 100644 --- a/htdocs/theme/md/graph-color.php +++ b/htdocs/theme/md/graph-color.php @@ -31,4 +31,3 @@ $theme_bordercolor = array(235,235,224); $theme_datacolor = array(array(136,102,136), array(0,130,110), array(140,140,220), array(190,120,120), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); $theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); $theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); - diff --git a/htdocs/variants/ajax/orderAttribute.php b/htdocs/variants/ajax/orderAttribute.php index 92bbcc241d5..518b41fb388 100644 --- a/htdocs/variants/ajax/orderAttribute.php +++ b/htdocs/variants/ajax/orderAttribute.php @@ -50,4 +50,3 @@ if (isset($_POST['roworder'])) { ProductAttribute::bulkUpdateOrder($db, $newrowordertab); } - diff --git a/htdocs/webservices/index.php b/htdocs/webservices/index.php index e0a1ba998c8..2f469fa95fd 100644 --- a/htdocs/webservices/index.php +++ b/htdocs/webservices/index.php @@ -54,4 +54,3 @@ print 'List of available SOAP Web services is visible on the setup area, setup p $db->close(); - diff --git a/scripts/contracts/email_expire_services_to_customers.php b/scripts/contracts/email_expire_services_to_customers.php index 43a0b2524e6..326f0b44d72 100755 --- a/scripts/contracts/email_expire_services_to_customers.php +++ b/scripts/contracts/email_expire_services_to_customers.php @@ -314,4 +314,3 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldtarget,$durati return -1; } } - diff --git a/scripts/contracts/email_expire_services_to_representatives.php b/scripts/contracts/email_expire_services_to_representatives.php index a23652a779f..2a80c610f0e 100755 --- a/scripts/contracts/email_expire_services_to_representatives.php +++ b/scripts/contracts/email_expire_services_to_representatives.php @@ -280,4 +280,3 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresenta return -1; } } - diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php index 57fdeeed76f..c9d59e46502 100755 --- a/scripts/invoices/email_unpaid_invoices_to_customers.php +++ b/scripts/invoices/email_unpaid_invoices_to_customers.php @@ -305,4 +305,3 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldtarget) return -1; } } - diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index 37b421bcefd..bb4b90c81ce 100755 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -277,4 +277,3 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresenta return -1; } } - diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index d7d4fbdeaaf..a82caf4cbe7 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -340,4 +340,3 @@ function dolValidElement($element) { return (trim($element) != ''); } - diff --git a/scripts/members/sync_members_types_ldap2dolibarr.php b/scripts/members/sync_members_types_ldap2dolibarr.php index cb85e38bd89..b9ded8436b7 100755 --- a/scripts/members/sync_members_types_ldap2dolibarr.php +++ b/scripts/members/sync_members_types_ldap2dolibarr.php @@ -216,4 +216,3 @@ function dolValidElementType($element) { return (trim($element) != ''); } - diff --git a/scripts/modulebuilder/initmodule.php b/scripts/modulebuilder/initmodule.php index bee931dc8fa..09daa1024d5 100755 --- a/scripts/modulebuilder/initmodule.php +++ b/scripts/modulebuilder/initmodule.php @@ -172,4 +172,3 @@ if (! $error) print 'Module initialized'."\n"; exit(0); - diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index 4063d2f9321..6ddf94b6022 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -263,4 +263,3 @@ function dolValidElement($element) { return (trim($element) != ''); } - diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 320a1f495ad..bd7f136ab9c 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -319,4 +319,3 @@ function dolValidElement($element) { return (trim($element) != ''); } - From ac63a7b6b5ebbb699981fc350a1432900c848360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic34@users.noreply.github.com> Date: Sun, 27 Jan 2019 14:30:23 +0100 Subject: [PATCH 101/183] do not trim int, use cast --- htdocs/adherents/type.php | 46 ++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index c1ce5c2c294..d24802a6a41 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -105,8 +105,8 @@ if ($cancel) { if ($action == 'add' && $user->rights->adherent->configurer) { $object->label = trim($label); - $object->statut = trim($statut); - $object->subscription = (int) trim($subscription); + $object->statut = (int) $statut; + $object->subscription = (int) $subscription; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -159,8 +159,8 @@ if ($action == 'update' && $user->rights->adherent->configurer) $object->oldcopy = clone $object; $object->label = trim($label); - $object->statut = trim($statut); - $object->subscription = (int) trim($subscription); + $object->statut = (int) $statut; + $object->subscription = (int) $subscription; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -283,9 +283,12 @@ if (! $rowid && $action != 'create' && $action != 'edit') print '<td align="center">'.yn($objp->subscription).'</td>'; print '<td align="center">'.yn($objp->vote).'</td>'; print '<td align="center">'; -if ( !empty($objp->statut) ) print img_picto($langs->trans("InActivity"),'statut4'); -else print img_picto($langs->trans("ActivityCeased"),'statut5'); - print '</td>'; + if ( !empty($objp->statut) ) { + print img_picto($langs->trans("InActivity"),'statut4'); + } else { + print img_picto($langs->trans("ActivityCeased"),'statut5'); + } + print '</td>'; if ($user->rights->adherent->configurer) print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>'; else @@ -351,7 +354,7 @@ if ($action == 'create') // Other attributes $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; + print $hookmanager->resPrint; if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); @@ -405,8 +408,11 @@ if ($rowid > 0) print '<table class="border" width="100%">'; print '<tr><td class="titlefield">'.$langs->trans("Status").'</td><td>'; - if ( !empty($object->statut) ) print img_picto($langs->trans('TypeStatusActive'),'statut4').' '.$langs->trans("InActivity"); - else print img_picto($langs->trans('TypeStatusInactive'),'statut5').' '.$langs->trans("ActivityCeased"); + if ( !empty($object->statut) ) { + print img_picto($langs->trans('TypeStatusActive'),'statut4').' '.$langs->trans("InActivity"); + } else { + print img_picto($langs->trans('TypeStatusInactive'),'statut5').' '.$langs->trans("ActivityCeased"); + } print '</tr>'; print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>'; @@ -444,12 +450,12 @@ if ($rowid > 0) } // Add - if ( $user->rights->adherent->configurer && !empty($object->statut) ) + if ( $user->rights->adherent->configurer && !empty($object->statut) ) { - print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>'; - } else { - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoAddMember")).'">'.$langs->trans("AddMember").'</a></div>'; - } + print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoAddMember")).'">'.$langs->trans("AddMember").'</a></div>'; + } // Delete if ($user->rights->adherent->configurer) @@ -598,8 +604,8 @@ if ($rowid > 0) print '<td align="right" colspan="2" class="liste_titre">'; print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; - print '  '; - print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">'; + print '  '; + print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">'; print '</td>'; print "</tr>\n"; @@ -746,10 +752,10 @@ if ($rowid > 0) print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" name="label" size="40" value="'.dol_escape_htmltag($object->label).'"></td></tr>'; print '<tr><td>'.$langs->trans("Status").'</td><td>'; - print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut); - print '</td></tr>'; + print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut); + print '</td></tr>'; - print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>'; + print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>'; print $form->selectyesno("subscription",$object->subscription,1); print '</td></tr>'; From 0e3efadf59ca253740c44f6ef1372dcc54524edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic34@users.noreply.github.com> Date: Sun, 27 Jan 2019 14:37:37 +0100 Subject: [PATCH 102/183] typo in fournisseur.product.class.php --- htdocs/fourn/class/fournisseur.product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index d721a4a9254..9dfd7dcf264 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -329,11 +329,11 @@ class ProductFournisseur extends Product if ($resql) { // Call trigger - $result=$this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_UPDATE',$user); + $result=$this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_UPDATE', $user); if ($result < 0) $error++; // End call triggers if (! $error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) { - $result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrenc, $multicurrency_code); + $result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrency, $multicurrency_code); if ($result < 0) { $error++; } From f0cdf300d1299b107f70f089d15a5c3656c52dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic.france@free.fr> Date: Sun, 27 Jan 2019 15:20:16 +0100 Subject: [PATCH 103/183] Squiz.Functions.FunctionDeclarationArgumentSpacing --- dev/setup/codesniffer/ruleset.xml | 11 +- dev/translation/autotranslator.class.php | 8 +- htdocs/accountancy/admin/accountmodel.php | 2 +- htdocs/accountancy/admin/categories_list.php | 2 +- htdocs/accountancy/admin/journals_list.php | 2 +- .../class/accountancycategory.class.php | 14 +- .../class/accountingaccount.class.php | 6 +- .../class/accountingjournal.class.php | 6 +- .../accountancy/class/bookkeeping.class.php | 22 +- htdocs/adherents/class/adherent.class.php | 32 +-- .../adherents/class/adherent_type.class.php | 10 +- .../adherents/class/adherentstats.class.php | 6 +- htdocs/adherents/class/api_members.class.php | 2 +- htdocs/adherents/class/subscription.class.php | 8 +- htdocs/admin/dict.php | 2 +- .../admin/dolistore/class/dolistore.class.php | 2 +- htdocs/admin/mails_templates.php | 2 +- htdocs/admin/website.php | 2 +- htdocs/api/class/api.class.php | 4 +- htdocs/api/class/api_login.class.php | 2 +- htdocs/asset/class/asset.class.php | 6 +- htdocs/asset/class/asset_type.class.php | 8 +- htdocs/blockedlog/class/authority.class.php | 2 +- htdocs/blockedlog/class/blockedlog.class.php | 12 +- htdocs/cashdesk/class/Facturation.class.php | 32 +-- htdocs/categories/class/categorie.class.php | 26 +-- htdocs/comm/action/class/actioncomm.class.php | 18 +- .../action/class/actioncommreminder.class.php | 4 +- .../comm/action/class/cactioncomm.class.php | 4 +- htdocs/comm/action/index.php | 2 +- htdocs/comm/action/pertype.php | 2 +- htdocs/comm/action/peruser.php | 2 +- .../mailing/class/advtargetemailing.class.php | 14 +- .../html.formadvtargetemailing.class.php | 14 +- htdocs/comm/mailing/class/mailing.class.php | 10 +- .../comm/propal/class/api_proposals.class.php | 4 +- htdocs/comm/propal/class/propal.class.php | 68 +++--- .../comm/propal/class/propalestats.class.php | 4 +- htdocs/commande/class/api_orders.class.php | 6 +- htdocs/commande/class/commande.class.php | 62 ++--- htdocs/commande/class/commandestats.class.php | 6 +- htdocs/compta/bank/class/account.class.php | 30 +-- .../bank/class/api_bankaccounts.class.php | 2 +- .../bank/class/paymentvarious.class.php | 10 +- .../cashcontrol/class/cashcontrol.class.php | 6 +- .../deplacement/class/deplacement.class.php | 10 +- .../class/deplacementstats.class.php | 6 +- .../facture/class/api_invoices.class.php | 14 +- .../facture/class/facture-rec.class.php | 24 +- htdocs/compta/facture/class/facture.class.php | 56 ++--- .../facture/class/facturestats.class.php | 6 +- .../facture/class/paymentterm.class.php | 6 +- .../compta/localtax/class/localtax.class.php | 8 +- .../cheque/class/remisecheque.class.php | 14 +- .../compta/paiement/class/paiement.class.php | 26 +-- .../class/bonprelevement.class.php | 24 +- .../class/ligneprelevement.class.php | 4 +- .../class/rejetprelevement.class.php | 4 +- .../salaries/class/paymentsalary.class.php | 10 +- .../salaries/class/salariesstats.class.php | 6 +- .../sociales/class/cchargesociales.class.php | 6 +- .../sociales/class/chargesociales.class.php | 8 +- .../class/paymentsocialcontribution.class.php | 14 +- htdocs/compta/tva/class/tva.class.php | 10 +- htdocs/contact/class/contact.class.php | 14 +- htdocs/contrat/class/api_contracts.class.php | 4 +- htdocs/contrat/class/contrat.class.php | 44 ++-- htdocs/core/ajax/ajaxdirtree.php | 2 +- htdocs/core/boxes/box_actions.php | 6 +- htdocs/core/boxes/box_activity.php | 6 +- htdocs/core/boxes/box_bookmarks.php | 6 +- htdocs/core/boxes/box_clients.php | 6 +- htdocs/core/boxes/box_commandes.php | 6 +- htdocs/core/boxes/box_comptes.php | 6 +- htdocs/core/boxes/box_contacts.php | 6 +- htdocs/core/boxes/box_contracts.php | 6 +- htdocs/core/boxes/box_external_rss.php | 6 +- htdocs/core/boxes/box_factures.php | 6 +- htdocs/core/boxes/box_factures_fourn.php | 6 +- htdocs/core/boxes/box_factures_fourn_imp.php | 6 +- htdocs/core/boxes/box_factures_imp.php | 6 +- htdocs/core/boxes/box_ficheinter.php | 6 +- htdocs/core/boxes/box_fournisseurs.php | 6 +- htdocs/core/boxes/box_goodcustomers.php | 6 +- .../boxes/box_graph_invoices_permonth.php | 6 +- .../box_graph_invoices_supplier_permonth.php | 6 +- .../core/boxes/box_graph_orders_permonth.php | 6 +- .../box_graph_orders_supplier_permonth.php | 6 +- .../boxes/box_graph_product_distribution.php | 6 +- .../boxes/box_graph_propales_permonth.php | 6 +- .../core/boxes/box_last_modified_ticket.php | 2 +- htdocs/core/boxes/box_last_ticket.php | 2 +- htdocs/core/boxes/box_lastlogin.php | 6 +- htdocs/core/boxes/box_members.php | 6 +- htdocs/core/boxes/box_produits.php | 6 +- .../core/boxes/box_produits_alerte_stock.php | 6 +- htdocs/core/boxes/box_project.php | 6 +- htdocs/core/boxes/box_propales.php | 6 +- htdocs/core/boxes/box_prospect.php | 6 +- htdocs/core/boxes/box_services_contracts.php | 6 +- htdocs/core/boxes/box_services_expired.php | 6 +- htdocs/core/boxes/box_supplier_orders.php | 4 +- htdocs/core/boxes/box_task.php | 6 +- htdocs/core/boxes/modules_boxes.php | 6 +- htdocs/core/class/CMailFile.class.php | 8 +- htdocs/core/class/CSMSFile.class.php | 2 +- htdocs/core/class/canvas.class.php | 6 +- htdocs/core/class/ccountry.class.php | 8 +- htdocs/core/class/comment.class.php | 8 +- .../core/class/commondocgenerator.class.php | 18 +- htdocs/core/class/commoninvoice.class.php | 18 +- htdocs/core/class/commonobject.class.php | 108 ++++----- htdocs/core/class/commonobjectline.class.php | 2 +- .../class/commonstickergenerator.class.php | 10 +- htdocs/core/class/coreobject.class.php | 6 +- htdocs/core/class/cstate.class.php | 8 +- htdocs/core/class/ctypent.class.php | 8 +- htdocs/core/class/ctyperesource.class.php | 4 +- htdocs/core/class/discount.class.php | 12 +- htdocs/core/class/doleditor.class.php | 4 +- htdocs/core/class/dolgeoip.class.php | 2 +- htdocs/core/class/dolgraph.class.php | 10 +- htdocs/core/class/dolreceiptprinter.class.php | 4 +- .../core/class/emailsenderprofile.class.php | 8 +- htdocs/core/class/events.class.php | 4 +- htdocs/core/class/extrafields.class.php | 26 +-- htdocs/core/class/fileupload.class.php | 2 +- htdocs/core/class/fiscalyear.class.php | 4 +- htdocs/core/class/google.class.php | 2 +- htdocs/core/class/hookmanager.class.php | 2 +- htdocs/core/class/html.form.class.php | 156 ++++++------- .../core/class/html.formaccounting.class.php | 8 +- htdocs/core/class/html.formactions.class.php | 6 +- htdocs/core/class/html.formadmin.class.php | 8 +- htdocs/core/class/html.formbarcode.class.php | 10 +- htdocs/core/class/html.formcompany.class.php | 26 +-- htdocs/core/class/html.formcontract.class.php | 4 +- htdocs/core/class/html.formcron.class.php | 2 +- htdocs/core/class/html.formfile.class.php | 16 +- .../class/html.formintervention.class.php | 2 +- htdocs/core/class/html.formmail.class.php | 12 +- htdocs/core/class/html.formmailing.class.php | 2 +- htdocs/core/class/html.formmargin.class.php | 4 +- htdocs/core/class/html.formorder.class.php | 4 +- htdocs/core/class/html.formother.class.php | 40 ++-- htdocs/core/class/html.formprojet.class.php | 10 +- htdocs/core/class/html.formpropal.class.php | 2 +- htdocs/core/class/html.formsms.class.php | 2 +- .../class/html.formsocialcontrib.class.php | 2 +- htdocs/core/class/html.formticket.class.php | 8 +- htdocs/core/class/html.formwebsite.class.php | 6 +- htdocs/core/class/infobox.class.php | 4 +- htdocs/core/class/interfaces.class.php | 4 +- htdocs/core/class/ldap.class.php | 20 +- htdocs/core/class/link.class.php | 8 +- htdocs/core/class/menu.class.php | 4 +- htdocs/core/class/menubase.class.php | 8 +- htdocs/core/class/notify.class.php | 6 +- htdocs/core/class/openid.class.php | 8 +- htdocs/core/class/rssparser.class.php | 4 +- htdocs/core/class/smtps.class.php | 12 +- htdocs/core/class/stats.class.php | 16 +- htdocs/core/class/translate.class.php | 24 +- htdocs/core/class/utils.class.php | 8 +- htdocs/core/class/vcard.class.php | 14 +- htdocs/core/datepicker.php | 2 +- htdocs/core/db/Database.interface.php | 2 +- htdocs/core/db/DoliDB.class.php | 12 +- htdocs/core/db/mssql.class.php | 40 ++-- htdocs/core/db/mysqli.class.php | 32 +-- htdocs/core/db/pgsql.class.php | 38 ++-- htdocs/core/db/sqlite3.class.php | 34 +-- .../filemanagerdol/connectors/php/basexml.php | 2 +- .../connectors/php/commands.php | 4 +- .../core/filemanagerdol/connectors/php/io.php | 10 +- .../filemanagerdol/connectors/php/util.php | 8 +- htdocs/core/lib/accounting.lib.php | 2 +- htdocs/core/lib/admin.lib.php | 20 +- htdocs/core/lib/agenda.lib.php | 6 +- htdocs/core/lib/ajax.lib.php | 12 +- htdocs/core/lib/barcode.lib.php | 6 +- htdocs/core/lib/categories.lib.php | 2 +- htdocs/core/lib/company.lib.php | 18 +- htdocs/core/lib/date.lib.php | 22 +- htdocs/core/lib/doc.lib.php | 2 +- htdocs/core/lib/doleditor.lib.php | 2 +- htdocs/core/lib/ecm.lib.php | 2 +- htdocs/core/lib/files.lib.php | 44 ++-- htdocs/core/lib/functions.lib.php | 214 +++++++++--------- htdocs/core/lib/functions2.lib.php | 42 ++-- htdocs/core/lib/functionsnumtoword.lib.php | 4 +- htdocs/core/lib/geturl.lib.php | 2 +- htdocs/core/lib/images.lib.php | 4 +- htdocs/core/lib/import.lib.php | 2 +- htdocs/core/lib/invoice2.lib.php | 2 +- htdocs/core/lib/ldap.lib.php | 4 +- htdocs/core/lib/memory.lib.php | 4 +- htdocs/core/lib/modulebuilder.lib.php | 4 +- htdocs/core/lib/parsemd.lib.php | 2 +- htdocs/core/lib/payments.lib.php | 8 +- htdocs/core/lib/pdf.lib.php | 50 ++-- htdocs/core/lib/price.lib.php | 2 +- htdocs/core/lib/product.lib.php | 4 +- htdocs/core/lib/project.lib.php | 12 +- htdocs/core/lib/report.lib.php | 2 +- htdocs/core/lib/security.lib.php | 14 +- htdocs/core/lib/security2.lib.php | 10 +- htdocs/core/lib/sendings.lib.php | 2 +- htdocs/core/lib/signature.lib.php | 4 +- htdocs/core/lib/tax.lib.php | 4 +- htdocs/core/lib/ticket.lib.php | 2 +- htdocs/core/lib/treeview.lib.php | 4 +- htdocs/core/lib/usergroups.lib.php | 2 +- htdocs/core/lib/website.lib.php | 8 +- htdocs/core/lib/ws.lib.php | 2 +- htdocs/core/lib/xcal.lib.php | 8 +- htdocs/core/login/functions_dolibarr.php | 2 +- htdocs/core/login/functions_empty.php | 2 +- htdocs/core/login/functions_forceuser.php | 2 +- htdocs/core/login/functions_http.php | 2 +- htdocs/core/login/functions_ldap.php | 2 +- htdocs/core/login/functions_openid.php | 2 +- htdocs/core/menus/standard/auguria.lib.php | 6 +- htdocs/core/menus/standard/auguria_menu.php | 4 +- htdocs/core/menus/standard/eldy.lib.php | 6 +- htdocs/core/menus/standard/eldy_menu.php | 4 +- htdocs/core/menus/standard/empty.php | 4 +- htdocs/core/modules/DolibarrModules.class.php | 12 +- htdocs/core/modules/action/modules_action.php | 4 +- htdocs/core/modules/action/rapport.pdf.php | 2 +- .../core/modules/bank/doc/pdf_ban.modules.php | 6 +- .../bank/doc/pdf_sepamandate.modules.php | 6 +- htdocs/core/modules/bank/modules_bank.php | 2 +- .../barcode/doc/phpbarcode.modules.php | 4 +- .../barcode/doc/tcpdfbarcode.modules.php | 4 +- .../barcode/mod_barcode_product_standard.php | 4 +- .../modules/barcode/modules_barcode.class.php | 4 +- .../modules/cheque/doc/pdf_blochet.class.php | 2 +- .../modules/cheque/mod_chequereceipt_mint.php | 4 +- .../cheque/mod_chequereceipt_thyme.php | 4 +- .../modules/cheque/modules_chequereceipts.php | 4 +- .../doc/doc_generic_order_odt.modules.php | 2 +- .../commande/doc/pdf_einstein.modules.php | 8 +- .../commande/doc/pdf_eratosthene.modules.php | 10 +- .../commande/doc/pdf_proforma.modules.php | 2 +- .../modules/commande/mod_commande_marbre.php | 4 +- .../modules/commande/mod_commande_saphir.php | 4 +- .../modules/commande/modules_commande.php | 4 +- .../doc/doc_generic_contract_odt.modules.php | 2 +- .../contract/doc/pdf_strato.modules.php | 6 +- .../modules/contract/mod_contract_magre.php | 4 +- .../modules/contract/mod_contract_olive.php | 2 +- .../modules/contract/mod_contract_serpis.php | 4 +- .../modules/contract/modules_contract.php | 2 +- .../modules/dons/html_cerfafr.modules.php | 4 +- htdocs/core/modules/dons/modules_don.php | 2 +- .../doc/doc_generic_shipment_odt.modules.php | 2 +- .../expedition/doc/pdf_merou.modules.php | 8 +- .../expedition/doc/pdf_rouget.modules.php | 8 +- .../expedition/mod_expedition_ribera.php | 4 +- .../expedition/mod_expedition_safor.php | 4 +- .../modules/expedition/modules_expedition.php | 2 +- .../doc/pdf_standard.modules.php | 6 +- .../expensereport/modules_expensereport.php | 4 +- .../modules/export/export_csv.modules.php | 6 +- .../modules/export/export_excel.modules.php | 6 +- .../export/export_excelnew.modules.php | 6 +- .../modules/export/export_tsv.modules.php | 6 +- htdocs/core/modules/export/modules_export.php | 2 +- .../doc/doc_generic_invoice_odt.modules.php | 2 +- .../modules/facture/doc/pdf_crabe.modules.php | 6 +- .../facture/doc/pdf_sponge.modules.php | 8 +- .../core/modules/facture/mod_facture_mars.php | 4 +- .../modules/facture/mod_facture_mercure.php | 4 +- .../modules/facture/mod_facture_terre.php | 4 +- .../core/modules/facture/modules_facture.php | 4 +- .../fichinter/doc/pdf_soleil.modules.php | 6 +- htdocs/core/modules/fichinter/mod_arctic.php | 4 +- htdocs/core/modules/fichinter/mod_pacific.php | 4 +- .../modules/fichinter/modules_fichinter.php | 4 +- .../modules/holiday/mod_holiday_madonna.php | 2 +- .../core/modules/holiday/modules_holiday.php | 2 +- .../modules/import/import_csv.modules.php | 8 +- .../modules/import/import_xlsx.modules.php | 8 +- htdocs/core/modules/import/modules_import.php | 2 +- .../livraison/doc/pdf_typhon.modules.php | 6 +- .../modules/livraison/mod_livraison_jade.php | 4 +- .../livraison/mod_livraison_saphir.php | 6 +- .../modules/livraison/modules_livraison.php | 2 +- .../mailings/advthirdparties.modules.php | 6 +- .../modules/mailings/contacts1.modules.php | 2 +- .../core/modules/mailings/example.modules.php | 2 +- .../core/modules/mailings/fraise.modules.php | 2 +- .../core/modules/mailings/pomme.modules.php | 2 +- .../modules/mailings/thirdparties.modules.php | 2 +- .../thirdparties_services_expired.modules.php | 2 +- .../modules/mailings/xinputfile.modules.php | 2 +- .../modules/mailings/xinputuser.modules.php | 2 +- .../modules/member/doc/pdf_standard.class.php | 6 +- htdocs/core/modules/member/modules_cards.php | 4 +- htdocs/core/modules/modAdherent.class.php | 2 +- htdocs/core/modules/modApi.class.php | 2 +- htdocs/core/modules/modAsset.class.php | 2 +- htdocs/core/modules/modBanque.class.php | 2 +- htdocs/core/modules/modBarcode.class.php | 2 +- htdocs/core/modules/modBlockedLog.class.php | 2 +- htdocs/core/modules/modCashDesk.class.php | 2 +- htdocs/core/modules/modCategorie.class.php | 2 +- htdocs/core/modules/modCommande.class.php | 2 +- htdocs/core/modules/modComptabilite.class.php | 2 +- htdocs/core/modules/modContrat.class.php | 2 +- htdocs/core/modules/modDav.class.php | 2 +- htdocs/core/modules/modDeplacement.class.php | 2 +- .../modules/modDocumentGeneration.class.php | 2 +- htdocs/core/modules/modDon.class.php | 2 +- .../core/modules/modEmailCollector.class.php | 2 +- htdocs/core/modules/modExpedition.class.php | 2 +- .../core/modules/modExpenseReport.class.php | 2 +- htdocs/core/modules/modExternalRss.class.php | 4 +- htdocs/core/modules/modFicheinter.class.php | 2 +- htdocs/core/modules/modFournisseur.class.php | 2 +- htdocs/core/modules/modHRM.class.php | 2 +- htdocs/core/modules/modLabel.class.php | 2 +- htdocs/core/modules/modLoan.class.php | 2 +- htdocs/core/modules/modMailing.class.php | 2 +- htdocs/core/modules/modNotification.class.php | 2 +- htdocs/core/modules/modOauth.class.php | 2 +- htdocs/core/modules/modOpenSurvey.class.php | 2 +- htdocs/core/modules/modPrelevement.class.php | 2 +- htdocs/core/modules/modProduct.class.php | 2 +- htdocs/core/modules/modProductBatch.class.php | 2 +- htdocs/core/modules/modProjet.class.php | 2 +- htdocs/core/modules/modPropale.class.php | 2 +- .../core/modules/modReceiptPrinter.class.php | 2 +- htdocs/core/modules/modReception.class.php | 2 +- htdocs/core/modules/modSalaries.class.php | 2 +- htdocs/core/modules/modService.class.php | 2 +- htdocs/core/modules/modSociete.class.php | 2 +- htdocs/core/modules/modStock.class.php | 2 +- .../modules/modSupplierProposal.class.php | 2 +- htdocs/core/modules/modTakePos.class.php | 2 +- htdocs/core/modules/modTax.class.php | 2 +- htdocs/core/modules/modUser.class.php | 2 +- htdocs/core/modules/modWebsite.class.php | 2 +- htdocs/core/modules/modWorkflow.class.php | 2 +- .../core/modules/payment/mod_payment_ant.php | 4 +- .../modules/payment/mod_payment_cicada.php | 4 +- .../core/modules/payment/modules_payment.php | 2 +- .../modules/printing/modules_printing.php | 2 +- .../modules/printing/printgcp.modules.php | 2 +- .../modules/printing/printipp.modules.php | 2 +- .../doc/pdf_standardlabel.class.php | 6 +- .../printsheet/doc/pdf_tcpdflabel.class.php | 4 +- .../modules/printsheet/modules_labels.php | 4 +- .../doc/doc_generic_product_odt.modules.php | 2 +- .../product/doc/pdf_standard.modules.php | 8 +- .../product/mod_codeproduct_elephant.php | 4 +- .../product/mod_codeproduct_leopard.php | 2 +- .../modules/product/modules_product.class.php | 8 +- .../modules_product_batch.class.php | 2 +- .../doc/doc_generic_project_odt.modules.php | 18 +- .../project/doc/pdf_baleine.modules.php | 6 +- .../project/doc/pdf_beluga.modules.php | 6 +- .../project/doc/pdf_timespent.modules.php | 6 +- .../modules/project/mod_project_simple.php | 2 +- .../modules/project/mod_project_universal.php | 2 +- .../core/modules/project/modules_project.php | 2 +- .../task/doc/doc_generic_task_odt.modules.php | 18 +- .../modules/project/task/mod_task_simple.php | 4 +- .../project/task/mod_task_universal.php | 4 +- .../modules/project/task/modules_task.php | 2 +- .../doc/doc_generic_proposal_odt.modules.php | 2 +- .../modules/propale/doc/pdf_azur.modules.php | 6 +- .../modules/propale/doc/pdf_cyan.modules.php | 8 +- .../modules/propale/mod_propale_marbre.php | 4 +- .../modules/propale/mod_propale_saphir.php | 2 +- .../core/modules/propale/modules_propale.php | 4 +- .../doc/doc_generic_reception_odt.modules.php | 2 +- .../reception/doc/pdf_squille.modules.php | 8 +- .../modules/reception/mod_reception_beryl.php | 4 +- .../reception/mod_reception_moonstone.php | 4 +- .../modules/reception/modules_reception.php | 2 +- .../societe/doc/doc_generic_odt.modules.php | 2 +- .../societe/mod_codeclient_elephant.php | 6 +- .../societe/mod_codeclient_leopard.php | 2 +- .../modules/societe/mod_codeclient_monkey.php | 6 +- .../societe/mod_codecompta_aquarium.php | 4 +- .../societe/mod_codecompta_panicum.php | 4 +- .../modules/societe/modules_societe.class.php | 16 +- .../doc/doc_generic_stock_odt.modules.php | 2 +- .../stock/doc/pdf_standard.modules.php | 8 +- .../stock/doc/pdf_stdmovement.modules.php | 8 +- .../core/modules/stock/modules_movement.php | 2 +- htdocs/core/modules/stock/modules_stock.php | 2 +- .../mod_facture_fournisseur_cactus.php | 4 +- .../mod_facture_fournisseur_tulip.php | 4 +- .../modules_facturefournisseur.php | 4 +- .../pdf/pdf_canelle.modules.php | 6 +- .../mod_commande_fournisseur_muguet.php | 4 +- .../mod_commande_fournisseur_orchidee.php | 4 +- .../modules_commandefournisseur.php | 2 +- .../pdf/pdf_muscadet.modules.php | 6 +- .../doc/pdf_standard.modules.php | 6 +- .../mod_supplier_payment_brodator.php | 4 +- .../mod_supplier_payment_bronan.php | 4 +- .../modules_supplier_payment.php | 4 +- ..._generic_supplier_proposal_odt.modules.php | 2 +- .../doc/pdf_aurore.modules.php | 6 +- .../mod_supplier_proposal_marbre.php | 4 +- .../mod_supplier_proposal_saphir.php | 2 +- .../modules_supplier_proposal.php | 4 +- .../core/modules/syslog/mod_syslog_file.php | 4 +- .../user/doc/doc_generic_user_odt.modules.php | 4 +- .../core/modules/user/modules_user.class.php | 2 +- .../doc/doc_generic_usergroup_odt.modules.php | 2 +- .../usergroup/modules_usergroup.class.php | 2 +- htdocs/cron/class/cronjob.class.php | 14 +- htdocs/dav/dav.class.php | 2 +- htdocs/don/class/api_donations.class.php | 2 +- htdocs/don/class/don.class.php | 24 +- htdocs/don/class/donstats.class.php | 4 +- htdocs/don/class/paymentdonation.class.php | 14 +- htdocs/ecm/class/ecmdirectory.class.php | 18 +- htdocs/ecm/class/ecmfiles.class.php | 10 +- htdocs/ecm/class/htmlecm.form.class.php | 2 +- .../class/emailcollector.class.php | 8 +- .../class/emailcollectoraction.class.php | 6 +- .../class/emailcollectorfilter.class.php | 6 +- .../expedition/class/api_shipments.class.php | 2 +- htdocs/expedition/class/expedition.class.php | 32 +-- .../class/expeditionbatch.class.php | 4 +- .../class/expeditionstats.class.php | 4 +- .../class/expensereport.class.php | 50 ++-- .../class/expensereport_ik.class.php | 6 +- .../class/expensereport_rule.class.php | 2 +- .../class/expensereportstats.class.php | 6 +- .../class/paymentexpensereport.class.php | 12 +- htdocs/exports/class/export.class.php | 4 +- htdocs/exports/export.php | 2 +- .../class/api_interventions.class.php | 2 +- htdocs/fichinter/class/fichinter.class.php | 28 +-- .../fichinter/class/fichinterstats.class.php | 6 +- .../class/api_supplier_invoices.class.php | 4 +- .../fourn/class/api_supplier_orders.class.php | 4 +- .../class/fournisseur.commande.class.php | 46 ++-- .../fournisseur.commande.dispatch.class.php | 14 +- .../fourn/class/fournisseur.facture.class.php | 34 +-- .../fourn/class/fournisseur.product.class.php | 16 +- htdocs/fourn/class/paiementfourn.class.php | 22 +- htdocs/ftp/index.php | 4 +- htdocs/holiday/class/holiday.class.php | 44 ++-- htdocs/hrm/class/establishment.class.php | 6 +- htdocs/imports/class/import.class.php | 6 +- htdocs/imports/import.php | 4 +- htdocs/index.php | 2 +- htdocs/install/inc.php | 6 +- htdocs/install/step1.php | 4 +- htdocs/install/upgrade2.php | 86 +++---- htdocs/livraison/class/livraison.class.php | 10 +- htdocs/loan/class/loan.class.php | 6 +- htdocs/loan/class/loanschedule.class.php | 4 +- htdocs/loan/class/paymentloan.class.php | 6 +- .../mailmanspip/class/mailmanspip.class.php | 4 +- htdocs/main.inc.php | 18 +- .../template/class/actions_mymodule.class.php | 2 +- .../template/class/myobject.class.php | 8 +- .../mailinglist_mymodule_myobject.modules.php | 2 +- .../core/modules/modMyModule.class.php | 2 +- .../class/multicurrency.class.php | 6 +- .../class/opensurveysondage.class.php | 12 +- htdocs/opensurvey/fonctions.php | 2 +- htdocs/paybox/lib/paybox.lib.php | 2 +- htdocs/paypal/lib/paypal.lib.php | 10 +- .../product/actions_card_product.class.php | 2 +- .../service/actions_card_service.class.php | 4 +- htdocs/product/class/api_products.class.php | 2 +- .../product/class/html.formproduct.class.php | 14 +- htdocs/product/class/product.class.php | 80 +++---- htdocs/product/class/productbatch.class.php | 10 +- .../class/propalmergepdfproduct.class.php | 10 +- .../class/price_expression.class.php | 6 +- .../class/price_global_variable.class.php | 6 +- .../price_global_variable_updater.class.php | 10 +- .../inventory/class/inventory.class.php | 6 +- .../product/inventory/lib/inventory.lib.php | 2 +- htdocs/product/stock/class/entrepot.class.php | 14 +- .../stock/class/mouvementstock.class.php | 16 +- .../product/stock/class/productlot.class.php | 6 +- .../class/productstockentrepot.class.php | 10 +- htdocs/projet/class/api_projects.class.php | 6 +- htdocs/projet/class/api_tasks.class.php | 6 +- htdocs/projet/class/project.class.php | 30 +-- htdocs/projet/class/projectstats.class.php | 10 +- htdocs/projet/class/task.class.php | 36 +-- htdocs/projet/class/taskstats.class.php | 2 +- htdocs/projet/ganttchart.inc.php | 2 +- htdocs/public/members/new.php | 2 +- htdocs/reception/class/reception.class.php | 24 +- .../reception/class/receptionstats.class.php | 2 +- htdocs/resource/class/dolresource.class.php | 26 +-- .../class/html.formresource.class.php | 4 +- .../canvas/actions_card_common.class.php | 4 +- .../company/actions_card_company.class.php | 4 +- .../actions_card_individual.class.php | 4 +- htdocs/societe/class/address.class.php | 12 +- .../societe/class/api_thirdparties.class.php | 12 +- htdocs/societe/class/client.class.php | 2 +- .../class/companybankaccount.class.php | 8 +- .../class/companypaymentmode.class.php | 8 +- htdocs/societe/class/societe.class.php | 52 ++--- htdocs/societe/class/societeaccount.class.php | 10 +- htdocs/stripe/class/stripe.class.php | 10 +- htdocs/stripe/lib/stripe.lib.php | 6 +- .../class/supplier_proposal.class.php | 36 +-- htdocs/support/inc.php | 4 +- htdocs/ticket/class/actions_ticket.class.php | 2 +- htdocs/ticket/class/ticket.class.php | 2 +- htdocs/user/class/user.class.php | 50 ++-- htdocs/user/class/userbankaccount.class.php | 6 +- htdocs/user/class/usergroup.class.php | 24 +- htdocs/webservices/server_actioncomm.php | 6 +- htdocs/webservices/server_category.php | 2 +- htdocs/webservices/server_contact.php | 8 +- htdocs/webservices/server_invoice.php | 10 +- htdocs/webservices/server_order.php | 10 +- htdocs/webservices/server_other.php | 2 +- .../webservices/server_productorservice.php | 12 +- htdocs/webservices/server_project.php | 2 +- .../webservices/server_supplier_invoice.php | 4 +- htdocs/webservices/server_thirdparty.php | 10 +- htdocs/webservices/server_user.php | 6 +- htdocs/website/class/website.class.php | 12 +- htdocs/website/class/websitepage.class.php | 10 +- .../email_expire_services_to_customers.php | 2 +- ...ail_expire_services_to_representatives.php | 2 +- scripts/cron/cron_run_jobs.php | 2 +- .../email_unpaid_invoices_to_customers.php | 2 +- ...ail_unpaid_invoices_to_representatives.php | 2 +- test/phpunit/FactureRecTest.php | 2 +- test/phpunit/FactureTest.php | 2 +- test/phpunit/UserTest.php | 2 +- 541 files changed, 2338 insertions(+), 2329 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 879d791b8e9..2f1f0735a26 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -65,7 +65,7 @@ <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed"> <severity>0</severity> </rule> - + <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" /> <!-- @@ -191,6 +191,15 @@ <rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" /> <rule ref="Squiz.Functions.MultiLineFunctionDeclaration" /> + <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> + <properties> + <property name="equalsSpacing" value="1"/> + </properties> + </rule> + <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint"> + <severity>0</severity> + </rule> + <!-- Rules from PEAR Standard --> diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 123b7f6157d..cb70e9541dc 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -50,7 +50,7 @@ class autoTranslator * @param string $_apikey Api key * @return void */ - function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey) + function __construct($_destlang, $_refLang, $_langDir, $_limittofile, $_apikey) { // Set enviorment variables @@ -156,7 +156,7 @@ class autoTranslator * @param string $my_destlang Target language code * @return void */ - private function updateTranslationFile($destPath,$file,$my_destlang) + private function updateTranslationFile($destPath, $file, $my_destlang) { $this->_time_end = date('Y-m-d H:i:s'); @@ -183,7 +183,7 @@ class autoTranslator * @param string $my_destlang Target language code * @return void */ - private function createTranslationFile($path,$my_destlang) + private function createTranslationFile($path, $my_destlang) { $fp = fopen($path, 'w+'); fwrite($fp, "/*\n"); @@ -205,7 +205,7 @@ class autoTranslator * @param string $my_destlang Language code (ie: fr_FR) * @return int 0=Nothing translated, 1=Record translated */ - private function translateFileLine($content,$file,$key,$value,$my_destlang) + private function translateFileLine($content, $file, $key, $value, $my_destlang) { //print "key =".$key."\n"; diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index e5f1d211f3b..a5b39744e06 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -811,7 +811,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='') +function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db; global $form; diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 1f10403f798..80880c7bbb3 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -813,7 +813,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='') +function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db; global $form, $mysoc; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 49745676eb3..4611a0ba906 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -696,7 +696,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListJournal($fieldlist, $obj='', $tabname='', $context='') +function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db; global $form, $mysoc; diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 5b3282a3b29..70752f6d268 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -142,7 +142,7 @@ class AccountancyCategory // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -239,7 +239,7 @@ class AccountancyCategory // extends CommonObject * @param string $label Label * @return int <0 if KO, >0 if OK */ - function fetch($id, $code='', $label='') + function fetch($id, $code = '', $label = '') { $sql = "SELECT"; $sql.= " t.rowid,"; @@ -299,7 +299,7 @@ class AccountancyCategory // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -379,7 +379,7 @@ class AccountancyCategory // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -726,7 +726,7 @@ class AccountancyCategory // extends CommonObject * @param int $year Specifig year - Can be empty * @return integer <0 if KO, >= 0 if OK */ - public function getSumDebitCredit($cpt, $date_start, $date_end, $sens, $thirdparty_code='nofilter', $month=0, $year=0) + public function getSumDebitCredit($cpt, $date_start, $date_end, $sens, $thirdparty_code = 'nofilter', $month = 0, $year = 0) { global $conf; @@ -796,7 +796,7 @@ class AccountancyCategory // extends CommonObject * @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups * @return array|int Array of groups or -1 if error */ - public function getCats($categorytype=-1) + public function getCats($categorytype = -1) { global $conf, $mysoc; @@ -853,7 +853,7 @@ class AccountancyCategory // extends CommonObject * @param string $predefinedgroupwhere Sql criteria filter to select accounting accounts * @return array|int Array of accounting accounts or -1 if error */ - public function getCptsCat($cat_id, $predefinedgroupwhere='') + public function getCptsCat($cat_id, $predefinedgroupwhere = '') { global $conf, $mysoc; $sql = ''; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 886e19577fb..38f4e49f2a6 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -466,7 +466,7 @@ class AccountingAccount extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -632,7 +632,7 @@ class AccountingAccount extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -645,7 +645,7 @@ class AccountingAccount extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 9bd21a4a5c4..94cfbf3bd66 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -213,7 +213,7 @@ class AccountingJournal extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0) + function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0) { global $langs, $conf, $user; @@ -270,7 +270,7 @@ class AccountingJournal extends CommonObject * @param int $mode 0=libelle long, 1=libelle court * @return string Label of type */ - function getLibType($mode=0) + function getLibType($mode = 0) { return $this->LibType($this->nature,$mode); } @@ -283,7 +283,7 @@ class AccountingJournal extends CommonObject * @param int $mode 0=libelle long, 1=libelle court * @return string Label of type */ - function LibType($nature,$mode=0) + function LibType($nature, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 297fe0e3e9c..047628a7b96 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -411,7 +411,7 @@ class BookKeeping extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -470,7 +470,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, Id of created object if OK */ - public function createStd(User $user, $notrigger = false, $mode='') + public function createStd(User $user, $notrigger = false, $mode = '') { global $conf; @@ -641,7 +641,7 @@ class BookKeeping extends CommonObject * * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $ref = null, $mode='') + public function fetch($id, $ref = null, $mode = '') { global $conf; @@ -1090,7 +1090,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - public function update(User $user, $notrigger = false, $mode='') + public function update(User $user, $notrigger = false, $mode = '') { $error = 0; @@ -1225,7 +1225,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return number <0 if KO, >0 if OK */ - public function updateByMvt($piece_num='', $field='', $value='', $mode='') + public function updateByMvt($piece_num = '', $field = '', $value = '', $mode = '') { $error=0; @@ -1260,7 +1260,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - public function delete(User $user, $notrigger = false, $mode='') + public function delete(User $user, $notrigger = false, $mode = '') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -1338,7 +1338,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - function deleteByYearAndJournal($delyear='', $journal='', $mode='') + function deleteByYearAndJournal($delyear = '', $journal = '', $mode = '') { global $conf; @@ -1500,7 +1500,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - public function fetchPerMvt($piecenum, $mode='') + public function fetchPerMvt($piecenum, $mode = '') { global $conf; @@ -1536,7 +1536,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return string Next numero to use */ - public function getNextNumMvt($mode='') + public function getNextNumMvt($mode = '') { global $conf; @@ -1565,7 +1565,7 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - function fetchAllPerMvt($piecenum, $mode='') + function fetchAllPerMvt($piecenum, $mode = '') { global $conf; @@ -1687,7 +1687,7 @@ class BookKeeping extends CommonObject * @param string $piece_num Piece num * @return int int <0 if KO, >0 if OK */ - public function transformTransaction($direction=0,$piece_num='') + public function transformTransaction($direction = 0, $piece_num = '') { $error = 0; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 3a698c6b042..ab8fbe8ca06 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -246,7 +246,7 @@ class Adherent extends CommonObject * @param string $moreinheader Add more html headers * @return int <0 if KO, >0 if OK */ - function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='', $moreinheader='') + function send_an_email($text, $subject, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = -1, $errors_to = '', $moreinheader = '') { // phpcs:enable global $conf,$langs; @@ -358,7 +358,7 @@ class Adherent extends CommonObject * @param string $morphy Nature of the adherent (physical or moral) * @return string Label */ - function getmorphylib($morphy='') + function getmorphylib($morphy = '') { global $langs; if (! $morphy) { $morphy=$this->morphy; } @@ -374,7 +374,7 @@ class Adherent extends CommonObject * @param int $notrigger 1 ne declenche pas les triggers, 0 sinon * @return int <0 if KO, >0 if OK */ - function create($user,$notrigger=0) + function create($user, $notrigger = 0) { global $conf,$langs; @@ -500,7 +500,7 @@ class Adherent extends CommonObject * @param string $action Current action for hookmanager * @return int <0 if KO, >0 if OK */ - function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0,$action='update') + function update($user, $notrigger = 0, $nosyncuser = 0, $nosyncuserpass = 0, $nosyncthirdparty = 0, $action = 'update') { global $conf, $langs, $hookmanager; @@ -817,7 +817,7 @@ class Adherent extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, 0=nothing to do, >0 if OK */ - function delete($rowid, $user, $notrigger=0) + function delete($rowid, $user, $notrigger = 0) { global $conf, $langs; @@ -927,7 +927,7 @@ class Adherent extends CommonObject * @param int $nosyncuser Do not synchronize linked user * @return string If OK return clear password, 0 if no change, < 0 if error */ - function setPassword($user, $password='', $isencrypted=0, $notrigger=0, $nosyncuser=0) + function setPassword($user, $password = '', $isencrypted = 0, $notrigger = 0, $nosyncuser = 0) { global $conf, $langs; @@ -1147,7 +1147,7 @@ class Adherent extends CommonObject * @param string $lastname Lastname * @return void */ - function fetch_name($firstname,$lastname) + function fetch_name($firstname, $lastname) { // phpcs:enable global $conf; @@ -1183,7 +1183,7 @@ class Adherent extends CommonObject * @param bool $fetch_subscriptions To load member subscriptions * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($rowid,$ref='',$fk_soc='',$ref_ext='',$fetch_optionals=true,$fetch_subscriptions=true) + function fetch($rowid, $ref = '', $fk_soc = '', $ref_ext = '', $fetch_optionals = true, $fetch_subscriptions = true) { global $langs; @@ -1400,7 +1400,7 @@ class Adherent extends CommonObject * @param int $datesubend Date end subscription * @return int rowid of record added, <0 if KO */ - function subscription($date, $amount, $accountid=0, $operation='', $label='', $num_chq='', $emetteur_nom='', $emetteur_banque='', $datesubend=0) + function subscription($date, $amount, $accountid = 0, $operation = '', $label = '', $num_chq = '', $emetteur_nom = '', $emetteur_banque = '', $datesubend = 0) { global $conf,$langs,$user; @@ -1486,7 +1486,7 @@ class Adherent extends CommonObject * @param string $autocreatethirdparty Auto create new thirdparty if member not yet linked to a thirdparty and we request an option that generate invoice. * @return int <0 if KO, >0 if OK */ - function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom='', $emetteur_banque='', $autocreatethirdparty=0) + function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom = '', $emetteur_banque = '', $autocreatethirdparty = 0) { global $conf, $langs, $user, $mysoc; @@ -2018,7 +2018,7 @@ class Adherent extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpictoimg=0, $maxlen=0, $option='card', $mode='', $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1) { global $conf, $langs; @@ -2109,7 +2109,7 @@ class Adherent extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode); } @@ -2124,7 +2124,7 @@ class Adherent extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) + function LibStatut($statut, $need_subscription, $date_end_subscription, $mode = 0) { // phpcs:enable global $langs; @@ -2307,7 +2307,7 @@ class Adherent extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -2400,7 +2400,7 @@ class Adherent extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; @@ -2694,7 +2694,7 @@ class Adherent extends CommonObject * @param string $daysbeforeendlist Nb of days before end of subscription (negative number = after subscription). Can be a list of delay, separated by a semicolon, for example '10;5;0;-5' * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - public function sendReminderForExpiredSubscription($daysbeforeendlist='10') + public function sendReminderForExpiredSubscription($daysbeforeendlist = '10') { global $conf, $langs, $mysoc, $user; diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 984cf49d44d..263012df782 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -103,7 +103,7 @@ class AdherentType extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int >0 if OK, < 0 if KO */ - function create($user,$notrigger=0) + function create($user, $notrigger = 0) { global $conf; @@ -170,7 +170,7 @@ class AdherentType extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int >0 if OK, < 0 if KO */ - function update($user,$notrigger=0) + function update($user, $notrigger = 0) { global $conf, $hookmanager; @@ -356,7 +356,7 @@ class AdherentType extends CommonObject * 2=Return array of members id only * @return mixed Array of members or -1 on error */ - function listMembersForMemberType($excludefilter='', $mode=0) + function listMembersForMemberType($excludefilter = '', $mode = 0) { global $conf, $user; @@ -411,7 +411,7 @@ class AdherentType extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0) + function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0) { global $langs; @@ -449,7 +449,7 @@ class AdherentType extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index 310a40c52b3..f5ef24fb465 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -52,7 +52,7 @@ class AdherentStats extends Stats * @param int $socid Id third party * @param int $userid Id user for filter */ - function __construct($db, $socid=0, $userid=0) + function __construct($db, $socid = 0, $userid = 0) { global $user, $conf; @@ -85,7 +85,7 @@ class AdherentStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of nb each month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -126,7 +126,7 @@ class AdherentStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of amount each month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index 2da35df7e2c..a728ffe78d3 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -361,7 +361,7 @@ class Members extends DolibarrApi * * @url POST {id}/subscriptions */ - function createSubscription($id, $start_date, $end_date, $amount, $label='') + function createSubscription($id, $start_date, $end_date, $amount, $label = '') { if(! DolibarrApiAccess::$user->rights->adherent->cotisation->creer) { throw new RestException(401); diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 96876eb82b6..319dbb1f75b 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -207,7 +207,7 @@ $type=$this->fk_type; * @param int $notrigger 0=Disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { $error = 0; @@ -263,7 +263,7 @@ $type=$this->fk_type; * @param bool $notrigger false=launch triggers after, true=disable triggers * @return int <0 if KO, 0 if not found, >0 if OK */ - function delete($user, $notrigger=false) + function delete($user, $notrigger = false) { $error = 0; @@ -356,7 +356,7 @@ $type=$this->fk_type; * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $notooltip=0, $option='', $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $notooltip = 0, $option = '', $morecss = '', $save_lastsearch_value = -1) { global $langs; @@ -395,7 +395,7 @@ $type=$this->fk_type; * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return ''; } diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fc3b8f15f39..df61d33092a 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1755,7 +1755,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return string '' or value of entity into table */ -function fieldList($fieldlist, $obj='', $tabname='', $context='') +function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db,$mysoc; global $form; diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 553ce2e54e0..e676423e6b0 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -54,7 +54,7 @@ class Dolistore * * @param boolean $debug Enable debug of request on screen */ - function __construct($debug=false) + function __construct($debug = false) { global $conf, $langs; diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index da31a794374..a6b2e89cc1a 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -947,7 +947,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldList($fieldlist, $obj='', $tabname='', $context='') +function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf, $langs, $user, $db; global $form; diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index e36b8d59df3..e4cc568ea03 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -659,7 +659,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='') +function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf,$langs,$db; global $form; diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 6d6ef4578cd..10341ce170c 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -46,7 +46,7 @@ class DolibarrApi * @param string $cachedir Cache dir * @param boolean $refreshCache Update cache */ - function __construct($db, $cachedir='', $refreshCache=false) + function __construct($db, $cachedir = '', $refreshCache = false) { global $conf, $dolibarr_main_url_root; @@ -222,7 +222,7 @@ class DolibarrApi * @return bool * @throws RestException */ - static function _checkAccessToResource($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') + static function _checkAccessToResource($resource, $resource_id = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid') { // Features/modules to check diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php index 86d1cfff87c..01b0fdd56da 100644 --- a/htdocs/api/class/api_login.class.php +++ b/htdocs/api/class/api_login.class.php @@ -55,7 +55,7 @@ class Login * @url GET / * @url POST / */ - public function index($login, $password, $entity='', $reset=0) + public function index($login, $password, $entity = '', $reset = 0) { global $conf, $dolibarr_main_authentication, $dolibarr_auto_user; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 335a9f6e9d1..93f2e88f725 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -312,7 +312,7 @@ class Asset extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -369,7 +369,7 @@ class Asset extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -382,7 +382,7 @@ class Asset extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index 51d76d75155..54421b8910f 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -89,7 +89,7 @@ class AssetType extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int >0 if OK, < 0 if KO */ - function create($user,$notrigger=0) + function create($user, $notrigger = 0) { global $conf; @@ -166,7 +166,7 @@ class AssetType extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int >0 if OK, < 0 if KO */ - function update($user,$notrigger=0) + function update($user, $notrigger = 0) { global $conf, $hookmanager; @@ -350,7 +350,7 @@ class AssetType extends CommonObject * 2=Return array of asset id only * @return mixed Array of asset or -1 on error */ - function listAssetForAssetType($excludefilter='', $mode=0) + function listAssetForAssetType($excludefilter = '', $mode = 0) { global $conf, $user; @@ -405,7 +405,7 @@ class AssetType extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0) + function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0) { global $langs; diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index 0d0fc183b6c..c200bd4d9e5 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -142,7 +142,7 @@ class BlockedLogAuthority * @param string $signature Signature of object to load * @return int >0 if OK, <0 if KO, 0 if not found */ - public function fetch($id, $signature='') + public function fetch($id, $signature = '') { global $langs; diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index bc65c72260d..25c95e2346c 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -725,7 +725,7 @@ class BlockedLog * @param string $mode 0=unserialize, 1=json_decode * @return string Value unserialized */ - public function dolDecodeBlockedData($data, $mode=0) + public function dolDecodeBlockedData($data, $mode = 0) { try { @@ -763,7 +763,7 @@ class BlockedLog * @param int $forcesignature Force signature (for example '0000000000' when we disabled the module) * @return int <0 if KO, >0 if OK */ - public function create($user, $forcesignature='') + public function create($user, $forcesignature = '') { global $conf,$langs,$hookmanager; @@ -878,7 +878,7 @@ class BlockedLog * @param string $previoushash If previous signature hash is known, we can provide it to avoid to make a search of it in database. * @return boolean True if OK, False if KO */ - public function checkSignature($previoushash='') + public function checkSignature($previoushash = '') { if (empty($previoushash)) { @@ -921,7 +921,7 @@ class BlockedLog * @param int $beforeid ID of a record * @return string Hash of previous record (if beforeid is defined) or hash of last record (if beforeid is 0) */ - public function getPreviousHash($withlock=0, $beforeid=0) + public function getPreviousHash($withlock = 0, $beforeid = 0) { global $conf; @@ -972,7 +972,7 @@ class BlockedLog * @param string $search_code search code * @return array|int Array of object log or <0 if error */ - public function getLog($element, $fk_object, $limit = 0, $sortfield = '', $sortorder = '', $search_fk_user = -1, $search_start = -1, $search_end = -1, $search_ref='', $search_amount='', $search_code='') + public function getLog($element, $fk_object, $limit = 0, $sortfield = '', $sortorder = '', $search_fk_user = -1, $search_start = -1, $search_end = -1, $search_ref = '', $search_amount = '', $search_code = '') { global $conf, $cachedlogs; @@ -1070,7 +1070,7 @@ class BlockedLog * @param int $ignoresystem Ignore system events for the test * @return bool */ - function alreadyUsed($ignoresystem=0) + function alreadyUsed($ignoresystem = 0) { global $conf; diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index ea6ac7a47bd..dca01ea667e 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -283,7 +283,7 @@ class Facturation * @param int $aId Id * @return id */ - public function id($aId=null) + public function id($aId = null) { if ( !$aId ) @@ -308,7 +308,7 @@ class Facturation * @param string $aRef Ref * @return string Ref */ - public function ref($aRef=null) + public function ref($aRef = null) { if (is_null($aRef)) @@ -331,7 +331,7 @@ class Facturation * @param int $aQte Qty * @return int Qty */ - public function qte($aQte=null) + public function qte($aQte = null) { if (is_null($aQte)) { @@ -354,7 +354,7 @@ class Facturation * @param string $aStock Stock * @return string Stock */ - public function stock($aStock=null) + public function stock($aStock = null) { if (is_null($aStock)) @@ -377,7 +377,7 @@ class Facturation * @param string $aRemisePercent Discount * @return string Discount */ - public function remisePercent($aRemisePercent=null) + public function remisePercent($aRemisePercent = null) { if (is_null($aRemisePercent)) @@ -400,7 +400,7 @@ class Facturation * @param int $aMontantRemise Amount * @return string Amount */ - public function montantRemise($aMontantRemise=null) + public function montantRemise($aMontantRemise = null) { if (is_null($aMontantRemise)) { @@ -421,7 +421,7 @@ class Facturation * @param int $aPrix Price * @return string Stock */ - public function prix($aPrix=null) + public function prix($aPrix = null) { if (is_null($aPrix)) { @@ -442,7 +442,7 @@ class Facturation * @param int $aTva Vat * @return int Vat */ - public function tva($aTva=null) + public function tva($aTva = null) { if (is_null($aTva)) { @@ -462,7 +462,7 @@ class Facturation * @param string $aNumFacture Invoice ref * @return string Invoice ref */ - public function numInvoice($aNumFacture=null) + public function numInvoice($aNumFacture = null) { if (is_null($aNumFacture)) { @@ -482,7 +482,7 @@ class Facturation * @param int $aModeReglement Payment mode * @return int Payment mode */ - public function getSetPaymentMode($aModeReglement=null) + public function getSetPaymentMode($aModeReglement = null) { if (is_null($aModeReglement)) { @@ -503,7 +503,7 @@ class Facturation * @param int $aMontantEncaisse Amount * @return int Amount */ - public function montantEncaisse($aMontantEncaisse=null) + public function montantEncaisse($aMontantEncaisse = null) { if (is_null($aMontantEncaisse)) { @@ -524,7 +524,7 @@ class Facturation * @param int $aMontantRendu Amount * @return int Amount */ - public function montantRendu($aMontantRendu=null) + public function montantRendu($aMontantRendu = null) { if (is_null($aMontantRendu)) { @@ -545,7 +545,7 @@ class Facturation * @param date $aPaiementLe Date * @return date Date */ - public function paiementLe($aPaiementLe=null) + public function paiementLe($aPaiementLe = null) { if (is_null($aPaiementLe)) { @@ -565,7 +565,7 @@ class Facturation * @param int $aTotalHt Total amount * @return int Total amount */ - public function prixTotalHt($aTotalHt=null) + public function prixTotalHt($aTotalHt = null) { if (is_null($aTotalHt)) { @@ -585,7 +585,7 @@ class Facturation * @param int $aMontantTva Amount vat * @return int Amount vat */ - public function montantTva($aMontantTva=null) + public function montantTva($aMontantTva = null) { if (is_null($aMontantTva)) { @@ -605,7 +605,7 @@ class Facturation * @param int $aTotalTtc Amount ttc * @return int Amount ttc */ - public function prixTotalTtc($aTotalTtc=null) + public function prixTotalTtc($aTotalTtc = null) { if (is_null($aTotalTtc)) { diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index e4d95d490ed..138c5f154fa 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -234,7 +234,7 @@ class Categorie extends CommonObject * @param string $type Type of category ('product', '...') or (0, 1, ...) * @return int <0 if KO, >0 if OK */ - function fetch($id, $label='', $type=null) + function fetch($id, $label = '', $type = null) { global $conf; @@ -501,7 +501,7 @@ class Categorie extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 KO >0 OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf,$langs; @@ -691,7 +691,7 @@ class Categorie extends CommonObject * * @return int 1 if OK, -1 if KO */ - function del_type($obj,$type) + function del_type($obj, $type) { // phpcs:enable global $user,$langs,$conf; @@ -749,7 +749,7 @@ class Categorie extends CommonObject * @return array|int -1 if KO, array of instance of object if OK * @see containsObject */ - function getObjectsInCateg($type, $onlyids=0) + function getObjectsInCateg($type, $onlyids = 0) { $objs = array(); @@ -821,7 +821,7 @@ class Categorie extends CommonObject * @param int $page Page number * @return array|int Array of categories, 0 if no cat, -1 on error */ - function getListForItem($id, $type='customer', $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) + function getListForItem($id, $type = 'customer', $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) { global $conf; @@ -990,7 +990,7 @@ class Categorie extends CommonObject * * @return array|int Array of categories. this->cats and this->motherof are set, -1 on error */ - function get_full_arbo($type, $markafterid=0) + function get_full_arbo($type, $markafterid = 0) { // phpcs:enable global $conf, $langs; @@ -1076,7 +1076,7 @@ class Categorie extends CommonObject * @param int $protection Deep counter to avoid infinite loop * @return void */ - function build_path_from_id_categ($id_categ,$protection=1000) + function build_path_from_id_categ($id_categ, $protection = 1000) { // phpcs:enable dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG); @@ -1143,7 +1143,7 @@ class Categorie extends CommonObject * @param boolean $parent Just parent categories if true * @return array|int Table of Object Category, -1 on error */ - function get_all_categories($type=null, $parent=false) + function get_all_categories($type = null, $parent = false) { // phpcs:enable if (! is_numeric($type)) $type = $this->MAP_ID[$type]; @@ -1232,7 +1232,7 @@ class Categorie extends CommonObject * @param int $type Type of category (0, 1, ...) * @return array */ - function get_main_categories($type=null) + function get_main_categories($type = null) { // phpcs:enable return $this->get_all_categories($type, true); @@ -1248,7 +1248,7 @@ class Categorie extends CommonObject * @param int $nocolor 0 * @return array */ - function print_all_ways($sep = " >> ", $url='', $nocolor=0) + function print_all_ways($sep = " >> ", $url = '', $nocolor = 0) { // phpcs:enable $ways = array(); @@ -1376,7 +1376,7 @@ class Categorie extends CommonObject * labels, 'id'= Get array of category IDs * @return array|int Array of category objects or < 0 if KO */ - function containing($id, $type, $mode='object') + function containing($id, $type, $mode = 'object') { $cats = array(); @@ -1522,7 +1522,7 @@ class Categorie extends CommonObject * @param int $maxlength Max length of text * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$option='',$maxlength=0) + function getNomUrl($withpicto = 0, $option = '', $maxlength = 0) { global $langs; @@ -1608,7 +1608,7 @@ class Categorie extends CommonObject * @param int $nbmax Nombre maximum de photos (0=pas de max) * @return array Tableau de photos */ - function liste_photos($dir,$nbmax=0) + function liste_photos($dir, $nbmax = 0) { // phpcs:enable include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 05d5fa43c86..949639341da 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -566,7 +566,7 @@ class ActionComm extends CommonObject * @param string $ref_ext Ref ext to get * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='',$ref_ext='') + function fetch($id, $ref = '', $ref_ext = '') { global $langs; @@ -761,7 +761,7 @@ class ActionComm extends CommonObject * @param int $notrigger 1 = disable triggers, 0 = enable triggers * @return int <0 if KO, >0 if OK */ - function delete($notrigger=0) + function delete($notrigger = 0) { global $user,$langs,$conf; @@ -838,7 +838,7 @@ class ActionComm extends CommonObject * @param int $notrigger 1 = disable triggers, 0 = enable triggers * @return int <0 if KO, >0 if OK */ - function update($user,$notrigger=0) + function update($user, $notrigger = 0) { global $langs,$conf,$hookmanager; @@ -999,7 +999,7 @@ class ActionComm extends CommonObject * @param string $limit Limit number of answers * @return array or string Error string if KO, array with actions if OK */ - static function getActions($db, $socid=0, $fk_element=0, $elementtype='', $filter='', $sortfield='a.datep', $sortorder='DESC', $limit=0) + static function getActions($db, $socid = 0, $fk_element = 0, $elementtype = '', $filter = '', $sortfield = 'a.datep', $sortorder = 'DESC', $limit = 0) { global $conf, $langs; @@ -1051,7 +1051,7 @@ class ActionComm extends CommonObject * @param int $load_state_board Charge indicateurs this->nb de tableau de bord * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - function load_board($user, $load_state_board=0) + function load_board($user, $load_state_board = 0) { // phpcs:enable global $conf, $langs; @@ -1164,7 +1164,7 @@ class ActionComm extends CommonObject * @param int $hidenastatus 1=Show nothing if status is "Not applicable" * @return string String with status */ - function getLibStatut($mode,$hidenastatus=0) + function getLibStatut($mode, $hidenastatus = 0) { return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep); } @@ -1179,7 +1179,7 @@ class ActionComm extends CommonObject * @param int $datestart Date start of event * @return string Label */ - function LibStatut($percent,$mode,$hidenastatus=0,$datestart='') + function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '') { // phpcs:enable global $langs; @@ -1257,7 +1257,7 @@ class ActionComm extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $maxlength=0, $classname='', $option='', $overwritepicto=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $maxlength = 0, $classname = '', $option = '', $overwritepicto = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user, $hookmanager, $action; @@ -1391,7 +1391,7 @@ class ActionComm extends CommonObject * @param array $filters Array of filters. Exemple array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...) * @return int <0 if error, nb of events in new file if ok */ - function build_exportfile($format,$type,$cachedelay,$filename,$filters) + function build_exportfile($format, $type, $cachedelay, $filename, $filters) { // phpcs:enable global $conf,$langs,$dolibarr_main_url_root,$mysoc; diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index 6631d0e375d..4d5536e50fc 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -178,7 +178,7 @@ class ActionCommReminder extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -191,7 +191,7 @@ class ActionCommReminder extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index d6c25f6d4c1..8efb6ab0515 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -130,7 +130,7 @@ class CActionComm * @param int $shortlabel 1=Get short label instead of long label * @return mixed Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode. */ - function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='', $shortlabel=0) + function liste_array($active = '', $idorcode = 'id', $excludetype = '', $onlyautoornot = 0, $morefilter = '', $shortlabel = 0) { // phpcs:enable global $langs,$conf; @@ -223,7 +223,7 @@ class CActionComm * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Picto only * @return string Label of action type */ - function getNomUrl($withpicto=0) + function getNomUrl($withpicto = 0) { global $langs; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a73731699f2..3d062298f53 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1277,7 +1277,7 @@ $db->close(); * @param string $nonew 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button" * @return void */ -function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $nonew=0) +function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $nonew = 0) { global $user, $conf, $langs; global $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 67a4534ca14..0c2f3f95c4f 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -757,7 +757,7 @@ $db->close(); * @param bool $var true or false for alternat style on tr/td * @return void */ -function show_day_events_pertype($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false) +function show_day_events_pertype($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $showheader = false, $colorsbytype = array(), $var = false) { global $db; global $user, $conf, $langs, $hookmanager, $action; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 9e2a7278a27..6271a9a3880 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -905,7 +905,7 @@ $db->close(); * @param bool $var true or false for alternat style on tr/td * @return void */ -function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false) +function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $showheader = false, $colorsbytype = array(), $var = false) { global $db; global $user, $conf, $langs, $hookmanager, $action; diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 83833304d44..2f88cb2dd9c 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -108,7 +108,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -260,7 +260,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $id Id object * @return int <0 if KO, >0 if OK */ - function fetch_by_mailing($id=0) + function fetch_by_mailing($id = 0) { // phpcs:enable global $langs; @@ -327,7 +327,7 @@ class AdvanceTargetingMailing extends CommonObject * @param string $type_element Type target * @return int <0 if KO, >0 if OK */ - function fetch_by_element($id=0, $type_element='mailing') + function fetch_by_element($id = 0, $type_element = 'mailing') { // phpcs:enable global $langs; @@ -390,7 +390,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -466,7 +466,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -525,7 +525,7 @@ class AdvanceTargetingMailing extends CommonObject * @param array $arrayquery All element to Query * @return int <0 if KO, >0 if OK */ - function savequery($user,$arrayquery) + function savequery($user, $arrayquery) { global $langs,$conf; @@ -946,7 +946,7 @@ class AdvanceTargetingMailing extends CommonObject * For exemple jean;joe;jim%%;!jimo;!jima%> will target all jean, joe, start with jim but not jimo and not everythnig taht start by jima * @return string Sql to use for the where condition */ - public function transformToSQL($column_to_test,$criteria) + public function transformToSQL($column_to_test, $criteria) { $return_sql_criteria = '('; diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 19b1ce3e9b4..369c0536a33 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -92,7 +92,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array or Code or Label of preselected country * @return string HTML string with select */ - function multiselectCountry($htmlname = 'country_id', $selected_array=array()) + function multiselectCountry($htmlname = 'country_id', $selected_array = array()) { global $conf, $langs; @@ -194,7 +194,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array selected array * @return string combo list code */ - function multiselectselectLanguage($htmlname='', $selected_array=array()) + function multiselectselectLanguage($htmlname = '', $selected_array = array()) { global $conf,$langs; @@ -290,7 +290,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array Array * @return string HTML combo */ - function multiselectCivility($htmlname='civilite_id',$selected_array = array()) + function multiselectCivility($htmlname = 'civilite_id', $selected_array = array()) { global $conf,$langs,$user; $langs->load("dict"); @@ -356,7 +356,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array value selected * @return string HTML combo */ - function multiselectCustomerCategories($htmlname='cust_cat',$selected_array = array()) + function multiselectCustomerCategories($htmlname = 'cust_cat', $selected_array = array()) { return $this->multiselectCategories($htmlname,$selected_array,2); } @@ -368,7 +368,7 @@ class FormAdvTargetEmailing extends Form * @param array $selected_array value selected * @return string HTML combo */ - function multiselectContactCategories($htmlname='contact_cat',$selected_array = array()) + function multiselectContactCategories($htmlname = 'contact_cat', $selected_array = array()) { return $this->multiselectCategories($htmlname,$selected_array,4); } @@ -381,7 +381,7 @@ class FormAdvTargetEmailing extends Form * @param int $type Type * @return string HTML combo */ - public function multiselectCategories($htmlname='',$selected_array = array(), $type=0) + public function multiselectCategories($htmlname = '', $selected_array = array(), $type = 0) { global $conf,$langs,$user; $langs->load("dict"); @@ -427,7 +427,7 @@ class FormAdvTargetEmailing extends Form * @param string $type_element Type element. Example: 'mailing' * @return string HTML combo */ - public function selectAdvtargetemailingTemplate($htmlname='template_id', $selected=0, $showempty=0, $type_element='mailing') + public function selectAdvtargetemailingTemplate($htmlname = 'template_id', $selected = 0, $showempty = 0, $type_element = 'mailing') { global $conf, $user, $langs; diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index b807ea23334..7e1073a0f2a 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -271,7 +271,7 @@ class Mailing extends CommonObject * @param int $option2 Not used * @return int New id of clone */ - function createFromClone($fromid,$option1,$option2) + function createFromClone($fromid, $option1, $option2) { global $user,$langs; @@ -536,7 +536,7 @@ class Mailing extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -607,7 +607,7 @@ class Mailing extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -620,7 +620,7 @@ class Mailing extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -670,7 +670,7 @@ class Mailing extends CommonObject * @param strin $desc Desc error * @return string Label */ - public static function libStatutDest($statut,$mode=0,$desc='') + public static function libStatutDest($statut, $mode = 0, $desc = '') { global $langs; $langs->load('mails'); diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index a03624f3122..6ce38f8c432 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -559,7 +559,7 @@ class Proposals extends DolibarrApi * * @return array */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); @@ -607,7 +607,7 @@ class Proposals extends DolibarrApi * * @return array */ - function close($id, $status, $note_private='', $notrigger=0) + function close($id, $status, $note_private = '', $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 55dd950abf2..d1d3fb086bd 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -239,7 +239,7 @@ class Propal extends CommonObject * @param int $socid Id third party * @param int $propalid Id proposal */ - function __construct($db, $socid="", $propalid=0) + function __construct($db, $socid = "", $propalid = 0) { global $conf,$langs; @@ -267,7 +267,7 @@ class Propal extends CommonObject * TODO Replace calls to this function by generation objet Ligne * inserted into table $this->products */ - function add_product($idproduct, $qty, $remise_percent=0) + function add_product($idproduct, $qty, $remise_percent = 0) { // phpcs:enable global $conf, $mysoc; @@ -434,7 +434,7 @@ class Propal extends CommonObject * @return int >0 if OK, <0 if KO * @see add_product */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0, $pu_ht_devise=0, $fk_remise_except=0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $info_bits = 0, $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $fk_remise_except = 0) { global $mysoc, $conf, $langs; @@ -663,7 +663,7 @@ class Propal extends CommonObject * @param int $notrigger disable line update trigger * @return int 0 if OK, <0 if KO */ - function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $date_start='', $date_end='', $array_options=0, $fk_unit=null, $pu_ht_devise = 0, $notrigger=0) + function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) { global $mysoc; @@ -869,7 +869,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >=0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf,$hookmanager; $error=0; @@ -1216,7 +1216,7 @@ class Propal extends CommonObject * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$conf,$hookmanager; @@ -1340,7 +1340,7 @@ class Propal extends CommonObject * @param string $ref Ref of proposal * @return int >0 if OK, <0 if KO */ - function fetch($rowid,$ref='') + function fetch($rowid, $ref = '') { $sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc"; @@ -1504,7 +1504,7 @@ class Propal extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf; @@ -1599,7 +1599,7 @@ class Propal extends CommonObject * @param int $only_product Return only physical products * @return int <0 if KO, >0 if OK */ - function fetch_lines($only_product=0) + function fetch_lines($only_product = 0) { // phpcs:enable $this->lines=array(); @@ -1718,7 +1718,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0=execute triggers * @return int <0 if KO, 0=Nothing done, >=0 if OK */ - function valid($user, $notrigger=0) + function valid($user, $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1842,7 +1842,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_date($user, $date, $notrigger=0) + function set_date($user, $date, $notrigger = 0) { // phpcs:enable if (empty($date)) @@ -1911,7 +1911,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_echeance($user, $date_fin_validite, $notrigger=0) + function set_echeance($user, $date_fin_validite, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer)) @@ -1973,7 +1973,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_date_livraison($user, $date_livraison, $notrigger=0) + function set_date_livraison($user, $date_livraison, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer)) @@ -2035,7 +2035,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_availability($user, $id, $notrigger=0) + function set_availability($user, $id, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) @@ -2106,7 +2106,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_demand_reason($user, $id, $notrigger=0) + function set_demand_reason($user, $id, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) @@ -2179,7 +2179,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_ref_client($user, $ref_client, $notrigger=0) + function set_ref_client($user, $ref_client, $notrigger = 0) { // phpcs:enable if (! empty($user->rights->propal->creer)) @@ -2244,7 +2244,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_remise_percent($user, $remise, $notrigger=0) + function set_remise_percent($user, $remise, $notrigger = 0) { // phpcs:enable $remise=trim($remise)?trim($remise):0; @@ -2311,7 +2311,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_remise_absolue($user, $remise, $notrigger=0) + function set_remise_absolue($user, $remise, $notrigger = 0) { // phpcs:enable $remise=trim($remise)?trim($remise):0; @@ -2380,7 +2380,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function reopen($user, $statut, $note='', $notrigger=0) + function reopen($user, $statut, $note = '', $notrigger = 0) { $this->statut = $statut; @@ -2441,7 +2441,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ - function cloture($user, $statut, $note="", $notrigger=0) + function cloture($user, $statut, $note = "", $notrigger = 0) { global $langs,$conf; @@ -2544,7 +2544,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ - function classifyBilled(User $user, $notrigger=0) + function classifyBilled(User $user, $notrigger = 0) { $error=0; @@ -2600,7 +2600,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_draft($user, $notrigger=0) + function set_draft($user, $notrigger = 0) { // phpcs:enable $error=0; @@ -2665,7 +2665,7 @@ class Propal extends CommonObject * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ - function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC') + function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datep', $sortorder = 'DESC') { // phpcs:enable global $user; @@ -2833,7 +2833,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int 1 if ok, otherwise if error */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2957,7 +2957,7 @@ class Propal extends CommonObject * @return int >0 if OK, <0 if KO * @deprecated use set_availability */ - function availability($availability_id, $notrigger=0) + function availability($availability_id, $notrigger = 0) { global $user; @@ -3028,7 +3028,7 @@ class Propal extends CommonObject * @return int >0 si ok, <0 si ko * @deprecated use set_demand_reason */ - function demand_reason($demand_reason_id, $notrigger=0) + function demand_reason($demand_reason_id, $notrigger = 0) { // phpcs:enable global $user; @@ -3153,7 +3153,7 @@ class Propal extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut, $mode); } @@ -3166,7 +3166,7 @@ class Propal extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function LibStatut($statut,$mode=1) + function LibStatut($statut, $mode = 1) { // phpcs:enable global $conf; @@ -3213,7 +3213,7 @@ class Propal extends CommonObject * @param int $mode "opened" for proposal to close, "signed" for proposal to invoice * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - function load_board($user,$mode) + function load_board($user, $mode) { // phpcs:enable global $conf, $langs; @@ -3495,7 +3495,7 @@ class Propal extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $get_params='', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user; @@ -3585,7 +3585,7 @@ class Propal extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -3854,7 +3854,7 @@ class PropaleLigne extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function insert($notrigger=0) + function insert($notrigger = 0) { global $conf,$user; @@ -3997,7 +3997,7 @@ class PropaleLigne extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function delete(User $user, $notrigger=0) + function delete(User $user, $notrigger = 0) { global $conf; @@ -4051,7 +4051,7 @@ class PropaleLigne extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function update($notrigger=0) + function update($notrigger = 0) { global $conf,$user; diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index bdd4a9dfba2..4286bb17448 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -56,7 +56,7 @@ class PropaleStats extends Stats * @param int $userid Id user for filter (creation user) * @param string $mode Option ('customer', 'supplier') */ - function __construct($db, $socid=0, $userid=0, $mode='customer') + function __construct($db, $socid = 0, $userid = 0, $mode = 'customer') { global $user, $conf; @@ -106,7 +106,7 @@ class PropaleStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 1135a5c2502..c531948f4cd 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -496,7 +496,7 @@ class Orders extends DolibarrApi * * @return array */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); @@ -629,7 +629,7 @@ class Orders extends DolibarrApi * * @return int */ - function close($id, $notrigger=0) + function close($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); @@ -675,7 +675,7 @@ class Orders extends DolibarrApi * * @return array */ - function settodraft($id, $idwarehouse=-1) + function settodraft($id, $idwarehouse = -1) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8934e293973..894f9c5c687 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -313,7 +313,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <=0 if OK, 0=Nothing done, >0 if KO */ - function valid($user, $idwarehouse=0, $notrigger=0) + function valid($user, $idwarehouse = 0, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -474,7 +474,7 @@ class Commande extends CommonOrder * @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on) * @return int <0 if KO, >0 if OK */ - function set_draft($user, $idwarehouse=-1) + function set_draft($user, $idwarehouse = -1) { //phpcs:enable global $conf,$langs; @@ -617,7 +617,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ - function cloture($user, $notrigger=0) + function cloture($user, $notrigger = 0) { global $conf; @@ -677,7 +677,7 @@ class Commande extends CommonOrder * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - function cancel($idwarehouse=-1) + function cancel($idwarehouse = -1) { global $conf,$user,$langs; @@ -758,7 +758,7 @@ class Commande extends CommonOrder * @param int $notrigger Disable all triggers * @return int <0 if KO, >0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf,$langs; $error=0; @@ -1060,7 +1060,7 @@ class Commande extends CommonOrder * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$hookmanager; @@ -1302,7 +1302,7 @@ class Commande extends CommonOrder * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit) * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='', $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0, $pu_ht_devise = 0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $info_bits = 0, $fk_remise_except = 0, $price_base_type = 'HT', $pu_ttc = 0, $date_start = '', $date_end = '', $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0) { global $mysoc, $conf, $langs, $user; @@ -1531,7 +1531,7 @@ class Commande extends CommonOrder * TODO Remplacer les appels a cette fonction par generation objet Ligne * insere dans tableau $this->products */ - function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='') + function add_product($idproduct, $qty, $remise_percent = 0.0, $date_start = '', $date_end = '') { // phpcs:enable global $conf, $mysoc; @@ -1616,7 +1616,7 @@ class Commande extends CommonOrder * @param string $ref_int Internal reference of other object * @return int >0 if OK, <0 if KO, 0 if not found */ - function fetch($id, $ref='', $ref_ext='', $ref_int='') + function fetch($id, $ref = '', $ref_ext = '', $ref_int = '') { // Check parameters @@ -1845,7 +1845,7 @@ class Commande extends CommonOrder * @param int $only_product Return only physical products * @return int <0 if KO, >0 if OK */ - function fetch_lines($only_product=0) + function fetch_lines($only_product = 0) { // phpcs:enable $this->lines=array(); @@ -2027,7 +2027,7 @@ class Commande extends CommonOrder * @param int $filtre_statut Filter on shipment status * @return int <0 if KO, Nb of lines found if OK */ - function loadExpeditions($filtre_statut=-1) + function loadExpeditions($filtre_statut = -1) { $this->expeditions = array(); @@ -2103,7 +2103,7 @@ class Commande extends CommonOrder * * TODO FONCTION NON FINIE A FINIR */ - function stock_array($filtre_statut=self::STATUS_CANCELED) + function stock_array($filtre_statut = self::STATUS_CANCELED) { // phpcs:enable $this->stocks = array(); @@ -2143,7 +2143,7 @@ class Commande extends CommonOrder * @param int $lineid Id of line to delete * @return int >0 if OK, 0 if nothing to do, <0 if KO */ - function deleteline($user=null, $lineid=0) + function deleteline($user = null, $lineid = 0) { if ($this->statut == self::STATUS_DRAFT) { @@ -2221,7 +2221,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_remise($user, $remise, $notrigger=0) + function set_remise($user, $remise, $notrigger = 0) { // phpcs:enable $remise=trim($remise)?trim($remise):0; @@ -2289,7 +2289,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_remise_absolue($user, $remise, $notrigger=0) + function set_remise_absolue($user, $remise, $notrigger = 0) { // phpcs:enable $remise=trim($remise)?trim($remise):0; @@ -2357,7 +2357,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_date($user, $date, $notrigger=0) + function set_date($user, $date, $notrigger = 0) { // phpcs:enable if ($user->rights->commande->creer) @@ -2423,7 +2423,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ - function set_date_livraison($user, $date_livraison, $notrigger=0) + function set_date_livraison($user, $date_livraison, $notrigger = 0) { // phpcs:enable if ($user->rights->commande->creer) @@ -2494,7 +2494,7 @@ class Commande extends CommonOrder * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ - function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC') + function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'c.date_commande', $sortorder = 'DESC') { // phpcs:enable global $user; @@ -2562,7 +2562,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int >0 if OK, <0 if KO */ - function availability($availability_id, $notrigger=0) + function availability($availability_id, $notrigger = 0) { global $user; @@ -2633,7 +2633,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int >0 if ok, <0 if ko */ - function demand_reason($demand_reason_id, $notrigger=0) + function demand_reason($demand_reason_id, $notrigger = 0) { // phpcs:enable global $user; @@ -2706,7 +2706,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_ref_client($user, $ref_client, $notrigger=0) + function set_ref_client($user, $ref_client, $notrigger = 0) { // phpcs:enable if ($user->rights->commande->creer) @@ -2769,7 +2769,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function classifyBilled(User $user, $notrigger=0) + function classifyBilled(User $user, $notrigger = 0) { $error = 0; @@ -2904,7 +2904,7 @@ class Commande extends CommonOrder * @param int $notrigger disable line update trigger * @return int < 0 if KO, > 0 if OK */ - function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $fk_unit=null, $pu_ht_devise = 0, $notrigger=0) + function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $price_base_type = 'HT', $info_bits = 0, $date_start = '', $date_end = '', $type = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) { global $conf, $mysoc, $langs, $user; @@ -3094,7 +3094,7 @@ class Commande extends CommonOrder * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf; @@ -3189,7 +3189,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <=0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -3408,7 +3408,7 @@ class Commande extends CommonOrder * @param int $donotshowbilled Do not show billed status after order status * @return string Label of status */ - function LibStatut($statut,$billed,$mode,$donotshowbilled=0) + function LibStatut($statut, $billed, $mode, $donotshowbilled = 0) { // phpcs:enable global $langs, $conf; @@ -3501,7 +3501,7 @@ class Commande extends CommonOrder * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $max=0, $short=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user; @@ -3782,7 +3782,7 @@ class Commande extends CommonOrder * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -4022,7 +4022,7 @@ class OrderLine extends CommonOrderLine * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 si ko, >0 si ok */ - function delete(User $user, $notrigger=0) + function delete(User $user, $notrigger = 0) { global $conf, $langs; @@ -4083,7 +4083,7 @@ class OrderLine extends CommonOrderLine * @param int $notrigger 1 = disable triggers * @return int <0 if KO, >0 if OK */ - function insert($user=null, $notrigger=0) + function insert($user = null, $notrigger = 0) { global $langs, $conf; @@ -4228,7 +4228,7 @@ class OrderLine extends CommonOrderLine * @param int $notrigger 1 = disable triggers * @return int <0 si ko, >0 si ok */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf,$langs; diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 3c6ec07c6cb..edd072854d3 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -55,7 +55,7 @@ class CommandeStats extends Stats * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -101,7 +101,7 @@ class CommandeStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -144,7 +144,7 @@ class CommandeStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 80a0c6f819b..cb00e201bc6 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -352,7 +352,7 @@ class Account extends CommonObject * @param string $type To search using type * @return array|int Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error */ - function get_url($fk_bank='', $url_id='', $type='') + function get_url($fk_bank = '', $url_id = '', $type = '') { // phpcs:enable $lines = array(); @@ -417,7 +417,7 @@ class Account extends CommonObject * @param int $datev Date value * @return int Rowid of added entry, <0 if KO */ - function addline($date, $oper, $label, $amount, $num_chq, $categorie, User $user, $emetteur='',$banque='', $accountancycode='', $datev=null) + function addline($date, $oper, $label, $amount, $num_chq, $categorie, User $user, $emetteur = '', $banque = '', $accountancycode = '', $datev = null) { // Deprecation warning if (is_numeric($oper)) { @@ -525,7 +525,7 @@ class Account extends CommonObject * @param int $notrigger 1=Disable triggers * @return int < 0 if KO, > 0 if OK */ - function create(User $user, $notrigger=0) + function create(User $user, $notrigger = 0) { global $langs,$conf, $hookmanager; @@ -860,7 +860,7 @@ class Account extends CommonObject * @param string $ref Ref of bank account to get * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -1076,7 +1076,7 @@ class Account extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->clos,$mode); } @@ -1163,7 +1163,7 @@ class Account extends CommonObject * @param int $option 1=Exclude future operation date (this is to exclude input made in advance and have real account sold) * @return int Current sold (value date <= today) */ - function solde($option=0) + function solde($option = 0) { $solde=0; @@ -1329,7 +1329,7 @@ class Account extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $mode='', $option='', $save_lastsearch_value=-1, $notooltip=0) + function getNomUrl($withpicto = 0, $mode = '', $option = '', $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs, $user; @@ -1549,7 +1549,7 @@ class Account extends CommonObject * @return array * @see useDetailedBBAN */ - public function getFieldsToShow($includeibanbic=0) + public function getFieldsToShow($includeibanbic = 0) { //Get the required properties depending on the country $detailedBBAN = $this->useDetailedBBAN(); @@ -1765,7 +1765,7 @@ class AccountLine extends CommonObject * @param string $num External num to load (ex: num of transaction for paypal fee) * @return int <0 if KO, 0 if OK but not found, >0 if OK and found */ - function fetch($rowid,$ref='',$num='') + function fetch($rowid, $ref = '', $num = '') { global $conf; @@ -2011,7 +2011,7 @@ class AccountLine extends CommonObject * @param int $conciliated 1=Set transaction to conciliated, 0=Keep transaction non conciliated * @return int <0 if KO, >0 if OK */ - function update_conciliation(User $user, $cat, $conciliated=1) + function update_conciliation(User $user, $cat, $conciliated = 1) { // phpcs:enable global $conf,$langs; @@ -2075,7 +2075,7 @@ class AccountLine extends CommonObject * @param int $sign 1 or -1 * @return int >0 if OK, 0 if KO */ - function datev_change($rowid,$sign=1) + function datev_change($rowid, $sign = 1) { // phpcs:enable $sql = "SELECT datev FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; @@ -2142,7 +2142,7 @@ class AccountLine extends CommonObject * @param int $sign 1 or -1 * @return int >0 if OK, 0 if KO */ - function dateo_change($rowid,$sign=1) + function dateo_change($rowid, $sign = 1) { // phpcs:enable $sql = "SELECT dateo FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; @@ -2257,7 +2257,7 @@ class AccountLine extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlen=0,$option='',$notooltip=0) + function getNomUrl($withpicto = 0, $maxlen = 0, $option = '', $notooltip = 0) { global $langs; @@ -2298,7 +2298,7 @@ class AccountLine extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -2311,7 +2311,7 @@ class AccountLine extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/compta/bank/class/api_bankaccounts.class.php b/htdocs/compta/bank/class/api_bankaccounts.class.php index ffe01f41e7a..feaaccaa50f 100644 --- a/htdocs/compta/bank/class/api_bankaccounts.class.php +++ b/htdocs/compta/bank/class/api_bankaccounts.class.php @@ -325,7 +325,7 @@ class BankAccounts extends DolibarrApi * * @url POST {id}/lines */ - function addLine($id, $date, $type, $label, $amount, $category=0, $cheque_number='', $cheque_writer='', $cheque_bank='') + function addLine($id, $date, $type, $label, $amount, $category = 0, $cheque_number = '', $cheque_writer = '', $cheque_bank = '') { if (! DolibarrApiAccess::$user->rights->banque->modifier) { throw new RestException(401); diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 47edacb2410..cb8f21ecc5a 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -111,7 +111,7 @@ class PaymentVarious extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -181,7 +181,7 @@ class PaymentVarious extends CommonObject * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; $sql = "SELECT"; @@ -505,7 +505,7 @@ class PaymentVarious extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -518,7 +518,7 @@ class PaymentVarious extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -567,7 +567,7 @@ class PaymentVarious extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $save_lastsearch_value=-1, $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $save_lastsearch_value = -1, $notooltip = 0) { global $db, $conf, $langs, $hookmanager; global $langs; diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index d0a10ec94da..946658208df 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -295,7 +295,7 @@ class CashControl extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -308,7 +308,7 @@ class CashControl extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) @@ -364,7 +364,7 @@ class CashControl extends CommonObject * @param int $notooltip No tooltip * @return string String with URL */ - public function getNomUrl($withpicto=0, $option='', $maxlength=0, $save_lastsearch_value=-1, $notooltip=0) + public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs, $hookmanager; include_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 2c21c2694ae..60108eed794 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -245,7 +245,7 @@ class Deplacement extends CommonObject * @param string $ref Ref of record * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { $sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet, extraparams"; $sql.= " FROM ".MAIN_DB_PREFIX."deplacement"; @@ -316,7 +316,7 @@ class Deplacement extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -329,7 +329,7 @@ class Deplacement extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -374,7 +374,7 @@ class Deplacement extends CommonObject * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @return string Chaine avec URL */ - function getNomUrl($withpicto=0) + function getNomUrl($withpicto = 0) { global $langs; @@ -400,7 +400,7 @@ class Deplacement extends CommonObject * @param int $active Active or not * @return array */ - function listOfTypes($active=1) + function listOfTypes($active = 1) { global $langs; diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index ae93eb094d9..542fe49e503 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -50,7 +50,7 @@ class DeplacementStats extends Stats * @param mixed $userid Id user for filter or array of user ids * @return void */ - function __construct($db, $socid=0, $userid=0) + function __construct($db, $socid = 0, $userid = 0) { global $conf; @@ -96,7 +96,7 @@ class DeplacementStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { $sql = "SELECT MONTH(dated) as dm, count(*)"; $sql.= " FROM ".$this->from; @@ -118,7 +118,7 @@ class DeplacementStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { $sql = "SELECT date_format(dated,'%m') as dm, sum(".$this->field.")"; $sql.= " FROM ".$this->from; diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 04c2bedeb41..e145ed477aa 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -104,7 +104,7 @@ class Invoices extends DolibarrApi * * @throws RestException */ - function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids='', $status='', $sqlfilters = '') + function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') { global $db, $conf; @@ -600,7 +600,7 @@ class Invoices extends DolibarrApi * @throws 500 * */ - function addContact($id, $fk_socpeople, $type_contact, $source, $notrigger=0) + function addContact($id, $fk_socpeople, $type_contact, $source, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -650,7 +650,7 @@ class Invoices extends DolibarrApi * @throws 500 * */ - function settodraft($id, $idwarehouse=-1) + function settodraft($id, $idwarehouse = -1) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -702,7 +702,7 @@ class Invoices extends DolibarrApi * * @return array */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -753,7 +753,7 @@ class Invoices extends DolibarrApi * @throws 404 * @throws 500 */ - function settopaid($id, $close_code='', $close_note='') + function settopaid($id, $close_code = '', $close_note = '') { if(! DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -994,7 +994,7 @@ class Invoices extends DolibarrApi * @throws 401 * @throws 404 */ - function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement='', $comment='', $chqemetteur='', $chqbank='') + function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '') { global $conf; @@ -1114,7 +1114,7 @@ class Invoices extends DolibarrApi * @throws 403 * @throws 404 */ - function addPaymentDistributed($arrayofamounts, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement='', $comment='', $chqemetteur='', $chqbank='') + function addPaymentDistributed($arrayofamounts, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '') { global $conf; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 5090132632e..39df40cc260 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -321,7 +321,7 @@ class FactureRec extends CommonInvoice * @param int $ref_int Internal reference of other object * @return int >0 if OK, <0 if KO, 0 if not found */ - function fetch($rowid, $ref='', $ref_ext='', $ref_int='') + function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '') { $sql = 'SELECT f.rowid, f.entity, f.titre, f.suspended, f.fk_soc, f.amount, f.tva, f.localtax1, f.localtax2, f.total, f.total_ttc'; $sql.= ', f.remise_percent, f.remise_absolue, f.remise'; @@ -573,7 +573,7 @@ class FactureRec extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - function delete(User $user, $notrigger=0, $idwarehouse=-1) + function delete(User $user, $notrigger = 0, $idwarehouse = -1) { $rowid=$this->id; @@ -644,7 +644,7 @@ class FactureRec extends CommonInvoice * @param int $date_end_fill 1=Flag to fill end date when generating invoice * @return int <0 if KO, Id of line if OK */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise=0, $date_start_fill=0, $date_end_fill=0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $rang = -1, $special_code = 0, $label = '', $fk_unit = null, $pu_ht_devise = 0, $date_start_fill = 0, $date_end_fill = 0) { global $mysoc; @@ -826,7 +826,7 @@ class FactureRec extends CommonInvoice * @param int $date_end_fill 1=Flag to fill end date when generating invoice * @return int <0 if KO, Id of line if OK */ - function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise = 0, $notrigger=0, $date_start_fill=0, $date_end_fill=0) + function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $rang = -1, $special_code = 0, $label = '', $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $date_start_fill = 0, $date_end_fill = 0) { global $mysoc; @@ -1002,7 +1002,7 @@ class FactureRec extends CommonInvoice * @param int $forcevalidation 1=Force validation of invoice whatever is template auto_validate flag. * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function createRecurringInvoices($restrictioninvoiceid=0, $forcevalidation=0) + function createRecurringInvoices($restrictioninvoiceid = 0, $forcevalidation = 0) { global $conf, $langs, $db, $user, $hookmanager; @@ -1159,7 +1159,7 @@ class FactureRec extends CommonInvoice * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='',$notooltip='',$save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = '', $save_lastsearch_value = -1) { global $langs; @@ -1210,7 +1210,7 @@ class FactureRec extends CommonInvoice * @param integer $alreadypaid Not used on recurring invoices * @return string Label of status */ - function getLibStatut($mode=0, $alreadypaid=-1) + function getLibStatut($mode = 0, $alreadypaid = -1) { return $this->LibStatut($this->frequency?1:0, $this->suspended, $mode, $alreadypaid, empty($this->type)?0:$this->type); @@ -1227,7 +1227,7 @@ class FactureRec extends CommonInvoice * @param int $type Type invoice * @return string Label of status */ - function LibStatut($recur, $status, $mode=0, $alreadypaid=-1, $type=0) + function LibStatut($recur, $status, $mode = 0, $alreadypaid = -1, $type = 0) { // phpcs:enable global $langs; @@ -1328,7 +1328,7 @@ class FactureRec extends CommonInvoice * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $user,$langs,$conf; @@ -1480,7 +1480,7 @@ class FactureRec extends CommonInvoice * @param string $unit unit of frequency (d, m, y) * @return int <0 if KO, >0 if OK */ - function setFrequencyAndUnit($frequency,$unit) + function setFrequencyAndUnit($frequency, $unit) { if (! $this->table_element) { @@ -1523,7 +1523,7 @@ class FactureRec extends CommonInvoice * @param int $increment_nb_gen_done 0 do nothing more, >0 increment nb_gen_done * @return int <0 if KO, >0 if OK */ - function setNextDate($date, $increment_nb_gen_done=0) + function setNextDate($date, $increment_nb_gen_done = 0) { if (! $this->table_element) { @@ -1823,7 +1823,7 @@ class FactureLigneRec extends CommonInvoiceLine * @param int $notrigger No trigger * @return int <0 if KO, Id of line if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3e4335774c9..bc689118426 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -289,7 +289,7 @@ class Facture extends CommonInvoice * @param int $forceduedate 1=Do not recalculate due date from payment condition but force it with value * @return int <0 if KO, >0 if OK */ - function create(User $user, $notrigger=0, $forceduedate=0) + function create(User $user, $notrigger = 0, $forceduedate = 0) { global $langs,$conf,$mysoc,$hookmanager; $error=0; @@ -854,7 +854,7 @@ class Facture extends CommonInvoice * @param int $invertdetail Reverse sign of amounts for lines * @return int <0 if KO, >0 if OK */ - function createFromCurrent(User $user, $invertdetail=0) + function createFromCurrent(User $user, $invertdetail = 0) { global $conf; @@ -945,7 +945,7 @@ class Facture extends CommonInvoice * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$hookmanager, $conf; @@ -1162,7 +1162,7 @@ class Facture extends CommonInvoice * @param int $withpicto Add download picto into link * @return string HTML link to file */ - function getDirectExternalLink($withpicto=0) + function getDirectExternalLink($withpicto = 0) { global $dolibarr_main_url_root; @@ -1193,7 +1193,7 @@ class Facture extends CommonInvoice * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $max=0, $short=0, $moretitle='', $notooltip=0, $addlinktonotes=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user, $form; @@ -1301,7 +1301,7 @@ class Facture extends CommonInvoice * @param bool $fetch_situation Fetch the previous and next situation in $tab_previous_situation_invoice and $tab_next_situation_invoice * @return int >0 if OK, <0 if KO, 0 if not found */ - function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $fetch_situation=false) + function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '', $fetch_situation = false) { global $conf; @@ -1604,7 +1604,7 @@ class Facture extends CommonInvoice * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf; @@ -1819,7 +1819,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_ref_client($ref_client, $notrigger=0) + function set_ref_client($ref_client, $notrigger = 0) { // phpcs:enable global $user; @@ -1884,7 +1884,7 @@ class Facture extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, 0=Refused, >0 if OK */ - function delete($user, $notrigger=0, $idwarehouse=-1) + function delete($user, $notrigger = 0, $idwarehouse = -1) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2058,7 +2058,7 @@ class Facture extends CommonInvoice * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple) * @return int <0 if KO, >0 if OK */ - function set_paid($user, $close_code='', $close_note='') + function set_paid($user, $close_code = '', $close_note = '') { // phpcs:enable $error=0; @@ -2168,7 +2168,7 @@ class Facture extends CommonInvoice * @param string $close_note Comment * @return int <0 if KO, >0 if OK */ - function set_canceled($user, $close_code='', $close_note='') + function set_canceled($user, $close_code = '', $close_note = '') { // phpcs:enable @@ -2231,7 +2231,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, 0=Nothing done because invoice is not a draft, >0 if OK */ - function validate($user, $force_number='', $idwarehouse=0, $notrigger=0) + function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2529,7 +2529,7 @@ class Facture extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - function set_draft($user,$idwarehouse=-1) + function set_draft($user, $idwarehouse = -1) { // phpcs:enable global $conf,$langs; @@ -2649,7 +2649,7 @@ class Facture extends CommonInvoice * @param double $pu_ht_devise Unit price in currency * @return int <0 if KO, Id of line if OK */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=self::TYPE_STANDARD, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='', $array_options=0, $situation_percent=100, $fk_prev_id=0, $fk_unit = null, $pu_ht_devise = 0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = 0, $fk_remise_except = '', $price_base_type = 'HT', $pu_ttc = 0, $type = self::TYPE_STANDARD, $rang = -1, $special_code = 0, $origin = '', $origin_id = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $situation_percent = 100, $fk_prev_id = 0, $fk_unit = null, $pu_ht_devise = 0) { // Deprecation warning if ($label) { @@ -2879,7 +2879,7 @@ class Facture extends CommonInvoice * @param int $notrigger disable line update trigger * @return int < 0 if KO, > 0 if OK */ - function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=100, $fk_unit = null, $pu_ht_devise = 0, $notrigger=0) + function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = self::TYPE_STANDARD, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $situation_percent = 100, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) { global $conf,$user; // Deprecation warning @@ -3197,7 +3197,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function set_remise($user, $remise, $notrigger=0) + function set_remise($user, $remise, $notrigger = 0) { // phpcs:enable // Clean parameters @@ -3263,7 +3263,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_remise_absolue($user, $remise, $notrigger=0) + function set_remise_absolue($user, $remise, $notrigger = 0) { // phpcs:enable if (empty($remise)) $remise=0; @@ -3330,7 +3330,7 @@ class Facture extends CommonInvoice * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - function getNextNumRef($soc,$mode='next') + function getNextNumRef($soc, $mode = 'next') { global $conf, $langs; $langs->load("bills"); @@ -3472,7 +3472,7 @@ class Facture extends CommonInvoice * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ - function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC') + function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'f.datef,f.rowid', $sortorder = 'DESC') { // phpcs:enable global $conf,$user; @@ -3543,7 +3543,7 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) */ - function list_replacable_invoices($socid=0) + function list_replacable_invoices($socid = 0) { // phpcs:enable global $conf; @@ -3593,7 +3593,7 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) */ - function list_qualified_avoir_invoices($socid=0) + function list_qualified_avoir_invoices($socid = 0) { // phpcs:enable global $conf; @@ -3668,7 +3668,7 @@ class Facture extends CommonInvoice * @param float $amount Amount we request direct debit for * @return int <0 if KO, >0 if OK */ - function demande_prelevement($fuser, $amount=0) + function demande_prelevement($fuser, $amount = 0) { // phpcs:enable @@ -3894,7 +3894,7 @@ class Facture extends CommonInvoice * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $langs; @@ -4110,7 +4110,7 @@ class Facture extends CommonInvoice * @param null|array $moreparams Array to provide more information * @return int <0 if KO, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -4215,7 +4215,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function setFinal(User $user, $notrigger=0) + function setFinal(User $user, $notrigger = 0) { $error=0; @@ -4512,7 +4512,7 @@ class FactureLigne extends CommonInvoiceLine * @param int $noerrorifdiscountalreadylinked 1=Do not make error if lines is linked to a discount and discount already linked to another * @return int <0 if KO, >0 if OK */ - function insert($notrigger=0, $noerrorifdiscountalreadylinked=0) + function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0) { global $langs,$user,$conf; @@ -4729,7 +4729,7 @@ class FactureLigne extends CommonInvoiceLine * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function update($user='',$notrigger=0) + function update($user = '', $notrigger = 0) { global $user,$conf; @@ -4945,7 +4945,7 @@ class FactureLigne extends CommonInvoiceLine * @param bool $include_credit_note Include credit note or not * @return int >= 0 */ - function get_prev_progress($invoiceid, $include_credit_note=true) + function get_prev_progress($invoiceid, $include_credit_note = true) { // phpcs:enable if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") { diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 4cf9477613e..ea065d81636 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -53,7 +53,7 @@ class FactureStats extends Stats * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -100,7 +100,7 @@ class FactureStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -145,7 +145,7 @@ class FactureStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index 55a3e40b55f..3d4f0881de2 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -82,7 +82,7 @@ class PaymentTerm // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -268,7 +268,7 @@ class PaymentTerm // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -345,7 +345,7 @@ class PaymentTerm // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 49c95c26c2e..d80b9cc4783 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -163,7 +163,7 @@ class Localtax extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf, $langs; @@ -628,7 +628,7 @@ class Localtax extends CommonObject * @param string $option Sur quoi pointe le lien * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='') + function getNomUrl($withpicto = 0, $option = '') { global $langs; @@ -652,7 +652,7 @@ class Localtax extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -665,7 +665,7 @@ class Localtax extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status, $mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 28973d3c4e2..34dd599f35a 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -84,7 +84,7 @@ class RemiseCheque extends CommonObject * @param string $ref Ref record * @return int <0 if KO, > 0 if OK */ - function fetch($id,$ref='') + function fetch($id, $ref = '') { global $conf; @@ -299,7 +299,7 @@ class RemiseCheque extends CommonObject * @param User $user Utilisateur qui effectue l'operation * @return int */ - function delete($user='') + function delete($user = '') { global $conf; @@ -416,7 +416,7 @@ class RemiseCheque extends CommonObject * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - function getNextNumRef($mode='next') + function getNextNumRef($mode = 'next') { global $conf, $db, $langs, $mysoc; $langs->load("bills"); @@ -988,7 +988,7 @@ class RemiseCheque extends CommonObject * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $user,$langs,$conf; @@ -1013,7 +1013,7 @@ class RemiseCheque extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $conf, $langs; @@ -1064,7 +1064,7 @@ class RemiseCheque extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1077,7 +1077,7 @@ class RemiseCheque extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index c4cb529d895..4e729e9c37b 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -157,7 +157,7 @@ class Paiement extends CommonObject * @param int $fk_bank Id of bank line associated to payment * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $ref='', $fk_bank='') + public function fetch($id, $ref = '', $fk_bank = '') { $sql = 'SELECT p.rowid, p.ref, p.datep as dp, p.amount, p.statut, p.ext_payment_id, p.ext_payment_site, p.fk_bank,'; $sql.= ' c.code as type_code, c.libelle as type_libelle,'; @@ -224,7 +224,7 @@ class Paiement extends CommonObject * @param int $closepaidinvoices 1=Also close payed invoices to paid, 0=Do nothing more * @return int id of created payment, < 0 if error */ - function create($user, $closepaidinvoices=0) + function create($user, $closepaidinvoices = 0) { global $conf, $langs; @@ -488,7 +488,7 @@ class Paiement extends CommonObject * @param int $notrigger No trigger * @return int <0 si ko, >0 si ok */ - function delete($notrigger=0) + function delete($notrigger = 0) { global $conf, $user, $langs; @@ -598,7 +598,7 @@ class Paiement extends CommonObject * @param int $notrigger No trigger * @return int <0 if KO, bank_line_id if OK */ - function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque,$notrigger=0) + function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque, $notrigger = 0) { global $conf,$langs,$user; @@ -897,7 +897,7 @@ class Paiement extends CommonObject * @param User $user User making validation * @return int <0 if KO, >0 if OK */ - function valide(User $user=null) + function valide(User $user = null) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 1 WHERE rowid = '.$this->id; @@ -921,7 +921,7 @@ class Paiement extends CommonObject * @param User $user User making reject * @return int <0 if KO, >0 if OK */ - function reject(User $user=null) + function reject(User $user = null) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 2 WHERE rowid = '.$this->id; @@ -989,7 +989,7 @@ class Paiement extends CommonObject * @param string $filter Critere de filtre * @return array Tableau des id de factures */ - function getBillsArray($filter='') + function getBillsArray($filter = '') { $sql = 'SELECT fk_facture'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'facture as f'; @@ -1027,7 +1027,7 @@ class Paiement extends CommonObject * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - function getNextNumRef($soc,$mode='next') + function getNextNumRef($soc, $mode = 'next') { global $conf, $db, $langs; $langs->load("bills"); @@ -1138,7 +1138,7 @@ class Paiement extends CommonObject * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $user,$langs,$conf; @@ -1164,7 +1164,7 @@ class Paiement extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='', $mode='withlistofinvoices', $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0) { global $conf, $langs; @@ -1222,7 +1222,7 @@ class Paiement extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1235,7 +1235,7 @@ class Paiement extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage @@ -1286,7 +1286,7 @@ class Paiement extends CommonObject * @param int $force_thirdparty_id Force thirdparty id * @return int <0 if KO, >0 if OK */ - function fetch_thirdparty($force_thirdparty_id=0) + function fetch_thirdparty($force_thirdparty_id = 0) { // phpcs:enable include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 3f7dd23059d..f39ed254df3 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -81,7 +81,7 @@ class BonPrelevement extends CommonObject * @param DoliDB $db Database handler * @param string $filename Filename of withdraw receipt */ - function __construct($db, $filename='') + function __construct($db, $filename = '') { global $conf,$langs; @@ -276,7 +276,7 @@ class BonPrelevement extends CommonObject * @param string $ref Ref of direct debit * @return int >0 if OK, <0 if KO */ - function fetch($rowid, $ref='') + function fetch($rowid, $ref = '') { global $conf; @@ -630,7 +630,7 @@ class BonPrelevement extends CommonObject * @param int $amounts If you want to get the amount of the order for each invoice * @return array Id of invoices */ - private function getListInvoices($amounts=0) + private function getListInvoices($amounts = 0) { global $conf; @@ -731,7 +731,7 @@ class BonPrelevement extends CommonObject * @param int $agence dolibarr mysoc agence * @return int <O if KO, number of invoices if OK */ - function NbFactureAPrelever($banque=0,$agence=0) + function NbFactureAPrelever($banque = 0, $agence = 0) { // phpcs:enable global $conf; @@ -777,7 +777,7 @@ class BonPrelevement extends CommonObject * @param string $executiondate Date to execute the transfer * @return int <0 if KO, nbre of invoice withdrawed if OK */ - function Create($banque=0, $agence=0, $mode='real', $format='ALL',$executiondate='') + function Create($banque = 0, $agence = 0, $mode = 'real', $format = 'ALL', $executiondate = '') { // phpcs:enable global $conf,$langs; @@ -1138,7 +1138,7 @@ class BonPrelevement extends CommonObject * @param User $user Object user that delete * @return int >0 if OK, <0 if KO */ - function delete($user=null) + function delete($user = null) { $this->db->begin(); @@ -1178,7 +1178,7 @@ class BonPrelevement extends CommonObject * @param string $option link target * @return string URL of target */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto = 0, $option = '') { global $langs; @@ -1299,7 +1299,7 @@ class BonPrelevement extends CommonObject * @param string $executiondate Date to execute transfer * @return int 0 if OK, <0 if KO */ - function generate($format='ALL',$executiondate='') + function generate($format = 'ALL', $executiondate = '') { global $conf,$langs,$mysoc; @@ -1493,7 +1493,7 @@ class BonPrelevement extends CommonObject * @param string $rib_dom rib domiciliation * @return void */ - function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $ref, $facid, $rib_dom='') + function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $ref, $facid, $rib_dom = '') { // phpcs:enable fputs($this->file, "06"); @@ -1726,7 +1726,7 @@ class BonPrelevement extends CommonObject * @param string $format FRST or RCUR or ALL * @return string String with SEPA Sender */ - function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n', $format='FRST') + function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf = '\n', $format = 'FRST') { // phpcs:enable // SEPA INITIALISATION @@ -1905,7 +1905,7 @@ class BonPrelevement extends CommonObject * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1918,7 +1918,7 @@ class BonPrelevement extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable if (empty($this->labelstatut)) diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index 7e100022c7a..d47eb32504a 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -123,7 +123,7 @@ class LignePrelevement * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -136,7 +136,7 @@ class LignePrelevement * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 4797121a24c..46b4242944b 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -82,7 +82,7 @@ class RejetPrelevement * @param int $facturation Facturation * @return void */ - function create($user, $id, $motif, $date_rejet, $bonid, $facturation=0) + function create($user, $id, $motif, $date_rejet, $bonid, $facturation = 0) { global $langs,$conf; @@ -282,7 +282,7 @@ class RejetPrelevement * @return array Array List of invoices related to the withdrawal line * @TODO A withdrawal line is today linked to one and only one invoice. So the function should return only one object ? */ - private function getListInvoices($amounts=0) + private function getListInvoices($amounts = 0) { global $conf; diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 76a8284daff..8f55b5804cc 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -108,7 +108,7 @@ class PaymentSalary extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -189,7 +189,7 @@ class PaymentSalary extends CommonObject * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; $sql = "SELECT"; @@ -544,7 +544,7 @@ class PaymentSalary extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -652,7 +652,7 @@ class PaymentSalary extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -665,7 +665,7 @@ class PaymentSalary extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php index 82a8d094148..0c91ee29309 100644 --- a/htdocs/compta/salaries/class/salariesstats.class.php +++ b/htdocs/compta/salaries/class/salariesstats.class.php @@ -49,7 +49,7 @@ class SalariesStats extends Stats * @param mixed $userid Id user for filter or array of user ids * @return void */ - function __construct($db, $socid=0, $userid=0) + function __construct($db, $socid = 0, $userid = 0) { global $conf; @@ -94,7 +94,7 @@ class SalariesStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { $sql = "SELECT MONTH(datep) as dm, count(*)"; $sql.= " FROM ".$this->from; @@ -116,7 +116,7 @@ class SalariesStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { $sql = "SELECT date_format(datep,'%m') as dm, sum(".$this->field.")"; $sql.= " FROM ".$this->from; diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index 9e13ffcd8a5..f7c829294f8 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -404,7 +404,7 @@ class Cchargesociales * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -438,7 +438,7 @@ class Cchargesociales * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -451,7 +451,7 @@ class Cchargesociales * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index cca5a4d7dd2..1828e750914 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -93,7 +93,7 @@ class ChargeSociales extends CommonObject * @param string $ref Ref * @return int <0 KO >0 OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { $sql = "SELECT cs.rowid, cs.date_ech"; $sql.= ", cs.libelle as lib, cs.fk_type, cs.amount, cs.fk_projet as fk_project, cs.paye, cs.periode, cs.import_key"; @@ -419,7 +419,7 @@ class ChargeSociales extends CommonObject * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - function getLibStatut($mode=0,$alreadypaid=-1) + function getLibStatut($mode = 0, $alreadypaid = -1) { return $this->LibStatut($this->paye,$mode,$alreadypaid); } @@ -433,7 +433,7 @@ class ChargeSociales extends CommonObject * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - function LibStatut($statut,$mode=0,$alreadypaid=-1) + function LibStatut($statut, $mode = 0, $alreadypaid = -1) { // phpcs:enable global $langs; @@ -491,7 +491,7 @@ class ChargeSociales extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with link */ - function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0, $short=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $short = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user, $form; diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 74ddce68230..bd678904df6 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -104,7 +104,7 @@ class PaymentSocialContribution extends CommonObject * @param int $closepaidcontrib 1=Also close payed contributions to paid, 0=Do nothing more * @return int <0 if KO, id of payment if OK */ - function create($user, $closepaidcontrib=0) + function create($user, $closepaidcontrib = 0) { global $conf, $langs; @@ -292,7 +292,7 @@ class PaymentSocialContribution extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -379,7 +379,7 @@ class PaymentSocialContribution extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -540,7 +540,7 @@ class PaymentSocialContribution extends CommonObject * @param string $emetteur_banque Name of bank * @return int <0 if KO, >0 if OK */ - function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque) + function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque) { global $conf; @@ -656,7 +656,7 @@ class PaymentSocialContribution extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -669,7 +669,7 @@ class PaymentSocialContribution extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage @@ -720,7 +720,7 @@ class PaymentSocialContribution extends CommonObject * @param int $maxlen Longueur max libelle * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 33d48de8bfc..5da7b0e144c 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -173,7 +173,7 @@ class Tva extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; @@ -241,7 +241,7 @@ class Tva extends CommonObject * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; $sql = "SELECT"; @@ -687,7 +687,7 @@ class Tva extends CommonObject * @param string $morecss More CSS * @return string Chaine with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '') { global $langs, $conf; @@ -813,7 +813,7 @@ class Tva extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -826,7 +826,7 @@ class Tva extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index a5297750386..d5b5afa4433 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -313,7 +313,7 @@ class Contact extends CommonObject * @param int $nosyncuser No sync linked user (external users and contacts are linked) * @return int <0 if KO, >0 if OK */ - function update($id, $user=null, $notrigger=0, $action='update', $nosyncuser=0) + function update($id, $user = null, $notrigger = 0, $action = 'update', $nosyncuser = 0) { global $conf, $langs, $hookmanager; @@ -501,7 +501,7 @@ class Contact extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; @@ -597,7 +597,7 @@ class Contact extends CommonObject * @param int $notrigger 0=no, 1=yes * @return int <0 if KO, >=0 if OK */ - function update_perso($id, $user=null, $notrigger=0) + function update_perso($id, $user = null, $notrigger = 0) { // phpcs:enable $error=0; @@ -686,7 +686,7 @@ class Contact extends CommonObject * @param string $email Email * @return int -1 if KO, 0 if OK but not found, 1 if OK */ - function fetch($id, $user=null, $ref_ext='', $email='') + function fetch($id, $user = null, $ref_ext = '', $email = '') { global $langs; @@ -931,7 +931,7 @@ class Contact extends CommonObject * @param int $notrigger Disable all trigger * @return int <0 if KO, >0 if OK */ - function delete($notrigger=0) + function delete($notrigger = 0) { global $conf, $langs, $user; @@ -1124,7 +1124,7 @@ class Contact extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1, $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $moreparam = '', $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs, $hookmanager; @@ -1231,7 +1231,7 @@ class Contact extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index 585d5399771..8631becc515 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -555,7 +555,7 @@ class Contracts extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if (! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401); @@ -601,7 +601,7 @@ class Contracts extends DolibarrApi * "notrigger": 0 * } */ - function close($id, $notrigger=0) + function close($id, $notrigger = 0) { if (! DolibarrApiAccess::$user->rights->contrat->creer) { throw new RestException(401); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 5929ec034d1..5dce6cb4bd4 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -261,7 +261,7 @@ class Contrat extends CommonObject * @param string $comment A comment typed by user * @return int <0 if KO, >0 if OK */ - function active_line($user, $line_id, $date, $date_end='', $comment='') + function active_line($user, $line_id, $date, $date_end = '', $comment = '') { // phpcs:enable $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment); @@ -284,7 +284,7 @@ class Contrat extends CommonObject * @param string $comment A comment typed by user * @return int <0 if KO, >0 if OK */ - function close_line($user, $line_id, $date_end, $comment='') + function close_line($user, $line_id, $date_end, $comment = '') { // phpcs:enable $result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); @@ -307,7 +307,7 @@ class Contrat extends CommonObject * @return int <0 if KO, >0 if OK * @see closeAll */ - function activateAll($user, $date_start='', $notrigger=0, $comment='') + function activateAll($user, $date_start = '', $notrigger = 0, $comment = '') { if (empty($date_start)) $date_start = dol_now(); @@ -363,7 +363,7 @@ class Contrat extends CommonObject * @return int <0 if KO, >0 if OK * @see activateAll */ - function closeAll(User $user, $notrigger=0, $comment='') + function closeAll(User $user, $notrigger = 0, $comment = '') { $this->db->begin(); @@ -419,7 +419,7 @@ class Contrat extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function validate(User $user, $force_number='', $notrigger=0) + function validate(User $user, $force_number = '', $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; global $langs, $conf; @@ -547,7 +547,7 @@ class Contrat extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0=execute triggers * @return int <0 if KO, >0 if OK */ - function reopen($user, $notrigger=0) + function reopen($user, $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; global $langs, $conf; @@ -614,7 +614,7 @@ class Contrat extends CommonObject * @param string $ref_supplier Supplier ref * @return int <0 if KO, 0 if not found, Id of contract if OK */ - function fetch($id, $ref='', $ref_customer='', $ref_supplier='') + function fetch($id, $ref = '', $ref_customer = '', $ref_supplier = '') { $sql = "SELECT rowid, statut, ref, fk_soc, mise_en_service as datemise,"; $sql.= " ref_supplier, ref_customer,"; @@ -1242,7 +1242,7 @@ class Contrat extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -1360,7 +1360,7 @@ class Contrat extends CommonObject * @param string $rang Position * @return int <0 if KO, >0 if OK */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_options=0, $fk_unit = null, $rang=0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type = 'HT', $pu_ttc = 0.0, $info_bits = 0, $fk_fournprice = null, $pa_ht = 0, $array_options = 0, $fk_unit = null, $rang = 0) { global $user, $langs, $conf, $mysoc; $error=0; @@ -1570,7 +1570,7 @@ class Contrat extends CommonObject * @param string $fk_unit Code of the unit to use. Null to use the default one * @return int < 0 si erreur, > 0 si ok */ - function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx=0.0, $localtax2tx=0.0, $date_debut_reel='', $date_fin_reel='', $price_base_type='HT', $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_options=0, $fk_unit = null) + function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx = 0.0, $localtax2tx = 0.0, $date_debut_reel = '', $date_fin_reel = '', $price_base_type = 'HT', $info_bits = 0, $fk_fournprice = null, $pa_ht = 0, $array_options = 0, $fk_unit = null) { global $user, $conf, $langs, $mysoc; @@ -1840,7 +1840,7 @@ class Contrat extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length * @return string Label */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; @@ -1909,7 +1909,7 @@ class Contrat extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $maxlength=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user; @@ -2022,7 +2022,7 @@ class Contrat extends CommonObject * @param int $statut Status of lines to get * @return array Array of line's rowid */ - function array_detail($statut=-1) + function array_detail($statut = -1) { // phpcs:enable $tab=array(); @@ -2059,7 +2059,7 @@ class Contrat extends CommonObject * @param string $option 'all' or 'others' * @return array Array of contracts id */ - function getListOfContracts($option='all') + function getListOfContracts($option = 'all') { $tab=array(); @@ -2100,7 +2100,7 @@ class Contrat extends CommonObject * @param string $mode "inactive" pour services a activer, "expired" pour services expires * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - function load_board($user,$mode) + function load_board($user, $mode) { // phpcs:enable global $conf, $langs; @@ -2336,7 +2336,7 @@ class Contrat extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -2382,7 +2382,7 @@ class Contrat extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int New id of clone */ - function createFromClone($socid = 0, $notrigger=0) + function createFromClone($socid = 0, $notrigger = 0) { global $db, $user, $langs, $conf, $hookmanager, $extrafields; @@ -2658,7 +2658,7 @@ class ContratLigne extends CommonObjectLine * @param string $moreatt More attribute * @return string Libelle */ - static function LibStatut($statut,$mode,$expired=-1,$moreatt='') + static function LibStatut($statut, $mode, $expired = -1, $moreatt = '') { // phpcs:enable global $langs; @@ -2720,7 +2720,7 @@ class ContratLigne extends CommonObjectLine * @param int $maxlength Max length * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlength=0) + function getNomUrl($withpicto = 0, $maxlength = 0) { global $langs; @@ -2747,7 +2747,7 @@ class ContratLigne extends CommonObjectLine * @param string $ref Ref of contract * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { // Check parameters @@ -2879,7 +2879,7 @@ class ContratLigne extends CommonObjectLine * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs, $mysoc; @@ -3257,7 +3257,7 @@ class ContratLigne extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ - function close_line($user, $date_end, $comment = '', $notrigger=0) + function close_line($user, $date_end, $comment = '', $notrigger = 0) { // phpcs:enable global $langs, $conf; diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index d90a3f5f316..1e4dde7e0a4 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -337,7 +337,7 @@ if ((! isset($mode) || $mode != 'noajax') && is_object($db)) $db->close(); * @param int $depth Depth * @return void */ -function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, $modulepart, $websitekey, $pageid, $preopened, $fullpathpreopened, $depth=0) +function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, $modulepart, $websitekey, $pageid, $preopened, $fullpathpreopened, $depth = 0) { global $conf, $db, $langs, $form; global $dolibarr_main_data_root; diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index aea85fd111e..55804430113 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -54,7 +54,7 @@ class box_actions extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $user; @@ -69,7 +69,7 @@ class box_actions extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -189,7 +189,7 @@ class box_actions extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { global $langs, $conf; $out = parent::showBox($this->info_box_head, $this->info_box_contents); diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 413dc43d8b2..e18114a5bc7 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -53,7 +53,7 @@ class box_activity extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $conf, $user; @@ -74,7 +74,7 @@ class box_activity extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -457,7 +457,7 @@ class box_activity extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index c3a29877104..ec091956701 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -50,7 +50,7 @@ class box_bookmarks extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -65,7 +65,7 @@ class box_bookmarks extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -157,7 +157,7 @@ class box_bookmarks extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 9b1e4e34261..c4e34a72e9b 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -54,7 +54,7 @@ class box_clients extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -72,7 +72,7 @@ class box_clients extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -173,7 +173,7 @@ class box_clients extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 3f86909f04a..795bf36bd0b 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -54,7 +54,7 @@ class box_commandes extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -69,7 +69,7 @@ class box_commandes extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -198,7 +198,7 @@ class box_commandes extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 5a5c2f59986..0f0d0f83fed 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -56,7 +56,7 @@ class box_comptes extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -75,7 +75,7 @@ class box_comptes extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -184,7 +184,7 @@ class box_comptes extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 2d9d7e9461b..2654607e2eb 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -56,7 +56,7 @@ class box_contacts extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -71,7 +71,7 @@ class box_contacts extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -185,7 +185,7 @@ class box_contacts extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 7239fa78919..bd499855cc4 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -53,7 +53,7 @@ class box_contracts extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -68,7 +68,7 @@ class box_contracts extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -189,7 +189,7 @@ class box_contracts extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php index fa7d35f6db0..d7165198201 100644 --- a/htdocs/core/boxes/box_external_rss.php +++ b/htdocs/core/boxes/box_external_rss.php @@ -56,7 +56,7 @@ class box_external_rss extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { $this->db=$db; $this->paramdef=$param; @@ -69,7 +69,7 @@ class box_external_rss extends ModeleBoxes * @param int $cachedelay Delay we accept for cache file * @return void */ - function loadBox($max=5, $cachedelay=3600) + function loadBox($max = 5, $cachedelay = 3600) { global $user, $langs, $conf; $langs->load("boxes"); @@ -195,7 +195,7 @@ class box_external_rss extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index ae4a32fad7c..b45c530a085 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -52,7 +52,7 @@ class box_factures extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -67,7 +67,7 @@ class box_factures extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -209,7 +209,7 @@ class box_factures extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 617f041d7d2..cc8cd3bd1da 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -53,7 +53,7 @@ class box_factures_fourn extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -68,7 +68,7 @@ class box_factures_fourn extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -214,7 +214,7 @@ class box_factures_fourn extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index bd8fde32aab..181994fc1e3 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -52,7 +52,7 @@ class box_factures_fourn_imp extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -67,7 +67,7 @@ class box_factures_fourn_imp extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -201,7 +201,7 @@ class box_factures_fourn_imp extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index 11331f7f3e7..6193924ebc7 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -55,7 +55,7 @@ class box_factures_imp extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -70,7 +70,7 @@ class box_factures_imp extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -207,7 +207,7 @@ class box_factures_imp extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index 76d1414f53f..b4016bb3758 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -53,7 +53,7 @@ class box_ficheinter extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -68,7 +68,7 @@ class box_ficheinter extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=10) + function loadBox($max = 10) { global $user, $langs, $db, $conf; @@ -166,7 +166,7 @@ class box_ficheinter extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index c66c7f674c2..aa04d312f54 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -53,7 +53,7 @@ class box_fournisseurs extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -68,7 +68,7 @@ class box_fournisseurs extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; $langs->load("boxes"); @@ -160,7 +160,7 @@ class box_fournisseurs extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php index 138326d6c01..0cca908f5d8 100644 --- a/htdocs/core/boxes/box_goodcustomers.php +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -55,7 +55,7 @@ class box_goodcustomers extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -74,7 +74,7 @@ class box_goodcustomers extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -169,7 +169,7 @@ class box_goodcustomers extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index fd0b4e593c0..b288912915d 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -48,7 +48,7 @@ class box_graph_invoices_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_invoices_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -275,7 +275,7 @@ class box_graph_invoices_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index f13b19259c9..be4b8722cf2 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -48,7 +48,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -274,7 +274,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index fefa90c5fea..390499bd359 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -48,7 +48,7 @@ class box_graph_orders_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_orders_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -273,7 +273,7 @@ class box_graph_orders_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index e388d226fd2..098cbb4d038 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -48,7 +48,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -272,7 +272,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 9dc4c162e0f..bc4a3130151 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -51,7 +51,7 @@ class box_graph_product_distribution extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user, $conf; @@ -70,7 +70,7 @@ class box_graph_product_distribution extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -412,7 +412,7 @@ class box_graph_product_distribution extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index f28b0ec2c99..4abd3a8725a 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -48,7 +48,7 @@ class box_graph_propales_permonth extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -63,7 +63,7 @@ class box_graph_propales_permonth extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -276,7 +276,7 @@ class box_graph_propales_permonth extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php index 9ce7dd91605..34281d13c82 100644 --- a/htdocs/core/boxes/box_last_modified_ticket.php +++ b/htdocs/core/boxes/box_last_modified_ticket.php @@ -187,7 +187,7 @@ class box_last_modified_ticket extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php index a824a707168..a1a52c3070d 100644 --- a/htdocs/core/boxes/box_last_ticket.php +++ b/htdocs/core/boxes/box_last_ticket.php @@ -187,7 +187,7 @@ class box_last_ticket extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_lastlogin.php b/htdocs/core/boxes/box_lastlogin.php index c8149c6384b..d1ae1e7abf4 100644 --- a/htdocs/core/boxes/box_lastlogin.php +++ b/htdocs/core/boxes/box_lastlogin.php @@ -53,7 +53,7 @@ class box_lastlogin extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $conf; @@ -66,7 +66,7 @@ class box_lastlogin extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -109,7 +109,7 @@ class box_lastlogin extends ModeleBoxes * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index b0f999f54f1..8ffa90de5a4 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -55,7 +55,7 @@ class box_members extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -74,7 +74,7 @@ class box_members extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; $langs->load("boxes"); @@ -178,7 +178,7 @@ class box_members extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 3dd66eb1da2..bb64e46ecc4 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -55,7 +55,7 @@ class box_produits extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $conf, $user; @@ -73,7 +73,7 @@ class box_produits extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf, $hookmanager; @@ -226,7 +226,7 @@ class box_produits extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 896ceb93df6..b14cc2e659f 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -57,7 +57,7 @@ class box_produits_alerte_stock extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf,$user; @@ -75,7 +75,7 @@ class box_produits_alerte_stock extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf, $hookmanager; @@ -238,7 +238,7 @@ class box_produits_alerte_stock extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index a48543a00f6..3784294298a 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -51,7 +51,7 @@ class box_project extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $user, $langs; @@ -70,7 +70,7 @@ class box_project extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -195,7 +195,7 @@ class box_project extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 2b3426f21b8..aa3a9f8fb00 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -54,7 +54,7 @@ class box_propales extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -69,7 +69,7 @@ class box_propales extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -188,7 +188,7 @@ class box_propales extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index a4382f86048..2c58bdbe1c3 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -56,7 +56,7 @@ class box_prospect extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $conf, $user; @@ -74,7 +74,7 @@ class box_prospect extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -176,7 +176,7 @@ class box_prospect extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 708b781f092..264b95d5c65 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -54,7 +54,7 @@ class box_services_contracts extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -69,7 +69,7 @@ class box_services_contracts extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -241,7 +241,7 @@ class box_services_contracts extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index ed62e127816..0bae23fef95 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -52,7 +52,7 @@ class box_services_expired extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -67,7 +67,7 @@ class box_services_expired extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $user, $langs, $db, $conf; @@ -185,7 +185,7 @@ class box_services_expired extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index 4621950843e..142fd2820be 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -52,7 +52,7 @@ class box_supplier_orders extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param) + function __construct($db, $param) { global $user; @@ -184,7 +184,7 @@ class box_supplier_orders extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index cf1e799e486..bfcf5d2c301 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -54,7 +54,7 @@ class box_task extends ModeleBoxes * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { global $user, $langs; @@ -73,7 +73,7 @@ class box_task extends ModeleBoxes * @param int $max Maximum number of records to load * @return void */ - function loadBox($max=5) + function loadBox($max = 5) { global $conf, $user, $langs, $db; @@ -152,7 +152,7 @@ class box_task extends ModeleBoxes * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 9ae35403ec7..971c04848c7 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -115,7 +115,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box * @param DoliDB $db Database handler * @param string $param More parameters */ - function __construct($db,$param='') + function __construct($db, $param = '') { $this->db=$db; } @@ -204,7 +204,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box * @param int $nooutput No print, only return string * @return string */ - function showBox($head = null, $contents = null, $nooutput=0) + function showBox($head = null, $contents = null, $nooutput = 0) { global $langs, $user, $conf; @@ -385,7 +385,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box * @param array $forcedirwidget null=All default directories. This parameter is used by modulebuilder module only. * @return array Array list of widget */ - static function getWidgetsList($forcedirwidget=null) + static function getWidgetsList($forcedirwidget = null) { global $conf, $langs, $db; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 52d98790dcc..499bd8deb29 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -119,7 +119,7 @@ class CMailFile * @param string $sendcontext 'standard', 'emailing', ... (used to define with sending mode and parameters to use) * @param string $replyto Reply-to email (will be set to same value than From by default if not provided) */ - function __construct($subject, $to, $from, $msg, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=0, $errors_to='', $css='', $trackid='', $moreinheader='', $sendcontext='standard', $replyto='') + function __construct($subject, $to, $from, $msg, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = 0, $errors_to = '', $css = '', $trackid = '', $moreinheader = '', $sendcontext = 'standard', $replyto = '') { global $conf, $dolibarr_main_data_root; @@ -1178,7 +1178,7 @@ class CMailFile * @param array $mimefilename_list Tableau * @return string Chaine fichiers encodes */ - function write_files($filename_list,$mimetype_list,$mimefilename_list) + function write_files($filename_list, $mimetype_list, $mimefilename_list) { // phpcs:enable $out = ''; @@ -1259,7 +1259,7 @@ class CMailFile * @param int $port Example: 25, 465 * @return int Socket id if ok, 0 if KO */ - function check_server_port($host,$port) + function check_server_port($host, $port) { // phpcs:enable global $conf; @@ -1457,7 +1457,7 @@ class CMailFile * If format 3: '<john@doe.com>' or '"John Doe" <john@doe.com>' or '"=?UTF-8?B?Sm9obiBEb2U=?=" <john@doe.com>' * If format 4: 'John Doe' or 'john@doe.com' if no label exists */ - static function getValidAddress($address,$format,$encode=0,$maxnumberofemail=0) + static function getValidAddress($address, $format, $encode = 0, $maxnumberofemail = 0) { global $conf; diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index 86ffed48551..893c08b9257 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -59,7 +59,7 @@ class CSMSFile * @param int $priority Priority * @param int $class Class */ - function __construct($to,$from,$msg,$deliveryreceipt=0,$deferred=0,$priority=3,$class=1) + function __construct($to, $from, $msg, $deliveryreceipt = 0, $deferred = 0, $priority = 3, $class = 1) { global $conf; diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 4694a5e4652..f822b178536 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -60,7 +60,7 @@ class Canvas * @param DoliDB $db Database handler * @param string $actiontype Action type ('create', 'view', 'edit', 'list') */ - function __construct($db, $actiontype='view') + function __construct($db, $actiontype = 'view') { $this->db = $db; @@ -142,7 +142,7 @@ class Canvas * @param string $ref Object ref (if id not provided) * @return void */ - function assign_values(&$action='view', $id=0, $ref='') + function assign_values(&$action = 'view', $id = 0, $ref = '') { // phpcs:enable if (method_exists($this->control,'assign_values')) $this->control->assign_values($action, $id, $ref); @@ -204,7 +204,7 @@ class Canvas * @return mixed Return return code of doActions of canvas * @see http://wiki.dolibarr.org/index.php/Canvas_development */ - function doActions(&$action='view', $id=0) + function doActions(&$action = 'view', $id = 0) { if (method_exists($this->control,'doActions')) { diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index f07916a7511..e93af622a27 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -86,7 +86,7 @@ class Ccountry // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -165,7 +165,7 @@ class Ccountry // extends CommonObject * @param string $code Code * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($id,$code='') + function fetch($id, $code = '') { global $langs; $sql = "SELECT"; @@ -214,7 +214,7 @@ class Ccountry // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -285,7 +285,7 @@ class Ccountry // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 332f7e115ef..ddcce49cef4 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -82,7 +82,7 @@ class Comment extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -155,7 +155,7 @@ class Comment extends CommonObject * @param int $ref ref object * @return int <0 if KO, 0 if not found, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $langs; @@ -213,7 +213,7 @@ class Comment extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <=0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -278,7 +278,7 @@ class Comment extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 726e95214cb..d4007235295 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -69,7 +69,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ - function get_substitutionarray_user($user,$outputlangs) + function get_substitutionarray_user($user, $outputlangs) { // phpcs:enable global $conf; @@ -107,7 +107,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ - function get_substitutionarray_mysoc($mysoc,$outputlangs) + function get_substitutionarray_mysoc($mysoc, $outputlangs) { // phpcs:enable global $conf; @@ -167,7 +167,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ - function get_substitutionarray_thirdparty($object,$outputlangs) + function get_substitutionarray_thirdparty($object, $outputlangs) { // phpcs:enable global $conf; @@ -361,7 +361,7 @@ abstract class CommonDocGenerator * @param string $array_key Name of the key for return array * @return array Array of substitution */ - function get_substitutionarray_object($object,$outputlangs,$array_key='object') + function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable global $conf; @@ -604,7 +604,7 @@ abstract class CommonDocGenerator * @param array $array_key Name of the key for return array * @return array Array of substitution */ - function get_substitutionarray_shipment($object,$outputlangs,$array_key='object') + function get_substitutionarray_shipment($object, $outputlangs, $array_key = 'object') { // phpcs:enable global $conf; @@ -716,7 +716,7 @@ abstract class CommonDocGenerator * @param boolean $recursive Want to fetch child array or child object * @return array Array of substitution key->code */ - function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true) + function get_substitutionarray_each_var_object(&$object, $outputlangs, $recursive = true) { // phpcs:enable $array_other = array(); @@ -747,7 +747,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Lang object to use for output * @return array Substitution array */ - function fill_substitutionarray_with_extrafields($object,$array_to_fill,$extrafields,$array_key,$outputlangs) + function fill_substitutionarray_with_extrafields($object, $array_to_fill, $extrafields, $array_key, $outputlangs) { // phpcs:enable global $conf; @@ -834,7 +834,7 @@ abstract class CommonDocGenerator * @param int $hidebottom Hide bottom * @return void */ - function printRect($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0) + function printRect($pdf, $x, $y, $l, $h, $hidetop = 0, $hidebottom = 0) { if (empty($hidetop) || $hidetop==-1) $pdf->line($x, $y, $x+$l, $y); $pdf->line($x+$l, $y, $x+$l, $y+$h); @@ -870,7 +870,7 @@ abstract class CommonDocGenerator * @param int $hideref Do not show ref * @return null */ - function prepareArrayColumnField($object,$outputlangs,$hidedetails=0,$hidedesc=0,$hideref=0) + function prepareArrayColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf; diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index cd346dd95e2..5615ecf3b20 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -97,7 +97,7 @@ abstract class CommonInvoice extends CommonObject * @param int $multicurrency Return multicurrency_amount instead of amount * @return double Remain of amount to pay */ - function getRemainToPay($multicurrency=0) + function getRemainToPay($multicurrency = 0) { $alreadypaid=0; $alreadypaid+=$this->getSommePaiement($multicurrency); @@ -112,7 +112,7 @@ abstract class CommonInvoice extends CommonObject * @param int $multicurrency Return multicurrency_amount instead of amount * @return int Amount of payment already done, <0 if KO */ - function getSommePaiement($multicurrency=0) + function getSommePaiement($multicurrency = 0) { $table='paiement_facture'; $field='fk_facture'; @@ -149,7 +149,7 @@ abstract class CommonInvoice extends CommonObject * @param int $multicurrency Return multicurrency_amount instead of amount * @return int <0 if KO, Sum of deposits amount otherwise */ - function getSumDepositsUsed($multicurrency=0) + function getSumDepositsUsed($multicurrency = 0) { if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') { @@ -178,7 +178,7 @@ abstract class CommonInvoice extends CommonObject * @param int $multicurrency Return multicurrency_amount instead of amount * @return int <0 if KO, Sum of credit notes and deposits amount otherwise */ - function getSumCreditNotesUsed($multicurrency=0) + function getSumCreditNotesUsed($multicurrency = 0) { require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; @@ -233,7 +233,7 @@ abstract class CommonInvoice extends CommonObject * @param string $option filtre sur statut ('', 'validated', ...) * @return int <0 si KO, 0 si aucune facture ne remplace, id facture sinon */ - function getIdReplacingInvoice($option='') + function getIdReplacingInvoice($option = '') { $sql = 'SELECT rowid'; $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element; @@ -274,7 +274,7 @@ abstract class CommonInvoice extends CommonObject * @param string $filtertype 1 to filter on type of payment == 'PRE' * @return array Array with list of payments */ - function getListOfPayments($filtertype='') + function getListOfPayments($filtertype = '') { $retarray=array(); @@ -447,7 +447,7 @@ abstract class CommonInvoice extends CommonObject * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label of status */ - function getLibStatut($mode=0, $alreadypaid=-1) + function getLibStatut($mode = 0, $alreadypaid = -1) { return $this->LibStatut($this->paye, $this->statut, $mode, $alreadypaid, $this->type); } @@ -463,7 +463,7 @@ abstract class CommonInvoice extends CommonObject * @param int $type Type invoice * @return string Label of status */ - function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0) + function LibStatut($paye, $status, $mode = 0, $alreadypaid = -1, $type = 0) { // phpcs:enable global $langs; @@ -593,7 +593,7 @@ abstract class CommonInvoice extends CommonObject * @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. * @return date Date limite de reglement si ok, <0 si ko */ - function calculate_date_lim_reglement($cond_reglement=0) + function calculate_date_lim_reglement($cond_reglement = 0) { // phpcs:enable if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 945d257b8eb..d262bf87ac4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -417,7 +417,7 @@ abstract class CommonObject * @param string $ref_ext Ref ext of object to check * @return int <0 if KO, 0 if OK but not found, >0 if OK and exists */ - static function isExistingObject($element, $id, $ref='', $ref_ext='') + static function isExistingObject($element, $id, $ref = '', $ref_ext = '') { global $db,$conf; @@ -505,7 +505,7 @@ abstract class CommonObject * @param int $maxlen Maximum length * @return string String with full name */ - function getFullName($langs,$option=0,$nameorder=-1,$maxlen=0) + function getFullName($langs, $option = 0, $nameorder = -1, $maxlen = 0) { //print "lastname=".$this->lastname." name=".$this->name." nom=".$this->nom."<br>\n"; $lastname=$this->lastname; @@ -532,7 +532,7 @@ abstract class CommonObject * @param int $withregion 1=Add region into address string * @return string Full address string */ - function getFullAddress($withcountry=0, $sep="\n", $withregion=0) + function getFullAddress($withcountry = 0, $sep = "\n", $withregion = 0) { if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country))) { @@ -682,7 +682,7 @@ abstract class CommonObject * @param int $relativelink 0=Return full external link, 1=Return link relative to root of file * @return string Link or empty string if there is no download link */ - function getLastMainDocLink($modulepart, $initsharekey=0, $relativelink=0) + function getLastMainDocLink($modulepart, $initsharekey = 0, $relativelink = 0) { global $user, $dolibarr_main_url_root; @@ -779,7 +779,7 @@ abstract class CommonObject * @param int $notrigger Disable all triggers * @return int <0 if KO, >0 if OK */ - function add_contact($fk_socpeople, $type_contact, $source='external',$notrigger=0) + function add_contact($fk_socpeople, $type_contact, $source = 'external', $notrigger = 0) { // phpcs:enable global $user,$langs; @@ -901,7 +901,7 @@ abstract class CommonObject * @param string $source Nature of contact ('internal' or 'external') * @return int >0 if OK, <0 if KO */ - function copy_linked_contact($objFrom, $source='internal') + function copy_linked_contact($objFrom, $source = 'internal') { // phpcs:enable $contacts = $objFrom->liste_contact(-1, $source); @@ -926,7 +926,7 @@ abstract class CommonObject * @param int $fk_socpeople Id of soc_people to update (not modified if 0) * @return int <0 if KO, >= 0 if OK */ - function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0) + function update_contact($rowid, $statut, $type_contact_id = 0, $fk_socpeople = 0) { // phpcs:enable // Insert into database @@ -955,7 +955,7 @@ abstract class CommonObject * @param int $notrigger Disable all triggers * @return int >0 if OK, <0 if KO */ - function delete_contact($rowid, $notrigger=0) + function delete_contact($rowid, $notrigger = 0) { // phpcs:enable global $user; @@ -994,7 +994,7 @@ abstract class CommonObject * @param string $code Type of contact (code or id) * @return int >0 if OK, <0 if KO */ - function delete_linked_contact($source='',$code='') + function delete_linked_contact($source = '', $code = '') { // phpcs:enable $temp = array(); @@ -1033,7 +1033,7 @@ abstract class CommonObject * @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...) * @return array|int Array of contacts, -1 if error */ - function liste_contact($statut=-1,$source='external',$list=0,$code='') + function liste_contact($statut = -1, $source = 'external', $list = 0, $code = '') { // phpcs:enable global $langs; @@ -1143,7 +1143,7 @@ abstract class CommonObject * @param string $code Type of contact (Example: 'CUSTOMER', 'SERVICE') * @return array Array list of type of contacts (id->label if option=0, code->label if option=1) */ - function liste_type_contact($source='internal', $order='position', $option=0, $activeonly=0, $code='') + function liste_type_contact($source = 'internal', $order = 'position', $option = 0, $activeonly = 0, $code = '') { // phpcs:enable global $langs; @@ -1197,7 +1197,7 @@ abstract class CommonObject * @param int $status limited to a certain status * @return array List of id for such contacts */ - function getIdContact($source,$code,$status=0) + function getIdContact($source, $code, $status = 0) { global $conf; @@ -1257,7 +1257,7 @@ abstract class CommonObject * @param int $contactid Id du contact. Use this->contactid if empty. * @return int <0 if KO, >0 if OK */ - function fetch_contact($contactid=null) + function fetch_contact($contactid = null) { // phpcs:enable if (empty($contactid)) $contactid=$this->contactid; @@ -1278,7 +1278,7 @@ abstract class CommonObject * @param int $force_thirdparty_id Force thirdparty id * @return int <0 if KO, >0 if OK */ - function fetch_thirdparty($force_thirdparty_id=0) + function fetch_thirdparty($force_thirdparty_id = 0) { // phpcs:enable global $conf; @@ -1542,7 +1542,7 @@ abstract class CommonObject * @return int <0 if KO, >0 if OK * @see updateExtraField() */ - function setValueFrom($field, $value, $table='', $id=null, $format='', $id_field='', $fuser=null, $trigkey='', $fk_user_field='fk_user_modif') + function setValueFrom($field, $value, $table = '', $id = null, $format = '', $id_field = '', $fuser = null, $trigkey = '', $fk_user_field = 'fk_user_modif') { global $user,$langs,$conf; @@ -1621,7 +1621,7 @@ abstract class CommonObject * @param int $nodbprefix Do not include DB prefix to forge table name * @return int <0 if KO, >0 if OK */ - function load_previous_next_ref($filter, $fieldid, $nodbprefix=0) + function load_previous_next_ref($filter, $fieldid, $nodbprefix = 0) { // phpcs:enable global $conf, $user; @@ -1745,7 +1745,7 @@ abstract class CommonObject * @return array Array of id of contacts (if source=external or internal) * Array of id of third parties with at least one contact on object (if source=thirdparty) */ - function getListContactId($source='external') + function getListContactId($source = 'external') { $contactAlreadySelected = array(); $tab = $this->liste_contact(-1,$source); @@ -1892,7 +1892,7 @@ abstract class CommonObject * @param int $mode mode 1 : amounts in company currency will be recalculated, mode 2 : amounts in foreign currency * @return int >0 if OK, <0 if KO */ - function setMulticurrencyRate($rate, $mode=1) + function setMulticurrencyRate($rate, $mode = 1) { dol_syslog(get_class($this).'::setMulticurrencyRate('.$id.')'); if ($this->statut >= 0 || $this->element == 'societe') @@ -2068,7 +2068,7 @@ abstract class CommonObject * * @return int 1 if OK, 0 if KO */ - function setShippingMethod($shipping_method_id, $notrigger=false, $userused=null) + function setShippingMethod($shipping_method_id, $notrigger = false, $userused = null) { global $user; @@ -2192,7 +2192,7 @@ abstract class CommonObject * @param User $userused Object user * @return int 1 if OK, 0 if KO */ - function setBankAccount($fk_account, $notrigger=false, $userused=null) + function setBankAccount($fk_account, $notrigger = false, $userused = null) { global $user; @@ -2257,7 +2257,7 @@ abstract class CommonObject * @param boolean $fk_parent_line Table with fk_parent_line field or not * @return int <0 if KO, >0 if OK */ - function line_order($renum=false, $rowidorder='ASC', $fk_parent_line=true) + function line_order($renum = false, $rowidorder = 'ASC', $fk_parent_line = true) { // phpcs:enable if (! $this->table_element_line) @@ -2376,7 +2376,7 @@ abstract class CommonObject * @param boolean $fk_parent_line Table with fk_parent_line field or not * @return void */ - function line_up($rowid, $fk_parent_line=true) + function line_up($rowid, $fk_parent_line = true) { // phpcs:enable $this->line_order(false, 'ASC', $fk_parent_line); @@ -2396,7 +2396,7 @@ abstract class CommonObject * @param boolean $fk_parent_line Table with fk_parent_line field or not * @return void */ - function line_down($rowid, $fk_parent_line=true) + function line_down($rowid, $fk_parent_line = true) { // phpcs:enable $this->line_order(false, 'ASC', $fk_parent_line); @@ -2418,7 +2418,7 @@ abstract class CommonObject * @param int $rang Position * @return void */ - function updateRangOfLine($rowid,$rang) + function updateRangOfLine($rowid, $rang) { $fieldposition = 'rang'; if (in_array($this->table_element_line, array('ecm_files', 'emailcollector_emailcollectoraction'))) $fieldposition = 'position'; @@ -2457,7 +2457,7 @@ abstract class CommonObject * @param int $rang Position * @return void */ - function updateLineUp($rowid,$rang) + function updateLineUp($rowid, $rang) { if ($rang > 1) { @@ -2491,7 +2491,7 @@ abstract class CommonObject * @param int $max Max * @return void */ - function updateLineDown($rowid,$rang,$max) + function updateLineDown($rowid, $rang, $max) { if ($rang < $max) { @@ -2563,7 +2563,7 @@ abstract class CommonObject * @param int $fk_parent_line Parent line id * @return int Max value of rang in table of lines */ - function line_max($fk_parent_line=0) + function line_max($fk_parent_line = 0) { // phpcs:enable // Search the last rang with fk_parent_line @@ -2645,7 +2645,7 @@ abstract class CommonObject * @param string $suffix '', '_public' or '_private' * @return int <0 if KO, >0 if OK */ - function update_note($note, $suffix='') + function update_note($note, $suffix = '') { // phpcs:enable global $user; @@ -2716,7 +2716,7 @@ abstract class CommonObject * @param Societe $seller If roundingadjust is '0' or '1' or maybe 'auto', it means we recalculate total for lines before calculating total for object and for this, we need seller object. * @return int <0 if KO, >0 if OK */ - function update_price($exclspec=0,$roundingadjust='none',$nodatabaseupdate=0,$seller=null) + function update_price($exclspec = 0, $roundingadjust = 'none', $nodatabaseupdate = 0, $seller = null) { // phpcs:enable global $conf, $hookmanager, $action; @@ -2953,7 +2953,7 @@ abstract class CommonObject * @return int <=0 if KO, >0 if OK * @see fetchObjectLinked(), updateObjectLinked(), deleteObjectLinked() */ - function add_object_linked($origin=null, $origin_id=null) + function add_object_linked($origin = null, $origin_id = null) { // phpcs:enable $origin = (! empty($origin) ? $origin : $this->origin); @@ -3014,7 +3014,7 @@ abstract class CommonObject * @return int <0 if KO, >0 if OK * @see add_object_linked(), updateObjectLinked(), deleteObjectLinked() */ - function fetchObjectLinked($sourceid=null,$sourcetype='',$targetid=null,$targettype='',$clause='OR',$alsosametype=1,$orderby='sourcetype',$loadalsoobjects=1) + function fetchObjectLinked($sourceid = null, $sourcetype = '', $targetid = null, $targettype = '', $clause = 'OR', $alsosametype = 1, $orderby = 'sourcetype', $loadalsoobjects = 1) { global $conf; @@ -3218,7 +3218,7 @@ abstract class CommonObject * @return int >0 if OK, <0 if KO * @see add_object_linked(), fetObjectLinked(), deleteObjectLinked() */ - function updateObjectLinked($sourceid=null, $sourcetype='', $targetid=null, $targettype='') + function updateObjectLinked($sourceid = null, $sourcetype = '', $targetid = null, $targettype = '') { $updatesource=false; $updatetarget=false; @@ -3265,7 +3265,7 @@ abstract class CommonObject * @return int >0 if OK, <0 if KO * @see add_object_linked, updateObjectLinked, fetchObjectLinked */ - function deleteObjectLinked($sourceid=null, $sourcetype='', $targetid=null, $targettype='', $rowid='') + function deleteObjectLinked($sourceid = null, $sourcetype = '', $targetid = null, $targettype = '', $rowid = '') { $deletesource=false; $deletetarget=false; @@ -3326,7 +3326,7 @@ abstract class CommonObject * @param string $trigkey Trigger key to use for trigger * @return int <0 if KO, >0 if OK */ - function setStatut($status, $elementId=null, $elementType='', $trigkey='') + function setStatut($status, $elementId = null, $elementType = '', $trigkey = '') { global $user,$langs,$conf; @@ -3414,7 +3414,7 @@ abstract class CommonObject * @param string $ref Record ref * @return int <0 if KO, 0 if nothing done, >0 if OK */ - function getCanvas($id=0,$ref='') + function getCanvas($id = 0, $ref = '') { global $conf; @@ -3474,7 +3474,7 @@ abstract class CommonObject * @param int $id Force id of object * @return int <0 if KO, 0 if not used, >0 if already used */ - function isObjectUsed($id=0) + function isObjectUsed($id = 0) { global $langs; @@ -3543,7 +3543,7 @@ abstract class CommonObject * @param int $predefined -1=All, 0=Count free product/service only, 1=Count predefined product/service only, 2=Count predefined product, 3=Count predefined service * @return int <0 if KO, 0 if no predefined products, nb of lines with predefined products if found */ - function hasProductsOrServices($predefined=-1) + function hasProductsOrServices($predefined = -1) { $nb=0; @@ -3881,7 +3881,7 @@ abstract class CommonObject * @param int $dateSelector 1=Show also date range input fields * @return void */ - function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0) + function printObjectLines($action, $seller, $buyer, $selected = 0, $dateSelector = 0) { global $conf, $hookmanager, $langs, $user; // TODO We should not use global var for this ! @@ -4035,7 +4035,7 @@ abstract class CommonObject * @param int $extrafieldsline Object of extrafield line attribute * @return void */ - function printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected=0,$extrafieldsline=0) + function printObjectLine($action, $line, $var, $num, $i, $dateSelector, $seller, $buyer, $selected = 0, $extrafieldsline = 0) { global $conf,$langs,$user,$object,$hookmanager; global $form,$bc,$bcdd; @@ -4153,7 +4153,7 @@ abstract class CommonObject * @param string $restrictlist ''=All lines, 'services'=Restrict to services only * @return void */ - function printOriginLinesList($restrictlist='') + function printOriginLinesList($restrictlist = '') { global $langs, $hookmanager, $conf; @@ -4207,7 +4207,7 @@ abstract class CommonObject * @param string $restrictlist ''=All lines, 'services'=Restrict to services only (strike line if not) * @return void */ - function printOriginLine($line, $var, $restrictlist='') + function printOriginLine($line, $var, $restrictlist = '') { global $langs, $conf; @@ -4353,7 +4353,7 @@ abstract class CommonObject * @param int $mandatory Mandatory or not * @return int <=0 if KO, >0 if OK */ - function add_element_resource($resource_id, $resource_type, $busy=0, $mandatory=0) + function add_element_resource($resource_id, $resource_type, $busy = 0, $mandatory = 0) { // phpcs:enable $this->db->begin(); @@ -4397,7 +4397,7 @@ abstract class CommonObject * @param int $notrigger Disable all triggers * @return int >0 if OK, <0 if KO */ - function delete_resource($rowid, $element, $notrigger=0) + function delete_resource($rowid, $element, $notrigger = 0) { // phpcs:enable global $user; @@ -4460,7 +4460,7 @@ abstract class CommonObject * @return int >0 if OK, <0 if KO * @see addFileIntoDatabaseIndex() */ - protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null) + protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null) { global $conf, $langs, $user; @@ -4742,7 +4742,7 @@ abstract class CommonObject * @param string $alternatevalue Alternate value to use * @return string|string[] Default value (can be an array if the GETPOST return an array) **/ - function getDefaultCreateValueFor($fieldname, $alternatevalue=null) + function getDefaultCreateValueFor($fieldname, $alternatevalue = null) { global $conf, $_POST; @@ -4818,7 +4818,7 @@ abstract class CommonObject * @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label(). Deprecated. Function must be called without parameters. * @return int <0 if error, 0 if no values of extrafield to find nor found, 1 if an attribute is found and value loaded */ - function fetch_optionals($rowid=null, $optionsArray=null) + function fetch_optionals($rowid = null, $optionsArray = null) { // phpcs:enable if (empty($rowid)) $rowid=$this->id; @@ -4962,7 +4962,7 @@ abstract class CommonObject * @return int -1=error, O=did nothing, 1=OK * @see updateExtraField(), setValueFrom() */ - function insertExtraFields($trigger='', $userused=null) + function insertExtraFields($trigger = '', $userused = null) { global $conf,$langs,$user; @@ -5208,7 +5208,7 @@ abstract class CommonObject * @return int -1=error, O=did nothing, 1=OK * @see setValueFrom(), insertExtraFields() */ - function updateExtraField($key, $trigger=null, $userused=null) + function updateExtraField($key, $trigger = null, $userused = null) { global $conf,$langs,$user; @@ -5342,7 +5342,7 @@ abstract class CommonObject * @param string|int $morecss Value for css to define style/length of field. May also be a numeric. * @return string */ - function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keyprefix='', $morecss=0) + function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0) { global $conf,$langs,$form; @@ -5953,7 +5953,7 @@ abstract class CommonObject * @param mixed $showsize Value for css to define size. May also be a numeric. * @return string */ - function showOutputField($val, $key, $value, $moreparam='', $keysuffix='', $keyprefix='', $showsize=0) + function showOutputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $showsize = 0) { global $conf,$langs,$form; @@ -6324,7 +6324,7 @@ abstract class CommonObject * @param string $onetrtd All fields in same tr td * @return string */ - function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='', $onetrtd=0) + function showOptionals($extrafields, $mode = 'view', $params = null, $keysuffix = '', $keyprefix = '', $onetrtd = 0) { global $db, $conf, $langs, $action, $form; @@ -6531,7 +6531,7 @@ abstract class CommonObject * @param int $ignoreerrors Ignore errors. Return true even if errors. We need this when replacement can fails like for categories (categorie of old thirdparty may already exists on new one) * @return bool True if success, False if error */ - public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors=0) + public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors = 0) { foreach ($tables as $table) { @@ -6647,7 +6647,7 @@ abstract class CommonObject * @param int $usesharelink Use the public shared link of image (if not available, the 'nophoto' image will be shown instead) * @return string Html code to show photo. Number of photos shown is saved in this->nbphoto */ - function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfilename=0, $showaction=0, $maxHeight=120, $maxWidth=160, $nolink=0, $notitle=0, $usesharelink=0) + function show_photos($modulepart, $sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0, $notitle = 0, $usesharelink = 0) { // phpcs:enable global $conf,$user,$langs; @@ -7349,7 +7349,7 @@ abstract class CommonObject * @param int $forcechilddeletion 0=no, 1=Force deletion of children * @return int <=0 if KO, >0 if OK */ - public function deleteCommon(User $user, $notrigger=false, $forcechilddeletion=0) + public function deleteCommon(User $user, $notrigger = false, $forcechilddeletion = 0) { $error=0; diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index 91d4245ff88..891ea5e4bc6 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -57,7 +57,7 @@ abstract class CommonObjectLine extends CommonObject * @param string $type Label type (long or short) * @return string|int <0 if ko, label if ok */ - public function getLabelOfUnit($type='long') + public function getLabelOfUnit($type = 'long') { global $langs; diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index d5bf6f3317e..2cbf6a9ecb7 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -107,7 +107,7 @@ abstract class CommonStickerGenerator * @param string $outputdir Output directory for pdf file * @return int 1=OK, 0=KO */ - abstract function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir=''); + abstract function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = ''); // phpcs:enable /** @@ -118,7 +118,7 @@ abstract class CommonStickerGenerator * @param array $param Associative array containing label content and optional parameters * @return void */ - abstract function addSticker(&$pdf,$outputlangs,$param); + abstract function addSticker(&$pdf, $outputlangs, $param); // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** @@ -129,7 +129,7 @@ abstract class CommonStickerGenerator * @param int $pt point * @return void */ - function Set_Char_Size(&$pdf,$pt) + function Set_Char_Size(&$pdf, $pt) { // phpcs:enable if ($pt > 3) { @@ -152,7 +152,7 @@ abstract class CommonStickerGenerator * @param int $nbPointilles Nb pointilles * @return void */ - function _Pointille(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$nbPointilles=15) + function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15) { // phpcs:enable $pdf->SetLineWidth($epaisseur); @@ -195,7 +195,7 @@ abstract class CommonStickerGenerator * @param int $taille Size * @return void */ - function _Croix(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=4) + function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4) { // phpcs:enable $pdf->SetDrawColor(192,192,192); diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index 5129ac54ece..b6cff34b0f3 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -123,7 +123,7 @@ class CoreObject extends CommonObject * @param bool $try_to_load Force the fetch if an id is given * @return int */ - public function addChild($tabName, $id=0, $key='id', $try_to_load = false) + public function addChild($tabName, $id = 0, $key = 'id', $try_to_load = false) { if(!empty($id)) { @@ -154,7 +154,7 @@ class CoreObject extends CommonObject * @param string $key Attribute name of the object id * @return bool */ - public function removeChild($tabName, $id, $key='id') + public function removeChild($tabName, $id, $key = 'id') { foreach ($this->{$tabName} as &$object) { @@ -370,7 +370,7 @@ class CoreObject extends CommonObject * @param string $format Output date format * @return string */ - public function getDate($field, $format='') + public function getDate($field, $format = '') { if(empty($this->{$field})) return ''; else diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 4320446d7b5..6ad6523f199 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -92,7 +92,7 @@ class Cstate // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -168,7 +168,7 @@ class Cstate // extends CommonObject * @param string $code Code * @return int <0 if KO, >0 if OK */ - function fetch($id,$code='') + function fetch($id, $code = '') { global $langs; $sql = "SELECT"; @@ -212,7 +212,7 @@ class Cstate // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -281,7 +281,7 @@ class Cstate // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index db8ed461727..ffaccbfe964 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -76,7 +76,7 @@ class Ctypent // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -166,7 +166,7 @@ class Ctypent // extends CommonObject * @param string $label Label * @return int <0 if KO, >0 if OK */ - function fetch($id,$code='',$label='') + function fetch($id, $code = '', $label = '') { global $langs; $sql = "SELECT"; @@ -214,7 +214,7 @@ class Ctypent // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -285,7 +285,7 @@ class Ctypent // extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php index 95c642772e2..4ceb7ed37c8 100644 --- a/htdocs/core/class/ctyperesource.class.php +++ b/htdocs/core/class/ctyperesource.class.php @@ -159,7 +159,7 @@ class Ctyperesource * * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id,$code='',$label='') + public function fetch($id, $code = '', $label = '') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -223,7 +223,7 @@ class Ctyperesource * * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 48c426a830f..b47a324838a 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -109,7 +109,7 @@ class DiscountAbsolute * @param int $fk_invoice_supplier_source fk_invoice_supplier_source * @return int <0 if KO, =0 if not found, >0 if OK */ - function fetch($rowid, $fk_facture_source=0, $fk_invoice_supplier_source=0) + function fetch($rowid, $fk_facture_source = 0, $fk_invoice_supplier_source = 0) { global $conf; @@ -396,7 +396,7 @@ class DiscountAbsolute * @param int $rowidinvoice Invoice id (To use discount as a credit note to reduc payment of invoice) * @return int <0 if KO, >0 if OK */ - function link_to_invoice($rowidline,$rowidinvoice) + function link_to_invoice($rowidline, $rowidinvoice) { // phpcs:enable // Check parameters @@ -484,7 +484,7 @@ class DiscountAbsolute * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return int <0 if KO, amount otherwise */ - function getAvailableDiscounts($company='', $user='',$filter='', $maxvalue=0, $discount_type=0) + function getAvailableDiscounts($company = '', $user = '', $filter = '', $maxvalue = 0, $discount_type = 0) { global $conf; @@ -527,7 +527,7 @@ class DiscountAbsolute * @param int $multicurrency Return multicurrency_amount instead of amount * @return int <0 if KO, Sum of credit notes and deposits amount otherwise */ - function getSumDepositsUsed($invoice, $multicurrency=0) + function getSumDepositsUsed($invoice, $multicurrency = 0) { dol_syslog(get_class($this)."::getSumDepositsUsed", LOG_DEBUG); @@ -573,7 +573,7 @@ class DiscountAbsolute * @param int $multicurrency Return multicurrency_amount instead of amount * @return int <0 if KO, Sum of credit notes and excess received amount otherwise */ - function getSumCreditNotesUsed($invoice, $multicurrency=0) + function getSumCreditNotesUsed($invoice, $multicurrency = 0) { dol_syslog(get_class($this)."::getSumCreditNotesUsed", LOG_DEBUG); @@ -619,7 +619,7 @@ class DiscountAbsolute * @param string $option Where to link to ('invoice' or 'discount') * @return string String with URL */ - function getNomUrl($withpicto,$option='invoice') + function getNomUrl($withpicto, $option = 'invoice') { global $langs; diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 548721be05f..5d375e420f4 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -64,7 +64,7 @@ class DolEditor * @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%') * @param int $readonly 0=Read/Edit, 1=Read only */ - function __construct($htmlname, $content, $width='', $height=200, $toolbarname='Basic', $toolbarlocation='In', $toolbarstartexpanded=false, $uselocalbrowser=true, $okforextendededitor=true, $rows=0, $cols=0, $readonly=0) + function __construct($htmlname, $content, $width = '', $height = 200, $toolbarname = 'Basic', $toolbarlocation = 'In', $toolbarstartexpanded = false, $uselocalbrowser = true, $okforextendededitor = true, $rows = 0, $cols = 0, $readonly = 0) { global $conf,$langs; @@ -149,7 +149,7 @@ class DolEditor * @param string $option For ACE editor, set the source language ('html', 'php', 'javascript', ...) * @return void|string */ - function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='', $option='') + function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $titlecontent = '', $option = '') { // phpcs:enable global $conf,$langs; diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index a57e4e844ec..d5b486f3430 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -41,7 +41,7 @@ class DolGeoIP * @param string $type 'country' or 'city' * @param string $datfile Data file */ - function __construct($type,$datfile) + function __construct($type, $datfile) { if ($type == 'country') { diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 42386494a37..c7dc7991a4a 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -88,7 +88,7 @@ class DolGraph * * @param string $library 'jflot' (default) or 'artichow' (no more supported) */ - function __construct($library='jflot') + function __construct($library = 'jflot') { global $conf; global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; @@ -658,7 +658,7 @@ class DolGraph * @param string $fileurl Url path to show image if saved onto disk * @return integer|null */ - function draw($file, $fileurl='') + function draw($file, $fileurl = '') { if (empty($file)) { @@ -690,7 +690,7 @@ class DolGraph * @param string $fileurl Url path to show image if saved onto disk * @return void */ - private function draw_artichow($file,$fileurl) + private function draw_artichow($file, $fileurl) { // phpcs:enable global $artichow_defaultfont; @@ -1127,7 +1127,7 @@ class DolGraph * @param int $shownographyet Show graph to say there is not enough data * @return string HTML string to show graph */ - function show($shownographyet=0) + function show($shownographyet = 0) { global $langs; @@ -1149,7 +1149,7 @@ class DolGraph * @param string $defaultsize Value we want as default size * @return int Value of width or height to use by default */ - static function getDefaultGraphSizeForStats($direction,$defaultsize='') + static function getDefaultGraphSizeForStats($direction, $defaultsize = '') { global $conf; diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index f38afc67807..19de8abb3f6 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -311,7 +311,7 @@ class dolReceiptPrinter extends Escpos * @param string $htmlname select html name * @return int 0 if OK; >0 if KO */ - function selectTypePrinter($selected='', $htmlname='printertypeid') + function selectTypePrinter($selected = '', $htmlname = 'printertypeid') { global $langs; @@ -335,7 +335,7 @@ class dolReceiptPrinter extends Escpos * @param string $htmlname select html name * @return int 0 if OK; >0 if KO */ - function selectProfilePrinter($selected='', $htmlname='printerprofileid') + function selectProfilePrinter($selected = '', $htmlname = 'printerprofileid') { global $langs; diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 3a1fba460c4..3ce9623a05d 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -277,7 +277,7 @@ class EmailSenderProfile extends CommonObject * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) * @return string String with URL */ - function getNomUrl($withpicto=0) + function getNomUrl($withpicto = 0) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -309,7 +309,7 @@ class EmailSenderProfile extends CommonObject * @param int $withpicto Add download picto into link * @return string HTML link to file */ - function getDirectExternalLink($withpicto=0) + function getDirectExternalLink($withpicto = 0) { return 'todo'; } @@ -320,7 +320,7 @@ class EmailSenderProfile extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -333,7 +333,7 @@ class EmailSenderProfile extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { global $langs; diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index 68e029dae4b..ecaaba8f4c7 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -183,7 +183,7 @@ class Events // extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -220,7 +220,7 @@ class Events // extends CommonObject * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index cc1fae502b3..6d26522bb97 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -171,7 +171,7 @@ class ExtraFields * @param string $enabled Condition to have the field enabled or not * @return int <=0 if KO, >0 if OK */ - function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique=0, $required=0, $default_value='', $param='', $alwayseditable=0, $perms='', $list='-1', $help='', $computed='', $entity='', $langfile='', $enabled='1') + function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique = 0, $required = 0, $default_value = '', $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $computed = '', $entity = '', $langfile = '', $enabled = '1') { if (empty($attrname)) return -1; if (empty($label)) return -1; @@ -221,7 +221,7 @@ class ExtraFields * @param string $computed Computed value * @return int <=0 if KO, >0 if OK */ - private function create($attrname, $type='varchar', $length=255, $elementtype='member', $unique=0, $required=0, $default_value='',$param='', $perms='', $list='0', $computed='') + private function create($attrname, $type = 'varchar', $length = 255, $elementtype = 'member', $unique = 0, $required = 0, $default_value = '', $param = '', $perms = '', $list = '0', $computed = '') { if ($elementtype == 'thirdparty') $elementtype='societe'; if ($elementtype == 'contact') $elementtype='socpeople'; @@ -317,7 +317,7 @@ class ExtraFields * @param string $enabled Condition to have the field enabled or not * @return int <=0 if KO, >0 if OK */ - private function create_label($attrname, $label='', $type='', $pos=0, $size=0, $elementtype='member', $unique=0, $required=0, $param='', $alwayseditable=0, $perms='', $list='-1', $help='', $default='', $computed='',$entity='', $langfile='', $enabled='1') + private function create_label($attrname, $label = '', $type = '', $pos = 0, $size = 0, $elementtype = 'member', $unique = 0, $required = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1') { // phpcs:enable global $conf,$user; @@ -414,7 +414,7 @@ class ExtraFields * @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...) * @return int < 0 if KO, 0 if nothing is done, 1 if OK */ - function delete($attrname, $elementtype='member') + function delete($attrname, $elementtype = 'member') { if ($elementtype == 'thirdparty') $elementtype='societe'; if ($elementtype == 'contact') $elementtype='socpeople'; @@ -472,7 +472,7 @@ class ExtraFields * @param string $elementtype Element type ('member', 'product', 'thirdparty', ...) * @return int < 0 if KO, 0 if nothing is done, 1 if OK */ - private function delete_label($attrname, $elementtype='member') + private function delete_label($attrname, $elementtype = 'member') { // phpcs:enable global $conf; @@ -529,7 +529,7 @@ class ExtraFields * @param int $totalizable Is extrafield totalizable on list * @return int >0 if OK, <=0 if KO */ - function update($attrname, $label, $type, $length, $elementtype, $unique=0, $required=0, $pos=0, $param='', $alwayseditable=0, $perms='', $list='', $help='', $default='', $computed='', $entity='', $langfile='', $enabled='1', $totalizable=0) + function update($attrname, $label, $type, $length, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0) { if ($elementtype == 'thirdparty') $elementtype='societe'; if ($elementtype == 'contact') $elementtype='socpeople'; @@ -639,7 +639,7 @@ class ExtraFields * @param int $totalizable Is extrafield totalizable on list * @return int <=0 if KO, >0 if OK */ - private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0,$perms='',$list='0',$help='',$default='',$computed='',$entity='',$langfile='',$enabled='1', $totalizable=0) + private function update_label($attrname, $label, $type, $size, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '0', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0) { // phpcs:enable global $conf, $user; @@ -770,7 +770,7 @@ class ExtraFields * @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED. Deprecated. Should not be required. * @return array Array of attributes keys+label for all extra fields. */ - function fetch_name_optionals_label($elementtype,$forceload=false) + function fetch_name_optionals_label($elementtype, $forceload = false) { // phpcs:enable global $conf; @@ -893,7 +893,7 @@ class ExtraFields * @param string $extrafieldsobjectkey If defined (for example $object->table_element), use the new method to get extrafields data * @return string */ - function showInputField($key, $value, $moreparam='', $keysuffix='', $keyprefix='', $morecss='', $objectid=0, $extrafieldsobjectkey='') + function showInputField($key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '', $objectid = 0, $extrafieldsobjectkey = '') { global $conf,$langs,$form; @@ -1508,7 +1508,7 @@ class ExtraFields * @param string $extrafieldsobjectkey If defined (for example $object->table_element), use the new method to get extrafields data * @return string Formated value */ - function showOutputField($key, $value, $moreparam='', $extrafieldsobjectkey='') + function showOutputField($key, $value, $moreparam = '', $extrafieldsobjectkey = '') { global $conf,$langs; @@ -1820,7 +1820,7 @@ class ExtraFields * @param string $extrafieldsobjectkey If defined, use the new method to get extrafields data * @return string Formated value */ - function getAlignFlag($key, $extrafieldsobjectkey='') + function getAlignFlag($key, $extrafieldsobjectkey = '') { global $conf,$langs; @@ -1890,7 +1890,7 @@ class ExtraFields * @param string $onlykey Only following key is filled. When we make update of only one extrafield ($action = 'update_extras'), calling page must must set this to avoid to have other extrafields being reset. * @return int 1 if array_options set, 0 if no value, -1 if error (field required missing for example) */ - function setOptionalsFromPost($extralabels, &$object, $onlykey='') + function setOptionalsFromPost($extralabels, &$object, $onlykey = '') { global $_POST, $langs; $nofillrequired='';// For error when required field left blank @@ -1989,7 +1989,7 @@ class ExtraFields * @param string $keysuffix Suffix string to add into name and id of field (can be used to avoid duplicate names) * @return array|int array_options set or 0 if no value */ - function getOptionalsFromPost($extrafieldsobjectkey, $keyprefix='', $keysuffix='') + function getOptionalsFromPost($extrafieldsobjectkey, $keyprefix = '', $keysuffix = '') { global $_POST; diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index 027fdda0514..66f6e19102c 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -41,7 +41,7 @@ class FileUpload * @param int $fk_element fk_element * @param string $element element */ - function __construct($options=null,$fk_element=null,$element=null) + function __construct($options = null, $fk_element = null, $element = null) { global $db, $conf; global $object; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index c1c288cbf79..cf6a3cf345d 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -264,7 +264,7 @@ class Fiscalyear extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -277,7 +277,7 @@ class Fiscalyear extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/core/class/google.class.php b/htdocs/core/class/google.class.php index 615729ba9c3..797f0a14af1 100644 --- a/htdocs/core/class/google.class.php +++ b/htdocs/core/class/google.class.php @@ -44,7 +44,7 @@ class GoogleAPI * @param DoliDB $db Database handler * @param string $key Google key */ - function __construct($db,$key) + function __construct($db, $key) { $this->db=$db; $this->key=$key; diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 98193f1e32e..47edef4011d 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -136,7 +136,7 @@ class HookManager * All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller. * $this->error or this->errors are also defined by class called by this function if error. */ - function executeHooks($method, $parameters=array(), &$object='', &$action='') + function executeHooks($method, $parameters = array(), &$object = '', &$action = '') { if (! is_array($this->hooks) || empty($this->hooks)) return ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 228c9fa1538..c737c7b791e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -102,7 +102,7 @@ class Form * @param string $paramid Key of parameter for id ('id', 'socid') * @return string HTML edit field */ - function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0, $notabletag=0, $paramid='id') + function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id') { global $conf,$langs; @@ -164,7 +164,7 @@ class Form * @param string $paramid Key of parameter for id ('id', 'socid') * @return string HTML edit field */ - function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='', $notabletag=0, $formatfunc='', $paramid='id') + function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id') { global $conf,$langs,$db; @@ -306,7 +306,7 @@ class Form * @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') * @return string HTML edit in place */ - private function editInPlace($object, $value, $htmlname, $condition, $inputType='textarea', $editvalue=null, $extObject=null, $custommsg=null) + private function editInPlace($object, $value, $htmlname, $condition, $inputType = 'textarea', $editvalue = null, $extObject = null, $custommsg = null) { global $conf; @@ -441,7 +441,7 @@ class Form * @see Use function textwithpicto if you can. * TODO Move this as static as soon as everybody use textwithpicto or @Form::textwithtooltip */ - function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger='', $forcenowrap=0) + function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0) { global $conf; @@ -526,7 +526,7 @@ class Form * @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only) * @return string HTML code of text, picto, tooltip */ - function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger='', $forcenowrap=0) + function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger = '', $forcenowrap = 0) { global $conf, $langs; @@ -578,7 +578,7 @@ class Form * @param int $alwaysvisible 1=select button always visible * @return string Select list */ - function selectMassAction($selected, $arrayofaction, $alwaysvisible=0) + function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0) { global $conf,$langs,$hookmanager; @@ -678,7 +678,7 @@ class Form * @param int $addspecialentries 1=Add dedicated entries for group of countries (like 'European Economic Community', ...) * @return string HTML string with select */ - function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0, $addspecialentries=0) + function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0) { // phpcs:enable global $conf,$langs,$mysoc; @@ -791,7 +791,7 @@ class Form * @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @return string HTML string with select and input */ - function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array()) + function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array()) { // phpcs:enable global $conf,$langs; @@ -884,7 +884,7 @@ class Form * @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service') * @return void */ - function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0) + function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0) { // phpcs:enable global $db,$langs,$user,$conf; @@ -987,7 +987,7 @@ class Form * @param int $showempty Add an empty field * @return void */ - function select_type_fees($selected='',$htmlname='type',$showempty=0) + function select_type_fees($selected = '', $htmlname = 'type', $showempty = 0) { // phpcs:enable global $user, $langs; @@ -1031,7 +1031,7 @@ class Form * @return string Return select box for thirdparty. * @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0) */ - function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0) + function select_thirdparty($selected = '', $htmlname = 'socid', $filter = '', $limit = 20, $ajaxoptions = array(), $forcecombo = 0) { // phpcs:enable return $this->select_thirdparty_list($selected,$htmlname,$filter,1,0,$forcecombo,array(),'',0, $limit); @@ -1057,7 +1057,7 @@ class Form * @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter) * @return string HTML string with select box for thirdparty. */ - function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='', $selected_input_value='', $hidelabel=1, $ajaxoptions=array(), $multiple=false) + function select_company($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $limit = 0, $morecss = 'minwidth100', $moreparam = '', $selected_input_value = '', $hidelabel = 1, $ajaxoptions = array(), $multiple = false) { // phpcs:enable global $conf,$user,$langs; @@ -1121,7 +1121,7 @@ class Form * @param bool $multiple add [] in the name of element and add 'multiple' attribut * @return string HTML string with */ - function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty='', $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='', $multiple=false) + function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false) { // phpcs:enable global $conf,$user,$langs; @@ -1295,7 +1295,7 @@ class Form * @param int $maxvalue Max value for lines that can be selected * @return int Return number of qualifed lines in list */ - function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0) + function select_remises($selected, $htmlname, $filter, $socid, $maxvalue = 0) { // phpcs:enable global $langs,$conf; @@ -1382,7 +1382,7 @@ class Form * @return int <0 if KO, Nb of contact in list if OK * @deprected You can use selectcontacts directly (warning order of param was changed) */ - function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $events=array(), $options_only=false, $moreparam='', $htmlid='') + function select_contacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $showsoc = 0, $forcecombo = 0, $events = array(), $options_only = false, $moreparam = '', $htmlid = '') { // phpcs:enable print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid); @@ -1412,7 +1412,7 @@ class Form * @param bool $multiple add [] in the name of element and add 'multiple' attribut * @return int <0 if KO, Nb of contact in list if OK */ - function selectcontacts($socid, $selected='', $htmlname='contactid', $showempty=0, $exclude='', $limitto='', $showfunction=0, $moreclass='', $options_only=false, $showsoc=0, $forcecombo=0, $events=array(), $moreparam='', $htmlid='', $multiple=false) + function selectcontacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $options_only = false, $showsoc = 0, $forcecombo = 0, $events = array(), $moreparam = '', $htmlid = '', $multiple = false) { global $conf,$langs,$hookmanager,$action; @@ -1559,7 +1559,7 @@ class Form * @deprecated Use select_dolusers instead * @see select_dolusers() */ - function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0') + function select_users($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0') { // phpcs:enable print $this->select_dolusers($selected,$htmlname,$show_empty,$exclude,$disabled,$include,$enableonly,$force_entity); @@ -1589,7 +1589,7 @@ class Form * @return string HTML select string * @see select_dolgroups */ - function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='', $morecss='', $noactive=0, $outputmode=0, $multiple=false) + function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false) { // phpcs:enable global $conf,$user,$langs; @@ -1797,7 +1797,7 @@ class Form * @return string HTML select string * @see select_dolgroups */ - function select_dolusers_forevent($action='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $showproperties=0, $listofuserid=array(), $listofcontactid=array(), $listofotherid=array()) + function select_dolusers_forevent($action = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $showproperties = 0, $listofuserid = array(), $listofcontactid = array(), $listofotherid = array()) { // phpcs:enable global $conf, $user, $langs; @@ -1890,7 +1890,7 @@ class Form * @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) * @return void */ - function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $hidepriceinlabel=0, $warehouseStatus='', $selected_combinations = array()) + function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array()) { // phpcs:enable global $langs,$conf; @@ -2032,7 +2032,7 @@ class Form * 'warehouseinternal' = select products from warehouses for internal correct/transfer only * @return array Array of keys for json */ - function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0,$showempty='1',$forcecombo=0,$morecss='',$hidepriceinlabel=0, $warehouseStatus='') + function select_produits_list($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $filterkey = '', $status = 1, $finished = 2, $outputmode = 0, $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '') { // phpcs:enable global $langs,$conf,$user,$db; @@ -2324,7 +2324,7 @@ class Form * @param int $hidepriceinlabel Hide price in label * @return void */ - private function constructProductListOption(&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel=0) + private function constructProductListOption(&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel = 0) { global $langs,$conf,$user,$db; @@ -2546,7 +2546,7 @@ class Form * @param string $morecss More CSS * @return void */ - function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0, $morecss='') + function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '') { // phpcs:enable global $langs,$conf; @@ -2592,7 +2592,7 @@ class Form * @param string $morecss Add more CSS * @return array Array of keys for json */ - function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0,$morecss='') + function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '') { // phpcs:enable global $langs,$conf,$db; @@ -2816,7 +2816,7 @@ class Form * @param int $selected_supplier Pre-selected supplier if more than 1 result * @return void */ - function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='') + function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '') { // phpcs:enable global $langs,$conf; @@ -2930,7 +2930,7 @@ class Form * @param int $showempty Add an empty field * @return integer|null */ - function select_address($selected, $socid, $htmlname='address_id',$showempty=0) + function select_address($selected, $socid, $htmlname = 'address_id', $showempty = 0) { // phpcs:enable // looking for users @@ -3081,7 +3081,7 @@ class Form * @param int $addempty Add empty entry * @return void */ - function selectAvailabilityDelay($selected='',$htmlname='availid',$filtertype='',$addempty=0) + function selectAvailabilityDelay($selected = '', $htmlname = 'availid', $filtertype = '', $addempty = 0) { global $langs,$user; @@ -3167,7 +3167,7 @@ class Form * @param int $addempty Add an empty entry * @return void */ - function selectInputReason($selected='',$htmlname='demandreasonid',$exclude='',$addempty=0) + function selectInputReason($selected = '', $htmlname = 'demandreasonid', $exclude = '', $addempty = 0) { global $langs,$user; @@ -3263,7 +3263,7 @@ class Form * @param string $morecss Add more CSS on select tag * @return void */ - function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='') + function select_conditions_paiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '') { // phpcs:enable global $langs, $user, $conf; @@ -3310,7 +3310,7 @@ class Form * @param string $morecss Add more CSS on select tag * @return void */ - function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='') + function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '') { // phpcs:enable global $langs,$user; @@ -3364,7 +3364,7 @@ class Form * @param string $htmlname Nom de la zone select * @return string Code of HTML select to chose tax or not */ - function selectPriceBaseType($selected='',$htmlname='price_base_type') + function selectPriceBaseType($selected = '', $htmlname = 'price_base_type') { global $langs; @@ -3402,7 +3402,7 @@ class Form * @param string $moreattrib To add more attribute on select * @return void */ - function selectShippingMethod($selected='',$htmlname='shipping_method_id',$filtre='',$useempty=0,$moreattrib='') + function selectShippingMethod($selected = '', $htmlname = 'shipping_method_id', $filtre = '', $useempty = 0, $moreattrib = '') { global $langs, $conf, $user; @@ -3455,7 +3455,7 @@ class Form * @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @return void */ - function formSelectShippingMethod($page, $selected='', $htmlname='shipping_method_id', $addempty=0) + function formSelectShippingMethod($page, $selected = '', $htmlname = 'shipping_method_id', $addempty = 0) { global $langs, $db; @@ -3540,7 +3540,7 @@ class Form * @param int $showempty Add a nempty line * @return string HTML select */ - function selectUnits($selected = '', $htmlname = 'units', $showempty=0) + function selectUnits($selected = '', $htmlname = 'units', $showempty = 0) { global $langs; @@ -3591,7 +3591,7 @@ class Form * @param int $showcurrency Show currency in label * @return int <0 if error, Num of bank account found if OK (0, 1, 2, ...) */ - function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0) + function select_comptes($selected = '', $htmlname = 'accountid', $statut = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0) { // phpcs:enable global $langs, $conf; @@ -3661,7 +3661,7 @@ class Form * @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @return void */ - function formSelectAccount($page, $selected='', $htmlname='fk_account', $addempty=0) + function formSelectAccount($page, $selected = '', $htmlname = 'fk_account', $addempty = 0) { global $langs; if ($htmlname != "none") { @@ -3699,7 +3699,7 @@ class Form * @return string * @see select_categories */ - function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0) + function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $excludeafterid = 0, $outputmode = 0) { // phpcs:enable global $conf, $langs; @@ -3790,7 +3790,7 @@ class Form * @deprecated * @see formconfirm() */ - function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) + function form_confirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = "", $useajax = 0, $height = 170, $width = 500) { // phpcs:enable dol_syslog(__METHOD__ . ': using form_confirm is deprecated. Use formconfim instead.', LOG_WARNING); @@ -3821,7 +3821,7 @@ class Form * @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a <form> section. * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form */ - function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice='', $useajax=0, $height=210, $width=500, $disableformtag=0) + function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 210, $width = 500, $disableformtag = 0) { global $langs,$conf; global $useglobalvars; @@ -4101,7 +4101,7 @@ class Form * @param int $nooutput No print is done. String is returned. * @return string Return html content */ - function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0) + function form_project($page, $socid, $selected = '', $htmlname = 'projectid', $discard_closed = 0, $maxlength = 20, $forcefocus = 0, $nooutput = 0) { // phpcs:enable global $langs; @@ -4157,7 +4157,7 @@ class Form * @param int $addempty Add empty entry * @return void */ - function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0) + function form_conditions_reglement($page, $selected = '', $htmlname = 'cond_reglement_id', $addempty = 0) { // phpcs:enable global $langs; @@ -4192,7 +4192,7 @@ class Form * @param int $addempty Ajoute entree vide * @return void */ - function form_availability($page, $selected='', $htmlname='availability', $addempty=0) + function form_availability($page, $selected = '', $htmlname = 'availability', $addempty = 0) { // phpcs:enable global $langs; @@ -4227,7 +4227,7 @@ class Form * @param int $addempty Add empty entry * @return void */ - function formInputReason($page, $selected='', $htmlname='demandreason', $addempty=0) + function formInputReason($page, $selected = '', $htmlname = 'demandreason', $addempty = 0) { global $langs; if ($htmlname != "none") @@ -4271,7 +4271,7 @@ class Form * @return string * @see selectDate */ - function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) + function form_date($page, $selected, $htmlname, $displayhour = 0, $displaymin = 0, $nooutput = 0) { // phpcs:enable global $langs; @@ -4312,7 +4312,7 @@ class Form * @param array $include List of users id to include * @return void */ - function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='') + function form_users($page, $selected = '', $htmlname = 'userid', $exclude = '', $include = '') { // phpcs:enable global $langs; @@ -4353,7 +4353,7 @@ class Form * @param int $addempty 1=Add empty entry * @return void */ - function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1, $addempty=0) + function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0) { // phpcs:enable global $langs; @@ -4387,7 +4387,7 @@ class Form * @param string $htmlname Name of select html field * @return void */ - function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code') + function form_multicurrency_code($page, $selected = '', $htmlname = 'multicurrency_code') { // phpcs:enable global $langs; @@ -4417,7 +4417,7 @@ class Form * @param string $currency Currency code to explain the rate * @return void */ - function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx', $currency='') + function form_multicurrency_rate($page, $rate = '', $htmlname = 'multicurrency_tx', $currency = '') { // phpcs:enable global $langs, $mysoc, $conf; @@ -4466,7 +4466,7 @@ class Form * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return void */ - function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0) + function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter = '', $maxvalue = 0, $more = '', $hidelist = 0, $discount_type = 0) { // phpcs:enable global $conf,$langs; @@ -4557,7 +4557,7 @@ class Form * @param string $htmlname Name of HTML select. If 'none', we just show contact link. * @return void */ - function form_contacts($page, $societe, $selected='', $htmlname='contactid') + function form_contacts($page, $societe, $selected = '', $htmlname = 'contactid') { // phpcs:enable global $langs, $conf; @@ -4608,7 +4608,7 @@ class Form * @param int $nooutput No print output. Return it only. * @return void */ - function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $nooutput=0) + function form_thirdparty($page, $selected = '', $htmlname = 'socid', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $events = array(), $nooutput = 0) { // phpcs:enable global $langs; @@ -4651,7 +4651,7 @@ class Form * @deprecated * @return void */ - function select_currency($selected='',$htmlname='currency_id') + function select_currency($selected = '', $htmlname = 'currency_id') { // phpcs:enable print $this->selectCurrency($selected,$htmlname); @@ -4664,7 +4664,7 @@ class Form * @param string $htmlname name of HTML select list * @return string */ - function selectCurrency($selected='',$htmlname='currency_id') + function selectCurrency($selected = '', $htmlname = 'currency_id') { global $conf,$langs,$user; @@ -4707,7 +4707,7 @@ class Form * @param integer $useempty 1=Add empty line * @return string */ - function selectMultiCurrency($selected='', $htmlname='multicurrency_code', $useempty=0) + function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0) { global $db,$conf,$langs,$user; @@ -4844,7 +4844,7 @@ class Form * @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key * @return string */ - function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0) + function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = '', $societe_acheteuse = '', $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0) { // phpcs:enable global $langs,$conf,$mysoc; @@ -5044,7 +5044,7 @@ class Form * @deprecated * @see form_date, select_month, select_year, select_dayofweek */ - function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') + function select_date($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $nooutput = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '') { // phpcs:enable $retstring = $this->selectDate($set_time, $prefix, $h, $m, $empty, $form_name, $d, $addnowlink, $disabled, $fullday, $addplusone, $adddateof); @@ -5077,7 +5077,7 @@ class Form * @return string Html for selectDate * @see form_date, select_month, select_year, select_dayofweek */ - function selectDate($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') + function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '') { global $conf,$langs; @@ -5440,7 +5440,7 @@ class Form * @param int $nooutput Do not output html string but return it * @return string|void */ - function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0) + function select_duration($prefix, $iSecond = '', $disabled = 0, $typehour = 'select', $minunderhours = 0, $nooutput = 0) { // phpcs:enable global $langs; @@ -5528,7 +5528,7 @@ class Form * @return string Return HTML string * @see selectForFormsList select_thirdparty */ - function selectForForms($objectdesc, $htmlname, $preselectedvalue, $showempty='', $searchkey='', $placeholder='', $morecss='', $moreparams='', $forcecombo=0) + function selectForForms($objectdesc, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0) { global $conf, $user; @@ -5598,7 +5598,7 @@ class Form * @return string Return HTML string * @see selectForForms */ - function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty='', $searchkey='', $placeholder='', $morecss='', $moreparams='', $forcecombo=0, $outputmode=0) + function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0) { global $conf, $langs, $user; @@ -5735,7 +5735,7 @@ class Form * @return string HTML select string. * @see multiselectarray, selectArrayAjax, selectArrayFilter */ - static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='',$disablebademail=0, $nohtmlescape=0) + static function selectarray($htmlname, $array, $id = '', $show_empty = 0, $key_in_label = 0, $value_as_key = 0, $moreparam = '', $translate = 0, $maxlen = 0, $disabled = 0, $sort = '', $morecss = '', $addjscombo = 0, $moreparamonempty = '', $disablebademail = 0, $nohtmlescape = 0) { global $conf, $langs; @@ -5845,7 +5845,7 @@ class Form * @return string HTML select string * @see selectArrayFilter, ajax_combobox in ajax.lib.php */ - static function selectArrayAjax($htmlname, $url, $id='', $moreparam='', $moreparamtourl='', $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0) + static function selectArrayAjax($htmlname, $url, $id = '', $moreparam = '', $moreparamtourl = '', $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0) { global $conf, $langs; global $delayedhtmlcontent; @@ -5947,7 +5947,7 @@ class Form * @return string HTML select string * @see selectArrayAjax, ajax_combobox in ajax.lib.php */ - static function selectArrayFilter($htmlname, $array, $id='', $moreparam='', $disableFiltering=0, $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0) + static function selectArrayFilter($htmlname, $array, $id = '', $moreparam = '', $disableFiltering = 0, $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0) { global $conf, $langs; global $delayedhtmlcontent; @@ -6065,7 +6065,7 @@ class Form * @return string HTML multiselect string * @see selectarray, selectArrayAjax, selectArrayFilter */ - static function multiselectarray($htmlname, $array, $selected=array(), $key_in_label=0, $value_as_key=0, $morecss='', $translate=0, $width=0, $moreattrib='', $elemtype='', $placeholder='', $addjscombo=-1) + static function multiselectarray($htmlname, $array, $selected = array(), $key_in_label = 0, $value_as_key = 0, $morecss = '', $translate = 0, $width = 0, $moreattrib = '', $elemtype = '', $placeholder = '', $addjscombo = -1) { global $conf, $langs; @@ -6264,7 +6264,7 @@ class Form * @param int $rendermode 0=Default, use multiselect. 1=Emulate multiselect (recommended) * @return string String with categories */ - function showCategories($id, $type, $rendermode=0) + function showCategories($id, $type, $rendermode = 0) { global $db; @@ -6309,7 +6309,7 @@ class Form * @param array $compatibleImportElementsList Array of compatibles elements object for "import from" action * @return int <0 if KO, >=0 if OK */ - function showLinkedObjectBlock($object, $morehtmlright='',$compatibleImportElementsList=false) + function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = false) { global $conf,$langs,$hookmanager; global $bc; @@ -6457,7 +6457,7 @@ class Form * @param array $excludelinksto Do not show links of this type, for exemple array('order') or array('supplier_order'). null or array() if no exclusion. * @return string <0 if KO, >0 if OK */ - function showLinkToObjectBlock($object, $restrictlinksto=array(), $excludelinksto=array()) + function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array()) { global $conf, $langs, $hookmanager; global $bc; @@ -6630,7 +6630,7 @@ class Form * @param int $useempty 1=Add empty line * @return string See option */ - function selectyesno($htmlname, $value='', $option=0, $disabled=false, $useempty=0) + function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0) { global $langs; @@ -6672,7 +6672,7 @@ class Form * @param int $useempty Affiche valeur vide dans liste * @return void */ - function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0) + function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0) { // phpcs:enable $sql = "SELECT rowid, label"; @@ -6730,7 +6730,7 @@ class Form * @param string $morehtmlright More html code to show after ref. * @return string Portion HTML with ref + navigation buttons */ - function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlstatus='',$morehtmlright='') + function showrefnav($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $morehtmlright = '') { global $langs,$conf,$hookmanager; @@ -6880,7 +6880,7 @@ class Form * @param int $width Width of photo * @return string HTML code to output barcode */ - function showbarcode(&$object,$width=100) + function showbarcode(&$object, $width = 100) { global $conf; @@ -6917,7 +6917,7 @@ class Form * @param string $forcecapture Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if empty. * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0, $forcecapture='') + static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '') { global $conf,$langs; @@ -7076,7 +7076,7 @@ class Form * @return string * @see select_dolusers */ - function select_dolgroups($selected='', $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity='0', $multiple=false) + function select_dolgroups($selected = '', $htmlname = 'groupid', $show_empty = 0, $exclude = '', $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $multiple = false) { // phpcs:enable global $conf,$user,$langs; @@ -7191,7 +7191,7 @@ class Form * @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes * @return string */ - function showCheckAddButtons($cssclass='checkforaction', $calljsfunction=0) + function showCheckAddButtons($cssclass = 'checkforaction', $calljsfunction = 0) { global $conf, $langs; @@ -7230,7 +7230,7 @@ class Form * @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes * @return string */ - function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0) + function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0) { $out.=$this->showFilterButtons(); if ($addcheckuncheckall) @@ -7252,7 +7252,7 @@ class Form * @param array $params param to give * @return string */ - function selectExpenseCategories($selected='', $htmlname='fk_c_exp_tax_cat', $useempty=0, $excludeid=array(), $target='', $default_selected=0, $params=array()) + function selectExpenseCategories($selected = '', $htmlname = 'fk_c_exp_tax_cat', $useempty = 0, $excludeid = array(), $target = '', $default_selected = 0, $params = array()) { global $db, $conf, $langs, $user; @@ -7341,7 +7341,7 @@ class Form * @param integer $useempty 1=Add empty line * @return string */ - function selectExpenseRanges($selected='', $htmlname='fk_range', $useempty=0) + function selectExpenseRanges($selected = '', $htmlname = 'fk_range', $useempty = 0) { global $db,$conf,$langs; @@ -7378,7 +7378,7 @@ class Form * @param integer $useid 0=use 'code' as key, 1=use 'id' as key * @return string */ - function selectExpense($selected='', $htmlname='fk_c_type_fees', $useempty=0, $allchoice=1, $useid=0) + function selectExpense($selected = '', $htmlname = 'fk_c_type_fees', $useempty = 0, $allchoice = 1, $useid = 0) { global $db,$langs; diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 5ffaf0463a6..41476fb4966 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -70,7 +70,7 @@ class FormAccounting extends Form * @param int $disabledajaxcombo Disable ajax combo box. * @return string String with HTML select */ - function select_journal($selectid, $htmlname = 'journal', $nature=0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='', $disabledajaxcombo=0) + function select_journal($selectid, $htmlname = 'journal', $nature = 0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss = 'maxwidth300 maxwidthonsmartphone', $usecache = '', $disabledajaxcombo = 0) { // phpcs:enable global $conf,$langs; @@ -151,7 +151,7 @@ class FormAccounting extends Form * @param int $allcountries All countries * @return void */ - function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=0, $help=1, $allcountries=0) + function select_accounting_category($selected = '', $htmlname = 'account_category', $useempty = 0, $maxlen = 0, $help = 1, $allcountries = 0) { // phpcs:enable global $db,$langs,$user,$mysoc; @@ -267,7 +267,7 @@ class FormAccounting extends Form * @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache. * @return string String with HTML select */ - function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='') + function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss = 'maxwidth300 maxwidthonsmartphone', $usecache = '') { // phpcs:enable global $conf, $langs; @@ -356,7 +356,7 @@ class FormAccounting extends Form * @param string $morecss More css * @return string String with HTML select */ - function select_auxaccount($selectid, $htmlname='account_num_aux', $showempty=0, $morecss='maxwidth200') + function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $morecss = 'maxwidth200') { // phpcs:enable diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 15db641a5ec..2f345bb20e4 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -64,7 +64,7 @@ class FormActions * @param string $morecss More css on select field * @return void */ - function form_select_status_action($formname, $selected, $canedit=1, $htmlname='complete', $showempty=0, $onlyselect=0, $morecss='maxwidth100') + function form_select_status_action($formname, $selected, $canedit = 1, $htmlname = 'complete', $showempty = 0, $onlyselect = 0, $morecss = 'maxwidth100') { // phpcs:enable global $langs,$conf; @@ -168,7 +168,7 @@ class FormActions * @param string $morehtmlright More html text on right of title line * @return int <0 if KO, >=0 if OK */ - function showactions($object, $typeelement, $socid=0, $forceshowtitle=0, $morecss='listactions', $max=0, $moreparambacktopage='', $morehtmlright='') + function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlright = '') { global $langs,$conf,$user; global $bc; @@ -327,7 +327,7 @@ class FormActions * @param int $nooutput 1=No output * @return string */ - function select_type_actions($selected='', $htmlname='actioncode', $excludetype='', $onlyautoornot=0, $hideinfohelp=0, $multiselect=0, $nooutput=0) + function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0) { // phpcs:enable global $langs,$user,$form,$conf; diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 32a421a7b61..e96ec257c93 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -59,7 +59,7 @@ class FormAdmin * @param int $forcecombo Force to use combo box (so no ajax beautify effect) * @return string Return HTML select string with list of languages */ - function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0, $forcecombo=0) + function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = null, $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0) { // phpcs:enable global $langs; @@ -131,7 +131,7 @@ class FormAdmin * @param string $moreattrib More attributes on html select tag * @return integer|null */ - function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib='') + function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib = '') { // phpcs:enable global $langs,$conf; @@ -293,7 +293,7 @@ class FormAdmin * @param string $htmlname Nom de la zone select * @return void */ - function select_timezone($selected,$htmlname) + function select_timezone($selected, $htmlname) { // phpcs:enable global $langs,$conf; @@ -349,7 +349,7 @@ class FormAdmin * @param int $showempty Add empty value * @return string Return HTML output */ - function select_paper_format($selected='',$htmlname='paperformat_id',$filter=0,$showempty=0) + function select_paper_format($selected = '', $htmlname = 'paperformat_id', $filter = 0, $showempty = 0) { // phpcs:enable global $langs; diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index 65a3213bad8..f7a7199ab03 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -60,7 +60,7 @@ class FormBarCode * @param int $idForm Id du formulaire * @return string HTML select string */ - function setBarcodeEncoder($selected,$barcodelist,$code_id,$idForm='formbarcode') + function setBarcodeEncoder($selected, $barcodelist, $code_id, $idForm = 'formbarcode') { global $conf, $langs; @@ -123,7 +123,7 @@ class FormBarCode * @return void * @deprecated */ - function select_barcode_type($selected='', $htmlname='barcodetype_id', $useempty=0) + function select_barcode_type($selected = '', $htmlname = 'barcodetype_id', $useempty = 0) { // phpcs:enable print $this->selectBarcodeType($selected, $htmlname, $useempty); @@ -137,7 +137,7 @@ class FormBarCode * @param int $useempty Display empty value in select * @return string */ - function selectBarcodeType($selected='', $htmlname='barcodetype_id', $useempty=0) + function selectBarcodeType($selected = '', $htmlname = 'barcodetype_id', $useempty = 0) { global $langs, $conf; @@ -193,7 +193,7 @@ class FormBarCode * @return void * @deprecated */ - function form_barcode_type($page, $selected='', $htmlname='barcodetype_id') + function form_barcode_type($page, $selected = '', $htmlname = 'barcodetype_id') { // phpcs:enable print $this->formBarcodeType($page, $selected, $htmlname); @@ -207,7 +207,7 @@ class FormBarCode * @param string $htmlname Nom du formulaire select * @return string */ - function formBarcodeType($page, $selected='', $htmlname='barcodetype_id') + function formBarcodeType($page, $selected = '', $htmlname = 'barcodetype_id') { global $langs, $conf; $out = ''; diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 9d0bded74b6..065b241095a 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -60,7 +60,7 @@ class FormCompany * @param string $filter Add a SQL filter to select * @return array Array of types */ - function typent_array($mode=0, $filter='') + function typent_array($mode = 0, $filter = '') { // phpcs:enable global $langs,$mysoc; @@ -103,7 +103,7 @@ class FormCompany * @param string $filter Add a SQL filter to select * @return array Array of types d'effectifs */ - function effectif_array($mode=0, $filter='') + function effectif_array($mode = 0, $filter = '') { // phpcs:enable $effs = array(); @@ -145,7 +145,7 @@ class FormCompany * @param int $empty Add empty value in list * @return void */ - function form_prospect_level($page, $selected='', $htmlname='prospect_level_id', $empty=0) + function form_prospect_level($page, $selected = '', $htmlname = 'prospect_level_id', $empty = 0) { // phpcs:enable global $user, $langs; @@ -199,7 +199,7 @@ class FormCompany * @param string $htmlname Id of department * @return void */ - function select_departement($selected='',$country_codeid=0, $htmlname='state_id') + function select_departement($selected = '', $country_codeid = 0, $htmlname = 'state_id') { // phpcs:enable print $this->select_state($selected,$country_codeid, $htmlname); @@ -219,7 +219,7 @@ class FormCompany * @return string String with HTML select * @see select_country */ - function select_state($selected='',$country_codeid=0, $htmlname='state_id') + function select_state($selected = '', $country_codeid = 0, $htmlname = 'state_id') { // phpcs:enable global $conf,$langs,$user; @@ -332,7 +332,7 @@ class FormCompany * @param string $htmlname Name of HTML select field * @return void */ - function select_region($selected='',$htmlname='region_id') + function select_region($selected = '', $htmlname = 'region_id') { // phpcs:enable global $conf,$langs; @@ -398,7 +398,7 @@ class FormCompany * @param string $morecss Add more css on SELECT element * @return string String with HTML select */ - function select_civility($selected='',$htmlname='civility_id',$morecss='maxwidth100') + function select_civility($selected = '', $htmlname = 'civility_id', $morecss = 'maxwidth100') { // phpcs:enable global $conf,$langs,$user; @@ -459,7 +459,7 @@ class FormCompany * @deprecated Use print xxx->select_juridicalstatus instead * @see select_juridicalstatus() */ - function select_forme_juridique($selected='', $country_codeid=0, $filter='') + function select_forme_juridique($selected = '', $country_codeid = 0, $filter = '') { // phpcs:enable print $this->select_juridicalstatus($selected, $country_codeid, $filter); @@ -476,7 +476,7 @@ class FormCompany * @param string $htmlname HTML name of select * @return string String with HTML select */ - function select_juridicalstatus($selected='', $country_codeid=0, $filter='', $htmlname='forme_juridique_code') + function select_juridicalstatus($selected = '', $country_codeid = 0, $filter = '', $htmlname = 'forme_juridique_code') { // phpcs:enable global $conf,$langs,$user; @@ -581,7 +581,7 @@ class FormCompany * @param string $morecss More CSS on select component * @return int The selected third party ID */ - function selectCompaniesForNewContact($object, $var_id, $selected='', $htmlname='newcompany', $limitto='', $forceid=0, $moreparam='', $morecss='') + function selectCompaniesForNewContact($object, $var_id, $selected = '', $htmlname = 'newcompany', $limitto = '', $forceid = 0, $moreparam = '', $morecss = '') { global $conf, $langs; @@ -740,7 +740,7 @@ class FormCompany * @param string $morecss Add more css to select component * @return void */ - function selectTypeContact($object, $selected, $htmlname = 'type', $source='internal', $sortorder='position', $showempty=0, $morecss='') + function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '') { global $user, $langs; @@ -774,7 +774,7 @@ class FormCompany * @param string $morecss More css * @return string */ - function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0, $moreattrib='',$morecss='') + function select_ziptown($selected = '', $htmlname = 'zipcode', $fields = '', $fieldsize = 0, $disableautocomplete = 0, $moreattrib = '', $morecss = '') { // phpcs:enable global $conf; @@ -805,7 +805,7 @@ class FormCompany * @param string $morecss More css * @return string HTML string with prof id */ - function get_input_id_prof($idprof,$htmlname,$preselected,$country_code,$morecss='maxwidth100onsmartphone quatrevingtpercent') + function get_input_id_prof($idprof, $htmlname, $preselected, $country_code, $morecss = 'maxwidth100onsmartphone quatrevingtpercent') { // phpcs:enable global $conf,$langs; diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index 5bdb00cfc40..f09758aec2d 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -60,7 +60,7 @@ class FormContract * @param int $showempty Show empty line * @return int Nbr of project if OK, <0 if KO */ - function select_contract($socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) + function select_contract($socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1) { // phpcs:enable global $db,$user,$conf,$langs; @@ -177,7 +177,7 @@ class FormContract * @param int $showempty Show empty line * @return int Nbr of project if OK, <0 if KO */ - function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) + function formSelectContract($page, $socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1) { global $langs; diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php index 94747481cb0..13cf88e9aa2 100644 --- a/htdocs/core/class/html.formcron.class.php +++ b/htdocs/core/class/html.formcron.class.php @@ -58,7 +58,7 @@ class FormCron extends Form * @param integer $readonly Select is read only or not * @return string HTML select field */ - function select_typejob($htmlname,$selected=0,$readonly=0) + function select_typejob($htmlname, $selected = 0, $readonly = 0) { // phpcs:enable global $langs; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index d8af718bb04..5bd33520420 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -77,7 +77,7 @@ class FormFile * @param string $sectiondir If upload must be done inside a particular directory (is sectiondir defined, sectionid must not be) * @return int <0 if KO, >0 if OK */ - function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=1, $savingdocmask='', $linkfiles=1, $htmlname='formuserfile', $accept='', $sectiondir='') + function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = '', $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile', $accept = '', $sectiondir = '') { // phpcs:enable global $conf,$langs, $hookmanager; @@ -255,7 +255,7 @@ class FormFile * @return int <0 if KO, number of shown files if OK * @deprecated Use print xxx->showdocuments() instead. */ - function show_documents($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='') + function show_documents($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed = 0, $modelselected = '', $allowgenifempty = 1, $forcenomultilang = 0, $iconPDF = 0, $notused = 0, $noform = 0, $param = '', $title = '', $buttonlabel = '', $codelang = '') { // phpcs:enable $this->numoffiles=0; @@ -288,7 +288,7 @@ class FormFile * @param int $hideifempty Hide section of generated files if there is no file * @return string Output string with HTML array of documents (might be empty string) */ - function showdocuments($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='',$morepicto='',$object=null,$hideifempty=0) + function showdocuments($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed = 0, $modelselected = '', $allowgenifempty = 1, $forcenomultilang = 0, $iconPDF = 0, $notused = 0, $noform = 0, $param = '', $title = '', $buttonlabel = '', $codelang = '', $morepicto = '', $object = null, $hideifempty = 0) { // Deprecation warning if (! empty($iconPDF)) { @@ -887,7 +887,7 @@ class FormFile * @param string $filter Filter filenames on this regex string (Example: '\.pdf$') * @return string Output string with HTML link of documents (might be empty string). This also fill the array ->infofiles */ - function getDocumentsLink($modulepart, $modulesubdir, $filedir, $filter='') + function getDocumentsLink($modulepart, $modulesubdir, $filedir, $filter = '') { global $conf, $langs; @@ -1022,7 +1022,7 @@ class FormFile * @return int <0 if KO, nb of files shown if OK * @see list_of_autoecmfiles */ - function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permonobject=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0, $permtoeditline=-1,$upload_dir='',$sortfield='',$sortorder='ASC', $disablemove=1, $addfilterfields=0) + function list_of_documents($filearray, $object, $modulepart, $param = '', $forcedownload = 0, $relativepath = '', $permonobject = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $title = '', $url = '', $showrelpart = 0, $permtoeditline = -1, $upload_dir = '', $sortfield = '', $sortorder = 'ASC', $disablemove = 1, $addfilterfields = 0) { // phpcs:enable global $user, $conf, $langs, $hookmanager; @@ -1412,7 +1412,7 @@ class FormFile * @return int <0 if KO, nb of files shown if OK * @see list_of_documents */ - function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload=0, $relativepath='', $permtodelete=1, $useinecm=0, $textifempty='', $maxlength=0, $url='', $addfilterfields=0) + function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload = 0, $relativepath = '', $permtodelete = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $url = '', $addfilterfields = 0) { // phpcs:enable global $user, $conf, $langs, $form; @@ -1695,7 +1695,7 @@ class FormFile * @param string $param More param to add into URL * @return int Number of links */ - public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null, $param='') + public function listOfLinks($object, $permtodelete = 1, $action = null, $selected = null, $param = '') { global $user, $conf, $langs, $user; global $sortfield, $sortorder; @@ -1831,7 +1831,7 @@ class FormFile * @param string $param More param on http links * @return string $out Output string with HTML */ - public function showPreview($file, $modulepart, $relativepath, $ruleforpicto=0, $param='') + public function showPreview($file, $modulepart, $relativepath, $ruleforpicto = 0, $param = '') { global $langs, $conf; diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php index ae35b74fad9..a9602f8a158 100644 --- a/htdocs/core/class/html.formintervention.class.php +++ b/htdocs/core/class/html.formintervention.class.php @@ -60,7 +60,7 @@ class FormIntervention * @param int $showempty Show empty line * @return int Nbre of project if OK, <0 if KO */ - function select_interventions($socid=-1, $selected='', $htmlname='interventionid', $maxlength=16, $showempty=1) + function select_interventions($socid = -1, $selected = '', $htmlname = 'interventionid', $maxlength = 16, $showempty = 1) { // phpcs:enable global $db,$user,$conf,$langs; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 2cb10056cc3..ac4ce55ebba 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -183,7 +183,7 @@ class FormMail extends Form * @param string $type Mime type (can be dol_mimetype($file)) * @return void */ - function add_attached_files($path, $file='', $type='') + function add_attached_files($path, $file = '', $type = '') { // phpcs:enable $listofpaths=array(); @@ -268,7 +268,7 @@ class FormMail extends Form * @param string $removefileaction Name of action when removing file attachments * @return void */ - function show_form($addfileaction='addfile',$removefileaction='removefile') + function show_form($addfileaction = 'addfile', $removefileaction = 'removefile') { // phpcs:enable print $this->get_form($addfileaction,$removefileaction); @@ -285,7 +285,7 @@ class FormMail extends Form * @param string $removefileaction Name of action when removing file attachments * @return string Form to show */ - function get_form($addfileaction='addfile', $removefileaction='removefile') + function get_form($addfileaction = 'addfile', $removefileaction = 'removefile') { // phpcs:enable global $conf, $langs, $user, $hookmanager, $form; @@ -1143,7 +1143,7 @@ class FormMail extends Form * @param string $label Label of template * @return ModelMail One instance of ModelMail */ - public function getEMailTemplate($db, $type_template, $user, $outputlangs, $id=0, $active=1, $label='') + public function getEMailTemplate($db, $type_template, $user, $outputlangs, $id = 0, $active = 1, $label = '') { $ret = new ModelMail(); @@ -1267,7 +1267,7 @@ class FormMail extends Form * @param int $active 1=Only active template, 0=Only disabled, -1=All * @return int <0 if KO, nb of records found if OK */ - public function fetchAllEMailTemplate($type_template, $user, $outputlangs, $active=1) + public function fetchAllEMailTemplate($type_template, $user, $outputlangs, $active = 1) { $ret=array(); @@ -1378,7 +1378,7 @@ class FormMail extends Form * @param Object $object Object if applicable * @return array Array of substitution values for emails. */ - static function getAvailableSubstitKey($mode='formemail', $object=null) + static function getAvailableSubstitKey($mode = 'formemail', $object = null) { global $conf, $langs; diff --git a/htdocs/core/class/html.formmailing.class.php b/htdocs/core/class/html.formmailing.class.php index 067692f5094..95c2c057b40 100644 --- a/htdocs/core/class/html.formmailing.class.php +++ b/htdocs/core/class/html.formmailing.class.php @@ -40,7 +40,7 @@ class FormMailing extends Form * @param integer $show_empty Show empty option * @return string HTML select */ - public function selectDestinariesStatus($selectedid='', $htmlname='dest_status', $show_empty=0) + public function selectDestinariesStatus($selectedid = '', $htmlname = 'dest_status', $show_empty = 0) { global $langs; diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index cdd827145b0..8492237d68f 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -59,7 +59,7 @@ class FormMargin * @param boolean $force_price True of not * @return array Array with info */ - function getMarginInfosArray($object, $force_price=false) + function getMarginInfosArray($object, $force_price = false) { global $conf, $db; @@ -191,7 +191,7 @@ class FormMargin * @param boolean $force_price Force price * @return void */ - function displayMarginInfos($object, $force_price=false) + function displayMarginInfos($object, $force_price = false) { global $langs, $conf, $user; diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index 781b3f76e4f..c16f292d10d 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -39,7 +39,7 @@ class FormOrder extends Form * @param string $hmlname Name of HTML select element * @return void */ - public function selectSupplierOrderStatus($selected='', $short=0, $hmlname='order_status') + public function selectSupplierOrderStatus($selected = '', $short = 0, $hmlname = 'order_status') { $options = array(); @@ -74,7 +74,7 @@ class FormOrder extends Form * @param int $addempty 0=list with no empty value, 1=list with empty value * @return array Tableau des sources de commandes */ - public function selectInputMethod($selected='',$htmlname='source_id',$addempty=0) + public function selectInputMethod($selected = '', $htmlname = 'source_id', $addempty = 0) { global $langs; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 8ca0b988fda..ce3fe126a51 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -67,7 +67,7 @@ class FormOther * @param int $fk_user Utilisateur créant le modèle * @return void */ - function select_export_model($selected='', $htmlname='exportmodelid', $type='', $useempty=0, $fk_user=null) + function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null) { // phpcs:enable $sql = "SELECT rowid, label"; @@ -119,7 +119,7 @@ class FormOther * @param int $useempty Affiche valeur vide dans liste * @return void */ - function select_import_model($selected='', $htmlname='importmodelid', $type='', $useempty=0) + function select_import_model($selected = '', $htmlname = 'importmodelid', $type = '', $useempty = 0) { // phpcs:enable $sql = "SELECT rowid, label"; @@ -168,7 +168,7 @@ class FormOther * @param string $htmlname Name of combo list * @return integer */ - function select_ecotaxes($selected='', $htmlname='ecotaxe_id') + function select_ecotaxes($selected = '', $htmlname = 'ecotaxe_id') { // phpcs:enable global $langs; @@ -227,7 +227,7 @@ class FormOther * @param string $country_code Country Code * @return string HTML select list */ - function select_revenue_stamp($selected='', $htmlname='revenuestamp', $country_code='') + function select_revenue_stamp($selected = '', $htmlname = 'revenuestamp', $country_code = '') { // phpcs:enable global $langs; @@ -290,7 +290,7 @@ class FormOther * @param int $showempty Add also an empty line * @return string HTML select string */ - function select_percent($selected=0,$htmlname='percent',$disabled=0,$increment=5,$start=0,$end=100,$showempty=0) + function select_percent($selected = 0, $htmlname = 'percent', $disabled = 0, $increment = 5, $start = 0, $end = 100, $showempty = 0) { // phpcs:enable $return = '<select class="flat" name="'.$htmlname.'" '.($disabled?'disabled':'').'>'; @@ -328,7 +328,7 @@ class FormOther * @return string Html combo list code * @see select_all_categories */ - function select_categories($type, $selected=0, $htmlname='search_categ', $nocateg=0, $showempty=1, $morecss='') + function select_categories($type, $selected = 0, $htmlname = 'search_categ', $nocateg = 0, $showempty = 1, $morecss = '') { // phpcs:enable global $conf, $langs; @@ -389,7 +389,7 @@ class FormOther * @param string $morecss More CSS * @return string Html combo list code */ - function select_salesrepresentatives($selected,$htmlname,$user,$showstatus=0,$showempty=1,$morecss='') + function select_salesrepresentatives($selected, $htmlname, $user, $showstatus = 0, $showempty = 1, $morecss = '') { // phpcs:enable global $conf,$langs; @@ -490,7 +490,7 @@ class FormOther * @param string $morecss More css * @return void */ - function selectProjectTasks($selectedtask='', $projectid=0, $htmlname='task_parent', $modeproject=0, $modetask=0, $mode=0, $useempty=0, $disablechildoftaskid=0, $filteronprojstatus='', $morecss='') + function selectProjectTasks($selectedtask = '', $projectid = 0, $htmlname = 'task_parent', $modeproject = 0, $modetask = 0, $mode = 0, $useempty = 0, $disablechildoftaskid = 0, $filteronprojstatus = '', $morecss = '') { global $user, $langs; @@ -528,7 +528,7 @@ class FormOther * @param int $disablechildoftaskid 1=Disable task that are child of the provided task id * @return void */ - private function _pLineSelect(&$inc, $parent, $lines, $level=0, $selectedtask=0, $selectedproject=0, $disablechildoftaskid=0) + private function _pLineSelect(&$inc, $parent, $lines, $level = 0, $selectedtask = 0, $selectedproject = 0, $disablechildoftaskid = 0) { global $langs, $user, $conf; @@ -621,7 +621,7 @@ class FormOther * @return string HTML code for color thumb * @see selectColor */ - static function showColor($color, $textifnotdefined='') + static function showColor($color, $textifnotdefined = '') { $textcolor='FFF'; include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -646,7 +646,7 @@ class FormOther * @deprecated Use instead selectColor * @see selectColor() */ - function select_color($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='') + function select_color($set_color = '', $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = '') { // phpcs:enable print $this->selectColor($set_color, $prefix, $form_name, $showcolorbox, $arrayofcolors); @@ -664,7 +664,7 @@ class FormOther * @return string * @see showColor */ - static function selectColor($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='', $morecss='') + static function selectColor($set_color = '', $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = '', $morecss = '') { // Deprecation warning if ($form_name) { @@ -763,7 +763,7 @@ class FormOther * @param int $y Hauteur de l'image en pixels * @return void */ - function CreateColorIcon($color,$module,$name,$x='12',$y='12') + function CreateColorIcon($color, $module, $name, $x = '12', $y = '12') { // phpcs:enable global $conf; @@ -802,7 +802,7 @@ class FormOther * @param int $useempty Affiche valeur vide dans liste * @return string */ - function select_dayofweek($selected='',$htmlname='weekid',$useempty=0) + function select_dayofweek($selected = '', $htmlname = 'weekid', $useempty = 0) { // phpcs:enable global $langs; @@ -850,7 +850,7 @@ class FormOther * @param string $morecss More Css * @return string */ - function select_month($selected='', $htmlname='monthid', $useempty=0, $longlabel=0, $morecss='') + function select_month($selected = '', $htmlname = 'monthid', $useempty = 0, $longlabel = 0, $morecss = '') { // phpcs:enable global $langs; @@ -897,7 +897,7 @@ class FormOther * @param string $morecss More CSS * @return string */ - function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='valignmiddle widthauto') + function select_year($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle widthauto') { // phpcs:enable print $this->selectyear($selected,$htmlname,$useempty,$min_year,$max_year,$offset,$invert,$option,$morecss); @@ -917,7 +917,7 @@ class FormOther * @param string $morecss More css * @return string */ - function selectyear($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='valignmiddle widthauto') + function selectyear($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle widthauto') { $out=''; @@ -968,7 +968,7 @@ class FormOther * @param int $originid Id de l'origine * @return void */ - function form_address($page, $selected, $socid, $htmlname='address_id', $origin='', $originid='') + function form_address($page, $selected, $socid, $htmlname = 'address_id', $origin = '', $originid = '') { // phpcs:enable global $langs,$conf; @@ -1011,7 +1011,7 @@ class FormOther * @param String $areacode Code of area for pages ('0'=value for Home page) * @return array array('selectboxlist'=>, 'boxactivated'=>, 'boxlista'=>, 'boxlistb'=>) */ - static function getBoxesArea($user,$areacode) + static function getBoxesArea($user, $areacode) { global $conf,$langs,$db; @@ -1231,7 +1231,7 @@ class FormOther * @param string $moreattrib More attributes on HTML select tag * @return void */ - function select_dictionary($htmlname,$dictionarytable,$keyfield='code',$labelfield='label',$selected='',$useempty=0,$moreattrib='') + function select_dictionary($htmlname, $dictionarytable, $keyfield = 'code', $labelfield = 'label', $selected = '', $useempty = 0, $moreattrib = '') { // phpcs:enable global $langs, $conf; diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index dea04047405..d91142bd6bd 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -71,7 +71,7 @@ class FormProjets * @param int $htmlid Html id to use instead of htmlname * @return string Return html content */ - function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlength=16, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode = 0, $filterkey = '', $nooutput=0, $forceaddid=0, $morecss='', $htmlid='') + function select_projects($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 16, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $morecss = '', $htmlid = '') { // phpcs:enable global $langs,$conf,$form; @@ -140,7 +140,7 @@ class FormProjets * @param string $morecss More CSS * @return int Nb of project if OK, <0 if KO */ - function select_projects_list($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey = '', $nooutput=0, $forceaddid=0, $htmlid='', $morecss='maxwidth500') + function select_projects_list($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500') { // phpcs:enable global $user,$conf,$langs; @@ -320,7 +320,7 @@ class FormProjets * @param User $usertofilter User object to use for filtering * @return int Nbr of project if OK, <0 if KO */ - function selectTasks($socid=-1, $selected='', $htmlname='taskid', $maxlength=24, $option_only=0, $show_empty='1', $discard_closed=0, $forcefocus=0, $disabled=0, $morecss='maxwidth500', $projectsListId='', $showproject='all', $usertofilter=null) + function selectTasks($socid = -1, $selected = '', $htmlname = 'taskid', $maxlength = 24, $option_only = 0, $show_empty = '1', $discard_closed = 0, $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500', $projectsListId = '', $showproject = 'all', $usertofilter = null) { global $user,$conf,$langs; @@ -488,7 +488,7 @@ class FormProjets * @param string $projectkey Equivalent key to fk_projet for actual table_element * @return int|string The HTML select list of element or '' if nothing or -1 if KO */ - function select_element($table_element, $socid=0, $morecss='', $limitonstatus=-2,$projectkey="fk_projet") + function select_element($table_element, $socid = 0, $morecss = '', $limitonstatus = -2, $projectkey = "fk_projet") { // phpcs:enable global $conf, $langs; @@ -618,7 +618,7 @@ class FormProjets * @param string $morecss Add more css * @return int|string The HTML select list of element or '' if nothing or -1 if KO */ - function selectOpportunityStatus($htmlname, $preselected='-1', $showempty=1, $useshortlabel=0, $showallnone=0, $showpercent=0, $morecss='') + function selectOpportunityStatus($htmlname, $preselected = '-1', $showempty = 1, $useshortlabel = 0, $showallnone = 0, $showpercent = 0, $morecss = '') { global $conf, $langs; diff --git a/htdocs/core/class/html.formpropal.class.php b/htdocs/core/class/html.formpropal.class.php index c4ac522d98a..1f4fad0829c 100644 --- a/htdocs/core/class/html.formpropal.class.php +++ b/htdocs/core/class/html.formpropal.class.php @@ -60,7 +60,7 @@ class FormPropal * @param string $htmlname Name of select field * @return void */ - function selectProposalStatus($selected='',$short=0, $excludedraft=0, $showempty=1, $mode='customer',$htmlname='propal_statut') + function selectProposalStatus($selected = '', $short = 0, $excludedraft = 0, $showempty = 1, $mode = 'customer', $htmlname = 'propal_statut') { global $langs; diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 4ef6208723d..9d300db27e8 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -100,7 +100,7 @@ class FormSms * @param int $showform Show form tags and submit button (recommanded is to use with value 0) * @return void */ - function show_form($morecss='titlefield', $showform=1) + function show_form($morecss = 'titlefield', $showform = 1) { // phpcs:enable global $conf, $langs, $user, $form; diff --git a/htdocs/core/class/html.formsocialcontrib.class.php b/htdocs/core/class/html.formsocialcontrib.class.php index 99e36878390..9f9ed7ab1d2 100644 --- a/htdocs/core/class/html.formsocialcontrib.class.php +++ b/htdocs/core/class/html.formsocialcontrib.class.php @@ -61,7 +61,7 @@ class FormSocialContrib * @param string $morecss Add more CSS on select * @return void */ - function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1, $morecss='minwidth300') + function select_type_socialcontrib($selected = '', $htmlname = 'actioncode', $useempty = 0, $maxlen = 40, $help = 1, $morecss = 'minwidth300') { // phpcs:enable global $conf,$db,$langs,$user,$mysoc; diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 6c4a9703014..a04032463c9 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -124,7 +124,7 @@ class FormTicket * @param int $withdolfichehead With dol_fiche_head * @return void */ - public function showForm($withdolfichehead=0) + public function showForm($withdolfichehead = 0) { global $conf, $langs, $user, $hookmanager; @@ -431,7 +431,7 @@ class FormTicket * @param string $morecss More CSS * @return void */ - public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss='') + public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '') { global $langs, $user; @@ -531,7 +531,7 @@ class FormTicket * @param string $morecss More CSS * @return void */ - public function selectCategoriesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss='') + public function selectCategoriesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '') { global $langs, $user; @@ -632,7 +632,7 @@ class FormTicket * @param string $morecss More CSS * @return void */ - public function selectSeveritiesTickets($selected = '', $htmlname = 'ticketseverity', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss='') + public function selectSeveritiesTickets($selected = '', $htmlname = 'ticketseverity', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '') { global $langs, $user; diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index f5feccd5860..fea4f34332c 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -54,7 +54,7 @@ class FormWebsite * @param int $useempty Show empty value or not * @return string Html component */ - function selectWebsite($selected='',$htmlname='exportmodelid',$useempty=0) + function selectWebsite($selected = '', $htmlname = 'exportmodelid', $useempty = 0) { $out=''; @@ -107,7 +107,7 @@ class FormWebsite * @param string $moreattrib More attributes on HTML select tag * @return void */ - function selectTypeOfContainer($htmlname, $selected='', $useempty=0, $moreattrib='') + function selectTypeOfContainer($htmlname, $selected = '', $useempty = 0, $moreattrib = '') { global $langs, $conf, $user; @@ -170,7 +170,7 @@ class FormWebsite * @param string $moreattrib More attributes on HTML select tag * @return void */ - function selectSampleOfContainer($htmlname, $selected='', $useempty=0, $moreattrib='') + function selectSampleOfContainer($htmlname, $selected = '', $useempty = 0, $moreattrib = '') { global $langs, $conf, $user; diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index dedf3ec384f..0a97429be44 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -48,7 +48,7 @@ class InfoBox * @param int $includehidden Include also hidden boxes * @return array Array of boxes */ - static function listBoxes($db, $mode, $zone, $user=null, $excludelist=array(), $includehidden=1) + static function listBoxes($db, $mode, $zone, $user = null, $excludelist = array(), $includehidden = 1) { global $conf; @@ -186,7 +186,7 @@ class InfoBox * @param int $userid Id of user * @return int <0 if KO, 0=Nothing done, > 0 if OK */ - static function saveboxorder($db, $zone,$boxorder,$userid=0) + static function saveboxorder($db, $zone, $boxorder, $userid = 0) { global $conf; diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 6f43643eeb7..7c8bb689de5 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -65,7 +65,7 @@ class Interfaces * @param Conf $conf Objet conf * @return int Nb of triggers ran if no error, -Nb of triggers with errors otherwise. */ - function run_triggers($action,$object,$user,$langs,$conf) + function run_triggers($action, $object, $user, $langs, $conf) { // phpcs:enable // Check parameters @@ -241,7 +241,7 @@ class Interfaces * @param array $forcedirtriggers null=All default directories. This parameter is used by modulebuilder module only. * @return array Array list of triggers */ - function getTriggersList($forcedirtriggers=null) + function getTriggersList($forcedirtriggers = null) { global $conf, $langs, $db; diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 8c42d691d39..2c845440ec1 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -333,7 +333,7 @@ class Ldap * @param string $pass Password * @return boolean true or false */ - function bindauth($bindDn,$pass) + function bindauth($bindDn, $pass) { if (! $this->result = @ldap_bind($this->connection, $bindDn, $pass)) { @@ -569,7 +569,7 @@ class Ldap * @param string $newparent New parent (ou=xxx,dc=aaa,dc=bbb) (for ldap_rename) * @return int <0 if KO, >0 if OK */ - function update($dn, $info, $user, $olddn, $newrdn=false, $newparent=false) + function update($dn, $info, $user, $olddn, $newrdn = false, $newparent = false) { global $conf; @@ -741,7 +741,7 @@ class Ldap * @param int $timeout Timeout in second (default 1s) * @return boolean true or false */ - function serverPing($host, $port=389, $timeout=1) + function serverPing($host, $port = 389, $timeout = 1) { // Replace ldaps:// by ssl:// if (preg_match('/^ldaps:\/\/([^\/]+)\/?$/',$host, $regs)) { @@ -925,7 +925,7 @@ class Ldap * @param string $filter Filter * @return int|array <0 or false if KO, array if OK */ - function getAttribute($dn,$filter) + function getAttribute($dn, $filter) { // Check parameters if (! $this->connection) @@ -970,7 +970,7 @@ class Ldap * @param string $attribute Attributes * @return void */ - function getAttributeValues($filterrecord,$attribute) + function getAttributeValues($filterrecord, $attribute) { $attributes=array(); $attributes[0] = $attribute; @@ -1015,7 +1015,7 @@ class Ldap * @param array $attributeAsArray Array of fields wanted as an array not a string * @return array Array of [id_record][ldap_field]=value */ - function getRecords($search, $userDn, $useridentifier, $attributeArray, $activefilter=0, $attributeAsArray=array()) + function getRecords($search, $userDn, $useridentifier, $attributeArray, $activefilter = 0, $attributeAsArray = array()) { $fulllist=array(); @@ -1260,7 +1260,7 @@ class Ldap * Examples: &(objectClass=inetOrgPerson) &(objectClass=user)(objectCategory=person) &(isMemberOf=cn=Sales,ou=Groups,dc=opencsi,dc=com) * @return int >0 if OK, <0 if KO */ - function fetch($user,$filter) + function fetch($user, $filter) { // Perform the search and get the entry handles @@ -1463,7 +1463,7 @@ class Ldap * @param string $pagecodefrom Page code of src string * @return string Converted string */ - private function convToOutputCharset($str,$pagecodefrom='UTF-8') + private function convToOutputCharset($str, $pagecodefrom = 'UTF-8') { global $conf; if ($pagecodefrom == 'ISO-8859-1' && $conf->file->character_set_client == 'UTF-8') $str=utf8_encode($str); @@ -1478,7 +1478,7 @@ class Ldap * @param string $pagecodeto Page code for result string * @return string Converted string */ - function convFromOutputCharset($str,$pagecodeto='UTF-8') + function convFromOutputCharset($str, $pagecodeto = 'UTF-8') { global $conf; if ($pagecodeto == 'ISO-8859-1' && $conf->file->character_set_client == 'UTF-8') $str=utf8_decode($str); @@ -1493,7 +1493,7 @@ class Ldap * @param string $keygroup Key of group * @return int gid number */ - function getNextGroupGid($keygroup='LDAP_KEY_GROUPS') + function getNextGroupGid($keygroup = 'LDAP_KEY_GROUPS') { global $conf; diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 8413725ab11..82069e10204 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -72,7 +72,7 @@ class Link extends CommonObject * @param User $user Object of user that ask creation * @return int >= 0 if OK, < 0 if KO */ - public function create($user='') + public function create($user = '') { global $langs,$conf; @@ -156,7 +156,7 @@ class Link extends CommonObject * @param int $call_trigger 0=no, 1=yes * @return int <0 if KO, >=0 if OK */ - public function update($user='', $call_trigger=1) + public function update($user = '', $call_trigger = 1) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -241,7 +241,7 @@ class Link extends CommonObject * @param string $sortorder sort order * @return int 1 if ok, 0 if no records, -1 if error **/ - public function fetchAll(&$links, $objecttype, $objectid, $sortfield=null, $sortorder=null) + public function fetchAll(&$links, $objecttype, $objectid, $sortfield = null, $sortorder = null) { global $conf; @@ -315,7 +315,7 @@ class Link extends CommonObject * @param int $rowid Id of link to load * @return int 1 if ok, 0 if no record found, -1 if error **/ - public function fetch($rowid=null) + public function fetch($rowid = null) { global $conf; diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php index 3d9d92189a3..872f871b202 100644 --- a/htdocs/core/class/menu.class.php +++ b/htdocs/core/class/menu.class.php @@ -65,7 +65,7 @@ class Menu * @param string $prefix Prefix to title (image or picto) * @return void */ - function add($url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='', $prefix='') + function add($url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '') { $this->liste[]=array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu, 'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix); } @@ -88,7 +88,7 @@ class Menu * @param string $prefix Prefix to title (image or picto) * @return void */ - function insert($idafter, $url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='', $prefix='') + function insert($idafter, $url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '') { $array_start = array_slice($this->liste,0,($idafter+1)); $array_new = array(0=>array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu,'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix)); diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 86b27948389..641bfeacdcb 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -91,7 +91,7 @@ class Menubase * @param DoliDB $db Database handler * @param string $menu_handler Menu handler */ - function __construct($db,$menu_handler='') + function __construct($db, $menu_handler = '') { $this->db = $db; $this->menu_handler = $menu_handler; @@ -105,7 +105,7 @@ class Menubase * @param User $user User that create * @return int <0 if KO, Id of record if OK */ - function create($user=null) + function create($user = null) { global $conf, $langs; @@ -245,7 +245,7 @@ class Menubase * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -310,7 +310,7 @@ class Menubase * @param User $user User that load * @return int <0 if KO, >0 if OK */ - function fetch($id, $user=null) + function fetch($id, $user = null) { global $langs; diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index e7cd7cabe53..e5616c31c40 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -105,7 +105,7 @@ class Notify * @param Object $object Object the notification is about * @return string Message */ - function confirmMessage($action,$socid,$object) + function confirmMessage($action, $socid, $object) { global $langs; $langs->load("mails"); @@ -146,7 +146,7 @@ class Notify * @param array $scope Scope where to search * @return array|int <0 if KO, array of notifications to send if OK */ - function getNotificationsArray($notifcode, $socid=0, $object=null, $userid=0, $scope=array('thirdparty', 'user', 'global')) + function getNotificationsArray($notifcode, $socid = 0, $object = null, $userid = 0, $scope = array('thirdparty', 'user', 'global')) { global $conf, $user; @@ -309,7 +309,7 @@ class Notify * @param array $mimefilename_list List of attached file name in message * @return int <0 if KO, or number of changes if OK */ - function send($notifcode, $object, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array()) + function send($notifcode, $object, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array()) { global $user,$conf,$langs,$mysoc; global $hookmanager; diff --git a/htdocs/core/class/openid.class.php b/htdocs/core/class/openid.class.php index 48de42ad847..2254ec25cf2 100644 --- a/htdocs/core/class/openid.class.php +++ b/htdocs/core/class/openid.class.php @@ -301,7 +301,7 @@ class SimpleOpenID * @param string $params Params * @return boolean|unknown */ - function FSOCK_Request($url, $method="GET", $params = "") + function FSOCK_Request($url, $method = "GET", $params = "") { // phpcs:enable $fp = fsockopen("ssl://www.myopenid.com", 443, $errno, $errstr, 3); // Connection timeout is 3 seconds @@ -335,7 +335,7 @@ class SimpleOpenID * @param string $params Params * @return string */ - function CURL_Request($url, $method="GET", $params = "") + function CURL_Request($url, $method = "GET", $params = "") { // phpcs:enable // Remember, SSL MUST BE SUPPORTED @@ -394,7 +394,7 @@ class SimpleOpenID * @param string $url Url to found endpoint * @return string Endpoint */ - function GetOpenIDServer($url='') + function GetOpenIDServer($url = '') { // phpcs:enable global $conf; @@ -518,7 +518,7 @@ class SimpleOpenID * @param string $url Url of endpoint to request * @return string First endpoint OpenID server found. False if it failed to found. */ - function sendDiscoveryRequestToGetXRDS($url='') + function sendDiscoveryRequestToGetXRDS($url = '') { global $conf; diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index fd37476a26e..931dce263a1 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -184,7 +184,7 @@ class RssParser * @param string $cachedir Directory where to save cache file * @return int <0 if KO, >0 if OK */ - public function parser($urlRSS, $maxNb=0, $cachedelay=60, $cachedir='') + public function parser($urlRSS, $maxNb = 0, $cachedelay = 60, $cachedir = '') { global $conf; @@ -666,7 +666,7 @@ class RssParser * @param string $str2 Str2 * @return string String cancatenated */ - function concat(&$str1, $str2="") + function concat(&$str1, $str2 = "") { if (!isset($str1) ) { $str1=""; diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 1ade95098fa..c52261a5530 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -310,7 +310,7 @@ class SMTPs * @param boolean $_part Variant * @return string Errors to */ - function getErrorsTo($_part = true ) + function getErrorsTo($_part = true) { $_retValue = ''; @@ -328,7 +328,7 @@ class SMTPs * @param boolean $_vDebug Value for debug * @return void */ - function setDebug($_vDebug = false ) + function setDebug($_vDebug = false) { $this->_debug = $_vDebug; } @@ -1659,7 +1659,7 @@ class SMTPs * @param integer $_value Message Priority * @return void */ - function setPriority( $_value = 3 ) + function setPriority($_value = 3) { if ( ( is_numeric($_value) ) && ( ( $_value >= 0 ) && ( $_value <= 5 ) ) ) @@ -1748,7 +1748,7 @@ class SMTPs * @param string $type Type of boundary * @return string $_smtpsBoundary MIME message Boundary */ - function _getBoundary($type='mixed') + function _getBoundary($type = 'mixed') { if ($type == 'mixed') return $this->_smtpsBoundary; else if ($type == 'related') return $this->_smtpsRelatedBoundary; @@ -1807,7 +1807,7 @@ class SMTPs * @param string $CRLF CRLF * @return boolean|null True or false */ - function socket_send_str( $_strSend, $_returnCode = null, $CRLF = "\r\n" ) + function socket_send_str($_strSend, $_returnCode = null, $CRLF = "\r\n") { // phpcs:enable if ($this->_debug) $this->log.=$_strSend; // @CHANGE LDR for log @@ -1828,7 +1828,7 @@ class SMTPs * @param string $_errMsg Error Message * @return void */ - function _setErr( $_errNum, $_errMsg ) + function _setErr($_errNum, $_errMsg) { $this->_smtpsErrors[] = array( 'num' => $_errNum, diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index 90986e7b6da..eab2ef70e8a 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -42,7 +42,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonthWithPrevYear($endyear, $startyear, $cachedelay=0, $format=0) + function getNbByMonthWithPrevYear($endyear, $startyear, $cachedelay = 0, $format = 0) { global $conf,$user,$langs; @@ -136,7 +136,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getAmountByMonthWithPrevYear($endyear, $startyear, $cachedelay=0, $format=0) + function getAmountByMonthWithPrevYear($endyear, $startyear, $cachedelay = 0, $format = 0) { global $conf,$user,$langs; @@ -228,7 +228,7 @@ abstract class Stats * @param int $startyear End year * @return array Array of values */ - function getAverageByMonthWithPrevYear($endyear,$startyear) + function getAverageByMonthWithPrevYear($endyear, $startyear) { if ($startyear > $endyear) return -1; @@ -264,7 +264,7 @@ abstract class Stats * @param int $cachedelay Delay we accept for cache file (0=No read, no save of cache, -1=No read but save) * @return array Array of values */ - function getAllByProductEntry($year,$cachedelay=0) + function getAllByProductEntry($year, $cachedelay = 0) { global $conf,$user,$langs; @@ -413,7 +413,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of nb each month */ - function _getNbByMonth($year, $sql, $format=0) + function _getNbByMonth($year, $sql, $format = 0) { global $langs; @@ -470,7 +470,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array */ - function _getAmountByMonth($year, $sql, $format=0) + function _getAmountByMonth($year, $sql, $format = 0) { global $langs; @@ -524,7 +524,7 @@ abstract class Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array */ - function _getAverageByMonth($year, $sql, $format=0) + function _getAverageByMonth($year, $sql, $format = 0) { global $langs; @@ -577,7 +577,7 @@ abstract class Stats * @param int $limit Limit * @return array */ - function _getAllByProduct($sql, $limit=10) + function _getAllByProduct($sql, $limit = 10) { global $langs; diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index a8d22b61257..d13ca7eb567 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -62,7 +62,7 @@ class Translate * @param string $srclang Language to use. If '' or 'auto', we use browser lang. * @return void */ - function setDefaultLang($srclang='en_US') + function setDefaultLang($srclang = 'en_US') { global $conf; @@ -132,7 +132,7 @@ class Translate * @param int $mode 0=Long language code, 1=Short language code (en, fr, es, ...) * @return string Language code used (en_US, en_AU, fr_FR, ...) */ - function getDefaultLang($mode=0) + function getDefaultLang($mode = 0) { if (empty($mode)) return $this->defaultlang; else return substr($this->defaultlang,0,2); @@ -173,7 +173,7 @@ class Translate * @return int <0 if KO, 0 if already loaded or loading not required, >0 if OK * @see loadLangs */ - function load($domain,$alt=0,$stopafterdirection=0,$forcelangdir='',$loadfromfileonly=0) + function load($domain, $alt = 0, $stopafterdirection = 0, $forcelangdir = '', $loadfromfileonly = 0) { global $conf,$db; @@ -594,7 +594,7 @@ class Translate * @param int $maxsize Max length of text * @return string Translated string (encoded into HTML entities and UTF8) */ - function trans($key, $param1='', $param2='', $param3='', $param4='', $maxsize=0) + function trans($key, $param1 = '', $param2 = '', $param3 = '', $param4 = '', $maxsize = 0) { global $conf; @@ -655,7 +655,7 @@ class Translate * @param string $param5 chaine de param5 * @return string Translated string (encoded into UTF8) */ - function transnoentities($key, $param1='', $param2='', $param3='', $param4='', $param5='') + function transnoentities($key, $param1 = '', $param2 = '', $param3 = '', $param4 = '', $param5 = '') { return $this->convToOutputCharset($this->transnoentitiesnoconv($key, $param1, $param2, $param3, $param4, $param5)); } @@ -676,7 +676,7 @@ class Translate * @param string $param5 chaine de param5 * @return string Translated string */ - function transnoentitiesnoconv($key, $param1='', $param2='', $param3='', $param4='', $param5='') + function transnoentitiesnoconv($key, $param1 = '', $param2 = '', $param3 = '', $param4 = '', $param5 = '') { global $conf; @@ -747,7 +747,7 @@ class Translate * @param string $pagecodefrom Page code of src string * @return string Converted string */ - function convToOutputCharset($str,$pagecodefrom='UTF-8') + function convToOutputCharset($str, $pagecodefrom = 'UTF-8') { if ($pagecodefrom == 'ISO-8859-1' && $this->charset_output == 'UTF-8') $str=utf8_encode($str); if ($pagecodefrom == 'UTF-8' && $this->charset_output == 'ISO-8859-1') $str=utf8_decode(str_replace('€',chr(128),$str)); @@ -764,7 +764,7 @@ class Translate * @param int $usecode 1=Show code instead of country name for language variant, 2=Show only code * @return array List of languages */ - function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0,$usecode=0) + function get_available_languages($langdir = DOL_DOCUMENT_ROOT, $maxlength = 0, $usecode = 0) { // phpcs:enable global $conf; @@ -804,7 +804,7 @@ class Translate * @param integer $searchalt Search also alernate language file * @return boolean true if exists and readable */ - function file_exists($filename,$searchalt=0) + function file_exists($filename, $searchalt = 0) { // phpcs:enable // Test si fichier dans repertoire de la langue @@ -836,7 +836,7 @@ class Translate * 10 if setDefaultLang was en_US => ten * 123 if setDefaultLang was fr_FR => cent vingt trois */ - function getLabelFromNumber($number,$isamount=0) + function getLabelFromNumber($number, $isamount = 0) { global $conf; @@ -879,7 +879,7 @@ class Translate * @return string Label in UTF8 (but without entities) * @see dol_getIdFromCode */ - function getLabelFromKey($db,$key,$tablename,$fieldkey,$fieldlabel,$keyforselect='',$filteronentity=0) + function getLabelFromKey($db, $key, $tablename, $fieldkey, $fieldlabel, $keyforselect = '', $filteronentity = 0) { // If key empty if ($key == '') return ''; @@ -947,7 +947,7 @@ class Translate * @param integer $forceloadall 1=Force to load all currencies into cache. We know we need to use all of them. By default read and cache only required currency. * @return string Currency symbol encoded into UTF8 */ - function getCurrencySymbol($currency_code, $forceloadall=0) + function getCurrencySymbol($currency_code, $forceloadall = 0) { $currency_sign = ''; // By default return iso code diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 9061539a804..b9720c400a6 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -53,7 +53,7 @@ class Utils * @param string $choice Choice of purge mode ('tempfiles', '' or 'tempfilesold' to purge temp older than 24h, 'allfiles', 'logfile') * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function purgeFiles($choice='tempfilesold') + function purgeFiles($choice = 'tempfilesold') { global $conf, $langs, $dolibarr_main_data_root; @@ -182,7 +182,7 @@ class Utils * @param int $execmethod 0=Use default method (that is 1 by default), 1=Use the PHP 'exec', 2=Use the 'popen' method * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function dumpDatabase($compression='none', $type='auto', $usedefault=1, $file='auto', $keeplastnfiles=0, $execmethod=0) + function dumpDatabase($compression = 'none', $type = 'auto', $usedefault = 1, $file = 'auto', $keeplastnfiles = 0, $execmethod = 0) { global $db, $conf, $langs, $dolibarr_main_data_root; global $dolibarr_main_db_name, $dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_port, $dolibarr_main_db_pass; @@ -501,7 +501,7 @@ class Utils * @param int $execmethod 0=Use default method (that is 1 by default), 1=Use the PHP 'exec', 2=Use the 'popen' method * @return array array('result'=>...,'output'=>...,'error'=>...). result = 0 means OK. */ - function executeCLI($command, $outputfile, $execmethod=0) + function executeCLI($command, $outputfile, $execmethod = 0) { global $conf, $langs; @@ -835,7 +835,7 @@ class Utils * @param string $tables Table name or '*' for all * @return int <0 if KO, >0 if OK */ - function backupTables($outputfile, $tables='*') + function backupTables($outputfile, $tables = '*') { global $db, $langs; global $errormsg; diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index 27144c9293a..9cb98f4838e 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -42,7 +42,7 @@ function encode($string) * @param int $line_max Max length of lines * @return string Encoded string */ -function dol_quoted_printable_encode($input, $line_max=76) +function dol_quoted_printable_encode($input, $line_max = 76) { $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'); $lines = preg_split("/(\?:\r\n|\r|\n)/", $input); @@ -98,7 +98,7 @@ class vCard * @param string $type Type * @return void */ - function setPhoneNumber($number, $type="") + function setPhoneNumber($number, $type = "") { // type may be PREF | WORK | HOME | VOICE | FAX | MSG | CELL | PAGER | BBS | CAR | MODEM | ISDN | VIDEO or any senseful combination, e.g. "PREF;WORK;VOICE" $key = "TEL"; @@ -142,7 +142,7 @@ class vCard * @param string $suffix Suffix * @return void */ - function setName($family="", $first="", $additional="", $prefix="", $suffix="") + function setName($family = "", $first = "", $additional = "", $prefix = "", $suffix = "") { $this->properties["N;CHARSET=".$this->encoding] = encode($family).";".encode($first).";".encode($additional).";".encode($prefix).";".encode($suffix); $this->filename = "$first%20$family.vcf"; @@ -174,7 +174,7 @@ class vCard * @param string $type Type * @return void */ - function setAddress($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") + function setAddress($postoffice = "", $extended = "", $street = "", $city = "", $region = "", $zip = "", $country = "", $type = "HOME;POSTAL") { // $type may be DOM | INTL | POSTAL | PARCEL | HOME | WORK or any combination of these: e.g. "WORK;PARCEL;POSTAL" $key = "ADR"; @@ -201,7 +201,7 @@ class vCard * @param string $type Type * @return void */ - function setLabel($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") + function setLabel($postoffice = "", $extended = "", $street = "", $city = "", $region = "", $zip = "", $country = "", $type = "HOME;POSTAL") { $label = ""; if ($postoffice!="") $label.= "$postoffice\r\n"; @@ -222,7 +222,7 @@ class vCard * @param string $type Vcard type * @return void */ - function setEmail($address,$type="internet,pref") + function setEmail($address, $type = "internet,pref") { $this->properties["EMAIL;TYPE=".$type] = $address; } @@ -293,7 +293,7 @@ class vCard * @param string $type Type * @return void */ - function setURL($url, $type="") + function setURL($url, $type = "") { // $type may be WORK | HOME $key = "URL"; diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index 6d0cd48ccfe..b6df52d2ef9 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -141,7 +141,7 @@ function xyzToUnixTimestamp($mysqldate) * @param int $year Year * @return void */ -function displayBox($selectedDate,$month,$year) +function displayBox($selectedDate, $month, $year) { global $langs,$conf; diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php index 54b950fdee7..e62692b233a 100644 --- a/htdocs/core/db/Database.interface.php +++ b/htdocs/core/db/Database.interface.php @@ -419,7 +419,7 @@ interface Database * @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ * @return int|string Date TMS or '' */ - function jdate($string, $gm=false); + function jdate($string, $gm = false); /** * Encrypt sensitive data in database diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index ecc27bf88dc..da1c3cd74fb 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -75,7 +75,7 @@ abstract class DoliDB implements Database * @param string $resko resultat si test non egal * @return string SQL string */ - function ifsql($test,$resok,$resko) + function ifsql($test, $resok, $resko) { return 'IF('.$test.','.$resok.','.$resko.')'; } @@ -135,7 +135,7 @@ abstract class DoliDB implements Database * @param string $log Add more log to default log line * @return int 1 if validation is OK or transaction level no started, 0 if ERROR */ - function commit($log='') + function commit($log = '') { dol_syslog('',0,-1); if ($this->transaction_opened<=1) @@ -165,7 +165,7 @@ abstract class DoliDB implements Database * @param string $log Add more log to default log line * @return resource|int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur */ - function rollback($log='') + function rollback($log = '') { dol_syslog('',0,-1); if ($this->transaction_opened<=1) @@ -189,7 +189,7 @@ abstract class DoliDB implements Database * @param int $offset Numero of line from where starting fetch * @return string String with SQL syntax to add a limit and offset */ - function plimit($limit=0,$offset=0) + function plimit($limit = 0, $offset = 0) { global $conf; if (empty($limit)) return ""; @@ -225,7 +225,7 @@ abstract class DoliDB implements Database * @param string $sortorder Sort order, separated by comma. Example: 'ASC,DESC'; * @return string String to provide syntax of a sort sql string */ - function order($sortfield=null,$sortorder=null) + function order($sortfield = null, $sortorder = null) { if (! empty($sortfield)) { @@ -278,7 +278,7 @@ abstract class DoliDB implements Database * @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ * @return int|string Date TMS or '' */ - function jdate($string, $gm=false) + function jdate($string, $gm = false) { // TODO GMT must set param gm to true by default if ($string==0 || $string=="0000-00-00 00:00:00") return ''; diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index f9e982961c9..ff2b4d51de7 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -55,7 +55,7 @@ class DoliDBMssql extends DoliDB * @param string $name Nom de la database * @param int $port Port of database server */ - function __construct($type, $host, $user, $pass, $name='', $port=0) + function __construct($type, $host, $user, $pass, $name = '', $port = 0) { global $langs; @@ -134,7 +134,7 @@ class DoliDBMssql extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return string SQL request line converted */ - static function convertSQLFromMysql($line,$type='ddl') + static function convertSQLFromMysql($line, $type = 'ddl') { return $line; } @@ -163,7 +163,7 @@ class DoliDBMssql extends DoliDB * @return false|resource|true Database access handler * @see close */ - function connect($host, $login, $passwd, $name, $port=0) + function connect($host, $login, $passwd, $name, $port = 0) { dol_syslog(get_class($this)."::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name"); $newhost=$host; @@ -263,7 +263,7 @@ class DoliDBMssql extends DoliDB * @param string $log Add more log to default log line * @return bool true if validation is OK or transaction level no started, false if ERROR */ - function commit($log='') + function commit($log = '') { $res=mssql_query('select @@TRANCOUNT'); $this->transaction_opened=mssql_result($res, 0, 0); @@ -296,7 +296,7 @@ class DoliDBMssql extends DoliDB * @param string $log Add more log to default log line * @return bool true si annulation ok ou transaction non ouverte, false en cas d'erreur */ - function rollback($log='') + function rollback($log = '') { $res=mssql_query('select @@TRANCOUNT'); $this->transaction_opened=mssql_result($res, 0, 0); @@ -324,7 +324,7 @@ class DoliDBMssql extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return false|resource|true Resultset of answer */ - function query($query,$usesavepoint=0,$type='auto') + function query($query, $usesavepoint = 0, $type = 'auto') { $query = trim($query); @@ -548,7 +548,7 @@ class DoliDBMssql extends DoliDB * @param resource $resultset Curseur de la requete voulue * @return bool */ - function free($resultset=null) + function free($resultset = null) { // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion if (! is_resource($resultset)) { $resultset=$this->_results; } @@ -657,7 +657,7 @@ class DoliDBMssql extends DoliDB * @param string $fieldid Field name * @return int Id of row or -1 on error */ - function last_insert_id($tab,$fieldid='rowid') + function last_insert_id($tab, $fieldid = 'rowid') { // phpcs:enable $res = $this->query("SELECT @@IDENTITY as id"); @@ -679,7 +679,7 @@ class DoliDBMssql extends DoliDB * @param int $withQuotes Return string with quotes * @return string XXX(field) or XXX('value') or field or 'value' */ - function encrypt($fieldorvalue, $withQuotes=0) + function encrypt($fieldorvalue, $withQuotes = 0) { global $conf; @@ -744,7 +744,7 @@ class DoliDBMssql extends DoliDB * @param string $owner Username of database owner * @return false|resource|true resource defined if OK, false if KO */ - function DDLCreateDb($database,$charset='',$collation='',$owner='') + function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') { // phpcs:enable /*if (empty($charset)) $charset=$this->forcecharset; @@ -778,7 +778,7 @@ class DoliDBMssql extends DoliDB * @param string $table Nmae of table filter ('xxx%') * @return array List of tables in an array */ - function DDLListTables($database,$table='') + function DDLListTables($database, $table = '') { // phpcs:enable $this->_results = mssql_list_tables($database, $this->db); @@ -817,7 +817,7 @@ class DoliDBMssql extends DoliDB * @param array $keys Tableau des champs cles noms => valeur * @return int <0 if KO, >=0 if OK */ - function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) + function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) { // phpcs:enable // FIXME: $fulltext_keys parameter is unused @@ -911,7 +911,7 @@ class DoliDBMssql extends DoliDB * @param string $field Optionnel : Name of field if we want description of field * @return false|resource|true Resource */ - function DDLDescTable($table,$field="") + function DDLDescTable($table, $field = "") { // phpcs:enable $sql="DESC ".$table." ".$field; @@ -931,7 +931,7 @@ class DoliDBMssql extends DoliDB * @param string $field_position Optionnel ex.: "after champtruc" * @return int <0 if KO, >0 if OK */ - function DDLAddField($table,$field_name,$field_desc,$field_position="") + function DDLAddField($table, $field_name, $field_desc, $field_position = "") { // phpcs:enable // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra @@ -968,7 +968,7 @@ class DoliDBMssql extends DoliDB * @param string $field_desc Array with description of field format * @return int <0 if KO, >0 if OK */ - function DDLUpdateField($table,$field_name,$field_desc) + function DDLUpdateField($table, $field_name, $field_desc) { // phpcs:enable $sql = "ALTER TABLE ".$table; @@ -992,7 +992,7 @@ class DoliDBMssql extends DoliDB * @param string $field_name Name of field to drop * @return int <0 if KO, >0 if OK */ - function DDLDropField($table,$field_name) + function DDLDropField($table, $field_name) { // phpcs:enable $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; @@ -1015,7 +1015,7 @@ class DoliDBMssql extends DoliDB * @param string $dolibarr_main_db_name Database name where user must be granted * @return int <0 if KO, >=0 if OK */ - function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) + function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) { // phpcs:enable $sql = "CREATE LOGIN ".$this->EscapeFieldName($dolibarr_main_db_user)." WITH PASSWORD='$dolibarr_main_db_pass'"; @@ -1141,7 +1141,7 @@ class DoliDBMssql extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerParametersValues($filter='') + function getServerParametersValues($filter = '') { // FIXME: Dummy method // TODO: Implement @@ -1157,7 +1157,7 @@ class DoliDBMssql extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerStatusValues($filter='') + function getServerStatusValues($filter = '') { // FIXME: Dummy method // TODO: Implement @@ -1188,7 +1188,7 @@ class DoliDBMssql extends DoliDB * @param mixed $fields String for one field or array of string for multiple field * @return false|object */ - function GetFieldInformation($table,$fields) + function GetFieldInformation($table, $fields) { // phpcs:enable $sql="SELECT * from INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='".$this->escape($table)."' AND COLUMN_NAME"; diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 185ebe1a56f..ad41e78620d 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -54,7 +54,7 @@ class DoliDBMysqli extends DoliDB * @param string $name Nom de la database * @param int $port Port of database server */ - function __construct($type, $host, $user, $pass, $name='', $port=0) + function __construct($type, $host, $user, $pass, $name = '', $port = 0) { global $conf,$langs; @@ -162,7 +162,7 @@ class DoliDBMysqli extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return string SQL request line converted */ - static function convertSQLFromMysql($line,$type='ddl') + static function convertSQLFromMysql($line, $type = 'ddl') { return $line; } @@ -250,7 +250,7 @@ class DoliDBMysqli extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return bool|mysqli_result Resultset of answer */ - function query($query,$usesavepoint=0,$type='auto') + function query($query, $usesavepoint = 0, $type = 'auto') { global $conf; @@ -382,7 +382,7 @@ class DoliDBMysqli extends DoliDB * @param mysqli_result $resultset Curseur de la requete voulue * @return void */ - function free($resultset=null) + function free($resultset = null) { // If resultset not provided, we take the last used by connexion if (! is_object($resultset)) { $resultset=$this->_results; } @@ -476,7 +476,7 @@ class DoliDBMysqli extends DoliDB * @param string $fieldid Field name * @return int|string Id of row */ - function last_insert_id($tab,$fieldid='rowid') + function last_insert_id($tab, $fieldid = 'rowid') { // phpcs:enable return $this->db->insert_id; @@ -491,7 +491,7 @@ class DoliDBMysqli extends DoliDB * @return string XXX(field) or XXX('value') or field or 'value' * */ - function encrypt($fieldorvalue, $withQuotes=0) + function encrypt($fieldorvalue, $withQuotes = 0) { global $conf; @@ -582,7 +582,7 @@ class DoliDBMysqli extends DoliDB * @param string $owner Username of database owner * @return bool|mysqli_result resource defined if OK, null if KO */ - function DDLCreateDb($database,$charset='',$collation='',$owner='') + function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') { // phpcs:enable if (empty($charset)) $charset=$this->forcecharset; @@ -612,7 +612,7 @@ class DoliDBMysqli extends DoliDB * @param string $table Nmae of table filter ('xxx%') * @return array List of tables in an array */ - function DDLListTables($database, $table='') + function DDLListTables($database, $table = '') { // phpcs:enable $listtables=array(); @@ -671,7 +671,7 @@ class DoliDBMysqli extends DoliDB * @param array $keys Tableau des champs cles noms => valeur * @return int <0 if KO, >=0 if OK */ - function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) + function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) { // phpcs:enable // FIXME: $fulltext_keys parameter is unused @@ -768,7 +768,7 @@ class DoliDBMysqli extends DoliDB * @param string $field Optionnel : Name of field if we want description of field * @return bool|mysqli_result Resultset x (x->Field, x->Type, ...) */ - function DDLDescTable($table,$field="") + function DDLDescTable($table, $field = "") { // phpcs:enable $sql="DESC ".$table." ".$field; @@ -788,7 +788,7 @@ class DoliDBMysqli extends DoliDB * @param string $field_position Optionnel ex.: "after champtruc" * @return int <0 if KO, >0 if OK */ - function DDLAddField($table,$field_name,$field_desc,$field_position="") + function DDLAddField($table, $field_name, $field_desc, $field_position = "") { // phpcs:enable // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra @@ -839,7 +839,7 @@ class DoliDBMysqli extends DoliDB * @param string $field_desc Array with description of field format * @return int <0 if KO, >0 if OK */ - function DDLUpdateField($table,$field_name,$field_desc) + function DDLUpdateField($table, $field_name, $field_desc) { // phpcs:enable $sql = "ALTER TABLE ".$table; @@ -885,7 +885,7 @@ class DoliDBMysqli extends DoliDB * @param string $field_name Name of field to drop * @return int <0 if KO, >0 if OK */ - function DDLDropField($table,$field_name) + function DDLDropField($table, $field_name) { // phpcs:enable $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; @@ -908,7 +908,7 @@ class DoliDBMysqli extends DoliDB * @param string $dolibarr_main_db_name Database name where user must be granted * @return int <0 if KO, >=0 if OK */ - function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) + function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) { // phpcs:enable $sql = "CREATE USER '".$this->escape($dolibarr_main_db_user)."'"; @@ -1082,7 +1082,7 @@ class DoliDBMysqli extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerParametersValues($filter='') + function getServerParametersValues($filter = '') { $result=array(); @@ -1103,7 +1103,7 @@ class DoliDBMysqli extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerStatusValues($filter='') + function getServerStatusValues($filter = '') { $result=array(); diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 85abdf2b004..b2c6f52d305 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -62,7 +62,7 @@ class DoliDBPgsql extends DoliDB * @param string $name Nom de la database * @param int $port Port of database server */ - function __construct($type, $host, $user, $pass, $name='', $port=0) + function __construct($type, $host, $user, $pass, $name = '', $port = 0) { global $conf,$langs; @@ -150,7 +150,7 @@ class DoliDBPgsql extends DoliDB * @param bool $unescapeslashquot Unescape slash quote with quote quote * @return string SQL request line converted */ - static function convertSQLFromMysql($line,$type='auto',$unescapeslashquot=false) + static function convertSQLFromMysql($line, $type = 'auto', $unescapeslashquot = false) { // Removed empty line if this is a comment line for SVN tagging if (preg_match('/^--\s\$Id/i',$line)) { @@ -389,7 +389,7 @@ class DoliDBPgsql extends DoliDB * @return false|resource Database access handler * @see close */ - function connect($host, $login, $passwd, $name, $port=0) + function connect($host, $login, $passwd, $name, $port = 0) { // use pg_pconnect() instead of pg_connect() if you want to use persistent connection costing 1ms, instead of 30ms for non persistent @@ -483,7 +483,7 @@ class DoliDBPgsql extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return false|resource Resultset of answer */ - function query($query,$usesavepoint=0,$type='auto') + function query($query, $usesavepoint = 0, $type = 'auto') { global $conf; @@ -631,7 +631,7 @@ class DoliDBPgsql extends DoliDB * @param resource $resultset Result set of request * @return void */ - function free($resultset=null) + function free($resultset = null) { // If resultset not provided, we take the last used by connexion if (! is_resource($resultset)) { $resultset=$this->_results; } @@ -647,7 +647,7 @@ class DoliDBPgsql extends DoliDB * @param int $offset Numero of line from where starting fetch * @return string String with SQL syntax to add a limit and offset */ - function plimit($limit=0,$offset=0) + function plimit($limit = 0, $offset = 0) { global $conf; if (empty($limit)) return ""; @@ -688,7 +688,7 @@ class DoliDBPgsql extends DoliDB * @param string $resko resultat si test non egal * @return string chaine formate SQL */ - function ifsql($test,$resok,$resko) + function ifsql($test, $resok, $resko) { return '(CASE WHEN '.$test.' THEN '.$resok.' ELSE '.$resko.' END)'; } @@ -777,7 +777,7 @@ class DoliDBPgsql extends DoliDB * @param string $fieldid Field name * @return string Id of row */ - function last_insert_id($tab,$fieldid='rowid') + function last_insert_id($tab, $fieldid = 'rowid') { // phpcs:enable //$result = pg_query($this->db,"SELECT MAX(".$fieldid.") FROM ".$tab); @@ -800,7 +800,7 @@ class DoliDBPgsql extends DoliDB * @param int $withQuotes Return string with quotes * @return string XXX(field) or XXX('value') or field or 'value' */ - function encrypt($fieldorvalue, $withQuotes=0) + function encrypt($fieldorvalue, $withQuotes = 0) { global $conf; @@ -862,7 +862,7 @@ class DoliDBPgsql extends DoliDB * @param string $owner Username of database owner * @return false|resource resource defined if OK, null if KO */ - function DDLCreateDb($database,$charset='',$collation='',$owner='') + function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') { // phpcs:enable if (empty($charset)) $charset=$this->forcecharset; @@ -885,7 +885,7 @@ class DoliDBPgsql extends DoliDB * @param string $table Name of table filter ('xxx%') * @return array List of tables in an array */ - function DDLListTables($database, $table='') + function DDLListTables($database, $table = '') { // phpcs:enable $listtables=array(); @@ -958,7 +958,7 @@ class DoliDBPgsql extends DoliDB * @param array $keys Tableau des champs cles noms => valeur * @return int <0 if KO, >=0 if OK */ - function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) + function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) { // phpcs:enable // FIXME: $fulltext_keys parameter is unused @@ -1054,7 +1054,7 @@ class DoliDBPgsql extends DoliDB * @param string $dolibarr_main_db_name Database name where user must be granted * @return int <0 if KO, >=0 if OK */ - function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) + function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) { // phpcs:enable // Note: using ' on user does not works with pgsql @@ -1078,7 +1078,7 @@ class DoliDBPgsql extends DoliDB * @param string $field Optionnel : Name of field if we want description of field * @return false|resource Resultset x (x->attname) */ - function DDLDescTable($table,$field="") + function DDLDescTable($table, $field = "") { // phpcs:enable $sql ="SELECT attname FROM pg_attribute, pg_type WHERE typname = '".$table."' AND attrelid = typrelid"; @@ -1100,7 +1100,7 @@ class DoliDBPgsql extends DoliDB * @param string $field_position Optionnel ex.: "after champtruc" * @return int <0 if KO, >0 if OK */ - function DDLAddField($table,$field_name,$field_desc,$field_position="") + function DDLAddField($table, $field_name, $field_desc, $field_position = "") { // phpcs:enable // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra @@ -1140,7 +1140,7 @@ class DoliDBPgsql extends DoliDB * @param string $field_desc Array with description of field format * @return int <0 if KO, >0 if OK */ - function DDLUpdateField($table,$field_name,$field_desc) + function DDLUpdateField($table, $field_name, $field_desc) { // phpcs:enable $sql = "ALTER TABLE ".$table; @@ -1184,7 +1184,7 @@ class DoliDBPgsql extends DoliDB * @param string $field_name Name of field to drop * @return int <0 if KO, >0 if OK */ - function DDLDropField($table,$field_name) + function DDLDropField($table, $field_name) { // phpcs:enable $sql= "ALTER TABLE ".$table." DROP COLUMN ".$field_name; @@ -1343,7 +1343,7 @@ class DoliDBPgsql extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerParametersValues($filter='') + function getServerParametersValues($filter = '') { $result=array(); @@ -1364,7 +1364,7 @@ class DoliDBPgsql extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerStatusValues($filter='') + function getServerStatusValues($filter = '') { /* This is to return current running requests. $sql='SELECT datname,procpid,current_query FROM pg_stat_activity ORDER BY procpid'; diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index bbd5853f95f..439c62af122 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -57,7 +57,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $name Nom de la database * @param int $port Port of database server */ - function __construct($type, $host, $user, $pass, $name='', $port=0) + function __construct($type, $host, $user, $pass, $name = '', $port = 0) { global $conf; @@ -134,7 +134,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return string SQL request line converted */ - static function convertSQLFromMysql($line,$type='ddl') + static function convertSQLFromMysql($line, $type = 'ddl') { // Removed empty line if this is a comment line for SVN tagging if (preg_match('/^--\s\$Id/i',$line)) { @@ -323,7 +323,7 @@ class DoliDBSqlite3 extends DoliDB * @return SQLite3 Database access handler * @see close */ - function connect($host, $login, $passwd, $name, $port=0) + function connect($host, $login, $passwd, $name, $port = 0) { global $main_data_dir; @@ -401,7 +401,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) * @return SQLite3Result Resultset of answer */ - function query($query,$usesavepoint=0,$type='auto') + function query($query, $usesavepoint = 0, $type = 'auto') { $ret=null; $query = trim($query); @@ -602,7 +602,7 @@ class DoliDBSqlite3 extends DoliDB * @param SQLite3Result $resultset Curseur de la requete voulue * @return void */ - function free($resultset=null) + function free($resultset = null) { // If resultset not provided, we take the last used by connexion if (! is_object($resultset)) { $resultset=$this->_results; } @@ -710,7 +710,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $fieldid Field name * @return int Id of row */ - function last_insert_id($tab,$fieldid='rowid') + function last_insert_id($tab, $fieldid = 'rowid') { // phpcs:enable return $this->db->lastInsertRowId(); @@ -724,7 +724,7 @@ class DoliDBSqlite3 extends DoliDB * @param int $withQuotes Return string with quotes * @return string XXX(field) or XXX('value') or field or 'value' */ - function encrypt($fieldorvalue, $withQuotes=0) + function encrypt($fieldorvalue, $withQuotes = 0) { global $conf; @@ -810,7 +810,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $owner Username of database owner * @return SQLite3Result resource defined if OK, null if KO */ - function DDLCreateDb($database,$charset='',$collation='',$owner='') + function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') { // phpcs:enable if (empty($charset)) $charset=$this->forcecharset; @@ -840,7 +840,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $table Name of table filter ('xxx%') * @return array List of tables in an array */ - function DDLListTables($database, $table='') + function DDLListTables($database, $table = '') { // phpcs:enable $listtables=array(); @@ -900,7 +900,7 @@ class DoliDBSqlite3 extends DoliDB * @param array $keys Tableau des champs cles noms => valeur * @return int <0 if KO, >=0 if OK */ - function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null) + function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) { // phpcs:enable // FIXME: $fulltext_keys parameter is unused @@ -993,7 +993,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $field Optionnel : Name of field if we want description of field * @return SQLite3Result Resource */ - function DDLDescTable($table,$field="") + function DDLDescTable($table, $field = "") { // phpcs:enable $sql="DESC ".$table." ".$field; @@ -1013,7 +1013,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $field_position Optionnel ex.: "after champtruc" * @return int <0 if KO, >0 if OK */ - function DDLAddField($table,$field_name,$field_desc,$field_position="") + function DDLAddField($table, $field_name, $field_desc, $field_position = "") { // phpcs:enable // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra @@ -1057,7 +1057,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $field_desc Array with description of field format * @return int <0 if KO, >0 if OK */ - function DDLUpdateField($table,$field_name,$field_desc) + function DDLUpdateField($table, $field_name, $field_desc) { // phpcs:enable $sql = "ALTER TABLE ".$table; @@ -1080,7 +1080,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $field_name Name of field to drop * @return int <0 if KO, >0 if OK */ - function DDLDropField($table,$field_name) + function DDLDropField($table, $field_name) { // phpcs:enable $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; @@ -1104,7 +1104,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $dolibarr_main_db_name Database name where user must be granted * @return int <0 if KO, >=0 if OK */ - function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) + function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) { // phpcs:enable $sql = "INSERT INTO user "; @@ -1236,7 +1236,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerParametersValues($filter='') + function getServerParametersValues($filter = '') { $result=array(); static $pragmas; @@ -1285,7 +1285,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $filter Filter list on a particular value * @return array Array of key-values (key=>value) */ - function getServerStatusValues($filter='') + function getServerStatusValues($filter = '') { $result=array(); /* diff --git a/htdocs/core/filemanagerdol/connectors/php/basexml.php b/htdocs/core/filemanagerdol/connectors/php/basexml.php index f1fe5365e7a..72722a1a948 100644 --- a/htdocs/core/filemanagerdol/connectors/php/basexml.php +++ b/htdocs/core/filemanagerdol/connectors/php/basexml.php @@ -55,7 +55,7 @@ function SetXmlHeaders() * @param string $currentFolder Current folder * @return void */ -function CreateXmlHeader( $command, $resourceType, $currentFolder ) +function CreateXmlHeader($command, $resourceType, $currentFolder) { SetXmlHeaders(); diff --git a/htdocs/core/filemanagerdol/connectors/php/commands.php b/htdocs/core/filemanagerdol/connectors/php/commands.php index 34e32fa5f99..58f7c20c109 100644 --- a/htdocs/core/filemanagerdol/connectors/php/commands.php +++ b/htdocs/core/filemanagerdol/connectors/php/commands.php @@ -67,7 +67,7 @@ function GetFolders($resourceType, $currentFolder) * @param string $currentFolder Current folder * @return void */ -function GetFoldersAndFiles( $resourceType, $currentFolder ) +function GetFoldersAndFiles($resourceType, $currentFolder) { // Map the virtual path to the local server path. $sServerDir = ServerMapFolder($resourceType, $currentFolder, 'GetFoldersAndFiles'); @@ -132,7 +132,7 @@ function GetFoldersAndFiles( $resourceType, $currentFolder ) * @param string $currentFolder Current folder * @return void */ -function CreateFolder( $resourceType, $currentFolder ) +function CreateFolder($resourceType, $currentFolder) { if (!isset($_GET)) { global $_GET; diff --git a/htdocs/core/filemanagerdol/connectors/php/io.php b/htdocs/core/filemanagerdol/connectors/php/io.php index 3ac325ed5d4..7d544ae9cce 100644 --- a/htdocs/core/filemanagerdol/connectors/php/io.php +++ b/htdocs/core/filemanagerdol/connectors/php/io.php @@ -29,7 +29,7 @@ * @param string $sFolder sFolder * @return string Combined path */ -function CombinePaths( $sBasePath, $sFolder ) +function CombinePaths($sBasePath, $sFolder) { return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/'); } @@ -238,7 +238,7 @@ function GetRootPath() // Emulate the asp Server.mapPath function. // given an url path return the physical directory that it corresponds to -function Server_MapPath( $path ) +function Server_MapPath($path) { // This function is available only for Apache if (function_exists('apache_lookup_uri')) { @@ -339,7 +339,7 @@ function GetCurrentFolder() } // Do a cleanup of the folder name to avoid possible problems -function SanitizeFolderName( $sNewFolderName ) +function SanitizeFolderName($sNewFolderName) { $sNewFolderName = stripslashes($sNewFolderName); @@ -350,7 +350,7 @@ function SanitizeFolderName( $sNewFolderName ) } // Do a cleanup of the file name to avoid possible problems -function SanitizeFileName( $sNewFileName ) +function SanitizeFileName($sNewFileName) { global $Config ; @@ -367,7 +367,7 @@ function SanitizeFileName( $sNewFileName ) } // This is the function that sends the results of the uploading process. -function SendUploadResults( $errorNumber, $fileUrl = '', $fileName = '', $customMsg = '' ) +function SendUploadResults($errorNumber, $fileUrl = '', $fileName = '', $customMsg = '') { // Minified version of the document.domain automatic fix script (#1919). // The original script can be found at _dev/domain_fix_template.js diff --git a/htdocs/core/filemanagerdol/connectors/php/util.php b/htdocs/core/filemanagerdol/connectors/php/util.php index f23ba45550a..0b39003f494 100644 --- a/htdocs/core/filemanagerdol/connectors/php/util.php +++ b/htdocs/core/filemanagerdol/connectors/php/util.php @@ -82,7 +82,7 @@ function FindBadUtf8($string) * @param string $value Value * @return string */ -function ConvertToXmlAttribute( $value ) +function ConvertToXmlAttribute($value) { if ( defined('PHP_OS') ) { @@ -110,7 +110,7 @@ function ConvertToXmlAttribute( $value ) * @param array $formExtensions Array of extensions * @return boolean */ -function IsHtmlExtension( $ext, $formExtensions ) +function IsHtmlExtension($ext, $formExtensions) { if (!$formExtensions || !is_array($formExtensions) ) { @@ -132,7 +132,7 @@ function IsHtmlExtension( $ext, $formExtensions ) * @param string $filePath absolute path to file * @return boolean */ -function DetectHtml( $filePath ) +function DetectHtml($filePath) { $fp = @fopen($filePath, 'rb'); @@ -202,7 +202,7 @@ function DetectHtml( $filePath ) * @param string $extension File extension * @return boolean True or false */ -function IsImageValid( $filePath, $extension ) +function IsImageValid($filePath, $extension) { if (!@is_readable($filePath)) { return -1; diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index b0b6dc6855c..30ace607536 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -152,7 +152,7 @@ function length_accounta($accounta) * @param string $varlink Add a variable into the address of the page * @return void */ -function journalHead($nom,$variante,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='', $varlink='') +function journalHead($nom, $variante, $period, $periodlink, $description, $builddate, $exportlink = '', $moreparam = array(), $calcmode = '', $varlink = '') { global $langs; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index aae550d65f8..77a21100f48 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -55,7 +55,7 @@ function versiontostring($versionarray) * 0 if same * 1,2,3,4 if versionarray1>versionarray2 (value depends on level of difference) */ -function versioncompare($versionarray1,$versionarray2) +function versioncompare($versionarray1, $versionarray2) { $ret=0; $level=0; @@ -127,7 +127,7 @@ function versiondolibarrarray() * @param int $offsetforchartofaccount Offset to use to load chart of account table to update sql on the fly to add offset to rowid and account_parent value * @return int <=0 if KO, >0 if OK */ -function run_sql($sqlfile, $silent=1, $entity='', $usesavepoint=1, $handler='', $okerror='default', $linelengthlimit=32768, $nocommentremoval=0, $offsetforchartofaccount=0) +function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handler = '', $okerror = 'default', $linelengthlimit = 32768, $nocommentremoval = 0, $offsetforchartofaccount = 0) { global $db, $conf, $langs, $user; @@ -432,7 +432,7 @@ function run_sql($sqlfile, $silent=1, $entity='', $usesavepoint=1, $handler='', * * @see dolibarr_get_const, dolibarr_set_const, dol_set_user_param */ -function dolibarr_del_const($db, $name, $entity=1) +function dolibarr_del_const($db, $name, $entity = 1) { global $conf; @@ -472,7 +472,7 @@ function dolibarr_del_const($db, $name, $entity=1) * * @see dolibarr_del_const, dolibarr_set_const, dol_set_user_param */ -function dolibarr_get_const($db, $name, $entity=1) +function dolibarr_get_const($db, $name, $entity = 1) { global $conf; $value=''; @@ -507,7 +507,7 @@ function dolibarr_get_const($db, $name, $entity=1) * * @see dolibarr_del_const, dolibarr_get_const, dol_set_user_param */ -function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1) +function dolibarr_set_const($db, $name, $value, $type = 'chaine', $visible = 0, $note = '', $entity = 1) { global $conf; @@ -864,7 +864,7 @@ function purgeSessions($mysessionid) * @param int $withdeps Activate/Disable also all dependencies * @return array array('nbmodules'=>nb modules activated with success, 'errors=>array of error messages, 'nbperms'=>Nb permission added); */ -function activateModule($value,$withdeps=1) +function activateModule($value, $withdeps = 1) { global $db, $modules, $langs, $conf, $mysoc; @@ -1008,7 +1008,7 @@ function activateModule($value,$withdeps=1) * @param int $requiredby 1=Desactive aussi modules dependants * @return string Error message or ''; */ -function unActivateModule($value, $requiredby=1) +function unActivateModule($value, $requiredby = 1) { global $db, $modules, $conf; @@ -1085,7 +1085,7 @@ function unActivateModule($value, $requiredby=1) * @param array $tabfieldcheck Tabfieldcheck * @return int 1 */ -function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond,&$tabhelp,&$tabfieldcheck) +function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tabsql, &$tabsqlsort, &$tabfield, &$tabfieldvalue, &$tabfieldinsert, &$tabrowid, &$tabcond, &$tabhelp, &$tabfieldcheck) { global $db, $modules, $conf, $langs; @@ -1362,7 +1362,7 @@ function complete_elementList_with_modules(&$elementList) * @param string $helptext Help * @return void */ -function form_constantes($tableau, $strictw3c=0, $helptext='') +function form_constantes($tableau, $strictw3c = 0, $helptext = '') { global $db,$bc,$langs,$conf,$user; global $_Avery_Labels; @@ -1606,7 +1606,7 @@ function showModulesExludedForExternal($modules) * @param string $description Model description * @return int <0 if KO, >0 if OK */ -function addDocumentModel($name, $type, $label='', $description='') +function addDocumentModel($name, $type, $label = '', $description = '') { global $db, $conf; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 6dab036193d..9b7481af7af 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -47,7 +47,7 @@ * @param int $resourceid Preselected value of resource for filter on resource * @return void */ -function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid='', $excludetype='', $resourceid=0) +function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals = array(), $actioncode = '', $usergroupid = '', $excludetype = '', $resourceid = 0) { global $conf, $user, $langs, $db, $hookmanager; global $begin_h, $end_h, $begin_d, $end_d; @@ -209,7 +209,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh * @param int $max Max nb of records * @return void */ -function show_array_actions_to_do($max=5) +function show_array_actions_to_do($max = 5) { global $langs, $conf, $user, $db, $bc, $socid; @@ -309,7 +309,7 @@ function show_array_actions_to_do($max=5) * @param int $max Max nb of records * @return void */ -function show_array_last_actions_done($max=5) +function show_array_last_actions_done($max = 5) { global $langs, $conf, $user, $db, $bc, $socid; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 4b4d36aa20b..8a2aa8f91a9 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -43,7 +43,7 @@ * - Ex: array('option_disabled'=> id to disable and warning to show if we select a disabled value (this is possible when using autocomplete ajax) * @return string Script */ -function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLength=2, $autoselect=0, $ajaxoptions=array()) +function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLength = 2, $autoselect = 0, $ajaxoptions = array()) { if (empty($minLength)) $minLength=1; @@ -221,7 +221,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt * @param int $autoselect Automatic selection if just one value * @return string Script */ -function ajax_multiautocompleter($htmlname, $fields, $url, $option='', $minLength=2, $autoselect=0) +function ajax_multiautocompleter($htmlname, $fields, $url, $option = '', $minLength = 2, $autoselect = 0) { $script = '<!-- Autocomplete -->'."\n"; $script.= '<script>'; @@ -328,7 +328,7 @@ function ajax_multiautocompleter($htmlname, $fields, $url, $option='', $minLengt * @param int $h height of dialog box * @return void */ -function ajax_dialog($title,$message,$w=350,$h=150) +function ajax_dialog($title, $message, $w = 350, $h = 150) { global $langs; @@ -371,7 +371,7 @@ function ajax_dialog($title,$message,$w=350,$h=150) * @return string Return html string to convert a select field into a combo, or '' if feature has been disabled for some reason. * @see selectArrayAjax of html.form.class */ -function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve') +function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = 0, $forcefocus = 0, $widthTypeOfAutocomplete = 'resolve') { global $conf; @@ -481,7 +481,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $ * @param bool $strict Use only "disabled" with delConstant and "enabled" with setConstant * @return string */ -function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0) +function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0) { global $conf, $langs; @@ -549,7 +549,7 @@ function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, * @param array $input Array of type->list of CSS element to switch. Example: array('disabled'=>array(0=>'cssid')) * @return string html for button on/off */ -function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input=array()) +function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input = array()) { global $langs; diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index efd245209d2..49acbf31517 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -65,7 +65,7 @@ else $genbarcode_loc = $conf->global->GENBARCODE_LOCATION; * @param string $mode 'png' or 'jpg' ... * @return array|string $bars array('encoding': the encoding which has been used, 'bars': the bars, 'text': text-positioning info) or string with error message */ -function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png") +function barcode_print($code, $encoding = "ANY", $scale = 2, $mode = "png") { dol_syslog("barcode.lib.php::barcode_print $code $encoding $scale $mode"); @@ -108,7 +108,7 @@ function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png") * @param string $encoding Encoding * @return array array('encoding': the encoding which has been used, 'bars': the bars, 'text': text-positioning info) */ -function barcode_encode($code,$encoding) +function barcode_encode($code, $encoding) { global $genbarcode_loc; @@ -238,7 +238,7 @@ function barcode_encode_ean($ean, $encoding = "EAN-13") * @param string $encoding Encoding * @return array array('encoding': the encoding which has been used, 'bars': the bars, 'text': text-positioning info) */ -function barcode_encode_genbarcode($code,$encoding) +function barcode_encode_genbarcode($code, $encoding) { global $genbarcode_loc; diff --git a/htdocs/core/lib/categories.lib.php b/htdocs/core/lib/categories.lib.php index 4d85c412bab..769613f6b6c 100644 --- a/htdocs/core/lib/categories.lib.php +++ b/htdocs/core/lib/categories.lib.php @@ -29,7 +29,7 @@ * @param string $type Type of category * @return array Array of tabs to show */ -function categories_prepare_head($object,$type) +function categories_prepare_head($object, $type) { global $langs, $conf, $user; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 41b0f1af3ef..ebcca729d55 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -425,7 +425,7 @@ function societe_admin_prepare_head() * @param int $searchlabel Label of country to search (warning: searching on label is not reliable) * @return mixed Integer with country id or String with country code or translated country name or Array('id','code','label') or 'NotDefined' */ -function getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entconv=1, $searchlabel='') +function getCountry($searchkey, $withcode = '', $dbtouse = 0, $outputlangs = '', $entconv = 1, $searchlabel = '') { global $db,$langs; @@ -490,7 +490,7 @@ function getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entc * @param int $entconv 0=Return value without entities and not converted to output charset, 1=Ready for html output * @return mixed String with state code or state name or Array('id','code','label')/Array('id','code','label','region_code','region') */ -function getState($id,$withcode='',$dbtouse=0,$withregion=0,$outputlangs='',$entconv=1) +function getState($id, $withcode = '', $dbtouse = 0, $withregion = 0, $outputlangs = '', $entconv = 1) { global $db,$langs; @@ -566,7 +566,7 @@ function getState($id,$withcode='',$dbtouse=0,$withregion=0,$outputlangs='',$ent * @param Translate $outputlangs Output language * @return string Label translated of currency */ -function currency_name($code_iso, $withcode='', $outputlangs=null) +function currency_name($code_iso, $withcode = '', $outputlangs = null) { global $langs,$db; @@ -717,7 +717,7 @@ function isInEEC($object) * @param string $morehtmlright More html on right of title * @return void */ -function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelink=0, $morehtmlright='') +function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatelink = 0, $morehtmlright = '') { global $user; @@ -845,7 +845,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin * @param string $backtopage Url to go once contact is created * @return void */ -function show_contacts($conf,$langs,$db,$object,$backtopage='') +function show_contacts($conf, $langs, $db, $object, $backtopage = '') { global $user,$conf,$extrafields,$hookmanager; global $contextpage; @@ -1176,7 +1176,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') * @param string $backtopage Url to go once address is created * @return void */ -function show_addresses($conf,$langs,$db,$object,$backtopage='') +function show_addresses($conf, $langs, $db, $object, $backtopage = '') { global $user; @@ -1270,7 +1270,7 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='') * @param int $actioncode Filter on actioncode * @return mixed Return html part or void if noprint is 1 */ -function show_actions_todo($conf,$langs,$db,$filterobj,$objcon='',$noprint=0,$actioncode='') +function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '') { global $user,$conf; @@ -1296,7 +1296,7 @@ function show_actions_todo($conf,$langs,$db,$filterobj,$objcon='',$noprint=0,$ac * @param string $sortorder Sort order * @return mixed Return html part or void if noprint is 1 */ -function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=0, $actioncode='', $donetodo='done', $filters=array(), $sortfield='a.datep,a.id', $sortorder='DESC') +function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC') { global $user, $conf; global $form; @@ -1763,7 +1763,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= * @param Societe $object Third party object * @return void */ -function show_subsidiaries($conf,$langs,$db,$object) +function show_subsidiaries($conf, $langs, $db, $object) { global $user; diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 0f84f46497e..b9a4dcbe710 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -80,7 +80,7 @@ function getServerTimeZoneString() * @param string $refgmtdate Reference period for timezone (timezone differs on winter and summer. May be 'now', 'winter' or 'summer') * @return int An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer) */ -function getServerTimeZoneInt($refgmtdate='now') +function getServerTimeZoneInt($refgmtdate = 'now') { global $conf; if (method_exists('DateTimeZone','getOffset')) @@ -151,7 +151,7 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit) * @return int Time into seconds * @see convertSecondToTime */ -function convertTime2Seconds($iHours=0, $iMinutes=0, $iSeconds=0) +function convertTime2Seconds($iHours = 0, $iMinutes = 0, $iSeconds = 0) { $iResult=($iHours*3600)+($iMinutes*60)+$iSeconds; return $iResult; @@ -179,7 +179,7 @@ function convertTime2Seconds($iHours=0, $iMinutes=0, $iSeconds=0) * Example: 0 return 00:00, 3600 return 1:00, 86400 return 1d, 90000 return 1 Day 01:00 * @see convertTime2Seconds */ -function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengthOfWeek=7) +function convertSecondToTime($iSecond, $format = 'all', $lengthOfDay = 86400, $lengthOfWeek = 7) { global $langs; @@ -327,7 +327,7 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date) * * @see dol_print_date, dol_mktime, dol_getdate */ -function dol_stringtotime($string, $gm=1) +function dol_stringtotime($string, $gm = 1) { // Convert date with format DD/MM/YYY HH:MM:SS. This part of code should not be used. if (preg_match('/^([0-9]+)\/([0-9]+)\/([0-9]+)\s?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i',$string,$reg)) @@ -485,7 +485,7 @@ function dol_get_next_week($day, $week, $month, $year) * Exemple: dol_get_first_day(1970,1,true) will return 0 whatever is TZ, after a dol_print_date will return 1970-01-01 00:00:00 * @return int Date for first day, '' if error */ -function dol_get_first_day($year,$month=1,$gm=false) +function dol_get_first_day($year, $month = 1, $gm = false) { if ($year > 9999) return ''; return dol_mktime(0,0,0,$month,1,$year,$gm); @@ -499,7 +499,7 @@ function dol_get_first_day($year,$month=1,$gm=false) * @param boolean $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date. * @return int Date for first day, '' if error */ -function dol_get_last_day($year,$month=12,$gm=false) +function dol_get_last_day($year, $month = 12, $gm = false) { if ($year > 9999) return ''; if ($month == 12) @@ -527,7 +527,7 @@ function dol_get_last_day($year,$month=12,$gm=false) * @param int $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date. * @return array year,month,week,first_day,first_month,first_year,prev_day,prev_month,prev_year */ -function dol_get_first_day_week($day,$month,$year,$gm=false) +function dol_get_first_day_week($day, $month, $year, $gm = false) { global $conf; @@ -605,7 +605,7 @@ function dol_get_first_day_week($day,$month,$year,$gm=false) * @return int Nombre de jours feries * @see num_between_day, num_open_day */ -function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR', $lastday=0) +function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR', $lastday = 0) { global $conf; @@ -897,7 +897,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR', $ * @return int Number of days * @see also num_public_holiday, num_open_day */ -function num_between_day($timestampStart, $timestampEnd, $lastday=0) +function num_between_day($timestampStart, $timestampEnd, $lastday = 0) { if ($timestampStart < $timestampEnd) { @@ -927,7 +927,7 @@ function num_between_day($timestampStart, $timestampEnd, $lastday=0) * @return int Number of days or hours * @see also num_between_day, num_public_holiday */ -function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $halfday=0, $country_code='') +function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0, $halfday = 0, $country_code = '') { global $langs,$mysoc; @@ -971,7 +971,7 @@ function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $ha * @param int $short 0=Return long label, 1=Return short label * @return array Month string or array if selected < 0 */ -function monthArray($outputlangs,$short=0) +function monthArray($outputlangs, $short = 0) { $montharray = array ( 1 => $outputlangs->trans("Month01"), diff --git a/htdocs/core/lib/doc.lib.php b/htdocs/core/lib/doc.lib.php index b5e607fbbc5..57cadc28e72 100644 --- a/htdocs/core/lib/doc.lib.php +++ b/htdocs/core/lib/doc.lib.php @@ -38,7 +38,7 @@ * @param int $issupplierline Is it a line for a supplier object ? * @return string String with line */ -function doc_getlinedesc($line,$outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) +function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0) { global $db, $conf, $langs; diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index 459bb3e3f2b..5ed80465428 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -31,7 +31,7 @@ * @param int $edit 1 to add edit form * @return void */ -function show_skin($fuser,$edit=0) +function show_skin($fuser, $edit = 0) { global $conf,$langs,$db; global $bc; diff --git a/htdocs/core/lib/ecm.lib.php b/htdocs/core/lib/ecm.lib.php index 05f16e767ba..a1ec2bc4eba 100644 --- a/htdocs/core/lib/ecm.lib.php +++ b/htdocs/core/lib/ecm.lib.php @@ -72,7 +72,7 @@ function ecm_prepare_dasboard_head($object) * @param string $section Section * @return array Array of tabs to show */ -function ecm_prepare_head($object, $module='ecm', $section='') +function ecm_prepare_head($object, $module = 'ecm', $section = '') { global $langs, $conf, $user; $h = 0; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index ae80d371e33..28095a97ac9 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -56,7 +56,7 @@ function dol_basename($pathfile) * @return array Array of array('name'=>'xxx','fullname'=>'/abc/xxx','date'=>'yyy','size'=>99,'type'=>'dir|file',...) * @see dol_dir_list_indatabase */ -function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0) +function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excludefilter = null, $sortcriteria = "name", $sortorder = SORT_ASC, $mode = 0, $nohook = 0, $relativename = "", $donotfollowsymlinks = 0) { global $db, $hookmanager; global $object; @@ -226,7 +226,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil * @return array Array of array('name'=>'xxx','fullname'=>'/abc/xxx','type'=>'dir|file',...) * @see dol_dir_list */ -function dol_dir_list_in_database($path, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0) +function dol_dir_list_in_database($path, $filter = "", $excludefilter = null, $sortcriteria = "name", $sortorder = SORT_ASC, $mode = 0) { global $conf, $db; @@ -578,7 +578,7 @@ function dol_filemtime($pathoffile) * @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK * @see dol_copy dolReplaceRegExInFile */ -function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, $indexdatabase=0) +function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = 0, $indexdatabase = 0) { global $conf; @@ -648,7 +648,7 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, * @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK * @see dol_copy dolReplaceInFile */ -function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, $indexdatabase=0) +function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = 0, $indexdatabase = 0) { // TODO } @@ -663,7 +663,7 @@ function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile='', $newma * @return int <0 if error, 0 if nothing done (dest file already exists and overwriteifexists=0), >0 if OK * @see dol_delete_file */ -function dol_copy($srcfile, $destfile, $newmask=0, $overwriteifexists=1) +function dol_copy($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1) { global $conf; @@ -719,7 +719,7 @@ function dol_copy($srcfile, $destfile, $newmask=0, $overwriteifexists=1) * @return int <0 if error, 0 if nothing done (all files already exists and overwriteifexists=0), >0 if OK * @see dol_copy */ -function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement=null) +function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement = null) { global $conf; @@ -811,7 +811,7 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep * @return boolean True if OK, false if KO * @see dol_move_uploaded_file */ -function dol_move($srcfile, $destfile, $newmask=0, $overwriteifexists=1, $testvirus=0, $indexdatabase=1) +function dol_move($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1, $testvirus = 0, $indexdatabase = 1) { global $user, $db, $conf; $result=false; @@ -993,7 +993,7 @@ function dolCheckVirus($src_file) * @return int >0 if OK, <0 or string if KO * @see dol_move */ -function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile') +function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan = 0, $uploaderrorcode = 0, $nohook = 0, $varfiles = 'addedfile') { global $conf, $db, $user, $langs; global $object, $hookmanager; @@ -1136,7 +1136,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable * @return boolean True if no error (file is deleted or if glob is used and there's nothing to delete), False if error * @see dol_delete_dir */ -function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1) +function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0, $object = null, $allowdotdot = false, $indexdatabase = 1) { global $db, $conf, $user, $langs; global $hookmanager; @@ -1246,7 +1246,7 @@ function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $obje * @return boolean True if success, false if error * @see dol_delete_file dol_copy */ -function dol_delete_dir($dir,$nophperrors=0) +function dol_delete_dir($dir, $nophperrors = 0) { // Security: // We refuse transversal using .. and pipes into filenames. @@ -1270,7 +1270,7 @@ function dol_delete_dir($dir,$nophperrors=0) * @param int $countdeleted Counter to count nb of elements found really deleted * @return int Number of files and directory we try to remove. NB really removed is returned into var by reference $countdeleted. */ -function dol_delete_dir_recursive($dir, $count=0, $nophperrors=0, $onlysub=0, &$countdeleted=0) +function dol_delete_dir_recursive($dir, $count = 0, $nophperrors = 0, $onlysub = 0, &$countdeleted = 0) { dol_syslog("functions.lib:dol_delete_dir_recursive ".$dir,LOG_DEBUG); if (dol_is_dir($dir)) @@ -1478,7 +1478,7 @@ function dol_meta_create($object) * @param string $trackid Track id (used to prefix name of session vars to avoid conflict) * @return void */ -function dol_init_file_process($pathtoscan='', $trackid='') +function dol_init_file_process($pathtoscan = '', $trackid = '') { $listofpaths=array(); $listofnames=array(); @@ -1516,7 +1516,7 @@ function dol_init_file_process($pathtoscan='', $trackid='') * @param int $generatethumbs 1=Generate also thumbs for uploaded image files * @return int <=0 if KO, >0 if OK */ -function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesession=0, $varfiles='addedfile', $savingdocmask='', $link=null, $trackid='', $generatethumbs=1) +function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesession = 0, $varfiles = 'addedfile', $savingdocmask = '', $link = null, $trackid = '', $generatethumbs = 1) { global $db,$user,$conf,$langs; @@ -1660,7 +1660,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio * @param string $trackid Track id (used to prefix name of session vars to avoid conflict) * @return void */ -function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile=1,$trackid='') +function dol_remove_file_process($filenb, $donotupdatesession = 0, $donotdeletefile = 1, $trackid = '') { global $db,$user,$conf,$langs,$_FILES; @@ -1712,7 +1712,7 @@ function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile= * @param int $setsharekey Set also the share key * @return int <0 if KO, 0 if nothing done, >0 if OK */ -function addFileIntoDatabaseIndex($dir, $file, $fullpathorig='', $mode='uploaded', $setsharekey=0) +function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uploaded', $setsharekey = 0) { global $db, $user; @@ -1760,7 +1760,7 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig='', $mode='uploaded * @param string $mode How file was created ('uploaded', 'generated', ...) * @return int <0 if KO, 0 if nothing done, >0 if OK */ -function deleteFilesIntoDatabaseIndex($dir, $file, $mode='uploaded') +function deleteFilesIntoDatabaseIndex($dir, $file, $mode = 'uploaded') { global $conf, $db, $user; @@ -1816,7 +1816,7 @@ function deleteFilesIntoDatabaseIndex($dir, $file, $mode='uploaded') * @param string $fileoutput Output filename * @return int <0 if KO, 0=Nothing done, >0 if OK */ -function dol_convert_file($fileinput, $ext='png', $fileoutput='') +function dol_convert_file($fileinput, $ext = 'png', $fileoutput = '') { global $langs; @@ -1874,7 +1874,7 @@ function dol_convert_file($fileinput, $ext='png', $fileoutput='') * @param string $mode 'gz' or 'bz' or 'zip' * @return int <0 if KO, >0 if OK */ -function dol_compress_file($inputfile, $outputfile, $mode="gz") +function dol_compress_file($inputfile, $outputfile, $mode = "gz") { $foundhandler=0; @@ -1927,7 +1927,7 @@ function dol_compress_file($inputfile, $outputfile, $mode="gz") * @param string $outputdir Target dir name * @return array array('error'=>'Error code') or array() if no error */ -function dol_uncompress($inputfile,$outputdir) +function dol_uncompress($inputfile, $outputdir) { global $langs; @@ -1988,7 +1988,7 @@ function dol_uncompress($inputfile,$outputdir) * @param string $mode 'zip' * @return int <0 if KO, >0 if OK */ -function dol_compress_dir($inputdir, $outputfile, $mode="zip") +function dol_compress_dir($inputdir, $outputfile, $mode = "zip") { $foundhandler=0; @@ -2088,7 +2088,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode="zip") * @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only * @return string Full path to most recent file */ -function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta|_preview.*\.png)$','^\.'),$nohook=false,$mode='') +function dol_most_recent_file($dir, $regexfilter = '', $excludefilter = array('(\.meta|_preview.*\.png)$','^\.'), $nohook = false, $mode = '') { $tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,$mode,$nohook); return $tmparray[0]; @@ -2106,7 +2106,7 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta * @return mixed Array with access information : 'accessallowed' & 'sqlprotectagainstexternals' & 'original_file' (as a full path name) * @see restrictedArea */ -function dol_check_secure_access_document($modulepart, $original_file, $entity, $fuser='', $refname='', $mode='read') +function dol_check_secure_access_document($modulepart, $original_file, $entity, $fuser = '', $refname = '', $mode = 'read') { global $conf, $db, $user; global $dolibarr_main_data_root, $dolibarr_main_document_root_alt; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 690a3ff5152..ca89eeba47c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -76,7 +76,7 @@ function getDoliDBInstance($type, $host, $user, $pass, $name, $port) * @param object $currentobject Current object if needed * @return mixed Entity id(s) to use */ -function getEntity($element, $shared=1, $currentobject=null) +function getEntity($element, $shared = 1, $currentobject = null) { global $conf, $mc; @@ -231,7 +231,7 @@ function GETPOSTISSET($paramname) * @param string $noreplace Force disable of replacement of __xxx__ strings. * @return string|string[] Value found (string or array), or '' if check fails */ -function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=null, $noreplace=0) +function GETPOST($paramname, $check = 'none', $method = 0, $filter = null, $options = null, $noreplace = 0) { global $mysoc,$user,$conf; @@ -580,7 +580,7 @@ if (! function_exists('dol_getprefix')) * @param string $mode '' (prefix for session name) or 'email' (prefix for email id) * @return string A calculated prefix */ - function dol_getprefix($mode='') + function dol_getprefix($mode = '') { global $conf; @@ -615,7 +615,7 @@ if (! function_exists('dol_getprefix')) * @param string $classname Class name (deprecated) * @return bool True if load is a success, False if it fails */ -function dol_include_once($relpath, $classname='') +function dol_include_once($relpath, $classname = '') { global $conf,$langs,$user,$mysoc; // Do not remove this. They must be defined for files we include. Other globals var must be retreived with $GLOBALS['var'] @@ -644,7 +644,7 @@ function dol_include_once($relpath, $classname='') * 2:If $type==0 and if file was not found into alternate dir, test into main dir, return default path if found, empty string if not found * @return string Full filesystem path (if path=0), Full url path (if mode=1) */ -function dol_buildpath($path, $type=0, $returnemptyifnotfound=0) +function dol_buildpath($path, $type = 0, $returnemptyifnotfound = 0) { global $conf; @@ -742,7 +742,7 @@ function dol_buildpath($path, $type=0, $returnemptyifnotfound=0) * @return object Object clone * @see https://php.net/manual/language.oop5.cloning.php */ -function dol_clone($object, $native=0) +function dol_clone($object, $native = 0) { //dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING); @@ -767,7 +767,7 @@ function dol_clone($object, $native=0) * 'width' = function is used to define a width * @return int New size after optimizing */ -function dol_size($size,$type='') +function dol_size($size, $type = '') { global $conf; if (empty($conf->dol_optimize_smallscreen)) return $size; @@ -786,7 +786,7 @@ function dol_size($size,$type='') * * @see dol_string_nospecial, dol_string_unaccent, dol_sanitizePathName */ -function dol_sanitizeFileName($str,$newstr='_',$unaccent=1) +function dol_sanitizeFileName($str, $newstr = '_', $unaccent = 1) { $filesystem_forbidden_chars = array('<','>','/','\\','?','*','|','"','°'); return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars); @@ -802,7 +802,7 @@ function dol_sanitizeFileName($str,$newstr='_',$unaccent=1) * * @see dol_string_nospecial, dol_string_unaccent, dol_sanitizeFileName */ -function dol_sanitizePathName($str,$newstr='_',$unaccent=1) +function dol_sanitizePathName($str, $newstr = '_', $unaccent = 1) { $filesystem_forbidden_chars = array('<','>','?','*','|','"','°'); return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars); @@ -874,7 +874,7 @@ function dol_string_unaccent($str) * * @see dol_sanitizeFilename, dol_string_unaccent */ -function dol_string_nospecial($str,$newstr='_',$badcharstoreplace='') +function dol_string_nospecial($str, $newstr = '_', $badcharstoreplace = '') { $forbidden_chars_to_replace=array(" ", "'", "/", "\\", ":", "*", "?", "\"", "<", ">", "|", "[", "]", ",", ";", "=", '°'); // more complete than dol_sanitizeFileName $forbidden_chars_to_remove=array(); @@ -904,7 +904,7 @@ function dolEscapeXML($string) * @param int $noescapebackslashn 0=Escape also \n. 1=Do not escape \n. * @return string Escaped string. Both ' and " are escaped into ' if they are escaped. */ -function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0) +function dol_escape_js($stringtoescape, $mode = 0, $noescapebackslashn = 0) { // escape quotes and backslashes, newlines, etc. $substitjs=array("'"=>"\\'","\r"=>'\\r'); @@ -927,7 +927,7 @@ function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0) * @return string Escaped string * @see dol_string_nohtmltag, dol_string_nospecial, dol_string_unaccent */ -function dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0) +function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0) { // escape quotes and backslashes, newlines, etc. $tmp=html_entity_decode($stringtoescape, ENT_COMPAT, 'UTF-8'); // TODO Use htmlspecialchars_decode instead, that make only required change for html tags @@ -980,7 +980,7 @@ function dol_strtoupper($utf8_string) * @param string $restricttologhandler Output log only for this log handler * @return void */ -function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='', $restricttologhandler='') +function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = '', $restricttologhandler = '') { global $conf, $user; @@ -1072,7 +1072,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename=' * @param string $morecss More Css * @return void */ -function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='') +function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '') { print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright, $morecss); } @@ -1090,7 +1090,7 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto * @param string $morecss More Css * @return string */ -function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='') +function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '') { global $conf, $langs, $hookmanager; @@ -1250,7 +1250,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi * @param int $notab -1 or 0=Add tab footer, 1=no tab footer * @return void */ -function dol_fiche_end($notab=0) +function dol_fiche_end($notab = 0) { print dol_get_fiche_end($notab); } @@ -1261,7 +1261,7 @@ function dol_fiche_end($notab=0) * @param int $notab -1 or 0=Add tab footer, 1=no tab footer * @return string */ -function dol_get_fiche_end($notab=0) +function dol_get_fiche_end($notab = 0) { if (! $notab || $notab == -1) return "\n</div>\n"; else return ''; @@ -1286,7 +1286,7 @@ function dol_get_fiche_end($notab=0) * @param string $morehtmlright More html code to show before navigation arrows * @return void */ -function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='') +function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $onlybanner = 0, $morehtmlright = '') { global $conf, $form, $user, $langs; @@ -1568,7 +1568,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r * @return string * @deprecated Form::editfieldkey */ -function fieldLabel($langkey, $fieldkey, $fieldrequired=0) +function fieldLabel($langkey, $fieldkey, $fieldrequired = 0) { global $conf, $langs; $ret=''; @@ -1587,7 +1587,7 @@ function fieldLabel($langkey, $fieldkey, $fieldrequired=0) * @param string $moreclass More class to add * @return string String to add class onto HTML element */ -function dol_bc($var,$moreclass='') +function dol_bc($var, $moreclass = '') { global $bc; $ret=' '.$bc[$var]; @@ -1606,7 +1606,7 @@ function dol_bc($var,$moreclass='') * @return string Formated string * @see dol_print_address */ -function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', $mode=0) +function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs = '', $mode = 0) { global $conf,$langs; @@ -1680,7 +1680,7 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='', * @param int $is_gmt See comment of timestamp parameter * @return string A formatted string */ -function dol_strftime($fmt, $ts=false, $is_gmt=false) +function dol_strftime($fmt, $ts = false, $is_gmt = false) { if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts); @@ -1709,7 +1709,7 @@ function dol_strftime($fmt, $ts=false, $is_gmt=false) * * @see dol_mktime, dol_stringtotime, dol_getdate */ -function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$encodetooutput=false) +function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlangs = '', $encodetooutput = false) { global $conf,$langs; @@ -1886,7 +1886,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e * 'ndays' => $ndays * @see dol_print_date, dol_stringtotime, dol_mktime */ -function dol_getdate($timestamp,$fast=false) +function dol_getdate($timestamp, $fast = false) { global $conf; @@ -1925,7 +1925,7 @@ function dol_getdate($timestamp,$fast=false) * @return int|string Date as a timestamp, '' or false if error * @see dol_print_date, dol_stringtotime, dol_getdate */ -function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) +function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = false, $check = 1) { global $conf; //print "- ".$hour.",".$minute.",".$second.",".$month.",".$day.",".$year.",".$_SERVER["WINDIR"]." -"; @@ -2008,7 +2008,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) * 'tzuser' => we add the user timezone * @return int $date Timestamp */ -function dol_now($mode='gmt') +function dol_now($mode = 'gmt') { $ret=0; @@ -2047,7 +2047,7 @@ function dol_now($mode='gmt') * @param int $shortunit Use short label of size unit (for example 'b' instead of 'bytes') * @return string Link */ -function dol_print_size($size,$shortvalue=0,$shortunit=0) +function dol_print_size($size, $shortvalue = 0, $shortunit = 0) { global $conf,$langs; $level=1024; @@ -2083,7 +2083,7 @@ function dol_print_size($size,$shortvalue=0,$shortunit=0) * @param int $withpicto With picto * @return string HTML Link */ -function dol_print_url($url,$target='_blank',$max=32,$withpicto=0) +function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0) { global $langs; @@ -2113,7 +2113,7 @@ function dol_print_url($url,$target='_blank',$max=32,$withpicto=0) * @param int $withpicto Show picto * @return string HTML Link */ -function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=1,$withpicto=0) +function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, $showinvalid = 1, $withpicto = 0) { global $conf,$user,$langs,$hookmanager; @@ -2170,7 +2170,7 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid= * @param string $type 'skype','facebook',... * @return string HTML Link */ -function dol_print_socialnetworks($value,$cid,$socid,$type) +function dol_print_socialnetworks($value, $cid, $socid, $type) { global $conf,$user,$langs; @@ -2226,7 +2226,7 @@ function dol_print_socialnetworks($value,$cid,$socid,$type) * @param int $adddivfloat Add div float around phone. * @return string Formated phone number */ -function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='',$titlealt='',$adddivfloat=0) +function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addlink = '', $separ = " ", $withpicto = '', $titlealt = '', $adddivfloat = 0) { global $conf, $user, $langs, $mysoc, $hookmanager; @@ -2605,7 +2605,7 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep * @param int $mode 0=return IP + country/flag, 1=return only country/flag, 2=return only IP * @return string Formated IP, with country if GeoIP module is enabled */ -function dol_print_ip($ip,$mode=0) +function dol_print_ip($ip, $mode = 0) { global $conf,$langs; @@ -2710,7 +2710,7 @@ function dol_user_country() * @return string|void Nothing if noprint is 0, formatted address if noprint is 1 * @see dol_format_address */ -function dol_print_address($address, $htmlid, $mode, $id, $noprint=0, $charfornl='') +function dol_print_address($address, $htmlid, $mode, $id, $noprint = 0, $charfornl = '') { global $conf, $user, $langs, $hookmanager; @@ -2762,7 +2762,7 @@ function dol_print_address($address, $htmlid, $mode, $id, $noprint=0, $charfornl * @param int $acceptsupervisorkey If 1, the special string '__SUPERVISOREMAIL__' is also accepted as valid * @return boolean true if email syntax is OK, false if KO or empty string */ -function isValidEmail($address, $acceptsupervisorkey=0) +function isValidEmail($address, $acceptsupervisorkey = 0) { if ($acceptsupervisorkey && $address == '__SUPERVISOREMAIL__') return true; if (filter_var($address, FILTER_VALIDATE_EMAIL)) return true; @@ -2819,7 +2819,7 @@ 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); @@ -2835,7 +2835,7 @@ function dol_strlen($string, $stringencoding='UTF-8') * @param int $trunconbytes 1=Length is max of bytes instead of max of characters * @return string substring */ -function dol_substr($string, $start, $length, $stringencoding='', $trunconbytes=0) +function dol_substr($string, $start, $length, $stringencoding = '', $trunconbytes = 0) { global $langs; @@ -2881,7 +2881,7 @@ function dol_substr($string, $start, $length, $stringencoding='', $trunconbytes= * @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) +function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF-8', $nodot = 0, $display = 0) { global $conf; @@ -2950,7 +2950,7 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8',$nodo * @return string Return img tag * @see #img_object, #img_picto_common */ -function img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath = false, $srconly=0, $notitle=0, $alt='', $morecss='') +function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly = 0, $notitle = 0, $alt = '', $morecss = '') { global $conf, $langs; @@ -3155,7 +3155,7 @@ function img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath = false, $sr * @return string Return img tag * @see #img_picto, #img_picto_common */ -function img_object($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly=0, $notitle=0) +function img_object($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly = 0, $notitle = 0) { return img_picto($titlealt, 'object_'.$picto, $moreatt, $pictoisfullpath, $srconly, $notitle); } @@ -3276,7 +3276,7 @@ function img_edit_add($titlealt = 'default', $other = '') * @param string $other Add more attributes on img * @return string Return tag img */ -function img_edit_remove($titlealt = 'default', $other='') +function img_edit_remove($titlealt = 'default', $other = '') { global $conf, $langs; @@ -3345,7 +3345,7 @@ function img_delete($titlealt = 'default', $other = 'class="pictodelete"') * @param string $other Add more attributes on img * @return string Retourne tag img */ -function img_printer($titlealt = "default", $other='') +function img_printer($titlealt = "default", $other = '') { global $conf,$langs; if ($titlealt=="default") $titlealt=$langs->trans("Print"); @@ -3442,7 +3442,7 @@ function img_error($titlealt = 'default') * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_next($titlealt = 'default', $moreatt='') +function img_next($titlealt = 'default', $moreatt = '') { global $conf, $langs; @@ -3459,7 +3459,7 @@ function img_next($titlealt = 'default', $moreatt='') * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_previous($titlealt = 'default', $moreatt='') +function img_previous($titlealt = 'default', $moreatt = '') { global $conf, $langs; @@ -3477,7 +3477,7 @@ function img_previous($titlealt = 'default', $moreatt='') * @param string $moreclass Add more CSS classes * @return string Return img tag */ -function img_down($titlealt = 'default', $selected = 0, $moreclass='') +function img_down($titlealt = 'default', $selected = 0, $moreclass = '') { global $conf, $langs; @@ -3494,7 +3494,7 @@ function img_down($titlealt = 'default', $selected = 0, $moreclass='') * @param string $moreclass Add more CSS classes * @return string Return img tag */ -function img_up($titlealt = 'default', $selected = 0, $moreclass='') +function img_up($titlealt = 'default', $selected = 0, $moreclass = '') { global $conf, $langs; @@ -3511,7 +3511,7 @@ function img_up($titlealt = 'default', $selected = 0, $moreclass='') * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_left($titlealt = 'default', $selected = 0, $moreatt='') +function img_left($titlealt = 'default', $selected = 0, $moreatt = '') { global $conf, $langs; @@ -3528,7 +3528,7 @@ function img_left($titlealt = 'default', $selected = 0, $moreatt='') * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_right($titlealt = 'default', $selected = 0, $moreatt='') +function img_right($titlealt = 'default', $selected = 0, $moreatt = '') { global $conf, $langs; @@ -3582,7 +3582,7 @@ function img_credit_card($brand) * @param string $morecss More css * @return string Return img tag */ -function img_mime($file, $titlealt = '', $morecss='') +function img_mime($file, $titlealt = '', $morecss = '') { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -3673,7 +3673,7 @@ function img_searchclear($titlealt = 'default', $other = '') * @param string $morecss More CSS * @return string String with info text */ -function info_admin($text, $infoonimgalt = 0, $nodiv=0, $admin='1', $morecss='') +function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss = '') { global $conf, $langs; @@ -3698,7 +3698,7 @@ function info_admin($text, $infoonimgalt = 0, $nodiv=0, $admin='1', $morecss='') * @return void * @see dol_htmloutput_errors */ -function dol_print_error($db='',$error='',$errors=null) +function dol_print_error($db = '', $error = '', $errors = null) { global $conf,$langs,$argv; global $dolibarr_main_prod; @@ -3826,7 +3826,7 @@ function dol_print_error($db='',$error='',$errors=null) * @param string $email Email * @return void */ -function dol_print_error_email($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='') +function dol_print_error_email($prefixcode, $errormessage = '', $errormessages = array(), $morecss = 'error', $email = '') { global $langs,$conf; @@ -3863,7 +3863,7 @@ function dol_print_error_email($prefixcode, $errormessage='', $errormessages=arr * @param string $tooltip Tooltip * @return void */ -function print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="") +function print_liste_field_titre($name, $file = "", $field = "", $begin = "", $moreparam = "", $moreattrib = "", $sortfield = "", $sortorder = "", $prefix = "", $tooltip = "") { print getTitleFieldOfList($name, 0, $file, $field, $begin, $moreparam, $moreattrib, $sortfield, $sortorder, $prefix, 0, $tooltip); } @@ -3885,7 +3885,7 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar * @param string $tooltip Tooltip * @return string */ -function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='') +function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin = "", $moreparam = "", $moreattrib = "", $sortfield = "", $sortorder = "", $prefix = "", $disablesortlink = 0, $tooltip = '') { global $conf, $langs, $form; //print "$name, $file, $field, $begin, $options, $moreattrib, $sortfield, $sortorder<br>\n"; @@ -4010,7 +4010,7 @@ function print_titre($title) * @return void * @deprecated Use print load_fiche_titre instead */ -function print_fiche_titre($title, $mesg='', $picto='title_generic.png', $pictoisfullpath=0, $id='') +function print_fiche_titre($title, $mesg = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $id = '') { print load_fiche_titre($title, $mesg, $picto, $pictoisfullpath, $id); } @@ -4028,7 +4028,7 @@ function print_fiche_titre($title, $mesg='', $picto='title_generic.png', $pictoi * @return string * @see print_barre_liste */ -function load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='') +function load_fiche_titre($titre, $morehtmlright = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $id = '', $morecssontable = '', $morehtmlcenter = '') { global $conf; @@ -4076,7 +4076,7 @@ function load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', * @param int $hidenavigation Force to hide all navigation tools * @return void */ -function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='title_generic.png', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0) +function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0) { global $conf,$langs; @@ -4189,7 +4189,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so * @param int $hideselectlimit Force to hide select limit * @return void */ -function print_fleche_navigation($page, $file, $options='', $nextpage=0, $betweenarrows='', $afterarrows='', $limit=-1, $totalnboflines=0, $hideselectlimit=0) +function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $betweenarrows = '', $afterarrows = '', $limit = -1, $totalnboflines = 0, $hideselectlimit = 0) { global $conf, $langs; @@ -4274,7 +4274,7 @@ function print_fleche_navigation($page, $file, $options='', $nextpage=0, $betwee * @param int $usestarfornpr -1=Never show, 0 or 1=Use '*' for NPR vat rates * @return string String with formated amounts ('19,6' or '19,6%' or '8.5% (NPR)' or '8.5% *' or '19,6 (CODEX)') */ -function vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0) +function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0) { $morelabel=''; @@ -4322,7 +4322,7 @@ function vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0) * * @see price2num() Revert function of price */ -function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='') +function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $forcerounding = -1, $currency_code = '') { global $langs,$conf; @@ -4414,7 +4414,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou * * @see price Opposite function of price2num */ -function price2num($amount,$rounding='',$alreadysqlnb=0) +function price2num($amount, $rounding = '', $alreadysqlnb = 0) { global $langs,$conf; @@ -4500,7 +4500,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0) * @param string $forceunitoutput 'no' or numeric (-3, -6, ...) compared to $unit (In most case, this value is value defined into $conf->global->MAIN_WEIGHT_DEFAULT_UNIT) * @return string String to show dimensions */ -function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round=-1, $forceunitoutput='no') +function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round = -1, $forceunitoutput = 'no') { require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; @@ -4555,7 +4555,7 @@ function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round= * @return mixed 0 if not found, localtax rate if found * @see get_default_tva */ -function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller="", $vatnpr=0) +function get_localtax($vatrate, $local, $thirdparty_buyer = "", $thirdparty_seller = "", $vatnpr = 0) { global $db, $conf, $mysoc; @@ -4745,7 +4745,7 @@ function get_localtax_by_third($local) * @return array array('rowid'=> , 'code'=> ...) * @see getLocalTaxesFromRate */ -function getTaxesFromId($vatrate, $buyer=null, $seller=null, $firstparamisid=1) +function getTaxesFromId($vatrate, $buyer = null, $seller = null, $firstparamisid = 1) { global $db, $mysoc; @@ -4801,7 +4801,7 @@ function getTaxesFromId($vatrate, $buyer=null, $seller=null, $firstparamisid=1) * @return array array(localtax_type1(1-6/0 if not found), rate localtax1, localtax_type2, rate localtax2, accountancycodecust, accountancycodesupp) * @see getTaxesFromId */ -function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisid=0) +function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisid = 0) { global $db, $mysoc; @@ -4859,7 +4859,7 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisi * @return float|string Vat rate to use with format 5.0 or '5.0 (XXX)' * @see get_product_localtax_for_country */ -function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice=0) +function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice = 0) { global $db,$conf,$mysoc; @@ -5009,7 +5009,7 @@ function get_product_localtax_for_country($idprod, $local, $thirdparty_seller) * @return float|string Vat rate to use with format 5.0 or '5.0 (XXX)', -1 if we can't guess it * @see get_default_npr, get_default_localtax */ -function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod=0, $idprodfournprice=0) +function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod = 0, $idprodfournprice = 0) { global $conf; @@ -5096,7 +5096,7 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, * @return float 0 or 1 * @see get_default_tva, get_default_localtax */ -function get_default_npr(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod=0, $idprodfournprice=0) +function get_default_npr(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod = 0, $idprodfournprice = 0) { global $db; @@ -5133,7 +5133,7 @@ function get_default_npr(Societe $thirdparty_seller, Societe $thirdparty_buyer, * @return integer localtax, -1 si ne peut etre determine * @see get_default_tva, get_default_npr */ -function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $idprod=0) +function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $idprod = 0) { global $mysoc; @@ -5176,7 +5176,7 @@ function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $id * @param int $color 0=texte only, 1=Text is formated with a color font style ('ok' or 'error'), 2=Text is formated with 'ok' color. * @return string HTML string */ -function yn($yesno, $case=1, $color=0) +function yn($yesno, $case = 1, $color = 0) { global $langs; $result='unknown'; $classname=''; @@ -5263,7 +5263,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart) * @param int $newmask Mask for new file (Defaults to $conf->global->MAIN_UMASK or 0755 if unavailable). Example: '0444' * @return int < 0 if KO, 0 = already exists, > 0 if OK */ -function dol_mkdir($dir, $dataroot='', $newmask=null) +function dol_mkdir($dir, $dataroot = '', $newmask = null) { global $conf; @@ -5354,7 +5354,7 @@ function picto_required() * * @see dol_escape_htmltag strip_tags dol_string_onlythesehtmltags dol_string_neverthesehtmltags */ -function dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0) +function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto = 'UTF-8', $strip_tags = 0) { if ($removelinefeed == 2) $stringtoclean = preg_replace('/<br[^>]*>\n+/ims', '<br>', $stringtoclean); $temp = preg_replace('/<br[^>]*>/i', "\n", $stringtoclean); @@ -5418,7 +5418,7 @@ function dol_string_onlythesehtmltags($stringtoclean) * * @see dol_escape_htmltag strip_tags dol_string_nohtmltag dol_string_onlythesehtmltags */ -function dol_string_neverthesehtmltags($stringtoclean, $disallowed_tags=array('textarea')) +function dol_string_neverthesehtmltags($stringtoclean, $disallowed_tags = array('textarea')) { $temp = $stringtoclean; foreach($disallowed_tags as $tagtoremove) @@ -5438,7 +5438,7 @@ function dol_string_neverthesehtmltags($stringtoclean, $disallowed_tags=array('t * @return string Output text * @see dol_nboflines_bis, dol_string_nohtmltag, dol_escape_htmltag */ -function dolGetFirstLineOfText($text, $nboflines=1) +function dolGetFirstLineOfText($text, $nboflines = 1) { if ($nboflines == 1) { @@ -5496,7 +5496,7 @@ function dolGetFirstLineOfText($text, $nboflines=1) * @return string String encoded * @see dol_nboflines, dolGetFirstLineOfText */ -function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false) +function dol_nl2br($stringtoencode, $nl2brmode = 0, $forxml = false) { if (!$nl2brmode) { return nl2br($stringtoencode, $forxml); @@ -5524,7 +5524,7 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false) * @param int $removelasteolbr 1=Remove last br or lasts \n (default), 0=Do nothing * @return string String encoded */ -function dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1) +function dol_htmlentitiesbr($stringtoencode, $nl2brmode = 0, $pagecodefrom = 'UTF-8', $removelasteolbr = 1) { $newstring=$stringtoencode; if (dol_textishtml($stringtoencode)) // Check if text is already HTML or not @@ -5552,7 +5552,7 @@ function dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8' * @param string $pagecodeto Page code for result * @return string String decoded */ -function dol_htmlentitiesbr_decode($stringtodecode,$pagecodeto='UTF-8') +function dol_htmlentitiesbr_decode($stringtodecode, $pagecodeto = 'UTF-8') { $ret=dol_html_entity_decode($stringtodecode,ENT_COMPAT,$pagecodeto); $ret=preg_replace('/'."\r\n".'<br(\s[\sa-zA-Z_="]*)?\/?>/i',"<br>",$ret); @@ -5582,7 +5582,7 @@ function dol_htmlcleanlastbr($stringtodecode) * @param string $c Operand c * @return string String decoded */ -function dol_html_entity_decode($a,$b,$c='UTF-8') +function dol_html_entity_decode($a, $b, $c = 'UTF-8') { return html_entity_decode($a,$b,$c); } @@ -5597,7 +5597,7 @@ function dol_html_entity_decode($a,$b,$c='UTF-8') * @param bool $double_encode When double_encode is turned off, PHP will not encode existing html entities * @return string $ret Encoded string */ -function dol_htmlentities($string, $flags=null, $encoding='UTF-8', $double_encode=false) +function dol_htmlentities($string, $flags = null, $encoding = 'UTF-8', $double_encode = false) { return htmlentities($string, $flags, $encoding, $double_encode); } @@ -5633,7 +5633,7 @@ function dol_string_is_good_iso($s) * @return int Number of lines * @see dol_nboflines_bis, dolGetFirstLineOfText */ -function dol_nboflines($s,$maxchar=0) +function dol_nboflines($s, $maxchar = 0) { if ($s == '') return 0; $arraystring=explode("\n",$s); @@ -5652,7 +5652,7 @@ function dol_nboflines($s,$maxchar=0) * @return int Number of lines * @see dol_nboflines, dolGetFirstLineOfText */ -function dol_nboflines_bis($text,$maxlinesize=0,$charset='UTF-8') +function dol_nboflines_bis($text, $maxlinesize = 0, $charset = 'UTF-8') { $repTable = array("\t" => " ", "\n" => "<br>", "\r" => " ", "\0" => " ", "\x0B" => " "); if (dol_textishtml($text)) $repTable = array("\t" => " ", "\n" => " ", "\r" => " ", "\0" => " ", "\x0B" => " "); @@ -5707,7 +5707,7 @@ function dol_microtime_float() * @return boolean true/false * @see dol_concatdesc */ -function dol_textishtml($msg,$option=0) +function dol_textishtml($msg, $option = 0) { if ($option == 1) { @@ -5749,7 +5749,7 @@ function dol_textishtml($msg,$option=0) * @return string Text 1 + new line + Text2 * @see dol_textishtml */ -function dol_concatdesc($text1,$text2,$forxml=false, $invert=false) +function dol_concatdesc($text1, $text2, $forxml = false, $invert = false) { if (!empty($invert)) { @@ -5777,7 +5777,7 @@ function dol_concatdesc($text1,$text2,$forxml=false, $invert=false) * @return array Array of substitutions * @see setSubstitFromObject */ -function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null) +function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $object = null) { global $db, $conf, $mysoc, $user, $extrafields; @@ -6115,7 +6115,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob * @return string Output string after substitutions * @see complete_substitutions_array, getCommonSubstitutionArray */ -function make_substitutions($text, $substitutionarray, $outputlangs=null) +function make_substitutions($text, $substitutionarray, $outputlangs = null) { global $conf, $langs; @@ -6178,7 +6178,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null) * @return void * @see make_substitutions */ -function complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray") +function complete_substitutions_array(&$substitutionarray, $outputlangs, $object = null, $parameters = null, $callfunc = "completesubstitutionarray") { global $conf,$user; @@ -6234,7 +6234,7 @@ function complete_substitutions_array(&$substitutionarray, $outputlangs, $object * @param Translate $outputlangs Output language * @return void */ -function print_date_range($date_start,$date_end,$format = '',$outputlangs='') +function print_date_range($date_start, $date_end, $format = '', $outputlangs = '') { print get_date_range($date_start,$date_end,$format,$outputlangs); } @@ -6249,7 +6249,7 @@ function print_date_range($date_start,$date_end,$format = '',$outputlangs='') * @param integer $withparenthesis 1=Add parenthesis, 0=non parenthesis * @return string String */ -function get_date_range($date_start,$date_end,$format = '',$outputlangs='', $withparenthesis=1) +function get_date_range($date_start, $date_end, $format = '', $outputlangs = '', $withparenthesis = 1) { global $langs; @@ -6281,7 +6281,7 @@ function get_date_range($date_start,$date_end,$format = '',$outputlangs='', $wit * @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname, 3=Firstname if defined else lastname * @return string Firstname + lastname or Lastname + firstname */ -function dolGetFirstLastname($firstname,$lastname,$nameorder=-1) +function dolGetFirstLastname($firstname, $lastname, $nameorder = -1) { global $conf; @@ -6322,7 +6322,7 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1) * @return void * @see dol_htmloutput_events */ -function setEventMessage($mesgs, $style='mesgs') +function setEventMessage($mesgs, $style = 'mesgs') { //dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING); This is not deprecated, it is used by setEventMessages function if (! is_array($mesgs)) // If mesgs is a string @@ -6348,7 +6348,7 @@ function setEventMessage($mesgs, $style='mesgs') * @return void * @see dol_htmloutput_events */ -function setEventMessages($mesg, $mesgs, $style='mesgs') +function setEventMessages($mesg, $mesgs, $style = 'mesgs') { if (empty($mesg) && empty($mesgs)) { @@ -6375,7 +6375,7 @@ function setEventMessages($mesg, $mesgs, $style='mesgs') * @return void * @see dol_htmloutput_mesg */ -function dol_htmloutput_events($disabledoutputofmessages=0) +function dol_htmloutput_events($disabledoutputofmessages = 0) { // Show mesgs if (isset($_SESSION['dol_events']['mesgs'])) { @@ -6410,7 +6410,7 @@ function dol_htmloutput_events($disabledoutputofmessages=0) * @see dol_htmloutput_errors * @see setEventMessages */ -function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepembedded=0) +function get_htmloutput_mesg($mesgstring = '', $mesgarray = '', $style = 'ok', $keepembedded = 0) { global $conf, $langs; @@ -6486,7 +6486,7 @@ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb * @see dol_print_error * @see dol_htmloutput_mesg */ -function get_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0) +function get_htmloutput_errors($mesgstring = '', $mesgarray = array(), $keepembedded = 0) { return get_htmloutput_mesg($mesgstring, $mesgarray,'error',$keepembedded); } @@ -6504,7 +6504,7 @@ function get_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded * @see dol_htmloutput_errors * @see setEventMessages */ -function dol_htmloutput_mesg($mesgstring = '',$mesgarray = array(), $style = 'ok', $keepembedded=0) +function dol_htmloutput_mesg($mesgstring = '', $mesgarray = array(), $style = 'ok', $keepembedded = 0) { if (empty($mesgstring) && (! is_array($mesgarray) || count($mesgarray) == 0)) return; @@ -6558,7 +6558,7 @@ function dol_htmloutput_mesg($mesgstring = '',$mesgarray = array(), $style = 'ok * @see dol_print_error * @see dol_htmloutput_mesg */ -function dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0) +function dol_htmloutput_errors($mesgstring = '', $mesgarray = array(), $keepembedded = 0) { dol_htmloutput_mesg($mesgstring, $mesgarray, 'error', $keepembedded); } @@ -6576,7 +6576,7 @@ function dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded * @param int $keepindex If 0 and index key of array to sort is a numeric, than index will be rewrote. If 1 or index key is not numeric, key for index is kept after sorting. * @return array Sorted array */ -function dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0) +function dol_sort_array(&$array, $index, $order = 'asc', $natsort = 0, $case_sensitive = 0, $keepindex = 0) { // Clean parameters $order=strtolower($order); @@ -6672,7 +6672,7 @@ function dol_osencode($str) * @return int <0 if KO, Id of code if OK * @see $langs->getLabelFromKey */ -function dol_getIdFromCode($db, $key, $tablename, $fieldkey='code', $fieldid='id', $entityfilter=0) +function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid = 'id', $entityfilter = 0) { global $cache_codes; @@ -6739,7 +6739,7 @@ function verifCond($strRights) * @param int $hideerrors 1=Hide errors * @return mixed Nothing or return of eval */ -function dol_eval($s, $returnvalue=0, $hideerrors=1) +function dol_eval($s, $returnvalue = 0, $hideerrors = 1) { // Only global variables can be changed by eval function and returned to caller global $db, $langs, $user, $conf, $website, $websitepage; @@ -7049,7 +7049,7 @@ function getLanguageCodeFromCountryCode($countrycode) * @param string $mode 'add' to complete head, 'remove' to remove entries * @return void */ -function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode='add') +function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode = 'add') { global $hookmanager; @@ -7144,7 +7144,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode= * @param string $zone 'private' (for private pages) or 'public' (for public pages) * @return void */ -function printCommonFooter($zone='private') +function printCommonFooter($zone = 'private') { global $conf, $hookmanager, $user; global $action; @@ -7405,7 +7405,7 @@ function dol_getmypid() * @param integer $nofirstand 1=Do not output the first 'AND' * @return string $res The statement to append to the SQL query */ -function natural_search($fields, $value, $mode=0, $nofirstand=0) +function natural_search($fields, $value, $mode = 0, $nofirstand = 0) { global $db,$langs; @@ -7588,7 +7588,7 @@ function showDirectDownloadLink($object) * @param string $extImgTarget Force image extension for thumbs. Use '' to keep same extension than original image (default). * @return string New file name (full or relative path, including the thumbs/) */ -function getImageFileNameForSize($file, $extName, $extImgTarget='') +function getImageFileNameForSize($file, $extName, $extImgTarget = '') { $dirName = dirname($file); if ($dirName == '.') $dirName=''; @@ -7620,7 +7620,7 @@ function getImageFileNameForSize($file, $extName, $extImgTarget='') * @param string $param More param on http links * @return string|array Output string with href link or array with all components of link */ -function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0, $param='') +function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata = 0, $param = '') { global $conf, $langs; @@ -7650,7 +7650,7 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0, $param='' * @param string $addlink Add a 'link to' after * @return string */ -function ajax_autoselect($htmlname, $addlink='') +function ajax_autoselect($htmlname, $addlink = '') { global $langs; $out = '<script> @@ -7672,7 +7672,7 @@ function ajax_autoselect($htmlname, $addlink='') * @return string Return a mime type family (text/xxx, application/xxx, image/xxx, audio, video, archive) * @see image_format_supported (images.lib.php) */ -function dol_mimetype($file, $default='application/octet-stream', $mode=0) +function dol_mimetype($file, $default = 'application/octet-stream', $mode = 0) { $mime=$default; $imgmime='other.png'; @@ -7788,7 +7788,7 @@ function dol_mimetype($file, $default='application/octet-stream', $mode=0) * @param string $rowidfield name of the column rowid * @return string */ -function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='rowid') +function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield = 'rowid') { global $dictvalues,$db,$langs; @@ -7894,7 +7894,7 @@ function isVisibleToUserType($type_user, &$menuentry, &$listofmodulesforexternal * @param integer $x Multiple. For example 60 to round up to nearest exact minute for a date with seconds. * @return integer Value rounded. */ -function roundUpToNextMultiple($n, $x=5) +function roundUpToNextMultiple($n, $x = 5) { return (ceil($n)%$x === 0) ? ceil($n) : round(($n+$x/2)/$x)*$x; } diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index aae70adfb62..db264909819 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -78,7 +78,7 @@ function jsUnEscape($source) * @param string $subdir Sub directory (Example: '/mailings') * @return array Array of directories that can contains module descriptors */ -function dolGetModulesDirs($subdir='') +function dolGetModulesDirs($subdir = '') { global $conf; @@ -142,7 +142,7 @@ function dol_getDefaultFormat(Translate $outputlangs = null) * @param int $searchalt 1=Search also in alternative languages * @return boolean true if OK, false if KO */ -function dol_print_file($langs,$filename,$searchalt=0) +function dol_print_file($langs, $filename, $searchalt = 0) { global $conf; @@ -192,7 +192,7 @@ function dol_print_file($langs,$filename,$searchalt=0) * @param int $usetable Output into a table * @return void */ -function dol_print_object_info($object, $usetable=0) +function dol_print_object_info($object, $usetable = 0) { global $langs, $db; @@ -528,7 +528,7 @@ function isValidMailDomain($mail) * @param int $anchor 1: verify anchor is provided, 0: not verify anchor * @return int 1=Check is OK, 0=Check is KO */ -function isValidUrl($url,$http=0,$pass=0,$port=0,$path=0,$query=0,$anchor=0) +function isValidUrl($url, $http = 0, $pass = 0, $port = 0, $path = 0, $query = 0, $anchor = 0) { $ValidUrl = 0; $urlregex = ''; @@ -571,7 +571,7 @@ function isValidUrl($url,$http=0,$pass=0,$port=0,$path=0,$query=0,$anchor=0) * @param integer $http 1 = keep both http:// and https://, 0: remove http:// but not https:// * @return string Cleaned url */ -function clean_url($url,$http=1) +function clean_url($url, $http = 1) { // Fixed by Matelli (see http://matelli.fr/showcases/patchs-dolibarr/fix-cleaning-url.html) // To include the minus sign in a char class, we must not escape it but put it at the end of the class @@ -617,7 +617,7 @@ function clean_url($url,$http=1) * @param bool $displaytld Display tld (default: true) * @return string Return email with hidden parts or ''; */ -function dolObfuscateEmail($mail, $replace="*", $nbreplace=8, $nbdisplaymail=4, $nbdisplaydomain=3, $displaytld=true) +function dolObfuscateEmail($mail, $replace = "*", $nbreplace = 8, $nbdisplaymail = 4, $nbdisplaydomain = 3, $displaytld = true) { if(!isValidEmail($mail))return ''; $tab = explode('@', $mail); @@ -658,7 +658,7 @@ function dolObfuscateEmail($mail, $replace="*", $nbreplace=8, $nbdisplaymail=4, * @param string $tdoptions Options for td * @return string */ -function array2tr($data,$troptions='',$tdoptions='') +function array2tr($data, $troptions = '', $tdoptions = '') { $text = '<tr '.$troptions.'>' ; foreach($data as $key => $item){ @@ -678,7 +678,7 @@ function array2tr($data,$troptions='',$tdoptions='') * @param string $tdoptions Options for td * @return string */ -function array2table($data,$tableMarkup=1,$tableoptions='',$troptions='',$tdoptions='') +function array2table($data, $tableMarkup = 1, $tableoptions = '', $troptions = '', $tdoptions = '') { $text='' ; if($tableMarkup) $text = '<table '.$tableoptions.'>' ; @@ -712,7 +712,7 @@ function array2table($data,$tableMarkup=1,$tableoptions='',$troptions='',$tdopti * @param int $forceentity Entity id to force * @return string New value (numeric) or error message */ -function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$mode='next', $bentityon=true, $objuser=null, $forceentity=null) +function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $date = '', $mode = 'next', $bentityon = true, $objuser = null, $forceentity = null) { global $conf,$user; @@ -1193,7 +1193,7 @@ function get_string_between($string, $start, $end) * @param string $value Value * @return int|string <0 or error string if KO, 0 if OK */ -function check_value($mask,$value) +function check_value($mask, $value) { $result=0; @@ -1302,7 +1302,7 @@ function check_value($mask,$value) * @param boolean $upper Convert to tupper * @return string x */ -function binhex($bin, $pad=false, $upper=false) +function binhex($bin, $pad = false, $upper = false) { $last = dol_strlen($bin)-1; for($i=0; $i<=$last; $i++){ $x += $bin[$last-$i] * pow(2,$i); } @@ -1418,7 +1418,7 @@ function numero_semaine($time) * @param int $to_unit Nouvelle unite en puissance de 10 * @return float Masse convertie */ -function weight_convert($weight,&$from_unit,$to_unit) +function weight_convert($weight, &$from_unit, $to_unit) { /* Pour convertire 320 gr en Kg appeler * $f = -3 @@ -1522,7 +1522,7 @@ function dol_set_user_param($db, $conf, &$user, $tab) * @param Translate $langs Output language * @return string Formated reduction */ -function dol_print_reduction($reduction,$langs) +function dol_print_reduction($reduction, $langs) { $string = ''; if ($reduction == 100) @@ -1589,7 +1589,7 @@ function version_webserver() * @param int $maxfilenamelength Max length of value to show * @return mixed 0 if no module is activated, or array(key=>label). For modules that need directory scan, key is completed with ":filename". */ -function getListOfModels($db,$type,$maxfilenamelength=0) +function getListOfModels($db, $type, $maxfilenamelength = 0) { global $conf,$langs; $liste=array(); @@ -1714,7 +1714,7 @@ function is_ip($ip) * @param string $firstname Firstname * @return string Login */ -function dol_buildlogin($lastname,$firstname) +function dol_buildlogin($lastname, $firstname) { $login=strtolower(dol_string_unaccent($firstname)); $login.=($login?'.':''); @@ -1778,7 +1778,7 @@ function getSoapParams() * @param string $option More options * @return string URL of link to object id/type */ -function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='') +function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') { global $db, $conf, $langs; @@ -2140,7 +2140,7 @@ function getElementProperties($element_type) * @param ref $element_ref Element ref (Use this if element_id but not both) * @return int|object object || 0 || -1 if error */ -function fetchObjectByElement($element_id, $element_type, $element_ref='') +function fetchObjectByElement($element_id, $element_type, $element_ref = '') { global $conf; global $db,$conf; @@ -2170,7 +2170,7 @@ function fetchObjectByElement($element_id, $element_type, $element_ref='') * @return string RGB hex value (without # before). For example: 'FF00FF', '01FF02' * @see colorStringToArray */ -function colorArrayToHex($arraycolor,$colorifnotfound='888888') +function colorArrayToHex($arraycolor, $colorifnotfound = '888888') { if (! is_array($arraycolor)) return $colorifnotfound; if (empty($arraycolor)) return $colorifnotfound; @@ -2187,7 +2187,7 @@ function colorArrayToHex($arraycolor,$colorifnotfound='888888') * @return string RGB hex value (without # before). For example: FF00FF * @see colorArrayToHex */ -function colorStringToArray($stringcolor,$colorifnotfound=array(88,88,88)) +function colorStringToArray($stringcolor, $colorifnotfound = array(88,88,88)) { if (is_array($stringcolor)) return $stringcolor; // If already into correct output format, we return as is $tmp=preg_match('/^#?([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])$/',$stringcolor,$reg); @@ -2316,7 +2316,7 @@ function getModuleDirForApiClass($module) * @param $max int Between 0 and 255 * @return String */ -function random_color_part($min=0,$max=255) +function random_color_part($min = 0, $max = 255) { return str_pad( dechex( mt_rand( $min, $max) ), 2, '0', STR_PAD_LEFT); } @@ -2328,7 +2328,7 @@ function random_color_part($min=0,$max=255) * @param $max int Between 0 and 255 * @return String */ -function random_color($min=0, $max=255) +function random_color($min = 0, $max = 255) { return random_color_part($min, $max) . random_color_part($min, $max) . random_color_part($min, $max); } diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php index 9f04a81fa5f..20f99be09e3 100644 --- a/htdocs/core/lib/functionsnumtoword.lib.php +++ b/htdocs/core/lib/functionsnumtoword.lib.php @@ -33,7 +33,7 @@ * @param boolean $centimes 0=no centimes | 1=centimes to translate * @return string Text of the number */ -function dol_convertToWord($num, $langs, $currency=false, $centimes=false) +function dol_convertToWord($num, $langs, $currency = false, $centimes = false) { global $conf; @@ -144,7 +144,7 @@ function dol_convertToWord($num, $langs, $currency=false, $centimes=false) * @param string $numorcurrency 'number' or 'amount' * @return string Text of the number or -1 in case TOO LONG (more than 1000000000000.99) */ -function dolNumberToWord($numero, $langs, $numorcurrency='number') +function dolNumberToWord($numero, $langs, $numorcurrency = 'number') { // If the number is negative convert to positive and return -1 if is too long if ($numero < 0) $numero *= -1; diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index 418cc1418b5..2787b8f1209 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -31,7 +31,7 @@ * @param string[] $addheaders Array of string to add into header. Example: ('Accept: application/xrds+xml', ....) * @return array Returns an associative array containing the response from the server array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...) */ -function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addheaders=array()) +function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = 1, $addheaders = array()) { //declaring of global variables global $conf, $langs; diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index a37bd2818a1..0bc0ac8f7a5 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -106,7 +106,7 @@ function dol_getImageSize($file, $url = false) * @param int $src_y Position of croping image in source image (not use if mode=0) * @return int File name if OK, error message if KO */ -function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x=0, $src_y=0) +function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $src_y = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -349,7 +349,7 @@ function dolRotateImage($file_path) * @param int $targetformat New format of target (IMAGETYPE_GIF, IMAGETYPE_JPG, IMAGETYPE_PNG, IMAGETYPE_BMP, IMAGETYPE_WBMP ... or 0 to keep old format) * @return string Full path of thumb or '' if it fails or 'Error...' if it fails */ -function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $quality=50, $outdir='thumbs', $targetformat=0) +function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', $quality = 50, $outdir = 'thumbs', $targetformat = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/lib/import.lib.php b/htdocs/core/lib/import.lib.php index c3b8beac249..71e47554ac4 100644 --- a/htdocs/core/lib/import.lib.php +++ b/htdocs/core/lib/import.lib.php @@ -32,7 +32,7 @@ * @param int $maxstep Limit steps to maxstep or no limit if 0 * @return array Array of tabs */ -function import_prepare_head($param, $maxstep=0) +function import_prepare_head($param, $maxstep = 0) { global $langs; diff --git a/htdocs/core/lib/invoice2.lib.php b/htdocs/core/lib/invoice2.lib.php index f511d12da21..227d9ee24ec 100644 --- a/htdocs/core/lib/invoice2.lib.php +++ b/htdocs/core/lib/invoice2.lib.php @@ -48,7 +48,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; * @param string $fileprefix Prefix to add into filename of generated PDF * @return int Error code */ -function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filter, $dateafterdate, $datebeforedate, $paymentdateafter, $paymentdatebefore, $usestdout, $regenerate=0, $filesuffix='', $paymentbankid='', $thirdpartiesid='', $fileprefix='mergedpdf') +function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filter, $dateafterdate, $datebeforedate, $paymentdateafter, $paymentdatebefore, $usestdout, $regenerate = 0, $filesuffix = '', $paymentbankid = '', $thirdpartiesid = '', $fileprefix = 'mergedpdf') { $sql = "SELECT DISTINCT f.rowid, f.ref"; $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index 9f2e55153d0..28e75d494e9 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -103,7 +103,7 @@ function ldap_prepare_head() * @param string $objectclass Class * @return void */ -function show_ldap_test_button($butlabel,$testlabel,$key,$dn,$objectclass) +function show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass) { global $langs, $conf, $user; //print 'key='.$key.' dn='.$dn.' objectclass='.$objectclass; @@ -141,7 +141,7 @@ function show_ldap_test_button($butlabel,$testlabel,$key,$dn,$objectclass) * @param int $subcount Subcount * @return int */ -function show_ldap_content($result,$level,$count,$var,$hide=0,$subcount=0) +function show_ldap_content($result, $level, $count, $var, $hide = 0, $subcount = 0) { global $bc, $conf; diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index 69c127f915c..c8e594f549a 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -39,7 +39,7 @@ $shmoffset=1000; // Max number of entries found into a language file. If too low * @param string $data Data to save * @return int <0 if KO, Nb of bytes written if OK */ -function dol_setcache($memoryid,$data) +function dol_setcache($memoryid, $data) { global $conf; $result=0; @@ -214,7 +214,7 @@ function dol_listshmop() * @param string $data Data to save * @return int <0 if KO, Nb of bytes written if OK */ -function dol_setshmop($memoryid,$data) +function dol_setshmop($memoryid, $data) { global $shmkeys,$shmoffset; diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index 4981e0fffd0..57928341302 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -37,7 +37,7 @@ * @return int|object <=0 if KO, Object if OK * @see rebuildObjectSql */ -function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir='', $addfieldentry=array() ,$delfieldentry='') +function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = '', $addfieldentry = array(), $delfieldentry = '') { global $db, $langs; @@ -210,7 +210,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir=' * @return int <=0 if KO, >0 if OK * @see rebuildObjectClass */ -function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='', $object=null) +function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '', $object = null) { global $db, $langs; diff --git a/htdocs/core/lib/parsemd.lib.php b/htdocs/core/lib/parsemd.lib.php index 13334fd400c..8fb3a1eecca 100644 --- a/htdocs/core/lib/parsemd.lib.php +++ b/htdocs/core/lib/parsemd.lib.php @@ -29,7 +29,7 @@ * @param string $replaceimagepath Replace path to image with another path. Exemple: ('doc/'=>'xxx/aaa/') * @return string Parsed content */ -function dolMd2Html($content, $parser='parsedown',$replaceimagepath=null) +function dolMd2Html($content, $parser = 'parsedown', $replaceimagepath = null) { if (is_array($replaceimagepath)) { diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php index 0119b0f0ee5..28f899096bb 100644 --- a/htdocs/core/lib/payments.lib.php +++ b/htdocs/core/lib/payments.lib.php @@ -95,7 +95,7 @@ function payment_supplier_prepare_head(Paiement $object) * @param string $paymentmethod Filter on this payment method (''=none, 'paypal', ...) * @return array Array of valid payment method */ -function getValidOnlinePaymentMethods($paymentmethod='') +function getValidOnlinePaymentMethods($paymentmethod = '') { global $conf; @@ -123,7 +123,7 @@ function getValidOnlinePaymentMethods($paymentmethod='') * @param string $ref Ref of object * @return string Url string */ -function showOnlinePaymentUrl($type,$ref) +function showOnlinePaymentUrl($type, $ref) { global $conf, $langs; @@ -149,7 +149,7 @@ function showOnlinePaymentUrl($type,$ref) * @param string $freetag Free tag * @return string Url string */ -function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='your_free_tag') +function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_free_tag') { global $conf; @@ -274,7 +274,7 @@ function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='yo * @param Object $object Object related to payment * @return void */ -function htmlPrintOnlinePaymentFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null) +function htmlPrintOnlinePaymentFooter($fromcompany, $langs, $addformmessage = 0, $suffix = '', $object = null) { global $conf; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 056796032d4..7b624a02f8a 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -79,7 +79,7 @@ function pdf_getFormat(Translate $outputlangs = null) * @param string $pagetype 'P' or 'l' * @return TCPDF PDF object */ -function pdf_getInstance($format='',$metric='mm',$pagetype='P') +function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P') { global $conf; @@ -316,7 +316,7 @@ function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent) * @param int $includealias 1=Include alias name after name * @return string String with name of thirdparty (+ alias if requested) */ -function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includealias=0) +function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includealias = 0) { global $conf; @@ -350,7 +350,7 @@ function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includeali * @param Object $object Object we want to build document for * @return string String with full address */ -function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$object=null) +function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $targetcontact = '', $usecontact = 0, $mode = 'source', $object = null) { global $conf, $hookmanager; @@ -597,7 +597,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target * @param int $page_height Height of page * @return void */ -function pdf_pagehead(&$pdf,$outputlangs,$page_height) +function pdf_pagehead(&$pdf, $outputlangs, $page_height) { global $conf; @@ -620,7 +620,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height) * @param int $onlykey 1=Do not calculate some heavy values of keys (performance enhancement when we need only the keys), 2=Values are truncated and html sanitized (to use for help tooltip) * @return array Array of substitutions */ -function pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0) +function pdf_getSubstitutionArray($outputlangs, $exclude = null, $object = null, $onlykey = 0) { $substitutionarray = getCommonSubstitutionArray($outputlangs, $onlykey, $exclude, $object); $substitutionarray['__FROM_NAME__']='__FROM_NAME__'; @@ -689,7 +689,7 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) * @param int $default_font_size Default font size * @return float The Y PDF position */ -function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default_font_size=10) +function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, $default_font_size = 10) { global $mysoc, $conf; @@ -869,7 +869,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default * @param int $hidefreetext 1=Hide free text, 0=Show free text * @return int Return height of bottom margin including footer text */ -function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0,$hidefreetext=0) +function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_basse, $marge_gauche, $page_hauteur, $object, $showdetails = 0, $hidefreetext = 0) { global $conf,$user,$mysoc; @@ -1116,7 +1116,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass * @param string $default_font_size Font size * @return float The Y PDF position */ -function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$align,$default_font_size) +function pdf_writeLinkedObjects(&$pdf, $object, $outputlangs, $posx, $posy, $w, $h, $align, $default_font_size) { $linkedobjects = pdf_getLinkedObjects($object,$outputlangs); if (! empty($linkedobjects)) @@ -1155,7 +1155,7 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$al * @param int $issupplierline Is it a line for a supplier object ? * @return string */ -function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_writelinedesc(&$pdf, $object, $i, $outputlangs, $w, $h, $posx, $posy, $hideref = 0, $hidedesc = 0, $issupplierline = 0) { global $db, $conf, $langs, $hookmanager; @@ -1193,7 +1193,7 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide * @param int $issupplierline Is it a line for a supplier object ? * @return string String with line */ -function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0) { global $db, $conf, $langs; @@ -1422,7 +1422,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinenum($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1455,7 +1455,7 @@ function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineref($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1487,7 +1487,7 @@ function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineref_supplier($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1519,7 +1519,7 @@ function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails=0) +function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails = 0) { global $conf, $hookmanager, $mysoc; @@ -1578,7 +1578,7 @@ function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails = 0) { global $conf, $hookmanager; @@ -1618,7 +1618,7 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string */ -function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineupwithtax($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager,$conf; @@ -1654,7 +1654,7 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1688,7 +1688,7 @@ function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_asked($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1722,7 +1722,7 @@ function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_shipped($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1756,7 +1756,7 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_keeptoship($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1833,7 +1833,7 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager; @@ -1918,7 +1918,7 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string Return total of line excl tax */ -function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0) { global $conf, $hookmanager; @@ -1974,7 +1974,7 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string Return total of line incl tax */ -function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails = 0) { global $hookmanager,$conf; @@ -2014,7 +2014,7 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) * @return integer * @deprecated Not used by Dolibarr core, so will be removed. */ -function pdf_getTotalQty($object,$type,$outputlangs) +function pdf_getTotalQty($object, $type, $outputlangs) { global $hookmanager; @@ -2061,7 +2061,7 @@ function pdf_getTotalQty($object,$type,$outputlangs) * @param Translate $outputlangs Object lang for output * @return array Linked objects */ -function pdf_getLinkedObjects($object,$outputlangs) +function pdf_getLinkedObjects($object, $outputlangs) { global $hookmanager; diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 0b9f3a3b246..38a45fd96f1 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -82,7 +82,7 @@ * 25=multicurrency_total_tax1 for total_ht * 26=multicurrency_total_tax2 for total_ht */ -function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = '', $localtaxes_array='', $progress=100, $multicurrency_tx=1, $pu_devise=0) +function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = '', $localtaxes_array = '', $progress = 100, $multicurrency_tx = 1, $pu_devise = 0) { global $conf,$mysoc,$db; diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 68e78a29d76..e1f7e316e20 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -317,7 +317,7 @@ function product_lot_admin_prepare_head() * @param int $socid Thirdparty id * @return integer NB of lines shown into array */ -function show_stats_for_company($product,$socid) +function show_stats_for_company($product, $socid) { global $conf,$langs,$user,$db; @@ -470,7 +470,7 @@ function show_stats_for_company($product,$socid) * @return string Unit string * @see formproduct->load_measuring_units */ -function measuring_units_string($unit,$measuring_style='') +function measuring_units_string($unit, $measuring_style = '') { global $langs; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 8b6ca6a5ca3..80bb9a555b4 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -251,7 +251,7 @@ function task_prepare_head($object) * @param string $fuser Filter on user * @return array Array of tabs to show */ -function project_timesheet_prepare_head($mode, $fuser=null) +function project_timesheet_prepare_head($mode, $fuser = null) { global $langs, $conf, $user; $h = 0; @@ -347,7 +347,7 @@ function project_admin_prepare_head() * @param string $filterprogresscalc filter text * @return void */ -function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId='', $addordertick=0, $projectidfortotallink=0, $filterprogresscalc='') +function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId = '', $addordertick = 0, $projectidfortotallink = 0, $filterprogresscalc = '') { global $user, $bc, $langs, $conf, $db; global $projectstatic, $taskstatic; @@ -647,7 +647,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t * @param int $oldprojectforbreak Old project id of last project break * @return array Array with time spent for $fuser for each day of week on tasks in $lines and substasks */ -function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak=0) +function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0) { global $conf, $db, $user, $bc, $langs; global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic; @@ -873,7 +873,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec * @param int $oldprojectforbreak Old project id of last project break * @return array Array with time spent for $fuser for each day of week on tasks in $lines and substasks */ -function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak=0) +function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0) { global $conf, $db, $user, $bc, $langs; global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic; @@ -1162,7 +1162,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr * @param int $oldprojectforbreak Old project id of last project break * @return array Array with time spent for $fuser for each day of week on tasks in $lines and substasks */ -function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak=0) +function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0) { global $conf, $db, $user, $bc, $langs; global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic; @@ -1473,7 +1473,7 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole) * @param array $hiddenfields List of info to not show ('projectlabel', 'declaredprogress', '...', ) * @return void */ -function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=0, $statut=-1, $listofoppstatus=array(),$hiddenfields=array()) +function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $statut = -1, $listofoppstatus = array(), $hiddenfields = array()) { global $langs,$conf,$user,$bc; diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index 5a8aa344240..e920b1a9909 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -38,7 +38,7 @@ * @param string $varlink Add a variable into the address of the page * @return void */ -function report_header($reportname,$notused,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='', $varlink='') +function report_header($reportname, $notused, $period, $periodlink, $description, $builddate, $exportlink = '', $moreparam = array(), $calcmode = '', $varlink = '') { global $langs; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index c7d59db13da..573be47c8df 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -34,7 +34,7 @@ * @return string encoded string * @see dol_decode */ -function dol_encode($chain, $key='1') +function dol_encode($chain, $key = '1') { if (is_numeric($key) && $key == '1') // rule 1 is offset of 17 for char { @@ -70,7 +70,7 @@ function dol_encode($chain, $key='1') * @return string decoded string * @see dol_encode */ -function dol_decode($chain, $key='1') +function dol_decode($chain, $key = '1') { $chain = base64_decode($chain); @@ -111,7 +111,7 @@ function dol_decode($chain, $key='1') * @return string Hash of string * @getRandomPassword */ -function dol_hash($chain, $type='0') +function dol_hash($chain, $type = '0') { global $conf; @@ -147,7 +147,7 @@ function dol_hash($chain, $type='0') * @param string $type Type of hash ('0':auto, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'. * @return bool True if the computed hash is the same as the given one */ -function dol_verifyHash($chain, $hash, $type='0') +function dol_verifyHash($chain, $hash, $type = '0') { global $conf; @@ -178,7 +178,7 @@ function dol_verifyHash($chain, $hash, $type='0') * @return int Always 1, die process if not allowed * @see dol_check_secure_access_document */ -function restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0) +function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid', $isdraft = 0) { global $db, $conf; global $hookmanager; @@ -433,7 +433,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu * @return bool True if user has access, False otherwise * @see restrictedArea */ -function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='', $dbt_select='rowid') +function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = '', $dbt_select = 'rowid') { global $db, $conf; @@ -657,7 +657,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh * @param int $showonlymessage Show only message parameter. Otherwise add more information. * @return void */ -function accessforbidden($message='',$printheader=1,$printfooter=1,$showonlymessage=0) +function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $showonlymessage = 0) { global $conf, $db, $user, $langs; if (! is_object($langs)) diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index c09cd7f78d3..313574f6d72 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -49,7 +49,7 @@ function dol_getwebuser($mode) * @param array $authmode Array list of selected authentication mode array('http', 'dolibarr', 'xxx'...) * @return string Login or '' */ -function checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmode) +function checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $authmode) { global $conf,$langs; //global $dolauthmode; // To return authentication finally used @@ -129,7 +129,7 @@ if (! function_exists('dol_loginfunction')) * @param Societe $mysoc Company object * @return void */ - function dol_loginfunction($langs,$conf,$mysoc) + function dol_loginfunction($langs, $conf, $mysoc) { global $dolibarr_main_demo,$db; global $smartphone,$hookmanager; @@ -313,7 +313,7 @@ if (! function_exists('dol_loginfunction')) * non defini=>renvoi un salt pour cryptage par defaut * @return string Salt string */ -function makesalt($type=CRYPT_SALT_LENGTH) +function makesalt($type = CRYPT_SALT_LENGTH) { dol_syslog("makesalt type=".$type); switch($type) @@ -340,7 +340,7 @@ function makesalt($type=CRYPT_SALT_LENGTH) * @param int $level Encode level: 0 no encoding, 1 encoding * @return int <0 if KO, >0 if OK */ -function encodedecode_dbpassconf($level=0) +function encodedecode_dbpassconf($level = 0) { dol_syslog("encodedecode_dbpassconf level=".$level, LOG_DEBUG); $config = ''; @@ -448,7 +448,7 @@ function encodedecode_dbpassconf($level=0) * @return string New value for password * @see dol_hash */ -function getRandomPassword($generic=false, $replaceambiguouschars=null) +function getRandomPassword($generic = false, $replaceambiguouschars = null) { global $db,$conf,$langs,$user; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index be8aeb890fc..8ad2a91d3ea 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -174,7 +174,7 @@ function delivery_prepare_head($object) * @param string $filter Filter * @return int <0 if KO, >0 if OK */ -function show_list_sending_receive($origin,$origin_id,$filter='') +function show_list_sending_receive($origin, $origin_id, $filter = '') { global $db, $conf, $langs, $bc; global $form; diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index 2790c80c8e0..6f1ccdae258 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -24,7 +24,7 @@ * @param string $ref Ref of object * @return string Url string */ -function showOnlineSignatureUrl($type,$ref) +function showOnlineSignatureUrl($type, $ref) { global $conf, $langs; @@ -49,7 +49,7 @@ function showOnlineSignatureUrl($type,$ref) * @param string $ref Ref of object * @return string Url string */ -function getOnlineSignatureUrl($mode, $type, $ref='') +function getOnlineSignatureUrl($mode, $type, $ref = '') { global $conf, $db, $langs; diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 7927bec0268..e45afe65af1 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -88,7 +88,7 @@ function tax_prepare_head(ChargeSociales $object) * @param int $q Quarter * @return array Array with details of VATs (per third parties), -1 if no accountancy module, -2 if not yet developped, -3 if error */ -function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $direction, $m=0, $q=0) +function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $direction, $m = 0, $q = 0) { global $conf; @@ -556,7 +556,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di * @param int $m Month * @return array Array with details of VATs (per rate), -1 if no accountancy module, -2 if not yet developped, -3 if error */ -function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m=0) +function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m = 0) { global $conf; diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 735050af437..19407852066 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -126,7 +126,7 @@ function ticket_prepare_head($object) * @param string $car Char to generate key * @return void */ -function generate_random_id($car=16) +function generate_random_id($car = 16) { $string = ""; $chaine = "abcdefghijklmnopqrstuvwxyz123456789"; diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index 6c66079090a..d8242521f70 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -33,7 +33,7 @@ * @param int $silent Do not output indent and picto, returns only value * @return integer[] array(0 or 1 if at least one of this level after, 0 or 1 if at least one of higher level after, nbofdirinsub, nbofdocinsub) */ -function tree_showpad(&$fulltree,$key,$silent=0) +function tree_showpad(&$fulltree, $key, $silent = 0) { $pos=1; @@ -113,7 +113,7 @@ function tree_showpad(&$fulltree,$key,$silent=0) * @param int $showfk 1=show fk_links to parent into label (used by menu editor only) * @return void */ -function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetalreadyloaded=0, $showfk=0) +function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoresetalreadyloaded = 0, $showfk = 0) { global $tree_recur_alreadyadded; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 5747c0a5c0e..224d8407c48 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -295,7 +295,7 @@ function user_admin_prepare_head() * @param boolean $foruserprofile Show for user profile view * @return void */ -function show_theme($fuser,$edit=0,$foruserprofile=false) +function show_theme($fuser, $edit = 0, $foruserprofile = false) { global $conf,$langs,$db,$form; global $bc; diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index da16b0846c5..a66fd3971fd 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -33,7 +33,7 @@ * @return boolean True if OK * @see dolWebsiteOutput for function used to replace content in a web server context */ -function dolWebsiteReplacementOfLinks($website, $content, $removephppart=0) +function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0) { $nbrep = 0; @@ -102,7 +102,7 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart=0) * @param string $replacewith String to use as replacement * @return string Result string without php code */ -function dolStripPhpCode($str, $replacewith='') +function dolStripPhpCode($str, $replacewith = '') { $newstr = ''; @@ -277,7 +277,7 @@ function dolWebsiteSaveContent($content) * @param int $containerid Id of container. * @return void */ -function redirectToContainer($containerref, $containeraliasalt='',$containerid=0) +function redirectToContainer($containerref, $containeraliasalt = '', $containerid = 0) { global $db, $website; @@ -412,7 +412,7 @@ function includeContainer($containerref) * @param string $grabimagesinto 'root' or 'subpage' * @return void */ -function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modifylinks=0, $grabimages=1, $grabimagesinto='subpage') +function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modifylinks = 0, $grabimages = 1, $grabimagesinto = 'subpage') { global $conf; diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index 533a13e1fb6..89e8f0da5bd 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -32,7 +32,7 @@ * @param string $errorlabel Error string label * @return User Return user object identified by login/pass/entity into authentication array */ -function check_authentication($authentication,&$error,&$errorcode,&$errorlabel) +function check_authentication($authentication, &$error, &$errorcode, &$errorlabel) { global $db,$conf,$langs; global $dolibarr_main_authentication,$dolibarr_auto_user; diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 10d68475c97..01ce7fa3c60 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -32,7 +32,7 @@ * @param string $outputfile Output file * @return int <0 if ko, Nb of events in file if ok */ -function build_calfile($format,$title,$desc,$events_array,$outputfile) +function build_calfile($format, $title, $desc, $events_array, $outputfile) { global $conf,$langs; @@ -292,7 +292,7 @@ function build_calfile($format,$title,$desc,$events_array,$outputfile) * @param string $filter Filter * @return int <0 if ko, Nb of events in file if ok */ -function build_rssfile($format,$title,$desc,$events_array,$outputfile,$filter='') +function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filter = '') { global $user,$conf,$langs; global $dolibarr_main_url_root; @@ -395,7 +395,7 @@ function build_rssfile($format,$title,$desc,$events_array,$outputfile,$filter='' * @param string $string string to encode * @return string string encoded */ -function format_cal($format,$string) +function format_cal($format, $string) { global $conf; @@ -476,7 +476,7 @@ function calEncode($line) * @param int $forcal 1=For cal * @return string String converted */ -function quotedPrintEncode($str,$forcal=0) +function quotedPrintEncode($str, $forcal = 0) { $lines = preg_split("/\r\n/", $str); $out = ''; diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index 70cb1e4fa86..00615c30f0e 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -33,7 +33,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest=1) +function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotest = 1) { global $db,$conf,$langs; diff --git a/htdocs/core/login/functions_empty.php b/htdocs/core/login/functions_empty.php index a8b90de0e46..9d57e53832b 100644 --- a/htdocs/core/login/functions_empty.php +++ b/htdocs/core/login/functions_empty.php @@ -31,7 +31,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_empty($usertotest,$passwordtotest,$entitytotest) +function check_user_password_empty($usertotest, $passwordtotest, $entitytotest) { global $langs; diff --git a/htdocs/core/login/functions_forceuser.php b/htdocs/core/login/functions_forceuser.php index c337a0840b3..53e5f8beca9 100644 --- a/htdocs/core/login/functions_forceuser.php +++ b/htdocs/core/login/functions_forceuser.php @@ -32,7 +32,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_forceuser($usertotest,$passwordtotest,$entitytotest) +function check_user_password_forceuser($usertotest, $passwordtotest, $entitytotest) { // Variable dolibarr_auto_user must be defined in conf.php file global $dolibarr_auto_user; diff --git a/htdocs/core/login/functions_http.php b/htdocs/core/login/functions_http.php index 285ebebbabf..0be350787b4 100644 --- a/htdocs/core/login/functions_http.php +++ b/htdocs/core/login/functions_http.php @@ -31,7 +31,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_http($usertotest,$passwordtotest,$entitytotest) +function check_user_password_http($usertotest, $passwordtotest, $entitytotest) { dol_syslog("functions_http::check_user_password_http _SERVER[REMOTE_USER]=".(empty($_SERVER["REMOTE_USER"])?'':$_SERVER["REMOTE_USER"])); diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 4587dbae11b..baedc488674 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -32,7 +32,7 @@ * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) +function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) { global $db,$conf,$langs; global $_POST; diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php index bc8d7f45122..ffba9c09fb6 100644 --- a/htdocs/core/login/functions_openid.php +++ b/htdocs/core/login/functions_openid.php @@ -34,7 +34,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/openid.class.php'; * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled) * @return string Login if OK, '' if KO */ -function check_user_password_openid($usertotest,$passwordtotest,$entitytotest) +function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) { global $_POST,$db,$conf,$langs; diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 1ca94b38106..f6275348f07 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; * @param string $mode 'top', 'topnb', 'left', 'jmobile' * @return int 0 */ -function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode='') +function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 0, $mode = '') { global $user,$conf,$langs,$dolibarr_main_db_name; @@ -164,7 +164,7 @@ function print_start_menu_array_auguria() * @param int $showmode 0 = hide, 1 = allowed or 2 = not allowed * @return void */ -function print_start_menu_entry_auguria($idsel,$classname,$showmode) +function print_start_menu_entry_auguria($idsel, $classname, $showmode) { if ($showmode) { @@ -255,7 +255,7 @@ function print_end_menu_array_auguria() * @param array $moredata An array with more data to output * @return int Nb of entries */ -function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='',$moredata=null) +function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null) { global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index f4cb98d9c4b..8427ca3085c 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -63,7 +63,7 @@ class MenuManager * @param string $forceleftmenu To force leftmenu to load * @return void */ - function loadMenu($forcemainmenu='',$forceleftmenu='') + function loadMenu($forcemainmenu = '', $forceleftmenu = '') { global $conf, $user, $langs; @@ -123,7 +123,7 @@ class MenuManager * @param array $moredata An array with more data to output * @return int 0 or nb of top menu entries if $mode = 'topnb' */ - function showmenu($mode, $moredata=null) + function showmenu($mode, $moredata = null) { global $conf, $langs, $user; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 223cacaf26a..01ca42c9084 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; * @param string $mode 'top', 'topnb', 'left', 'jmobile' * @return int 0 */ -function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode='') +function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 0, $mode = '') { global $user,$conf,$langs,$dolibarr_main_db_name; @@ -393,7 +393,7 @@ function print_start_menu_array() * @param int $showmode 0 = hide, 1 = allowed or 2 = not allowed * @return void */ -function print_start_menu_entry($idsel,$classname,$showmode) +function print_start_menu_entry($idsel, $classname, $showmode) { if ($showmode) { @@ -482,7 +482,7 @@ function print_end_menu_array() * @param array $moredata An array with more data to output * @return int nb of menu entries */ -function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='',$moredata=null) +function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null) { global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 4992fc6d11c..7fae44b445f 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -62,7 +62,7 @@ class MenuManager * @param string $forceleftmenu To force leftmenu to load * @return void */ - function loadMenu($forcemainmenu='',$forceleftmenu='') + function loadMenu($forcemainmenu = '', $forceleftmenu = '') { // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; @@ -123,7 +123,7 @@ class MenuManager * @param array $moredata An array with more data to output * @return int 0 or nb of top menu entries if $mode = 'topnb' */ - function showmenu($mode, $moredata=null) + function showmenu($mode, $moredata = null) { global $conf, $langs, $user; diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 038167ae512..99acddd70ec 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -67,7 +67,7 @@ class MenuManager * @param array $moredata An array with more data to output * @return int 0 or nb of top menu entries if $mode = 'topnb' */ - function showmenu($mode, $moredata=null) + function showmenu($mode, $moredata = null) { global $user,$conf,$langs,$dolibarr_main_db_name; @@ -532,7 +532,7 @@ function print_start_menu_array_empty() * @param int $showmode 0 = hide, 1 = allowed or 2 = not allowed * @return void */ -function print_start_menu_entry_empty($idsel,$classname,$showmode) +function print_start_menu_entry_empty($idsel, $classname, $showmode) { if ($showmode) { diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 9e8d5565f67..441f73369ca 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -381,7 +381,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * * @return int 1 if OK, 0 if KO */ - function _init($array_sql, $options='') + function _init($array_sql, $options = '') { global $conf; $err=0; @@ -474,7 +474,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * * @return int 1 if OK, 0 if KO */ - function _remove($array_sql, $options='') + function _remove($array_sql, $options = '') { $err=0; @@ -778,7 +778,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * @param int $translated 1=Special version keys are translated, 0=Special version keys are not translated * @return string Module version */ - function getVersion($translated=1) + function getVersion($translated = 1) { global $langs; $langs->load("admin"); @@ -1127,7 +1127,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * * @return int Error count (0 if OK) */ - function insert_boxes($option='') + function insert_boxes($option = '') { // phpcs:enable include_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php'; @@ -1650,7 +1650,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int Error count (0 if OK) */ - function insert_permissions($reinitadminperms=0, $force_entity=null, $notrigger=0) + function insert_permissions($reinitadminperms = 0, $force_entity = null, $notrigger = 0) { // phpcs:enable global $conf,$user; @@ -2017,7 +2017,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * * @return int Error count (0 if OK) */ - function insert_dirs($name,$dir) + function insert_dirs($name, $dir) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/action/modules_action.php b/htdocs/core/modules/action/modules_action.php index 323675f88f6..2a492c3588d 100644 --- a/htdocs/core/modules/action/modules_action.php +++ b/htdocs/core/modules/action/modules_action.php @@ -41,7 +41,7 @@ abstract class ModeleAction extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -69,7 +69,7 @@ abstract class ModeleAction extends CommonDocGenerator * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ -function action_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function action_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $conf,$langs,$user; diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index 44092df6ec9..b0ba812123e 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -108,7 +108,7 @@ class CommActionRapport * @param Translate $outputlangs Lang object for output language * @return int 1=OK, 0=KO */ - function write_file($socid = 0, $catid = 0, $outputlangs='') + function write_file($socid = 0, $catid = 0, $outputlangs = '') { // phpcs:enable global $user,$conf,$langs,$hookmanager; diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 12aa47ce9d6..3daea20a113 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -100,7 +100,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs) + function write_file($object, $outputlangs) { // phpcs:enable global $conf, $hookmanager, $langs, $user; @@ -285,7 +285,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -387,7 +387,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 6fc6594b1e3..c05a66df53d 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -105,7 +105,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param null|array $moreparams More parameters * @return int 1 if OK, <=0 if KO */ - function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { // phpcs:enable global $conf, $hookmanager, $langs, $user, $mysoc; @@ -430,7 +430,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -618,7 +618,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/bank/modules_bank.php b/htdocs/core/modules/bank/modules_bank.php index fe43f9cee15..8cdf2ba7ebe 100644 --- a/htdocs/core/modules/bank/modules_bank.php +++ b/htdocs/core/modules/bank/modules_bank.php @@ -45,7 +45,7 @@ abstract class ModeleBankAccountDoc extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php index 6d9e492d666..a0d902aa3e1 100644 --- a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php @@ -120,7 +120,7 @@ class modPhpbarcode extends ModeleBarCode * @param integer $nooutputiferror No output if error * @return int <0 if KO, >0 if OK */ - function buildBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) + function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { global $_GET,$_SERVER; global $conf; @@ -161,7 +161,7 @@ class modPhpbarcode extends ModeleBarCode * @param integer $nooutputiferror No output if error * @return int <0 if KO, >0 if OK */ - function writeBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) + function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { global $conf,$filebarcode; diff --git a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php index ed6a7635164..e58d51135e1 100644 --- a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php @@ -105,7 +105,7 @@ class modTcpdfbarcode extends ModeleBarCode * @param integer $nooutputiferror No output if error (not used with this engine) * @return int <0 if KO, >0 if OK */ - function buildBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) + function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { global $_GET; @@ -152,7 +152,7 @@ class modTcpdfbarcode extends ModeleBarCode * @param integer $nooutputiferror No output if error (not used with this engine) * @return int <0 if KO, >0 if OK */ - function writeBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) + function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { global $conf,$_GET; diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 97121eebcfd..58271615683 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -119,7 +119,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode * @param Product $objproduct Object product * @return string Return string example */ - function getExample($langs,$objproduct=0) + function getExample($langs, $objproduct = 0) { $examplebarcode = $this->getNextValue($objproduct,''); if (! $examplebarcode) @@ -142,7 +142,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode * @param string $type Type of barcode (EAN, ISBN, ...) * @return string Value if OK, '' if module not configured, <0 if KO */ - function getNextValue($objproduct=null,$type='') + function getNextValue($objproduct = null, $type = '') { global $db,$conf; diff --git a/htdocs/core/modules/barcode/modules_barcode.class.php b/htdocs/core/modules/barcode/modules_barcode.class.php index 44d7eccbb07..81481d11dcf 100644 --- a/htdocs/core/modules/barcode/modules_barcode.class.php +++ b/htdocs/core/modules/barcode/modules_barcode.class.php @@ -96,7 +96,7 @@ abstract class ModeleNumRefBarCode * @param string $type Type of barcode (EAN, ISBN, ...) * @return string Value */ - function getNextValue($objproduct,$type='') + function getNextValue($objproduct, $type = '') { global $langs; return $langs->trans("Function_getNextValue_InModuleNotWorking"); @@ -126,7 +126,7 @@ abstract class ModeleNumRefBarCode * @param int $type -1=Nothing, 0=Product, 1=Service * @return string HTML translated description */ - function getToolTip($langs,$soc,$type) + function getToolTip($langs, $soc, $type) { global $conf; diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 32d35edb70a..2868191046a 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -381,7 +381,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts * @param int $hidefreetext 1=Hide free text * @return void */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php index ba617787cbe..e6abe0cf78f 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php @@ -109,7 +109,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -153,7 +153,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts * @param string $objforref Object for number to search * @return string Next free value */ - function chequereceipt_get_num($objsoc,$objforref) + function chequereceipt_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 6e211fb4ace..175ec2a7270 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -112,7 +112,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -141,7 +141,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts * @param string $objforref Object for number to search * @return string Next free value */ - function chequereceipt_get_num($objsoc,$objforref) + function chequereceipt_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/cheque/modules_chequereceipts.php b/htdocs/core/modules/cheque/modules_chequereceipts.php index 5a7920ce4f1..cc259b7f6b1 100644 --- a/htdocs/core/modules/cheque/modules_chequereceipts.php +++ b/htdocs/core/modules/cheque/modules_chequereceipts.php @@ -92,7 +92,7 @@ abstract class ModeleNumRefChequeReceipts * @param Object $object Object we need next value for * @return string Valeur */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $langs; return $langs->trans("NotAvailable"); @@ -135,7 +135,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index bd5c870e0ba..f65fe07a6ce 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -204,7 +204,7 @@ class doc_generic_order_odt extends ModelePDFCommandes * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 7009773e582..879319db2b9 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -215,7 +215,7 @@ class pdf_einstein extends ModelePDFCommandes * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; @@ -1125,7 +1125,7 @@ class pdf_einstein extends ModelePDFCommandes * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1235,7 +1235,7 @@ class pdf_einstein extends ModelePDFCommandes * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="PdfOrderTitle") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle") { global $conf,$langs,$hookmanager; @@ -1446,7 +1446,7 @@ class pdf_einstein extends ModelePDFCommandes * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 07173f7db13..a67327fa249 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -158,7 +158,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - public function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0) + public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; @@ -1183,7 +1183,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param string $currency Currency code * @return void */ - private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1251,7 +1251,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param string $titlekey Translation key to show as title of document * @return void */ - private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="PdfOrderTitle") + private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle") { global $conf,$langs,$hookmanager; @@ -1462,7 +1462,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - private function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; @@ -1481,7 +1481,7 @@ class pdf_eratosthene extends ModelePDFCommandes * @param int $hideref Do not show ref * @return null */ - public function defineColumnField($object,$outputlangs,$hidedetails=0,$hidedesc=0,$hideref=0) + public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf, $hookmanager; diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php index ebbe72f94c9..66a5307cbfa 100644 --- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php @@ -67,7 +67,7 @@ class pdf_proforma extends pdf_einstein * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="InvoiceProForma") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma") { global $conf,$langs,$hookmanager; diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php index 215d2380819..891e3d3dddd 100644 --- a/htdocs/core/modules/commande/mod_commande_marbre.php +++ b/htdocs/core/modules/commande/mod_commande_marbre.php @@ -119,7 +119,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -163,7 +163,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes * @param string $objforref Object for number to search * @return string Next free value */ - function commande_get_num($objsoc,$objforref) + function commande_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 1b08c9c1105..0b6768dd273 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -128,7 +128,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -159,7 +159,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes * @param string $objforref Object for number to search * @return string Next free value */ - function commande_get_num($objsoc,$objforref) + function commande_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php index d644de33a5d..6090ad35028 100644 --- a/htdocs/core/modules/commande/modules_commande.php +++ b/htdocs/core/modules/commande/modules_commande.php @@ -48,7 +48,7 @@ abstract class ModelePDFCommandes extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -128,7 +128,7 @@ abstract class ModeleNumRefCommandes * @param Object $object Object we need next value for * @return string Valeur */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index 22dfc6388b4..399bdca0fe0 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -193,7 +193,7 @@ class doc_generic_contract_odt extends ModelePDFContract * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 3375e5b7ccc..265263dd9bd 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -172,7 +172,7 @@ class pdf_strato extends ModelePDFContract * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$hookmanager,$mysoc; @@ -508,7 +508,7 @@ class pdf_strato extends ModelePDFContract * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf; @@ -762,7 +762,7 @@ class pdf_strato extends ModelePDFContract * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 4769ec17f99..4b40b982c28 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -118,7 +118,7 @@ class mod_contract_magre extends ModelNumRefContracts * @param Object $contract contract object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$contract) + function getNextValue($objsoc, $contract) { global $db,$conf; @@ -145,7 +145,7 @@ class mod_contract_magre extends ModelNumRefContracts * @param Object $objforref contract object * @return string Value if OK, 0 if KO */ - function contract_get_num($objsoc,$objforref) + function contract_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index 993f4bf9bfb..509ece14278 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -81,7 +81,7 @@ class mod_contract_olive extends ModelNumRefContracts * @param Contrat $contract Object contract * @return string Return next value */ - function getNextValue($objsoc,$contract) + function getNextValue($objsoc, $contract) { global $langs; return ''; diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index e91775f669c..6c8f6b848c8 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -119,7 +119,7 @@ class mod_contract_serpis extends ModelNumRefContracts * @param Object $contract contract object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$contract) + function getNextValue($objsoc, $contract) { global $db,$conf; @@ -161,7 +161,7 @@ class mod_contract_serpis extends ModelNumRefContracts * @param Object $objforref contract object * @return string Value if OK, 0 if KO */ - function contract_get_num($objsoc,$objforref) + function contract_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php index 59290de7d82..55f2ac2a940 100644 --- a/htdocs/core/modules/contract/modules_contract.php +++ b/htdocs/core/modules/contract/modules_contract.php @@ -51,7 +51,7 @@ abstract class ModelePDFContract extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index cac7329cf5b..e19e8d6839f 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -73,7 +73,7 @@ class html_cerfafr extends ModeleDon * @param string $currency Currency code * @return int >0 if OK, <0 if KO */ - function write_file($don,$outputlangs,$currency='') + function write_file($don, $outputlangs, $currency = '') { // phpcs:enable global $user,$conf,$langs,$mysoc; @@ -283,7 +283,7 @@ class html_cerfafr extends ModeleDon * @param mixed $devise2 devise 2 ex: centimes * @return string amount in letters */ - private function amountToLetters($montant, $devise1='', $devise2='') + private function amountToLetters($montant, $devise1 = '', $devise2 = '') { $unite = array(); $dix = array(); diff --git a/htdocs/core/modules/dons/modules_don.php b/htdocs/core/modules/dons/modules_don.php index aee52063227..7c74e1b542d 100644 --- a/htdocs/core/modules/dons/modules_don.php +++ b/htdocs/core/modules/dons/modules_don.php @@ -47,7 +47,7 @@ abstract class ModeleDon extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 4d7cc056f12..6ef784b0292 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -203,7 +203,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index bfda0e8dfad..b9c16d33420 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -116,7 +116,7 @@ class pdf_merou extends ModelePdfExpedition * * @param DoliDB $db Database handler */ - function __construct($db=0) + function __construct($db = 0) { global $conf,$langs,$mysoc; @@ -154,7 +154,7 @@ class pdf_merou extends ModelePdfExpedition * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file(&$object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file(&$object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$conf,$langs,$mysoc,$hookmanager; @@ -455,7 +455,7 @@ class pdf_merou extends ModelePdfExpedition * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $langs; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -493,7 +493,7 @@ class pdf_merou extends ModelePdfExpedition * @param int $hidefreetext 1=Hide free text * @return void */ - function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { $default_font_size = pdf_getPDFFontSize($outputlangs); $pdf->SetFont('','', $default_font_size - 2); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 84f73cde1c6..fe841f2278b 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -115,7 +115,7 @@ class pdf_rouget extends ModelePdfExpedition * * @param DoliDB $db Database handler */ - function __construct($db=0) + function __construct($db = 0) { global $conf,$langs,$mysoc; @@ -184,7 +184,7 @@ class pdf_rouget extends ModelePdfExpedition * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$conf,$langs,$hookmanager; @@ -778,7 +778,7 @@ class pdf_rouget extends ModelePdfExpedition * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf; @@ -1111,7 +1111,7 @@ class pdf_rouget extends ModelePdfExpedition * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 35a5eb2325b..a1bc26efa64 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -119,7 +119,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition * @param Object $shipment Shipment object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$shipment) + function getNextValue($objsoc, $shipment) { global $db,$conf; @@ -148,7 +148,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition * @param Object $objforref Shipment object * @return string Next free value */ - function expedition_get_num($objsoc,$objforref) + function expedition_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index 2ebf9335755..6b875388a4d 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -117,7 +117,7 @@ class mod_expedition_safor extends ModelNumRefExpedition * @param Object $shipment Shipment object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$shipment) + function getNextValue($objsoc, $shipment) { global $db,$conf; @@ -158,7 +158,7 @@ class mod_expedition_safor extends ModelNumRefExpedition * @param Object $objforref Shipment object * @return string Next free value */ - function expedition_get_num($objsoc,$objforref) + function expedition_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index a22ae0d0f99..e0c55cd2bc4 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -50,7 +50,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 9851e1781e2..644062c3077 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -541,7 +541,7 @@ class pdf_standard extends ModeleExpenseReport * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return void */ - private function printLine(&$pdf, $object, $linenumber, $curY, $default_font_size, $outputlangs, $hidedetails=0) + private function printLine(&$pdf, $object, $linenumber, $curY, $default_font_size, $outputlangs, $hidedetails = 0) { global $conf; $pdf->SetFont('','', $default_font_size - 1); @@ -835,7 +835,7 @@ class pdf_standard extends ModeleExpenseReport * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1057,7 +1057,7 @@ class pdf_standard extends ModeleExpenseReport * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails = $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/expensereport/modules_expensereport.php b/htdocs/core/modules/expensereport/modules_expensereport.php index 9ff7f671f9f..88621be737a 100644 --- a/htdocs/core/modules/expensereport/modules_expensereport.php +++ b/htdocs/core/modules/expensereport/modules_expensereport.php @@ -37,7 +37,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -66,7 +66,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ -function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 1efe6161647..298f535dffb 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -163,7 +163,7 @@ class ExportCsv extends ModeleExports * @param Translate $outputlangs Output language object * @return int <0 if KO, >=0 if OK */ - function open_file($file,$outputlangs) + function open_file($file, $outputlangs) { // phpcs:enable global $langs; @@ -208,7 +208,7 @@ class ExportCsv extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types) + function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable global $conf; @@ -244,7 +244,7 @@ class ExportCsv extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_record($array_selected_sorted,$objp,$outputlangs,$array_types) + function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 5dc574a150f..f0848d219c1 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -186,7 +186,7 @@ class ExportExcel extends ModeleExports * @param Translate $outputlangs Output language object * @return int <0 if KO, >=0 if OK */ - function open_file($file,$outputlangs) + function open_file($file, $outputlangs) { // phpcs:enable global $user,$conf,$langs; @@ -275,7 +275,7 @@ class ExportExcel extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types) + function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable global $conf; @@ -332,7 +332,7 @@ class ExportExcel extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_record($array_selected_sorted,$objp,$outputlangs,$array_types) + function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/export/export_excelnew.modules.php b/htdocs/core/modules/export/export_excelnew.modules.php index dfb9e4381f7..fcb580ea2d8 100644 --- a/htdocs/core/modules/export/export_excelnew.modules.php +++ b/htdocs/core/modules/export/export_excelnew.modules.php @@ -179,7 +179,7 @@ class ExportExcelnew extends ModeleExports * @param Translate $outputlangs Output language object * @return int <0 if KO, >=0 if OK */ - function open_file($file,$outputlangs) + function open_file($file, $outputlangs) { // phpcs:enable global $user,$conf,$langs; @@ -253,7 +253,7 @@ class ExportExcelnew extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types) + function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable global $conf; @@ -296,7 +296,7 @@ class ExportExcelnew extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_record($array_selected_sorted,$objp,$outputlangs,$array_types) + function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index 8afa9ded884..fa3a55fa10d 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -159,7 +159,7 @@ class ExportTsv extends ModeleExports * @param Translate $outputlangs Output language object * @return int <0 if KO, >=0 if OK */ - function open_file($file,$outputlangs) + function open_file($file, $outputlangs) { // phpcs:enable global $langs; @@ -204,7 +204,7 @@ class ExportTsv extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types) + function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable foreach($array_selected_sorted as $code => $value) @@ -229,7 +229,7 @@ class ExportTsv extends ModeleExports * @param array $array_types Array with types of fields * @return int <0 if KO, >0 if OK */ - function write_record($array_selected_sorted,$objp,$outputlangs,$array_types) + function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/export/modules_export.php b/htdocs/core/modules/export/modules_export.php index 15536747a28..7a2f172c19d 100644 --- a/htdocs/core/modules/export/modules_export.php +++ b/htdocs/core/modules/export/modules_export.php @@ -52,7 +52,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac * @param integer $maxfilenamelength Max length of value to show * @return array List of templates (same content than array this->driverlabel) */ - function liste_modeles($db,$maxfilenamelength=0) + function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable dol_syslog(get_class($this)."::liste_modeles"); diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 8e3caa1d3ec..1ac8e9aaa2c 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -202,7 +202,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index ab2ffb3bd2a..8365114bbad 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -230,7 +230,7 @@ class pdf_crabe extends ModelePDFFactures * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1411,7 +1411,7 @@ class pdf_crabe extends ModelePDFFactures * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1842,7 +1842,7 @@ class pdf_crabe extends ModelePDFFactures * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 7e28f11bb8a..203711fc80f 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -172,7 +172,7 @@ class pdf_sponge extends ModelePDFFactures * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - public function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1473,7 +1473,7 @@ class pdf_sponge extends ModelePDFFactures * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1813,7 +1813,7 @@ class pdf_sponge extends ModelePDFFactures * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; @@ -1830,7 +1830,7 @@ class pdf_sponge extends ModelePDFFactures * @param int $hideref Do not show ref * @return null */ - function defineColumnField($object,$outputlangs,$hidedetails=0,$hidedesc=0,$hideref=0) + function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf, $hookmanager; diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 7057fda20ee..9d67bdc96dc 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -149,7 +149,7 @@ class mod_facture_mars extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Value */ - function getNextValue($objsoc, $invoice, $mode='next') + function getNextValue($objsoc, $invoice, $mode = 'next') { global $db; $prefix=$this->prefixinvoice; @@ -223,7 +223,7 @@ class mod_facture_mars extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index c454b200004..ccd763eec33 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -135,7 +135,7 @@ class mod_facture_mercure extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc, $invoice, $mode='next') + function getNextValue($objsoc, $invoice, $mode = 'next') { global $db,$conf; @@ -182,7 +182,7 @@ class mod_facture_mercure extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 454a1588f27..f04addb657d 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -167,7 +167,7 @@ class mod_facture_terre extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Value */ - function getNextValue($objsoc, $invoice, $mode='next') + function getNextValue($objsoc, $invoice, $mode = 'next') { global $db; @@ -238,7 +238,7 @@ class mod_facture_terre extends ModeleNumRefFactures * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index fd9168150d6..505582f534a 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -50,7 +50,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -127,7 +127,7 @@ abstract class ModeleNumRefFactures * @param Facture $facture Objet facture * @return string Value */ - function getNextValue($objsoc,$facture) + function getNextValue($objsoc, $facture) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 22ec100a73e..2c3e5a6130b 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -163,7 +163,7 @@ class pdf_soleil extends ModelePDFFicheinter * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager; @@ -491,7 +491,7 @@ class pdf_soleil extends ModelePDFFicheinter * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf; @@ -727,7 +727,7 @@ class pdf_soleil extends ModelePDFFicheinter * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 86f25dc4078..dc0a607ad5e 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -124,7 +124,7 @@ class mod_arctic extends ModeleNumRefFicheinter * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc=0,$object='') + function getNextValue($objsoc = 0, $object = '') { global $db,$conf; @@ -152,7 +152,7 @@ class mod_arctic extends ModeleNumRefFicheinter * @param Object $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index 24f55192ff0..a313d9ddfb9 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -122,7 +122,7 @@ class mod_pacific extends ModeleNumRefFicheinter * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc=0,$object='') + function getNextValue($objsoc = 0, $object = '') { global $db,$conf; @@ -158,7 +158,7 @@ class mod_pacific extends ModeleNumRefFicheinter * @param Object $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index a0ab40ce7a0..ce447be2eac 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -48,7 +48,7 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -162,7 +162,7 @@ abstract class ModeleNumRefFicheinter * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ -function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $conf,$langs,$user; diff --git a/htdocs/core/modules/holiday/mod_holiday_madonna.php b/htdocs/core/modules/holiday/mod_holiday_madonna.php index f53e55be6fd..033f70a0a4e 100644 --- a/htdocs/core/modules/holiday/mod_holiday_madonna.php +++ b/htdocs/core/modules/holiday/mod_holiday_madonna.php @@ -162,7 +162,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays * @param Object $objforref Holiday object * @return string Value if OK, 0 if KO */ - function holiday_get_num($fuser,$objforref) + function holiday_get_num($fuser, $objforref) { // phpcs:enable return $this->getNextValue($fuser,$objforref); diff --git a/htdocs/core/modules/holiday/modules_holiday.php b/htdocs/core/modules/holiday/modules_holiday.php index 7f1c48fec10..25cd09de38a 100644 --- a/htdocs/core/modules/holiday/modules_holiday.php +++ b/htdocs/core/modules/holiday/modules_holiday.php @@ -52,7 +52,7 @@ abstract class ModelePDFHoliday extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 6db495e9f04..797f9c86227 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -93,7 +93,7 @@ class ImportCsv extends ModeleImports * @param DoliDB $db Database handler * @param string $datatoimport String code describing import set (ex: 'societe_1') */ - function __construct($db,$datatoimport) + function __construct($db, $datatoimport) { global $conf, $langs; $this->db = $db; @@ -139,7 +139,7 @@ class ImportCsv extends ModeleImports * @param array $headerlinefields Array of fields name * @return string */ - function write_title_example($outputlangs,$headerlinefields) + function write_title_example($outputlangs, $headerlinefields) { // phpcs:enable $s=join($this->separator,array_map('cleansep',$headerlinefields)); @@ -154,7 +154,7 @@ class ImportCsv extends ModeleImports * @param array $contentlinevalues Array of lines * @return string */ - function write_record_example($outputlangs,$contentlinevalues) + function write_record_example($outputlangs, $contentlinevalues) { // phpcs:enable $s=join($this->separator,array_map('cleansep',$contentlinevalues)); @@ -319,7 +319,7 @@ class ImportCsv extends ModeleImports * @param array $updatekeys Array of keys to use to try to do an update first before insert. This field are defined into the module descriptor. * @return int <0 if KO, >0 if OK */ - function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid,$updatekeys) + function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys) { // phpcs:enable global $langs,$conf,$user; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index d96dc18104f..beb6b66c479 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -95,7 +95,7 @@ class ImportXlsx extends ModeleImports * @param DoliDB $db Database handler * @param string $datatoimport String code describing import set (ex: 'societe_1') */ - function __construct($db,$datatoimport) + function __construct($db, $datatoimport) { global $conf,$langs; $this->db = $db; @@ -166,7 +166,7 @@ class ImportXlsx extends ModeleImports * @param array $headerlinefields Array of fields name * @return string */ - function write_title_example($outputlangs,$headerlinefields) + function write_title_example($outputlangs, $headerlinefields) { // phpcs:enable global $conf; @@ -192,7 +192,7 @@ class ImportXlsx extends ModeleImports * @param array $contentlinevalues Array of lines * @return string */ - function write_record_example($outputlangs,$contentlinevalues) + function write_record_example($outputlangs, $contentlinevalues) { // phpcs:enable $col = 0; @@ -346,7 +346,7 @@ class ImportXlsx extends ModeleImports * @param array $updatekeys Array of keys to use to try to do an update first before insert. This field are defined into the module descriptor. * @return int <0 if KO, >0 if OK */ - function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid,$updatekeys) + function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys) { // phpcs:enable global $langs,$conf,$user; diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index 4c606b8bacf..352d19dde8a 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -163,7 +163,7 @@ class ModeleImports * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable dol_syslog(get_class($this)."::liste_modeles"); diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index 971913cb58d..5ab47b22528 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -186,7 +186,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; @@ -673,7 +673,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -913,7 +913,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index 8df38cbc3a2..31e8d85c61d 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -125,7 +125,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -169,7 +169,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder * @param Object $object Object livraison * @return string Texte descriptif */ - function livraison_get_num($objsoc=0,$object='') + function livraison_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc,$object); diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php index 76579f5e757..2f8d828f038 100644 --- a/htdocs/core/modules/livraison/mod_livraison_saphir.php +++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php @@ -124,7 +124,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder * @param Object $object Object delivery * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -152,7 +152,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder * @param string $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } @@ -166,7 +166,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder * @param Object $object Objet livraison * @return string Texte descripif */ - function livraison_get_num($objsoc=0,$object='') + function livraison_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc,$object); diff --git a/htdocs/core/modules/livraison/modules_livraison.php b/htdocs/core/modules/livraison/modules_livraison.php index 6dad7003ec5..a4c28799088 100644 --- a/htdocs/core/modules/livraison/modules_livraison.php +++ b/htdocs/core/modules/livraison/modules_livraison.php @@ -49,7 +49,7 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index bfd7f4b0d45..5700801c64f 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -60,7 +60,7 @@ class mailing_advthirdparties extends MailingTargets * @param array $contactid Array of contact id to add * @return int <0 if error, number of emails added if ok */ - function add_to_target_spec($mailing_id,$socid,$type_of_target, $contactid) + function add_to_target_spec($mailing_id, $socid, $type_of_target, $contactid) { // phpcs:enable global $conf, $langs; @@ -208,7 +208,7 @@ class mailing_advthirdparties extends MailingTargets * @param string $sql Not use here * @return int Nb of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { global $conf; @@ -287,7 +287,7 @@ class mailing_advthirdparties extends MailingTargets * @param string $type type * @return string Url link */ - function url($id,$type) + function url($id, $type) { if ($type=='thirdparty') { $companystatic=new Societe($this->db); diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 588d61faf5e..53bf5095598 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -91,7 +91,7 @@ class mailing_contacts1 extends MailingTargets * @param string $sql Requete sql de comptage * @return int */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { global $conf; diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index cd0a0ee9d5a..8feadc6b6e2 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -110,7 +110,7 @@ class mailing_example extends MailingTargets * @param string $sql Requete sql de comptage * @return int|string Number of recipient or '?' */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { // CHANGE THIS: Optionnal diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 151d828aa61..75b01098333 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -90,7 +90,7 @@ class mailing_fraise extends MailingTargets * @param string $sql Requete sql de comptage * @return int Nb of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { $sql = "SELECT count(distinct(a.email)) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as a"; diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index 91539359d6e..177a40d4827 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -88,7 +88,7 @@ class mailing_pomme extends MailingTargets * @param string $sql SQL request to use to count * @return int Number of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { global $conf; diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index 5465b0af5c3..e6e5e021ab9 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -218,7 +218,7 @@ class mailing_thirdparties extends MailingTargets * @param string $sql Requete sql de comptage * @return int Nb of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { global $conf; diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index fc57a364c9d..a82517859db 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -189,7 +189,7 @@ class mailing_thirdparties_services_expired extends MailingTargets * @param string $sql SQL request to use to count * @return int Number of recipients */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { $now=dol_now(); diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index a4caef12af8..ee94516a44c 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -76,7 +76,7 @@ class mailing_xinputfile extends MailingTargets * @param string $sql Sql request to count * @return string '' means NA */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { return ''; } diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php index bcbf5d9a41b..a7448952f69 100644 --- a/htdocs/core/modules/mailings/xinputuser.modules.php +++ b/htdocs/core/modules/mailings/xinputuser.modules.php @@ -76,7 +76,7 @@ class mailing_xinputuser extends MailingTargets * @param string $sql Sql request to count * @return string '' means NA */ - function getNbOfRecipients($sql='') + function getNbOfRecipients($sql = '') { return ''; } diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 524d1446427..e6c023823fd 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -42,7 +42,7 @@ class pdf_standard extends CommonStickerGenerator * @param array $param Associative array containing label content and optional parameters * @return void */ - function addSticker(&$pdf,$outputlangs,$param) + function addSticker(&$pdf, $outputlangs, $param) { // use this method in future refactoring } @@ -63,7 +63,7 @@ class pdf_standard extends CommonStickerGenerator * @param string $photo Photo (full path to image file used as replacement for key __PHOTOS__ into left, right, header or footer text) * @return void */ - function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$idmember=0,$photo='') + function Add_PDF_card(&$pdf, $textleft, $header, $footer, $outputlangs, $textright = '', $idmember = 0, $photo = '') { // phpcs:enable global $db,$mysoc,$conf,$langs; @@ -248,7 +248,7 @@ class pdf_standard extends CommonStickerGenerator * @param int $nooutput 1=Generate only file on disk and do not return it on response * @return int 1=OK, 0=KO */ - function write_file($object, $outputlangs, $srctemplatepath, $mode='member', $nooutput=0) + function write_file($object, $outputlangs, $srctemplatepath, $mode = 'member', $nooutput = 0) { // phpcs:enable global $user,$conf,$langs,$mysoc,$_Avery_Labels; diff --git a/htdocs/core/modules/member/modules_cards.php b/htdocs/core/modules/member/modules_cards.php index 4f498d92158..7cbe8778f6e 100644 --- a/htdocs/core/modules/member/modules_cards.php +++ b/htdocs/core/modules/member/modules_cards.php @@ -48,7 +48,7 @@ class ModelePDFCards * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -76,7 +76,7 @@ class ModelePDFCards * @param string $template pdf generenate document class to use default 'standard' * @return int <0 if KO, >0 if OK */ -function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir='', $template='standard') +function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir = '', $template = 'standard') { // phpcs:enable global $conf,$langs; diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 6b5cb22d69a..006c529fc02 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -377,7 +377,7 @@ class modAdherent extends DolibarrModules * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modApi.class.php b/htdocs/core/modules/modApi.class.php index 45aedc11406..515ec4296b1 100644 --- a/htdocs/core/modules/modApi.class.php +++ b/htdocs/core/modules/modApi.class.php @@ -224,7 +224,7 @@ class modApi extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { $sql = array(); diff --git a/htdocs/core/modules/modAsset.class.php b/htdocs/core/modules/modAsset.class.php index dd61c75df2a..fc123cb3cd6 100644 --- a/htdocs/core/modules/modAsset.class.php +++ b/htdocs/core/modules/modAsset.class.php @@ -320,7 +320,7 @@ class modAsset extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php index 89a84f564b8..47f5a1b0519 100644 --- a/htdocs/core/modules/modBanque.class.php +++ b/htdocs/core/modules/modBanque.class.php @@ -210,7 +210,7 @@ class modBanque extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php index 9e66bc3f995..78282afae02 100644 --- a/htdocs/core/modules/modBarcode.class.php +++ b/htdocs/core/modules/modBarcode.class.php @@ -129,7 +129,7 @@ class modBarcode extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php index 2c422cb4ad6..b14f385ccba 100644 --- a/htdocs/core/modules/modBlockedLog.class.php +++ b/htdocs/core/modules/modBlockedLog.class.php @@ -162,7 +162,7 @@ class modBlockedLog extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf, $user; diff --git a/htdocs/core/modules/modCashDesk.class.php b/htdocs/core/modules/modCashDesk.class.php index 472abe53a42..ab1179fc61c 100644 --- a/htdocs/core/modules/modCashDesk.class.php +++ b/htdocs/core/modules/modCashDesk.class.php @@ -132,7 +132,7 @@ class modCashDesk extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { $sql = array(); diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index f0561757eae..11e7091a6e4 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -483,7 +483,7 @@ class modCategorie extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 5d1bdeada81..6a5791799ad 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -269,7 +269,7 @@ class modCommande extends DolibarrModules * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modComptabilite.class.php b/htdocs/core/modules/modComptabilite.class.php index 2d0f81cf0cc..ff4c44aaff6 100644 --- a/htdocs/core/modules/modComptabilite.class.php +++ b/htdocs/core/modules/modComptabilite.class.php @@ -109,7 +109,7 @@ class modComptabilite extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modContrat.class.php b/htdocs/core/modules/modContrat.class.php index 2ed01afee83..f7a72f62c9a 100644 --- a/htdocs/core/modules/modContrat.class.php +++ b/htdocs/core/modules/modContrat.class.php @@ -212,7 +212,7 @@ class modContrat extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modDav.class.php b/htdocs/core/modules/modDav.class.php index bf0f3b1b189..627d7051b52 100644 --- a/htdocs/core/modules/modDav.class.php +++ b/htdocs/core/modules/modDav.class.php @@ -287,7 +287,7 @@ class modDav extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - public function init($options='') + public function init($options = '') { //$this->_load_tables('/dav/sql/'); diff --git a/htdocs/core/modules/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php index e5c7146729f..8fe5dfd0a39 100644 --- a/htdocs/core/modules/modDeplacement.class.php +++ b/htdocs/core/modules/modDeplacement.class.php @@ -152,7 +152,7 @@ class modDeplacement extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modDocumentGeneration.class.php b/htdocs/core/modules/modDocumentGeneration.class.php index a2ea9dea7c8..7fbfc8d1ea4 100644 --- a/htdocs/core/modules/modDocumentGeneration.class.php +++ b/htdocs/core/modules/modDocumentGeneration.class.php @@ -103,7 +103,7 @@ class modDocumentGeneration extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index 325f6533f51..10665c91b93 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -151,7 +151,7 @@ class modDon extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index 868e1760ded..8c23b5e26b8 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -284,7 +284,7 @@ class modEmailCollector extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - public function init($options='') + public function init($options = '') { //$this->_load_tables('/dav/sql/'); diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 06cb8272ce0..a1166d46a07 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -315,7 +315,7 @@ class modExpedition extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php index 62daf54a395..428134573a2 100644 --- a/htdocs/core/modules/modExpenseReport.class.php +++ b/htdocs/core/modules/modExpenseReport.class.php @@ -210,7 +210,7 @@ class modExpenseReport extends DolibarrModules * @param string $options Options * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modExternalRss.class.php b/htdocs/core/modules/modExternalRss.class.php index 8d1bf055673..2d85e5737eb 100644 --- a/htdocs/core/modules/modExternalRss.class.php +++ b/htdocs/core/modules/modExternalRss.class.php @@ -86,7 +86,7 @@ class modExternalRss extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; @@ -126,7 +126,7 @@ class modExternalRss extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function remove($options='') + function remove($options = '') { $sql = array(); diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index b1b18da2508..f46c248d69a 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -208,7 +208,7 @@ class modFicheinter extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 16712d21ec2..41aa55eef83 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -623,7 +623,7 @@ class modFournisseur extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index 5da8cf74e71..9c2559f1218 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -131,7 +131,7 @@ class modHRM extends DolibarrModules * @param string $options Enabling module ('', 'noboxes') * @return int if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modLabel.class.php b/htdocs/core/modules/modLabel.class.php index 6dd268fc360..50756d2e1b4 100644 --- a/htdocs/core/modules/modLabel.class.php +++ b/htdocs/core/modules/modLabel.class.php @@ -100,7 +100,7 @@ class modLabel extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modLoan.class.php b/htdocs/core/modules/modLoan.class.php index 662ded1da21..2c098961cc1 100644 --- a/htdocs/core/modules/modLoan.class.php +++ b/htdocs/core/modules/modLoan.class.php @@ -156,7 +156,7 @@ class modLoan extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modMailing.class.php b/htdocs/core/modules/modMailing.class.php index 1f600cb9f12..5011d477b4c 100644 --- a/htdocs/core/modules/modMailing.class.php +++ b/htdocs/core/modules/modMailing.class.php @@ -149,7 +149,7 @@ class modMailing extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modNotification.class.php b/htdocs/core/modules/modNotification.class.php index 21d5f81eb98..7f7f43893d8 100644 --- a/htdocs/core/modules/modNotification.class.php +++ b/htdocs/core/modules/modNotification.class.php @@ -89,7 +89,7 @@ class modNotification extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modOauth.class.php b/htdocs/core/modules/modOauth.class.php index 086dac64bed..144734d0beb 100644 --- a/htdocs/core/modules/modOauth.class.php +++ b/htdocs/core/modules/modOauth.class.php @@ -130,7 +130,7 @@ class modOauth extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index be0b67950d7..7b6fa688192 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -173,7 +173,7 @@ class modOpenSurvey extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php index 2753c7e76ab..b2ac992eef7 100644 --- a/htdocs/core/modules/modPrelevement.class.php +++ b/htdocs/core/modules/modPrelevement.class.php @@ -146,7 +146,7 @@ class modPrelevement extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index e00df796409..917b8881d47 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -550,7 +550,7 @@ class modProduct extends DolibarrModules * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { $this->remove($options); diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index 55a800bd366..1c5f08b55a4 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -114,7 +114,7 @@ class modProductBatch extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $db,$conf; diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index fc18d1c7ec6..39de792b18c 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -310,7 +310,7 @@ class modProjet extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index cb2119e0146..d61720eda28 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -265,7 +265,7 @@ class modPropale extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modReceiptPrinter.class.php b/htdocs/core/modules/modReceiptPrinter.class.php index 0cb05499843..ced2dc491ad 100644 --- a/htdocs/core/modules/modReceiptPrinter.class.php +++ b/htdocs/core/modules/modReceiptPrinter.class.php @@ -130,7 +130,7 @@ class modReceiptPrinter extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; // Clean before activation diff --git a/htdocs/core/modules/modReception.class.php b/htdocs/core/modules/modReception.class.php index da1154d94ee..27df9b9a31a 100644 --- a/htdocs/core/modules/modReception.class.php +++ b/htdocs/core/modules/modReception.class.php @@ -243,7 +243,7 @@ class modReception extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php index 056b2c19785..9fe00cead73 100644 --- a/htdocs/core/modules/modSalaries.class.php +++ b/htdocs/core/modules/modSalaries.class.php @@ -166,7 +166,7 @@ class modSalaries extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 6e5f5562a77..9a8d19b1537 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -363,7 +363,7 @@ class modService extends DolibarrModules * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { $this->remove($options); diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index e8150348c0c..e77ecb20f0e 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -727,7 +727,7 @@ class modSociete extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf, $langs; diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index 4cdc5aabf83..e9d8a2f5129 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -358,7 +358,7 @@ class modStock extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modSupplierProposal.class.php b/htdocs/core/modules/modSupplierProposal.class.php index 570680b163b..43d42d7b8c3 100644 --- a/htdocs/core/modules/modSupplierProposal.class.php +++ b/htdocs/core/modules/modSupplierProposal.class.php @@ -206,7 +206,7 @@ class modSupplierProposal extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modTakePos.class.php b/htdocs/core/modules/modTakePos.class.php index c47a66c3de2..a0981c490f9 100644 --- a/htdocs/core/modules/modTakePos.class.php +++ b/htdocs/core/modules/modTakePos.class.php @@ -285,7 +285,7 @@ class modTakePos extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - public function init($options='') + public function init($options = '') { $this->_load_tables('/takepos/sql/'); diff --git a/htdocs/core/modules/modTax.class.php b/htdocs/core/modules/modTax.class.php index ee04d79ebcb..cacc1dd21dd 100644 --- a/htdocs/core/modules/modTax.class.php +++ b/htdocs/core/modules/modTax.class.php @@ -185,7 +185,7 @@ class modTax extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 40b7ff901b9..7d003fc2731 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -302,7 +302,7 @@ class modUser extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf; diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index 01490278566..3ef181d1da6 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -145,7 +145,7 @@ class modWebsite extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { global $conf,$langs; diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php index 771d718af70..cc72e8bc917 100644 --- a/htdocs/core/modules/modWorkflow.class.php +++ b/htdocs/core/modules/modWorkflow.class.php @@ -139,7 +139,7 @@ class modWorkflow extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + function init($options = '') { // Permissions $this->remove($options); diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index b7d88464355..9b542ac4742 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -122,7 +122,7 @@ class mod_payment_ant extends ModeleNumRefPayments * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -151,7 +151,7 @@ class mod_payment_ant extends ModeleNumRefPayments * @param string $objforref Object for number to search * @return string Next free value */ - function commande_get_num($objsoc,$objforref) + function commande_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php index 5869032cc5b..f412769edba 100644 --- a/htdocs/core/modules/payment/mod_payment_cicada.php +++ b/htdocs/core/modules/payment/mod_payment_cicada.php @@ -119,7 +119,7 @@ class mod_payment_cicada extends ModeleNumRefPayments * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -163,7 +163,7 @@ class mod_payment_cicada extends ModeleNumRefPayments * @param string $objforref Object for number to search * @return string Next free value */ - function payment_get_num($objsoc,$objforref) + function payment_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/payment/modules_payment.php b/htdocs/core/modules/payment/modules_payment.php index d9cf9b1260f..0773204a1c8 100644 --- a/htdocs/core/modules/payment/modules_payment.php +++ b/htdocs/core/modules/payment/modules_payment.php @@ -79,7 +79,7 @@ abstract class ModeleNumRefPayments * @param Object $object Object we need next value for * @return string Valeur */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php index afd46919598..dbe3a45bad1 100644 --- a/htdocs/core/modules/printing/modules_printing.php +++ b/htdocs/core/modules/printing/modules_printing.php @@ -59,7 +59,7 @@ class PrintingDriver * @param integer $maxfilenamelength Max length of value to show * @return array List of drivers */ - static function listDrivers($db,$maxfilenamelength=0) + static function listDrivers($db, $maxfilenamelength = 0) { global $conf; diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 089fb95ba69..d1deb37e3b3 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -299,7 +299,7 @@ class printing_printgcp extends PrintingDriver * @param string $subdir subdir for file * @return int 0 if OK, >0 if KO */ - public function printFile($file, $module, $subdir='') + public function printFile($file, $module, $subdir = '') { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index ab65f8fba3d..ddf07afe71c 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -87,7 +87,7 @@ class printing_printipp extends PrintingDriver * * @return int 0 if OK, >0 if KO */ - public function printFile($file, $module, $subdir='') + public function printFile($file, $module, $subdir = '') { global $conf, $user; $error = 0; diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index 0047dda7669..ad848427c4d 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -41,7 +41,7 @@ class pdf_standardlabel extends CommonStickerGenerator * @param array $param Associative array containing label content and optional parameters * @return void */ - function addSticker(&$pdf,$outputlangs,$param) + function addSticker(&$pdf, $outputlangs, $param) { // use this method in future refactoring } @@ -61,7 +61,7 @@ class pdf_standardlabel extends CommonStickerGenerator * @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text) * @return void */ - function Add_PDF_label(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$photo='') + function Add_PDF_label(&$pdf, $textleft, $header, $footer, $outputlangs, $textright = '', $photo = '') { // phpcs:enable global $mysoc, $conf, $langs; @@ -238,7 +238,7 @@ class pdf_standardlabel extends CommonStickerGenerator * @param string $filename Short file name of PDF output file * @return int 1=OK, 0=KO */ - function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='',$filename='tmp_address_sheet.pdf') + function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '', $filename = 'tmp_address_sheet.pdf') { // phpcs:enable global $user,$conf,$langs,$mysoc,$_Avery_Labels; diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php index de1aa1b5d5e..a83d490b7be 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php @@ -96,7 +96,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator * @param array $param Associative array containing label content and optional parameters * @return void */ - function addSticker(&$pdf,$outputlangs,$param) + function addSticker(&$pdf, $outputlangs, $param) { global $mysoc,$conf; @@ -277,7 +277,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator * @param string $filename Short file name of PDF output file * @return int 1=OK, 0=KO */ - function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='',$filename='tmp_address_sheet.pdf') + function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '', $filename = 'tmp_address_sheet.pdf') { // phpcs:enable global $user,$conf,$langs,$mysoc,$_Avery_Labels; diff --git a/htdocs/core/modules/printsheet/modules_labels.php b/htdocs/core/modules/printsheet/modules_labels.php index 7a34d5e7e64..653c9db4d6c 100644 --- a/htdocs/core/modules/printsheet/modules_labels.php +++ b/htdocs/core/modules/printsheet/modules_labels.php @@ -48,7 +48,7 @@ class ModelePDFLabels * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - function liste_modeles($db,$maxfilenamelength=0) + function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -77,7 +77,7 @@ class ModelePDFLabels * @param string $filename Short file name of PDF output file * @return int <0 if KO, >0 if OK */ -function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir='', $template='standardlabel', $filename='tmp_address_sheet.pdf') +function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir = '', $template = 'standardlabel', $filename = 'tmp_address_sheet.pdf') { // phpcs:enable global $conf,$langs; diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index dd2527338a4..8ae2fe0eb9a 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -217,7 +217,7 @@ class doc_generic_product_odt extends ModelePDFProduct * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $product,$langs,$conf,$mysoc,$hookmanager,$user; diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index e9af5b9aa6e..7da2295290f 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -160,7 +160,7 @@ class pdf_standard extends ModelePDFProduct * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager; @@ -603,7 +603,7 @@ class pdf_standard extends ModelePDFProduct * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -713,7 +713,7 @@ class pdf_standard extends ModelePDFProduct * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "") { global $conf,$langs,$hookmanager; @@ -862,7 +862,7 @@ class pdf_standard extends ModelePDFProduct * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 1b455743cb2..697add2fccb 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -138,7 +138,7 @@ class mod_codeproduct_elephant extends ModeleProductCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - function getExample($langs,$objproduct=0,$type=-1) + function getExample($langs, $objproduct = 0, $type = -1) { if ($type == 0 || $type == -1) { @@ -179,7 +179,7 @@ class mod_codeproduct_elephant extends ModeleProductCode * @param int $type Produit ou service (0:product, 1:service) * @return string Value if OK, '' if module not configured, <0 if KO */ - function getNextValue($objproduct=0,$type=-1) + function getNextValue($objproduct = 0, $type = -1) { global $db,$conf; diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 815e383d900..a8123c702e9 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -100,7 +100,7 @@ class mod_codeproduct_leopard extends ModeleProductCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return next value */ - function getNextValue($objproduct=0,$type=-1) + function getNextValue($objproduct = 0, $type = -1) { global $langs; return ''; diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index 10470d4d9f0..5c5f2428464 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -47,7 +47,7 @@ abstract class ModelePDFProduct extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -118,7 +118,7 @@ abstract class ModeleProductCode * @param int $type Type * @return string Value */ - function getNextValue($objproduct=0,$type=-1) + function getNextValue($objproduct = 0, $type = -1) { global $langs; return $langs->trans("Function_getNextValue_InModuleNotWorking"); @@ -149,7 +149,7 @@ abstract class ModeleProductCode * @param integer $maxfilenamelength Max length of value to show * @return array List of numbers */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable $liste=array(); @@ -182,7 +182,7 @@ abstract class ModeleProductCode * @param int $type -1=Nothing, 0=Customer, 1=Supplier * @return string HTML translated description */ - function getToolTip($langs,$product,$type) + function getToolTip($langs, $product, $type) { global $conf; diff --git a/htdocs/core/modules/product_batch/modules_product_batch.class.php b/htdocs/core/modules/product_batch/modules_product_batch.class.php index 0a2076e4ed0..5708033a8ea 100644 --- a/htdocs/core/modules/product_batch/modules_product_batch.class.php +++ b/htdocs/core/modules/product_batch/modules_product_batch.class.php @@ -52,7 +52,7 @@ abstract class ModelePDFProductBatch extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 6292008c54d..25f716f44cd 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -126,7 +126,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param string $array_key Name of the key for return array * @return array Array of substitution */ - function get_substitutionarray_object($object,$outputlangs,$array_key='object') + function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable global $conf; @@ -164,7 +164,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_tasks(Task $task,$outputlangs) + function get_substitutionarray_tasks(Task $task, $outputlangs) { // phpcs:enable global $conf; @@ -205,7 +205,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_contacts($contact,$outputlangs) + function get_substitutionarray_project_contacts($contact, $outputlangs) { // phpcs:enable global $conf; @@ -263,7 +263,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_file($file,$outputlangs) + function get_substitutionarray_project_file($file, $outputlangs) { // phpcs:enable global $conf; @@ -283,7 +283,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_reference($refdetail,$outputlangs) + function get_substitutionarray_project_reference($refdetail, $outputlangs) { // phpcs:enable global $conf; @@ -307,7 +307,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_tasksressource($taskressource,$outputlangs) + function get_substitutionarray_tasksressource($taskressource, $outputlangs) { // phpcs:enable global $conf; @@ -331,7 +331,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_taskstime($tasktime,$outputlangs) + function get_substitutionarray_taskstime($tasktime, $outputlangs) { // phpcs:enable global $conf; @@ -360,7 +360,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_task_file($file,$outputlangs) + function get_substitutionarray_task_file($file, $outputlangs) { // phpcs:enable global $conf; @@ -471,7 +471,7 @@ class doc_generic_project_odt extends ModelePDFProjects * @param string $srctemplatepath Full path of source filename for generator using a template file * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath) + function write_file($object, $outputlangs, $srctemplatepath) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index f0161b30715..ac941af86be 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -173,7 +173,7 @@ class pdf_baleine extends ModelePDFProjects * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs) + function write_file($object, $outputlangs) { // phpcs:enable global $conf, $hookmanager, $langs, $user; @@ -528,7 +528,7 @@ class pdf_baleine extends ModelePDFProjects * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -668,7 +668,7 @@ class pdf_baleine extends ModelePDFProjects * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index bc8da2b114c..32a2d10f72d 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -122,7 +122,7 @@ class pdf_beluga extends ModelePDFProjects * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs) + function write_file($object, $outputlangs) { // phpcs:enable global $conf, $hookmanager, $langs, $user; @@ -680,7 +680,7 @@ class pdf_beluga extends ModelePDFProjects * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -796,7 +796,7 @@ class pdf_beluga extends ModelePDFProjects * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index a299a9758c7..a0d15c0fc72 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -105,7 +105,7 @@ class pdf_timespent extends ModelePDFProjects * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs) + function write_file($object, $outputlangs) { // phpcs:enable global $conf, $hookmanager, $langs, $user; @@ -459,7 +459,7 @@ class pdf_timespent extends ModelePDFProjects * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -599,7 +599,7 @@ class pdf_timespent extends ModelePDFProjects * @param int $hidefreetext 1=Hide free text * @return integer */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index e5f5c268f06..1e46321818c 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -167,7 +167,7 @@ class mod_project_simple extends ModeleNumRefProjects * @param Project $project Object project * @return string Next not used reference */ - function project_get_num($objsoc=0, $project='') + function project_get_num($objsoc = 0, $project = '') { // phpcs:enable return $this->getNextValue($objsoc, $project); diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index e052dbcc7bd..64fe6487540 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -153,7 +153,7 @@ class mod_project_universal extends ModeleNumRefProjects * @param Project $project Object project * @return string Next not used reference */ - function project_get_num($objsoc=0, $project='') + function project_get_num($objsoc = 0, $project = '') { // phpcs:enable return $this->getNextValue($objsoc, $project); diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index af9877d59cb..d78b34faaa9 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -45,7 +45,7 @@ abstract class ModelePDFProjects extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index c8c588d1f4f..19fdfbac08d 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -127,7 +127,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param string $array_key Name of the key for return array * @return array Array of substitution */ - function get_substitutionarray_object($object,$outputlangs,$array_key='object') + function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable global $conf; @@ -171,7 +171,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_tasks($task,$outputlangs) + function get_substitutionarray_tasks($task, $outputlangs) { // phpcs:enable global $conf; @@ -202,7 +202,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_contacts($contact,$outputlangs) + function get_substitutionarray_project_contacts($contact, $outputlangs) { // phpcs:enable global $conf; @@ -227,7 +227,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_file($file,$outputlangs) + function get_substitutionarray_project_file($file, $outputlangs) { // phpcs:enable global $conf; @@ -247,7 +247,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_project_reference($refdetail,$outputlangs) + function get_substitutionarray_project_reference($refdetail, $outputlangs) { // phpcs:enable global $conf; @@ -271,7 +271,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_tasksressource($taskressource,$outputlangs) + function get_substitutionarray_tasksressource($taskressource, $outputlangs) { // phpcs:enable global $conf; @@ -295,7 +295,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_taskstime($tasktime,$outputlangs) + function get_substitutionarray_taskstime($tasktime, $outputlangs) { // phpcs:enable global $conf; @@ -320,7 +320,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ - function get_substitutionarray_task_file($file,$outputlangs) + function get_substitutionarray_task_file($file, $outputlangs) { // phpcs:enable global $conf; @@ -431,7 +431,7 @@ class doc_generic_task_odt extends ModelePDFTask * @param string $srctemplatepath Full path of source filename for generator using a template file * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath) + function write_file($object, $outputlangs, $srctemplatepath) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index 4450c57347d..4b8796ca5d0 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -123,7 +123,7 @@ class mod_task_simple extends ModeleNumRefTask * @param Task $object Object Task * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -167,7 +167,7 @@ class mod_task_simple extends ModeleNumRefTask * @param Task $object Object task * @return string Next not used reference */ - function task_get_num($objsoc=0,$object='') + function task_get_num($objsoc = 0, $object = '') { return $this->getNextValue($objsoc,$object); } diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 3272d180c50..785442edfb8 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -123,7 +123,7 @@ class mod_task_universal extends ModeleNumRefTask * @param Task $object Object task * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -153,7 +153,7 @@ class mod_task_universal extends ModeleNumRefTask * @param Task $object Object task * @return string Next not used reference */ - function project_get_num($objsoc=0,$object='') + function project_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc, $object); diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php index ef7a9be4e98..0d1c36bbfe6 100644 --- a/htdocs/core/modules/project/task/modules_task.php +++ b/htdocs/core/modules/project/task/modules_task.php @@ -46,7 +46,7 @@ abstract class ModelePDFTask extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 18f6d9b6102..cfb1b87388f 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -233,7 +233,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 3d7b5b44c34..4f7bedef51b 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -214,7 +214,7 @@ class pdf_azur extends ModelePDFPropales * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1318,7 +1318,7 @@ class pdf_azur extends ModelePDFPropales * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1660,7 +1660,7 @@ class pdf_azur extends ModelePDFPropales * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index a99f75d99ed..b38dbf83740 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -130,7 +130,7 @@ class pdf_cyan extends ModelePDFPropales * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - public function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1352,7 +1352,7 @@ class pdf_cyan extends ModelePDFPropales * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1644,7 +1644,7 @@ class pdf_cyan extends ModelePDFPropales * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; @@ -1697,7 +1697,7 @@ class pdf_cyan extends ModelePDFPropales * @param int $hideref Do not show ref * @return null */ - function defineColumnField($object,$outputlangs,$hidedetails=0,$hidedesc=0,$hideref=0) + function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf, $hookmanager; diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index cb1638aec82..68b9c1e71de 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -124,7 +124,7 @@ class mod_propale_marbre extends ModeleNumRefPropales * @param Propal $propal Object commercial proposal * @return string Next value */ - function getNextValue($objsoc,$propal) + function getNextValue($objsoc, $propal) { global $db,$conf; @@ -165,7 +165,7 @@ class mod_propale_marbre extends ModeleNumRefPropales * @param Object $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 87fcc7c2920..5a47fad4127 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -128,7 +128,7 @@ class mod_propale_saphir extends ModeleNumRefPropales * @param Propal $propal Object commercial proposal * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$propal) + function getNextValue($objsoc, $propal) { global $db,$conf; diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php index 595534c40f4..1d820062ac3 100644 --- a/htdocs/core/modules/propale/modules_propale.php +++ b/htdocs/core/modules/propale/modules_propale.php @@ -50,7 +50,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -128,7 +128,7 @@ abstract class ModeleNumRefPropales * @param Propal $propal Object commercial proposal * @return string Valeur */ - function getNextValue($objsoc,$propal) + function getNextValue($objsoc, $propal) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 7f6fd99bd67..e9b616cb0e2 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -185,7 +185,7 @@ class doc_generic_reception_odt extends ModelePdfReception * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 592171ed6f0..f6a7277469b 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -40,7 +40,7 @@ class pdf_squille extends ModelePdfReception * * @param DoliDB $db Database handler */ - function __construct($db=0) + function __construct($db = 0) { global $conf,$langs,$mysoc; @@ -110,7 +110,7 @@ class pdf_squille extends ModelePdfReception * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$conf,$langs,$hookmanager; @@ -702,7 +702,7 @@ class pdf_squille extends ModelePdfReception * @param int $hidebottom Hide bottom bar of array * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf; @@ -1032,7 +1032,7 @@ class pdf_squille extends ModelePdfReception * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/reception/mod_reception_beryl.php b/htdocs/core/modules/reception/mod_reception_beryl.php index f4cdadea9d2..071c7f732c3 100644 --- a/htdocs/core/modules/reception/mod_reception_beryl.php +++ b/htdocs/core/modules/reception/mod_reception_beryl.php @@ -97,7 +97,7 @@ class mod_reception_beryl extends ModelNumRefReception * @param Object $shipment Shipment object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$shipment) + function getNextValue($objsoc, $shipment) { global $db,$conf; @@ -138,7 +138,7 @@ class mod_reception_beryl extends ModelNumRefReception * @param Object $objforref Shipment object * @return string Next free value */ - function reception_get_num($objsoc,$objforref) + function reception_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index bea6887d99e..ae4c4b42b48 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -100,7 +100,7 @@ class mod_reception_moonstone extends ModelNumRefReception * @param Object $reception Reception object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$reception) + function getNextValue($objsoc, $reception) { global $db,$conf; @@ -129,7 +129,7 @@ class mod_reception_moonstone extends ModelNumRefReception * @param Object $objforref Reception object * @return string Next free value */ - function reception_get_num($objsoc,$objforref) + function reception_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/reception/modules_reception.php b/htdocs/core/modules/reception/modules_reception.php index 57965e1b462..9f0e8e8a58d 100644 --- a/htdocs/core/modules/reception/modules_reception.php +++ b/htdocs/core/modules/reception/modules_reception.php @@ -40,7 +40,7 @@ abstract class ModelePdfReception extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 3650af12b24..a67429c0376 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -186,7 +186,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager; diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index e0d6a186879..c047e6f3661 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -139,7 +139,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { if ($type == 0 || $type == -1) { @@ -200,7 +200,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode * @param int $type Client ou fournisseur (0:customer, 1:supplier) * @return string Value if OK, '' if module not configured, <0 if KO */ - function getNextValue($objsoc=0,$type=-1) + function getNextValue($objsoc = 0, $type = -1) { global $db,$conf; @@ -324,7 +324,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode * @param int $type 0 = customer/prospect , 1 = supplier * @return int 0 if available, <0 if KO */ - function verif_dispo($db, $code, $soc, $type=0) + function verif_dispo($db, $code, $soc, $type = 0) { // phpcs:enable $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index 9bdd27d5bee..929ad0a8a88 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -99,7 +99,7 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return next value */ - function getNextValue($objsoc=0,$type=-1) + function getNextValue($objsoc = 0, $type = -1) { global $langs; return ''; diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 77bb7c54a64..d64b6667bf8 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -103,7 +103,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { return $this->prefixcustomer.'0901-00001<br>'.$this->prefixsupplier.'0901-00001'; } @@ -116,7 +116,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode * @param int $type Client ou fournisseur (1:client, 2:fournisseur) * @return string Value if OK, '' if module not configured, <0 if KO */ - function getNextValue($objsoc=0,$type=-1) + function getNextValue($objsoc = 0, $type = -1) { global $db, $conf, $mc; @@ -234,7 +234,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode * @param int $type 0 = customer/prospect , 1 = supplier * @return int 0 if available, <0 if KO */ - function verif_dispo($db, $code, $soc, $type=0) + function verif_dispo($db, $code, $soc, $type = 0) { // phpcs:enable global $conf, $mc; diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index b117c948d69..759b71bd2e8 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -112,7 +112,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { $s=''; $s.=$this->prefixcustomeraccountancycode.'CUSTCODE'; @@ -131,7 +131,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode * @param string $type 'customer' or 'supplier' * @return int >=0 if OK, <0 if KO */ - function get_code($db, $societe, $type='') + function get_code($db, $societe, $type = '') { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/societe/mod_codecompta_panicum.php b/htdocs/core/modules/societe/mod_codecompta_panicum.php index c1e83b75db4..65cbba944b1 100644 --- a/htdocs/core/modules/societe/mod_codecompta_panicum.php +++ b/htdocs/core/modules/societe/mod_codecompta_panicum.php @@ -76,7 +76,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { return ''; } @@ -90,7 +90,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode * @param int $type 'customer' or 'supplier' * @return int >=0 if OK, <0 if KO */ - function get_code($db, $societe, $type='') + function get_code($db, $societe, $type = '') { // phpcs:enable $this->code=''; diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php index a38acbc002a..6ce43cd6e0d 100644 --- a/htdocs/core/modules/societe/modules_societe.class.php +++ b/htdocs/core/modules/societe/modules_societe.class.php @@ -46,7 +46,7 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -122,7 +122,7 @@ abstract class ModeleThirdPartyCode * @param int $type Type * @return string Value */ - function getNextValue($objsoc=0,$type=-1) + function getNextValue($objsoc = 0, $type = -1) { global $langs; return $langs->trans("Function_getNextValue_InModuleNotWorking"); @@ -153,7 +153,7 @@ abstract class ModeleThirdPartyCode * @param integer $maxfilenamelength Max length of value to show * @return array List of numbers */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable $liste=array(); @@ -186,7 +186,7 @@ abstract class ModeleThirdPartyCode * @param int $type -1=Nothing, 0=Customer, 1=Supplier * @return string HTML translated description */ - function getToolTip($langs,$soc,$type) + function getToolTip($langs, $soc, $type) { global $conf; @@ -289,7 +289,7 @@ abstract class ModeleAccountancyCode * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Example */ - function getExample($langs,$objsoc=0,$type=-1) + function getExample($langs, $objsoc = 0, $type = -1) { $langs->load("bills"); return $langs->trans("NoExample"); @@ -329,7 +329,7 @@ abstract class ModeleAccountancyCode * @param int $type -1=Nothing, 0=Customer, 1=Supplier * @return string HTML translated description */ - function getToolTip($langs,$soc,$type) + function getToolTip($langs, $soc, $type) { global $conf,$db; @@ -367,7 +367,7 @@ abstract class ModeleAccountancyCode * @param int $type 'customer' or 'supplier' * @return int >=0 if OK, <0 if KO */ - function get_code($db, $societe, $type='') + function get_code($db, $societe, $type = '') { // phpcs:enable global $langs; @@ -394,7 +394,7 @@ abstract class ModeleAccountancyCode * @deprecated Use the new function generateDocument of Facture class * @see Societe::generateDocument() */ -function thirdparty_doc_create(DoliDB $db, Societe $object, $message, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function thirdparty_doc_create(DoliDB $db, Societe $object, $message, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING); diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index c9c4350e050..b4fb70c735e 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -217,7 +217,7 @@ class doc_generic_stock_odt extends ModelePDFStock * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $stock,$langs,$conf,$mysoc,$hookmanager,$user; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index ce01124211a..db1fda75219 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -189,7 +189,7 @@ class pdf_standard extends ModelePDFStock * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager; @@ -839,7 +839,7 @@ class pdf_standard extends ModelePDFStock * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -943,7 +943,7 @@ class pdf_standard extends ModelePDFStock * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "") { global $conf,$langs,$db,$hookmanager; @@ -1171,7 +1171,7 @@ class pdf_standard extends ModelePDFStock * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 3ea7e184e35..8f139fa2a7d 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -192,7 +192,7 @@ class pdf_stdmovement extends ModelePDFMovement * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager; @@ -818,7 +818,7 @@ class pdf_stdmovement extends ModelePDFMovement * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -944,7 +944,7 @@ class pdf_stdmovement extends ModelePDFMovement * @param string $titlekey Translation key to show as title of document * @return void */ - function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="") + function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "") { global $conf,$langs,$db,$hookmanager; @@ -1172,7 +1172,7 @@ class pdf_stdmovement extends ModelePDFMovement * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/stock/modules_movement.php b/htdocs/core/modules/stock/modules_movement.php index 33672e415ea..e3aab8076ac 100644 --- a/htdocs/core/modules/stock/modules_movement.php +++ b/htdocs/core/modules/stock/modules_movement.php @@ -44,7 +44,7 @@ abstract class ModelePDFMovement extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/stock/modules_stock.php b/htdocs/core/modules/stock/modules_stock.php index a74df6198ce..5e5e1546e17 100644 --- a/htdocs/core/modules/stock/modules_stock.php +++ b/htdocs/core/modules/stock/modules_stock.php @@ -37,7 +37,7 @@ abstract class ModelePDFStock extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 908b3c8ba41..1edc3e46024 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -170,7 +170,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object,$mode='next') + function getNextValue($objsoc, $object, $mode = 'next') { global $db,$conf; @@ -243,7 +243,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index a3cb291263a..520b2f2ca64 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -153,7 +153,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object,$mode='next') + function getNextValue($objsoc, $object, $mode = 'next') { global $db,$conf; @@ -192,7 +192,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Next free value */ - function getNumRef($objsoc,$objforref,$mode='next') + function getNumRef($objsoc, $objforref, $mode = 'next') { return $this->getNextValue($objsoc,$objforref,$mode); } diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php index d1b28ebd0bd..593d4f9d51a 100644 --- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php +++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php @@ -48,7 +48,7 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of numbers */ - static function liste_modeles($db, $maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -120,7 +120,7 @@ abstract class ModeleNumRefSuppliersInvoices * @param string $mode 'next' for next value or 'last' for last value * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$object,$mode) + function getNextValue($objsoc, $object, $mode) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index f44240daa83..c15ea6e5a0b 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -195,7 +195,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0) + function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes; @@ -827,7 +827,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1242,7 +1242,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php index 4b599a1f769..526e75aae6e 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php @@ -132,7 +132,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc=0,$object='') + function getNextValue($objsoc = 0, $object = '') { global $db,$conf; @@ -171,7 +171,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Texte descripif */ - function commande_get_num($objsoc=0,$object='') + function commande_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc,$object); diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 3c8af4cd5a0..906a36f1be6 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -125,7 +125,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc=0,$object='') + function getNextValue($objsoc = 0, $object = '') { global $db,$conf; @@ -154,7 +154,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Texte descripif */ - function commande_get_num($objsoc=0,$object='') + function commande_get_num($objsoc = 0, $object = '') { // phpcs:enable return $this->getNextValue($objsoc,$object); diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index 7a6c7d4972d..e97ca664997 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -51,7 +51,7 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 06cf28daaed..d4c548b5dc8 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -209,7 +209,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs='',$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes; @@ -1012,7 +1012,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1366,7 +1366,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 5eeedb9dcfc..42a454a5941 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -188,7 +188,7 @@ class pdf_standard extends ModelePDFSuppliersPayments * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0) + function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; @@ -585,7 +585,7 @@ class pdf_standard extends ModelePDFSuppliersPayments * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf,$mysoc; @@ -805,7 +805,7 @@ class pdf_standard extends ModelePDFSuppliersPayments * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 216bc4bde90..36aaab7da90 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -122,7 +122,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -151,7 +151,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments * @param string $objforref Object for number to search * @return string Next free value */ - function commande_get_num($objsoc,$objforref) + function commande_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php index 0d64991065a..9c3f65efb62 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php @@ -119,7 +119,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $db,$conf; @@ -163,7 +163,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments * @param string $objforref Object for number to search * @return string Next free value */ - function payment_get_num($objsoc,$objforref) + function payment_get_num($objsoc, $objforref) { // phpcs:enable return $this->getNextValue($objsoc,$objforref); diff --git a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php index 8eb706dc0ce..29d248e1c84 100644 --- a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php +++ b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php @@ -36,7 +36,7 @@ abstract class ModelePDFSuppliersPayments extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of numbers */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -114,7 +114,7 @@ abstract class ModeleNumRefSupplierPayments * @param Object $object Object we need next value for * @return string Valeur */ - function getNextValue($objsoc,$object) + function getNextValue($objsoc, $object) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 05bfe535ac7..0560d68e3aa 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -233,7 +233,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index b9f9aa39dcf..ee40b86377e 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -205,7 +205,7 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; @@ -1169,7 +1169,7 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param string $currency Currency code * @return void */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='') + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') { global $conf; @@ -1495,7 +1495,7 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) + function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php index 847eb49958d..622cde25813 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -124,7 +124,7 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal * @param Propal $supplier_proposal Object commercial proposal * @return string Next value */ - function getNextValue($objsoc,$supplier_proposal) + function getNextValue($objsoc, $supplier_proposal) { global $db,$conf; @@ -165,7 +165,7 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal * @param Object $objforref Object for number to search * @return string Next free value */ - function getNumRef($objsoc,$objforref) + function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc,$objforref); } diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index fdbd9f1f90d..e59843dfb58 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -125,7 +125,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal * @param Propal $supplier_proposal Object supplier_proposal * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc,$supplier_proposal) + function getNextValue($objsoc, $supplier_proposal) { global $db,$conf; diff --git a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php index b96dc2c4e12..9377f39033a 100644 --- a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php +++ b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php @@ -50,7 +50,7 @@ abstract class ModelePDFSupplierProposal extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; @@ -128,7 +128,7 @@ abstract class ModeleNumRefSupplierProposal * @param Propal $propal Object commercial proposal * @return string Valeur */ - function getNextValue($objsoc,$propal) + function getNextValue($objsoc, $propal) { global $langs; return $langs->trans("NotAvailable"); diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index df33a697d59..2c8045edf9a 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -102,7 +102,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface * @param string $suffixinfilename When output is a file, append this suffix into default log filename. * @return string */ - private function getFilename($suffixinfilename='') + private function getFilename($suffixinfilename = '') { global $conf; @@ -131,7 +131,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface * @param string $suffixinfilename When output is a file, append this suffix into default log filename. * @return void */ - public function export($content, $suffixinfilename='') + public function export($content, $suffixinfilename = '') { global $conf, $dolibarr_main_prod; diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 28eaf77d30b..4a57a1e12cc 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -216,7 +216,7 @@ class doc_generic_user_odt extends ModelePDFUser * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; @@ -449,7 +449,7 @@ class doc_generic_user_odt extends ModelePDFUser * @param string $array_key key for array * @return array array of substitutions */ - function get_substitutionarray_object($object,$outputlangs,$array_key='object') + function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable $array_other = array(); diff --git a/htdocs/core/modules/user/modules_user.class.php b/htdocs/core/modules/user/modules_user.class.php index 3dc46707543..34356cf830f 100644 --- a/htdocs/core/modules/user/modules_user.class.php +++ b/htdocs/core/modules/user/modules_user.class.php @@ -52,7 +52,7 @@ abstract class ModelePDFUser extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index a00bec92c96..5e1418f8ed2 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -218,7 +218,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) + function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; diff --git a/htdocs/core/modules/usergroup/modules_usergroup.class.php b/htdocs/core/modules/usergroup/modules_usergroup.class.php index fc9648ab6e9..2bd717624d7 100644 --- a/htdocs/core/modules/usergroup/modules_usergroup.class.php +++ b/htdocs/core/modules/usergroup/modules_usergroup.class.php @@ -52,7 +52,7 @@ abstract class ModelePDFUserGroup extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - static function liste_modeles($db,$maxfilenamelength=0) + static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable global $conf; diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index f619befab0d..47383166e97 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -121,7 +121,7 @@ class Cronjob extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -406,7 +406,7 @@ class Cronjob extends CommonObject * @param int $processing Processing or not * @return int <0 if KO, >0 if OK */ - function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='', $processing=-1) + function fetch_all($sortorder = 'DESC', $sortfield = 't.rowid', $limit = 0, $offset = 0, $status = 1, $filter = '', $processing = -1) { // phpcs:enable global $langs; @@ -541,7 +541,7 @@ class Cronjob extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -691,7 +691,7 @@ class Cronjob extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { $error=0; @@ -852,7 +852,7 @@ class Cronjob extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -1301,7 +1301,7 @@ class Cronjob extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode, $this->processing); } @@ -1315,7 +1315,7 @@ class Cronjob extends CommonObject * @param int $processing 0=Not running, 1=Running * @return string Label of status */ - function LibStatut($status, $mode=0, $processing=0) + function LibStatut($status, $mode = 0, $processing = 0) { // phpcs:enable global $langs; diff --git a/htdocs/dav/dav.class.php b/htdocs/dav/dav.class.php index b8c38773538..a577f2a7cac 100644 --- a/htdocs/dav/dav.class.php +++ b/htdocs/dav/dav.class.php @@ -56,7 +56,7 @@ class CdavLib * @param int|boolean $ouri Ouri * @return string */ - public function getSqlCalEvents($calid, $oid=false, $ouri=false) + public function getSqlCalEvents($calid, $oid = false, $ouri = false) { // TODO : replace GROUP_CONCAT by $sql = 'SELECT diff --git a/htdocs/don/class/api_donations.class.php b/htdocs/don/class/api_donations.class.php index 8d13dd2d68b..982567f269e 100644 --- a/htdocs/don/class/api_donations.class.php +++ b/htdocs/don/class/api_donations.class.php @@ -307,7 +307,7 @@ class Donations extends DolibarrApi * * @return array */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index c3941059e64..4ce4fd24ff8 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -109,7 +109,7 @@ class Don extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -122,7 +122,7 @@ class Don extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable if (empty($this->labelstatut) || empty($this->labelstatutshort)) @@ -251,7 +251,7 @@ class Don extends CommonObject * @param int $minimum Minimum * @return int 0 if KO, >0 if OK */ - function check($minimum=0) + function check($minimum = 0) { global $langs; $langs->load('main'); @@ -344,7 +344,7 @@ class Don extends CommonObject * @return int <0 if KO, id of created donation if OK * TODO add numbering module for Ref */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -465,7 +465,7 @@ class Don extends CommonObject * @param int $notrigger Disable triggers * @return int >0 if OK, <0 if KO */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $langs, $conf; @@ -556,7 +556,7 @@ class Don extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, 0 if not possible, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $user, $conf, $langs; require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; @@ -631,7 +631,7 @@ class Don extends CommonObject * @param string $ref Ref of donation to load * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -718,7 +718,7 @@ class Don extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function setValid($user, $notrigger=0) + function setValid($user, $notrigger = 0) { return $this->valid_promesse($this->id, $user->id, $notrigger); } @@ -732,7 +732,7 @@ class Don extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function valid_promesse($id, $userid, $notrigger=0) + function valid_promesse($id, $userid, $notrigger = 0) { // phpcs:enable global $langs, $user; @@ -783,7 +783,7 @@ class Don extends CommonObject * @param int $modepayment mode of payment * @return int <0 if KO, >0 if OK */ - function set_paid($id, $modepayment=0) + function set_paid($id, $modepayment = 0) { // phpcs:enable $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2"; @@ -915,7 +915,7 @@ class Don extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $notooltip=0) + function getNomUrl($withpicto = 0, $notooltip = 0) { global $langs; @@ -989,7 +989,7 @@ class Don extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$langs; diff --git a/htdocs/don/class/donstats.class.php b/htdocs/don/class/donstats.class.php index e5e34f6ad1b..bcf4b4a9d59 100644 --- a/htdocs/don/class/donstats.class.php +++ b/htdocs/don/class/donstats.class.php @@ -55,7 +55,7 @@ class DonationStats extends Stats * @param string $mode Option (not used) * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -83,7 +83,7 @@ class DonationStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index 662b165ddf4..ba322f9fe08 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -101,7 +101,7 @@ class PaymentDonation extends CommonObject * @param bool $notrigger false=launch triggers after, true=disable triggers * @return int <0 if KO, id of payment if OK */ - function create($user, $notrigger=false) + function create($user, $notrigger = false) { global $conf, $langs; @@ -264,7 +264,7 @@ class PaymentDonation extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -344,7 +344,7 @@ class PaymentDonation extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -467,7 +467,7 @@ class PaymentDonation extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return ''; } @@ -480,7 +480,7 @@ class PaymentDonation extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -526,7 +526,7 @@ class PaymentDonation extends CommonObject * @param string $emetteur_banque Name of bank * @return int <0 if KO, >0 if OK */ - function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque) + function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque) { global $conf; @@ -629,7 +629,7 @@ class PaymentDonation extends CommonObject * @param int $maxlen Longueur max libelle * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 3d1ecac9088..e689dde3142 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -230,7 +230,7 @@ class EcmDirectory // extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; @@ -375,7 +375,7 @@ class EcmDirectory // extends CommonObject * @param int $deletedirrecursive 1=Agree to delete content recursiveley (otherwise an error will be returned when trying to delete) * @return int <0 if KO, >0 if OK */ - function delete($user, $mode='all', $deletedirrecursive=0) + function delete($user, $mode = 'all', $deletedirrecursive = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -468,7 +468,7 @@ class EcmDirectory // extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='', $max=0, $more='', $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $more = '', $notooltip = 0) { global $langs; @@ -501,7 +501,7 @@ class EcmDirectory // extends CommonObject * @param int $force Force reload of full arbo even if already loaded * @return string Relative physical path */ - function getRelativePath($force=0) + function getRelativePath($force = 0) { $this->get_full_arbo($force); @@ -579,7 +579,7 @@ class EcmDirectory // extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -592,7 +592,7 @@ class EcmDirectory // extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -620,7 +620,7 @@ class EcmDirectory // extends CommonObject * @param int $force Force reload of full arbo even if already loaded in cache $this->cats * @return array Tableau de array */ - function get_full_arbo($force=0) + function get_full_arbo($force = 0) { // phpcs:enable global $conf; @@ -710,7 +710,7 @@ class EcmDirectory // extends CommonObject * @param int $protection Deep counter to avoid infinite loop * @return void */ - function build_path_from_id_categ($id_categ,$protection=0) + function build_path_from_id_categ($id_categ, $protection = 0) { // phpcs:enable // Define fullpath @@ -750,7 +750,7 @@ class EcmDirectory // extends CommonObject * @param int $all 0=refresh record using this->id , 1=refresh record using this->entity * @return int -1 if KO, Nb of files in directory if OK */ - function refreshcachenboffile($all=0) + function refreshcachenboffile($all = 0) { global $conf; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index efc5af1310c..59084b1fb19 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -318,7 +318,7 @@ class EcmFiles extends CommonObject * @param string $src_object_id src_object_id to search * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $ref = '', $relativepath = '', $hashoffile='', $hashforshare='', $src_object_type='', $src_object_id=0) + public function fetch($id, $ref = '', $relativepath = '', $hashoffile = '', $hashforshare = '', $src_object_type = '', $src_object_id = 0) { global $conf; @@ -443,7 +443,7 @@ class EcmFiles extends CommonObject * * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -766,7 +766,7 @@ class EcmFiles extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -815,7 +815,7 @@ class EcmFiles extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -828,7 +828,7 @@ class EcmFiles extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/ecm/class/htmlecm.form.class.php b/htdocs/ecm/class/htmlecm.form.class.php index b6000cad923..698ddd57bfe 100644 --- a/htdocs/ecm/class/htmlecm.form.class.php +++ b/htdocs/ecm/class/htmlecm.form.class.php @@ -57,7 +57,7 @@ class FormEcm * @param string $module Module ('ecm', 'medias', ...) * @return string String with HTML select */ - function selectAllSections($selected=0, $select_name='', $module='ecm') + function selectAllSections($selected = 0, $select_name = '', $module = 'ecm') { global $conf, $langs; $langs->load("ecm"); diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index e00adfad724..80737c4c9e5 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -407,7 +407,7 @@ class EmailCollector extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -482,7 +482,7 @@ class EmailCollector extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -495,7 +495,7 @@ class EmailCollector extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) @@ -979,7 +979,7 @@ class EmailCollector extends CommonObject * @param string $prefix prefix * @return array Array with number and object */ - function createPartArray($structure, $prefix="") + function createPartArray($structure, $prefix = "") { //print_r($structure); if (count($structure->parts) > 0) { // There some sub parts diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index ccf811f7607..dd2c781e702 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -321,7 +321,7 @@ class EmailCollectorAction extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -392,7 +392,7 @@ class EmailCollectorAction extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -405,7 +405,7 @@ class EmailCollectorAction extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index cafde3a820c..61e65245630 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -296,7 +296,7 @@ class EmailCollectorFilter extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -367,7 +367,7 @@ class EmailCollectorFilter extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -380,7 +380,7 @@ class EmailCollectorFilter extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 834c0bf2bda..b217c19e97f 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -493,7 +493,7 @@ class Shipments extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->expedition->creer) { throw new RestException(401); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 48e84cf1cc4..b8e3f9929f3 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -264,7 +264,7 @@ class Expedition extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si erreur, id expedition creee si ok */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $hookmanager; @@ -444,7 +444,7 @@ class Expedition extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, line_id if OK */ - function create_line($entrepot_id, $origin_line_id, $qty,$array_options=0) + function create_line($entrepot_id, $origin_line_id, $qty, $array_options = 0) { //phpcs:enable $expeditionline = new ExpeditionLigne($this->db); @@ -470,7 +470,7 @@ class Expedition extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, >0 if OK */ - function create_line_batch($line_ext,$array_options=0) + function create_line_batch($line_ext, $array_options = 0) { // phpcs:enable $error = 0; @@ -520,7 +520,7 @@ class Expedition extends CommonObject * @param string $ref_int Internal reference of other object * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($id, $ref='', $ref_ext='', $ref_int='') + function fetch($id, $ref = '', $ref_ext = '', $ref_int = '') { global $conf; @@ -646,7 +646,7 @@ class Expedition extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if OK, >0 if KO */ - function valid($user, $notrigger=0) + function valid($user, $notrigger = 0) { global $conf, $langs; @@ -908,7 +908,7 @@ class Expedition extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, >0 if OK */ - function addline($entrepot_id, $id, $qty,$array_options=0) + function addline($entrepot_id, $id, $qty, $array_options = 0) { global $conf, $langs; @@ -979,7 +979,7 @@ class Expedition extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, >0 if OK */ - function addline_batch($dbatch,$array_options=0) + function addline_batch($dbatch, $array_options = 0) { // phpcs:enable global $conf,$langs; @@ -1048,7 +1048,7 @@ class Expedition extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf; $error=0; @@ -1593,7 +1593,7 @@ class Expedition extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $max=0, $short=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $langs; @@ -1643,7 +1643,7 @@ class Expedition extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1656,7 +1656,7 @@ class Expedition extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; @@ -1843,7 +1843,7 @@ class Expedition extends CommonObject * @param id $id only this carrier, all if none * @return void */ - function list_delivery_methods($id='') + function list_delivery_methods($id = '') { // phpcs:enable global $langs; @@ -1880,7 +1880,7 @@ class Expedition extends CommonObject * * @return void */ - function update_delivery_method($id='') + function update_delivery_method($id = '') { // phpcs:enable if ($id=='') @@ -1943,7 +1943,7 @@ class Expedition extends CommonObject * @param string $value Value * @return void */ - function getUrlTrackingStatus($value='') + function getUrlTrackingStatus($value = '') { if (! empty($this->shipping_method_id)) { @@ -2304,7 +2304,7 @@ class Expedition extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs,$hidedetails=0, $hidedesc=0, $hideref=0,$moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -2549,7 +2549,7 @@ class ExpeditionLigne extends CommonObjectLine * @param int $notrigger 1 = disable triggers * @return int <0 if KO, line id >0 if OK */ - function insert($user=null, $notrigger=0) + function insert($user = null, $notrigger = 0) { global $langs, $conf; diff --git a/htdocs/expedition/class/expeditionbatch.class.php b/htdocs/expedition/class/expeditionbatch.class.php index 850e4c0dda3..e15e766c439 100644 --- a/htdocs/expedition/class/expeditionbatch.class.php +++ b/htdocs/expedition/class/expeditionbatch.class.php @@ -155,7 +155,7 @@ class ExpeditionLineBatch extends CommonObject * @param int $id_expedition rowid of shipment * @return int -1 if KO, 1 if OK */ - static function deletefromexp($db,$id_expedition) + static function deletefromexp($db, $id_expedition) { $id_expedition = (int) $id_expedition; @@ -181,7 +181,7 @@ class ExpeditionLineBatch extends CommonObject * @param int $fk_product If provided, load also detailed information of lot * @return int|array -1 if KO, array of ExpeditionLineBatch if OK */ - static function fetchAll($db, $id_line_expdet, $fk_product=0) + static function fetchAll($db, $id_line_expdet, $fk_product = 0) { $sql="SELECT"; $sql.= " eb.rowid,"; diff --git a/htdocs/expedition/class/expeditionstats.class.php b/htdocs/expedition/class/expeditionstats.class.php index 26f7bda7a2a..dd18cdb4019 100644 --- a/htdocs/expedition/class/expeditionstats.class.php +++ b/htdocs/expedition/class/expeditionstats.class.php @@ -55,7 +55,7 @@ class ExpeditionStats extends Stats * @param string $mode Option (not used) * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -88,7 +88,7 @@ class ExpeditionStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 3b93cd0c0ff..de310fe0516 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -158,7 +158,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf; @@ -377,7 +377,7 @@ class ExpenseReport extends CommonObject * @param User $userofexpensereport New user we want to have the expense report on. * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger = 0, $userofexpensereport=null) + function update($user, $notrigger = 0, $userofexpensereport = null) { global $langs; @@ -447,7 +447,7 @@ class ExpenseReport extends CommonObject * @param string $ref Ref {@name ref} * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -613,7 +613,7 @@ class ExpenseReport extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -626,7 +626,7 @@ class ExpenseReport extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -801,7 +801,7 @@ class ExpenseReport extends CommonObject * @param User $user User * @return int <0 if KO, >0 if OK */ - function fetch_line_by_project($projectid,$user='') + function fetch_line_by_project($projectid, $user = '') { // phpcs:enable global $conf,$db,$langs; @@ -1038,7 +1038,7 @@ class ExpenseReport extends CommonObject * @param User $fuser User that delete * @return int <0 if KO, >0 if OK */ - function delete(User $fuser=null) + function delete(User $fuser = null) { global $user,$langs,$conf; @@ -1078,7 +1078,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, 0 if nothing done, >0 if OK */ - function setValidate($fuser, $notrigger=0) + function setValidate($fuser, $notrigger = 0) { global $conf,$langs,$user; @@ -1249,7 +1249,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, 0 if nothing done, >0 if OK */ - function setApproved($fuser, $notrigger=0) + function setApproved($fuser, $notrigger = 0) { $now=dol_now(); $error = 0; @@ -1312,7 +1312,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int */ - function setDeny($fuser,$details,$notrigger=0) + function setDeny($fuser, $details, $notrigger = 0) { $now = dol_now(); $error = 0; @@ -1439,7 +1439,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function set_cancel($fuser,$detail, $notrigger=0) + function set_cancel($fuser, $detail, $notrigger = 0) { // phpcs:enable $error = 0; @@ -1559,7 +1559,7 @@ class ExpenseReport extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $max=0, $short=0, $moretitle='', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf; @@ -1623,7 +1623,7 @@ class ExpenseReport extends CommonObject * @param string $ligne_total_tva Amount of all taxes * @return void */ - function update_totaux_add($ligne_total_ht,$ligne_total_tva) + function update_totaux_add($ligne_total_ht, $ligne_total_tva) { // phpcs:enable $this->total_ht = $this->total_ht + $ligne_total_ht; @@ -1653,7 +1653,7 @@ class ExpenseReport extends CommonObject * @param string $ligne_total_tva Amount of all taxes * @return void */ - function update_totaux_del($ligne_total_ht,$ligne_total_tva) + function update_totaux_del($ligne_total_ht, $ligne_total_tva) { // phpcs:enable $this->total_ht = $this->total_ht - $ligne_total_ht; @@ -1689,7 +1689,7 @@ class ExpenseReport extends CommonObject * @param int $type Type line * @return int <0 if KO, >0 if OK */ - function addline($qty=0, $up=0, $fk_c_type_fees=0, $vatrate=0, $date='', $comments='', $fk_project=0, $fk_c_exp_tax_cat=0, $type=0) + function addline($qty = 0, $up = 0, $fk_c_type_fees = 0, $vatrate = 0, $date = '', $comments = '', $fk_project = 0, $fk_c_exp_tax_cat = 0, $type = 0) { global $conf,$langs,$mysoc; @@ -1783,7 +1783,7 @@ class ExpenseReport extends CommonObject * @param string $seller seller, but actually he is unknown * @return true or false */ - function checkRules($type=0, $seller='') + function checkRules($type = 0, $seller = '') { global $user,$conf,$db,$langs; @@ -1939,7 +1939,7 @@ class ExpenseReport extends CommonObject * @param int $fk_c_exp_tax_cat id of category of car * @return int <0 if KO, >0 if OK */ - function updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $expensereport_id, $fk_c_exp_tax_cat=0) + function updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $expensereport_id, $fk_c_exp_tax_cat = 0) { global $user, $mysoc; @@ -2046,7 +2046,7 @@ class ExpenseReport extends CommonObject * @param User $fuser User * @return int <0 if KO, >0 if OK */ - function deleteline($rowid, $fuser='') + function deleteline($rowid, $fuser = '') { $this->db->begin(); @@ -2179,7 +2179,7 @@ class ExpenseReport extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -2207,7 +2207,7 @@ class ExpenseReport extends CommonObject * @param int $active Active or not * @return array */ - function listOfTypes($active=1) + function listOfTypes($active = 1) { global $langs; $ret=array(); @@ -2278,7 +2278,7 @@ class ExpenseReport extends CommonObject * @param string $option 'topay' or 'toapprove' * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - function load_board($user, $option='topay') + function load_board($user, $option = 'topay') { // phpcs:enable global $conf, $langs; @@ -2557,7 +2557,7 @@ class ExpenseReportLine * @param bool $fromaddline false=keep default behavior, true=exclude the update_price() of parent object * @return int <0 if KO, >0 if OK */ - function insert($notrigger=0,$fromaddline=false) + function insert($notrigger = 0, $fromaddline = false) { global $langs,$user,$conf; @@ -2638,7 +2638,7 @@ class ExpenseReportLine * @param string $mode day|EX_DAY / month|EX_MON / year|EX_YEA to get amount * @return amount */ - public function getExpAmount(ExpenseReportRule $rule, $fk_user, $mode='day') + public function getExpAmount(ExpenseReportRule $rule, $fk_user, $mode = 'day') { $amount = 0; @@ -2769,7 +2769,7 @@ class ExpenseReportLine * @param int $useshortlabel Use short labels * @return string HTML select with status */ -function select_expensereport_statut($selected='',$htmlname='fk_statut',$useempty=1, $useshortlabel=0) +function select_expensereport_statut($selected = '', $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0) { // phpcs:enable global $db, $langs; @@ -2806,7 +2806,7 @@ function select_expensereport_statut($selected='',$htmlname='fk_statut',$useempt * @param int $active 1=Active only, 0=Unactive only, -1=All * @return string Select html */ -function select_type_fees_id($selected='',$htmlname='type',$showempty=0, $active=1) +function select_type_fees_id($selected = '', $htmlname = 'type', $showempty = 0, $active = 1) { // phpcs:enable global $db,$langs,$user; diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 9eaa8970a5b..70bc3fd6c26 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -102,7 +102,7 @@ class ExpenseReportIk extends CoreObject * @param int $mode 1=only active; 2=only inactive; other value return all * @return array of category */ - public static function getTaxCategories($mode=1) + public static function getTaxCategories($mode = 1) { global $db; @@ -155,7 +155,7 @@ class ExpenseReportIk extends CoreObject * @param int $active active * @return array */ - public static function getRangesByCategory($fk_c_exp_tax_cat, $active=1) + public static function getRangesByCategory($fk_c_exp_tax_cat, $active = 1) { global $db; @@ -237,7 +237,7 @@ class ExpenseReportIk extends CoreObject * @param int $default_c_exp_tax_cat id * @return int */ - public static function getMaxRangeNumber($default_c_exp_tax_cat=0) + public static function getMaxRangeNumber($default_c_exp_tax_cat = 0) { global $db,$conf; diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 6d2a99d2101..2c25cb001d3 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -148,7 +148,7 @@ class ExpenseReportRule extends CoreObject * @param type $fk_user user of expense * @return array \ExpenseReportRule */ - public static function getAllRule($fk_c_type_fees='', $date='', $fk_user='') + public static function getAllRule($fk_c_type_fees = '', $date = '', $fk_user = '') { global $db; diff --git a/htdocs/expensereport/class/expensereportstats.class.php b/htdocs/expensereport/class/expensereportstats.class.php index 7901e813edc..1ad0f22bce7 100644 --- a/htdocs/expensereport/class/expensereportstats.class.php +++ b/htdocs/expensereport/class/expensereportstats.class.php @@ -50,7 +50,7 @@ class ExpenseReportStats extends Stats * @param int $userid Id user for filter * @return void */ - function __construct($db, $socid=0, $userid=0) + function __construct($db, $socid = 0, $userid = 0) { global $conf, $user; @@ -107,7 +107,7 @@ class ExpenseReportStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { $sql = "SELECT MONTH(".$this->db->ifsql('e.date_valid IS NULL','e.date_create','e.date_valid').") as dm, count(*)"; $sql.= " FROM ".$this->from; @@ -129,7 +129,7 @@ class ExpenseReportStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { $sql = "SELECT date_format(".$this->db->ifsql('e.date_valid IS NULL','e.date_create','e.date_valid').",'%m') as dm, sum(".$this->field.")"; $sql.= " FROM ".$this->from; diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index ae55432a4b8..b18eae8c514 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -258,7 +258,7 @@ class PaymentExpenseReport extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { // phpcs:enable global $conf, $langs; @@ -345,7 +345,7 @@ class PaymentExpenseReport extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { // phpcs:enable global $conf, $langs; @@ -471,7 +471,7 @@ class PaymentExpenseReport extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return ''; } @@ -484,7 +484,7 @@ class PaymentExpenseReport extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -530,7 +530,7 @@ class PaymentExpenseReport extends CommonObject * @param string $emetteur_banque Name of bank * @return int <0 if KO, >0 if OK */ - function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque) + function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque) { global $langs,$conf; @@ -663,7 +663,7 @@ class PaymentExpenseReport extends CommonObject * @param int $maxlen Longueur max libelle * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 7d908161071..af5554a26a9 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -78,7 +78,7 @@ class Export * @param string $filter Load a particular dataset only * @return int <0 if KO, >0 if OK */ - function load_arrays($user,$filter='') + function load_arrays($user, $filter = '') { // phpcs:enable global $langs,$conf,$mysoc; @@ -782,7 +782,7 @@ class Export * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 52ad0486597..de029081b1f 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -1293,7 +1293,7 @@ exit; // don't know why but apache hangs with php 5.3.10-1ubuntu3.12 and apache * @param string $sqlmaxforexport SQL request to parse * @return string Table name of field */ -function getablenamefromfield($code,$sqlmaxforexport) +function getablenamefromfield($code, $sqlmaxforexport) { $alias=preg_replace('/\.(.*)$/i','',$code); // Keep only 'Alias' and remove '.Fieldname' $regexstring='/([a-zA-Z_]+) as '.preg_quote($alias).'[, \)]/i'; diff --git a/htdocs/fichinter/class/api_interventions.class.php b/htdocs/fichinter/class/api_interventions.class.php index 3f3315b6028..1d7e4b9f939 100644 --- a/htdocs/fichinter/class/api_interventions.class.php +++ b/htdocs/fichinter/class/api_interventions.class.php @@ -334,7 +334,7 @@ class Interventions extends DolibarrApi * * @return array */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->ficheinter->creer) { throw new RestException(401, "Insuffisant rights"); diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index e20d8e1da1a..880bf83df5b 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -179,7 +179,7 @@ class Fichinter extends CommonObject * @param int $notrigger Disable all triggers * @return int <0 if KO, >0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -313,7 +313,7 @@ class Fichinter extends CommonObject * @param int $notrigger Disable all triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { if (! is_numeric($this->duration)) { $this->duration = 0; @@ -373,7 +373,7 @@ class Fichinter extends CommonObject * @param string $ref Ref of intervention * @return int <0 if KO, >0 if OK */ - function fetch($rowid,$ref='') + function fetch($rowid, $ref = '') { $sql = "SELECT f.rowid, f.ref, f.description, f.fk_soc, f.fk_statut,"; $sql.= " f.datec, f.dateo, f.datee, f.datet, f.fk_user_author,"; @@ -483,7 +483,7 @@ class Fichinter extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function setValid($user, $notrigger=0) + function setValid($user, $notrigger = 0) { global $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -625,7 +625,7 @@ class Fichinter extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$langs; @@ -653,7 +653,7 @@ class Fichinter extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -666,7 +666,7 @@ class Fichinter extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable // Init/load array of translation of status @@ -716,7 +716,7 @@ class Fichinter extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $hookmanager; @@ -897,7 +897,7 @@ class Fichinter extends CommonObject * @param int $notrigger Disable trigger * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1112,7 +1112,7 @@ class Fichinter extends CommonObject * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$hookmanager; @@ -1205,7 +1205,7 @@ class Fichinter extends CommonObject * @param array $array_options Array option * @return int >0 if ok, <0 if ko */ - function addline($user,$fichinterid, $desc, $date_intervention, $duration, $array_options='') + function addline($user, $fichinterid, $desc, $date_intervention, $duration, $array_options = '') { dol_syslog(get_class($this)."::addline $fichinterid, $desc, $date_intervention, $duration"); @@ -1443,7 +1443,7 @@ class FichinterLigne extends CommonObjectLine * @param int $notrigger Disable all triggers * @return int <0 if ko, >0 if ok */ - function insert($user, $notrigger=0) + function insert($user, $notrigger = 0) { global $langs,$conf; @@ -1539,7 +1539,7 @@ class FichinterLigne extends CommonObjectLine * @param int $notrigger Disable all triggers * @return int <0 if ko, >0 if ok */ - function update($user,$notrigger=0) + function update($user, $notrigger = 0) { global $langs,$conf; @@ -1660,7 +1660,7 @@ class FichinterLigne extends CommonObjectLine * @param int $notrigger Disable all triggers * @return int >0 if ok, <0 if ko */ - function deleteline($user,$notrigger=0) + function deleteline($user, $notrigger = 0) { global $langs,$conf; diff --git a/htdocs/fichinter/class/fichinterstats.class.php b/htdocs/fichinter/class/fichinterstats.class.php index 0475a2116eb..340c59b0cb5 100644 --- a/htdocs/fichinter/class/fichinterstats.class.php +++ b/htdocs/fichinter/class/fichinterstats.class.php @@ -54,7 +54,7 @@ class FichinterStats extends Stats * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; @@ -89,7 +89,7 @@ class FichinterStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with number by month */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -132,7 +132,7 @@ class FichinterStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index 3b3ac43c496..5d9efc10425 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -96,7 +96,7 @@ class SupplierInvoices extends DolibarrApi * * @throws RestException */ - function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids='', $status='', $sqlfilters = '') + function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') { global $db, $conf; @@ -296,7 +296,7 @@ class SupplierInvoices extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { throw new RestException(401); diff --git a/htdocs/fourn/class/api_supplier_orders.class.php b/htdocs/fourn/class/api_supplier_orders.class.php index ac5c825856c..a26b087cfee 100644 --- a/htdocs/fourn/class/api_supplier_orders.class.php +++ b/htdocs/fourn/class/api_supplier_orders.class.php @@ -96,7 +96,7 @@ class SupplierOrders extends DolibarrApi * * @throws RestException */ - function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids='', $status='', $sqlfilters = '') + function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') { global $db, $conf; @@ -301,7 +301,7 @@ class SupplierOrders extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $idwarehouse=0, $notrigger=0) + function validate($id, $idwarehouse = 0, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { throw new RestException(401); diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index d92159c3234..1436409d82e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -248,7 +248,7 @@ class CommandeFournisseur extends CommonOrder * @param string $ref Ref of object * @return int >0 if OK, <0 if KO, 0 if not found */ - public function fetch($id, $ref='') + public function fetch($id, $ref = '') { global $conf; @@ -382,7 +382,7 @@ class CommandeFournisseur extends CommonOrder * @param int $only_product Return only physical products * @return int <0 if KO, >0 if OK */ - function fetch_lines($only_product=0) + function fetch_lines($only_product = 0) { // phpcs:enable //$result=$this->fetch_lines(); @@ -492,7 +492,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function valid($user,$idwarehouse=0,$notrigger=0) + public function valid($user, $idwarehouse = 0, $notrigger = 0) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -611,7 +611,7 @@ class CommandeFournisseur extends CommonOrder * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto * @return string Label */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode,$this->billed); } @@ -625,7 +625,7 @@ class CommandeFournisseur extends CommonOrder * @param int $billed 1=Billed * @return string Label of status */ - function LibStatut($statut,$mode=0,$billed=0) + function LibStatut($statut, $mode = 0, $billed = 0) { // phpcs:enable global $conf, $langs; @@ -719,7 +719,7 @@ class CommandeFournisseur extends CommonOrder * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chain with URL */ - public function getNomUrl($withpicto=0, $option='', $notooltip=0, $save_lastsearch_value=-1) + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf; @@ -879,7 +879,7 @@ class CommandeFournisseur extends CommonOrder * @param int $secondlevel 0=Standard approval, 1=Second level approval (used when option SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set) * @return int <0 if KO, >0 if OK */ - public function approve($user, $idwarehouse=0, $secondlevel=0) + public function approve($user, $idwarehouse = 0, $secondlevel = 0) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1088,7 +1088,7 @@ class CommandeFournisseur extends CommonOrder * @param int $idwarehouse Id warehouse to use for stock change (not used for supplier orders). * @return int >0 if Ok, <0 if Ko */ - function Cancel($user, $idwarehouse=-1) + function Cancel($user, $idwarehouse = -1) { // phpcs:enable global $langs,$conf; @@ -1150,7 +1150,7 @@ class CommandeFournisseur extends CommonOrder * @param string $comment Comment * @return int <0 if KO, >0 if OK */ - public function commande($user, $date, $methode, $comment='') + public function commande($user, $date, $methode, $comment = '') { global $langs; dol_syslog(get_class($this)."::commande"); @@ -1208,7 +1208,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger Disable all triggers * @return int <0 if KO, Id of supplier order if OK */ - public function create($user, $notrigger=0) + public function create($user, $notrigger = 0) { global $langs,$conf,$hookmanager; @@ -1495,7 +1495,7 @@ class CommandeFournisseur extends CommonOrder * @param int $origin_id Id of origin object * @return int <=0 if KO, >0 if OK */ - public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $fk_prod_fourn_price=0, $ref_supplier='', $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $type=0, $info_bits=0, $notrigger=false, $date_start=null, $date_end=null, $array_options=0, $fk_unit=null, $pu_ht_devise=0, $origin='', $origin_id=0) + public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0) { global $langs,$mysoc,$conf; @@ -1754,7 +1754,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1 = notrigger * @return int <0 if KO, >0 if OK */ - public function dispatchProduct($user, $product, $qty, $entrepot, $price=0, $comment='', $eatby='', $sellby='', $batch='', $fk_commandefourndet=0, $notrigger=0) + public function dispatchProduct($user, $product, $qty, $entrepot, $price = 0, $comment = '', $eatby = '', $sellby = '', $batch = '', $fk_commandefourndet = 0, $notrigger = 0) { global $conf, $langs; @@ -1856,7 +1856,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Disable call to triggers * @return int <0 if KO, >0 if OK */ - public function deleteline($idline, $notrigger=0) + public function deleteline($idline, $notrigger = 0) { if ($this->statut == 0) { @@ -1892,7 +1892,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function delete(User $user, $notrigger=0) + public function delete(User $user, $notrigger = 0) { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2049,7 +2049,7 @@ class CommandeFournisseur extends CommonOrder * @param int $status Filter on stats (-1 = no filter, 0 = lines draft to be approved, 1 = approved lines) * @return array Array of lines */ - public function getDispachedLines($status=-1) + public function getDispachedLines($status = -1) { $ret = array(); @@ -2219,7 +2219,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function set_date_livraison($user, $date_livraison, $notrigger=0) + function set_date_livraison($user, $date_livraison, $notrigger = 0) { // phpcs:enable if ($user->rights->fournisseur->commande->creer) @@ -2285,7 +2285,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ - function set_id_projet($user, $id_projet, $notrigger=0) + function set_id_projet($user, $id_projet, $notrigger = 0) { // phpcs:enable if ($user->rights->fournisseur->commande->creer) @@ -2467,7 +2467,7 @@ class CommandeFournisseur extends CommonOrder * @param string $ref_supplier Supplier ref * @return int < 0 if error, > 0 if ok */ - public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $notrigger=0, $date_start='', $date_end='', $array_options=0, $fk_unit=null, $pu_ht_devise=0, $ref_supplier='') + public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $notrigger = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') { global $mysoc, $conf; dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $price_base_type, $info_bits, $type, $fk_unit"); @@ -2889,7 +2889,7 @@ class CommandeFournisseur extends CommonOrder * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $langs; @@ -3014,7 +3014,7 @@ class CommandeFournisseur extends CommonOrder * @param string $comment Comment * @return int <0 if KO, 0 if not applicable, >0 if OK */ - public function calcAndSetStatusDispatch(User $user, $closeopenorder=1, $comment='') + public function calcAndSetStatusDispatch(User $user, $closeopenorder = 1, $comment = '') { global $conf, $langs; @@ -3153,7 +3153,7 @@ class CommandeFournisseur extends CommonOrder * @param int $filtre_statut Filter on shipment status * @return int <0 if KO, Nb of lines found if OK */ - function loadReceptions($filtre_statut=-1) + function loadReceptions($filtre_statut = -1) { $this->receptions = array(); @@ -3350,7 +3350,7 @@ class CommandeFournisseurLigne extends CommonOrderLine * @param int $notrigger 1 = disable triggers * @return int <0 if KO, >0 if OK */ - public function insert($notrigger=0) + public function insert($notrigger = 0) { global $conf, $user; @@ -3476,7 +3476,7 @@ class CommandeFournisseurLigne extends CommonOrderLine * @param int $notrigger 1 = disable triggers * @return int <0 si ko, >0 si ok */ - public function update($notrigger=0) + public function update($notrigger = 0) { global $conf,$user; diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index ee4602d7093..0e1ad52d46c 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -135,7 +135,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs, $hookmanager; $error=0; @@ -256,7 +256,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param string $ref Ref * @return int <0 if KO, >0 if OK */ - function fetch($id,$ref='') + function fetch($id, $ref = '') { global $langs; $sql = "SELECT"; @@ -325,7 +325,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -420,7 +420,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -534,7 +534,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -547,7 +547,7 @@ class CommandeFournisseurDispatch extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -623,7 +623,7 @@ class CommandeFournisseurDispatch extends CommonObject * * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 1dab0e9f82e..6a0ca6abddf 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -547,7 +547,7 @@ class FactureFournisseur extends CommonInvoice * @param string $ref Ref supplier invoice * @return int <0 if KO, >0 if OK, 0 if not found */ - public function fetch($id='',$ref='') + public function fetch($id = '', $ref = '') { global $langs; @@ -813,7 +813,7 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - public function update($user=null, $notrigger=0) + public function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -1045,7 +1045,7 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function delete(User $user, $notrigger=0) + public function delete(User $user, $notrigger = 0) { global $langs,$conf; @@ -1196,7 +1196,7 @@ class FactureFournisseur extends CommonInvoice * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet. Not implementd yet. * @return int <0 si ko, >0 si ok */ - function set_paid($user, $close_code='', $close_note='') + function set_paid($user, $close_code = '', $close_note = '') { // phpcs:enable global $conf,$langs; @@ -1295,7 +1295,7 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, =0 if nothing to do, >0 if OK */ - public function validate($user, $force_number='', $idwarehouse=0, $notrigger=0) + public function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1458,7 +1458,7 @@ class FactureFournisseur extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - function set_draft($user, $idwarehouse=-1) + function set_draft($user, $idwarehouse = -1) { // phpcs:enable global $conf,$langs; @@ -1557,7 +1557,7 @@ class FactureFournisseur extends CommonInvoice * @param string $ref_supplier Supplier ref * @return int >0 if OK, <0 if KO */ - public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1, $notrigger=false, $array_options=0, $fk_unit=null, $origin_id=0, $pu_ht_devise=0, $ref_supplier='') + public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = '', $price_base_type = 'HT', $type = 0, $rang = -1, $notrigger = false, $array_options = 0, $fk_unit = null, $origin_id = 0, $pu_ht_devise = 0, $ref_supplier = '') { global $langs, $mysoc, $conf; @@ -1799,7 +1799,7 @@ class FactureFournisseur extends CommonInvoice * @param string $ref_supplier Supplier ref * @return int <0 if KO, >0 if OK */ - public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false, $date_start='', $date_end='', $array_options=0, $fk_unit = null, $pu_ht_devise=0, $ref_supplier='') + public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1 = 0, $txlocaltax2 = 0, $qty = 1, $idproduct = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $remise_percent = 0, $notrigger = false, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') { global $mysoc; dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent,$notrigger,$date_start,$date_end,$fk_unit,$pu_ht_devise,$ref_supplier", LOG_DEBUG); @@ -1927,7 +1927,7 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function deleteline($rowid, $notrigger=0) + public function deleteline($rowid, $notrigger = 0) { if (!$rowid) { $rowid = $this->id; @@ -2038,7 +2038,7 @@ class FactureFournisseur extends CommonInvoice * @return array|int Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) * <0 if error */ - function list_replacable_supplier_invoices($socid=0) + function list_replacable_supplier_invoices($socid = 0) { // phpcs:enable global $conf; @@ -2090,7 +2090,7 @@ class FactureFournisseur extends CommonInvoice * @return array|int Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) * <0 if error */ - function list_qualified_avoir_supplier_invoices($socid=0) + function list_qualified_avoir_supplier_invoices($socid = 0) { // phpcs:enable global $conf; @@ -2204,7 +2204,7 @@ class FactureFournisseur extends CommonInvoice * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - public function getNomUrl($withpicto=0, $option='',$max=0, $short=0, $moretitle='', $notooltip=0, $save_lastsearch_value=-1) + public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf; @@ -2281,7 +2281,7 @@ class FactureFournisseur extends CommonInvoice * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - public function getNextNumRef($soc,$mode='next') + public function getNextNumRef($soc, $mode = 'next') { global $db, $langs, $conf; $langs->load("orders"); @@ -2335,7 +2335,7 @@ class FactureFournisseur extends CommonInvoice * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - public function initAsSpecimen($option='') + public function initAsSpecimen($option = '') { global $langs,$conf; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -2481,7 +2481,7 @@ class FactureFournisseur extends CommonInvoice * @param int $invertdetail Reverse sign of amounts for lines * @return int New id of clone */ - public function createFromClone($fromid,$invertdetail=0) + public function createFromClone($fromid, $invertdetail = 0) { global $user,$langs; @@ -2560,7 +2560,7 @@ class FactureFournisseur extends CommonInvoice * @param null|array $moreparams Array to provide more information * @return int <0 if KO, 0 if nothing done, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $user, $langs; @@ -3047,7 +3047,7 @@ class SupplierInvoiceLine extends CommonObjectLine * @param int $notrigger 1 no triggers * @return int <0 if KO, >0 if OK */ - public function insert($notrigger=0) + public function insert($notrigger = 0) { global $user,$conf; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index d721a4a9254..1918013a966 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -224,7 +224,7 @@ class ProductFournisseur extends Product * @param string $desc_fourn Custom description for product_fourn_price * @return int <0 if KO, >=0 if OK */ - function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0, $supplier_reputation='', $localtaxes_array=array(), $newdefaultvatcode='', $multicurrency_buyprice=0, $multicurrency_price_base_type='HT',$multicurrency_tx=1,$multicurrency_code='', $desc_fourn='') + function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges = 0, $remise_percent = 0, $remise = 0, $newnpr = 0, $delivery_time_days = 0, $supplier_reputation = '', $localtaxes_array = array(), $newdefaultvatcode = '', $multicurrency_buyprice = 0, $multicurrency_price_base_type = 'HT', $multicurrency_tx = 1, $multicurrency_code = '', $desc_fourn = '') { // phpcs:enable global $conf, $langs; @@ -542,7 +542,7 @@ class ProductFournisseur extends Product * @param int $offset Offset * @return array Array of Products with new properties to define supplier price */ - function list_product_fournisseur_price($prodid, $sortfield='', $sortorder='', $limit=0, $offset=0) + function list_product_fournisseur_price($prodid, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0) { // phpcs:enable global $conf; @@ -643,7 +643,7 @@ class ProductFournisseur extends Product * @param int $socid get min price for specific supplier * @return int <0 if KO, 0=Not found of no product id provided, >0 if OK */ - function find_min_price_product_fournisseur($prodid, $qty=0, $socid=0) + function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0) { // phpcs:enable global $conf; @@ -815,7 +815,7 @@ class ProductFournisseur extends Product * @return string String with supplier price * TODO Remove this method. Use getNomUrl directly. */ - function getSocNomUrl($withpicto=0,$option='supplier',$maxlen=0,$notooltip=0) + function getSocNomUrl($withpicto = 0, $option = 'supplier', $maxlen = 0, $notooltip = 0) { $thirdparty = new Fournisseur($this->db); $thirdparty->fetch($this->fourn_id); @@ -835,7 +835,7 @@ class ProductFournisseur extends Product * to display in table format. * @return string String with supplier price */ - function display_price_product_fournisseur($showunitprice=1,$showsuptitle=1,$maxlen=0,$notooltip=0, $productFournList=array()) + function display_price_product_fournisseur($showunitprice = 1, $showsuptitle = 1, $maxlen = 0, $notooltip = 0, $productFournList = array()) { // phpcs:enable global $langs; @@ -888,7 +888,7 @@ class ProductFournisseur extends Product * @param int $offset Offset * @return array Array of Log prices */ - function listProductFournisseurPriceLog($fourn_id, $sortfield='', $sortorder='', $limit=0, $offset=0) + function listProductFournisseurPriceLog($fourn_id, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0) { global $conf; @@ -934,7 +934,7 @@ class ProductFournisseur extends Product * to display in table format. * @return string HTML String with supplier price */ - function displayPriceProductFournisseurLog($productFournLogList=array()) + function displayPriceProductFournisseurLog($productFournLogList = array()) { global $langs; @@ -968,7 +968,7 @@ class ProductFournisseur extends Product * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index ee92374149b..a7469367fb6 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -82,7 +82,7 @@ class PaiementFourn extends Paiement * @param int $fk_bank Id of bank line associated to payment * @return int <0 if KO, -2 if not found, >0 if OK */ - function fetch($id, $ref='', $fk_bank='') + function fetch($id, $ref = '', $fk_bank = '') { $error=0; @@ -145,7 +145,7 @@ class PaiementFourn extends Paiement * @param int $closepaidinvoices 1=Also close payed invoices to paid, 0=Do nothing more * @return int id of created payment, < 0 if error */ - function create($user, $closepaidinvoices=0) + function create($user, $closepaidinvoices = 0) { global $langs,$conf; @@ -317,7 +317,7 @@ class PaiementFourn extends Paiement * @param int $notrigger No trigger * @return int <0 si ko, >0 si ok */ - function delete($notrigger=0) + function delete($notrigger = 0) { global $conf, $user, $langs; @@ -463,7 +463,7 @@ class PaiementFourn extends Paiement * @param string $filter SQL filter * @return array Array of supplier invoice id */ - function getBillsArray($filter='') + function getBillsArray($filter = '') { $sql = 'SELECT fk_facturefourn'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf, '.MAIN_DB_PREFIX.'facture_fourn as f'; @@ -501,7 +501,7 @@ class PaiementFourn extends Paiement * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -514,7 +514,7 @@ class PaiementFourn extends Paiement * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -568,7 +568,7 @@ class PaiementFourn extends Paiement * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $option='', $mode='withlistofinvoices', $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0) { global $langs; @@ -604,7 +604,7 @@ class PaiementFourn extends Paiement * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - function initAsSpecimen($option='') + function initAsSpecimen($option = '') { global $user,$langs,$conf; @@ -629,7 +629,7 @@ class PaiementFourn extends Paiement * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - function getNextNumRef($soc,$mode='next') + function getNextNumRef($soc, $mode = 'next') { global $conf, $db, $langs; $langs->load("bills"); @@ -715,7 +715,7 @@ class PaiementFourn extends Paiement * @param null|array $moreparams Array to provide more information * @return int <0 if KO, 0 if nothing done, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $user, $langs; @@ -781,7 +781,7 @@ class PaiementFourn extends Paiement * @param int $force_thirdparty_id Force thirdparty id * @return int <0 if KO, >0 if OK */ - function fetch_thirdparty($force_thirdparty_id=0) + function fetch_thirdparty($force_thirdparty_id = 0) { // phpcs:enable require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index fd2e5e80772..449be9daccf 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -698,7 +698,7 @@ $db->close(); * @param integer $ftp_passive Use a passive mode * @return int <0 if OK, >0 if KO */ -function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $section, $ftp_passive=0) +function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $section, $ftp_passive = 0) { global $langs, $conf; @@ -798,7 +798,7 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect * @param string $dir Directory * @return int 1=directory, 0=not a directory */ -function ftp_isdir($connect_id,$dir) +function ftp_isdir($connect_id, $dir) { if (@ftp_chdir($connect_id,$dir)) { diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index f5761876795..6248b3d0bce 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -250,7 +250,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf; $error=0; @@ -336,7 +336,7 @@ class Holiday extends CommonObject * @param string $ref Ref object * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $langs; @@ -420,7 +420,7 @@ class Holiday extends CommonObject * @param string $filter SQL Filter * @return int -1 if KO, 1 if OK, 2 if no result */ - function fetchByUser($user_id, $order='', $filter='') + function fetchByUser($user_id, $order = '', $filter = '') { global $langs, $conf; @@ -548,7 +548,7 @@ class Holiday extends CommonObject * @param string $filter SQL Filter * @return int -1 if KO, 1 if OK, 2 if no result */ - function fetchAll($order,$filter) + function fetchAll($order, $filter) { global $langs; @@ -674,7 +674,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function validate($user=null, $notrigger=0) + function validate($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -745,7 +745,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function approve($user=null, $notrigger=0) + function approve($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -858,7 +858,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -972,7 +972,7 @@ class Holiday extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -1030,7 +1030,7 @@ class Holiday extends CommonObject * @return boolean False = New range overlap an existing holiday, True = no overlapping (is never on holiday during checked period). * @see verifDateHolidayForTimestamp */ - function verifDateHolidayCP($fk_user, $dateStart, $dateEnd, $halfday=0) + function verifDateHolidayCP($fk_user, $dateStart, $dateEnd, $halfday = 0) { $this->fetchByUser($fk_user,'',''); @@ -1112,7 +1112,7 @@ class Holiday extends CommonObject * @return array array('morning'=> ,'afternoon'=> ), Boolean is true if user is available for day timestamp. * @see verifDateHolidayCP */ - function verifDateHolidayForTimestamp($fk_user, $timestamp, $status='-1') + function verifDateHolidayForTimestamp($fk_user, $timestamp, $status = '-1') { global $langs, $conf; @@ -1175,7 +1175,7 @@ class Holiday extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $save_lastsearch_value = -1) { global $langs; @@ -1211,7 +1211,7 @@ class Holiday extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut, $mode, $this->date_debut); } @@ -1225,7 +1225,7 @@ class Holiday extends CommonObject * @param date $startdate Date holiday should start * @return string Label */ - function LibStatut($statut, $mode=0, $startdate='') + function LibStatut($statut, $mode = 0, $startdate = '') { // phpcs:enable global $langs; @@ -1290,7 +1290,7 @@ class Holiday extends CommonObject * @param string $htmlname Name of HTML select field * @return string Show select of status */ - function selectStatutCP($selected='', $htmlname='select_statut') + function selectStatutCP($selected = '', $htmlname = 'select_statut') { global $langs; @@ -1324,7 +1324,7 @@ class Holiday extends CommonObject * @param string $value vrai si mise à jour OK sinon faux * @return boolean ok or ko */ - function updateConfCP($name,$value) + function updateConfCP($name, $value) { $sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET"; @@ -1348,7 +1348,7 @@ class Holiday extends CommonObject * @param string $createifnotfound 'stringvalue'=Create entry with string value if not found. For example 'YYYYMMDDHHMMSS'. * @return string Value of parameter. Example: 'YYYYMMDDHHMMSS' or < 0 if error */ - function getConfCP($name, $createifnotfound='') + function getConfCP($name, $createifnotfound = '') { $sql = "SELECT value"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_config"; @@ -1403,7 +1403,7 @@ class Holiday extends CommonObject * @param int $fk_type Type of vacation * @return int 0=Nothing done, 1=OK, -1=KO */ - function updateSoldeCP($userID='',$nbHoliday='', $fk_type='') + function updateSoldeCP($userID = '', $nbHoliday = '', $fk_type = '') { global $user, $langs; @@ -1579,7 +1579,7 @@ class Holiday extends CommonObject * @param int $userid Id user * @return void */ - function createCPusers($single=false,$userid='') + function createCPusers($single = false, $userid = '') { // Si c'est l'ensemble des utilisateurs à ajouter if (! $single) @@ -1631,7 +1631,7 @@ class Holiday extends CommonObject * @param int $fk_type Filter on type * @return float Retourne le solde de congés payés de l'utilisateur */ - function getCPforUser($user_id, $fk_type=0) + function getCPforUser($user_id, $fk_type = 0) { $sql = "SELECT nb_holiday"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_users"; @@ -1661,7 +1661,7 @@ class Holiday extends CommonObject * @param string $filters Filters * @return array|string|int Return an array */ - function fetchUsers($stringlist=true, $type=true, $filters='') + function fetchUsers($stringlist = true, $type = true, $filters = '') { global $conf; @@ -2045,7 +2045,7 @@ class Holiday extends CommonObject * @param string $filter Filtre de séléction * @return int -1 si erreur, 1 si OK et 2 si pas de résultat */ - function fetchLog($order,$filter) + function fetchLog($order, $filter) { global $langs; @@ -2122,7 +2122,7 @@ class Holiday extends CommonObject * @param int $affect Filter on affect (a request will change sold or not). -1 = Both * @return array Return array with list of types */ - function getTypes($active=-1, $affect=-1) + function getTypes($active = -1, $affect = -1) { global $mysoc; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 4153972d27c..7e967176582 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -296,7 +296,7 @@ class Establishment extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -309,7 +309,7 @@ class Establishment extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -396,7 +396,7 @@ class Establishment extends CommonObject * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @return string String with URL */ - function getNomUrl($withpicto=0) + function getNomUrl($withpicto = 0) { global $langs; diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index a0d33d4c28a..441535d11fd 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -73,7 +73,7 @@ class Import * @param string $filter Load a particular dataset only. Index will start to 0. * @return int <0 if KO, >0 if OK */ - function load_arrays($user,$filter='') + function load_arrays($user, $filter = '') { // phpcs:enable global $langs,$conf; @@ -196,7 +196,7 @@ class Import * @param string $datatoimport Dataset to import * @return string <0 if KO, >0 if OK */ - function build_example_file($model, $headerlinefields, $contentlinevalues,$datatoimport) + function build_example_file($model, $headerlinefields, $contentlinevalues, $datatoimport) { // phpcs:enable global $conf,$langs; @@ -316,7 +316,7 @@ class Import * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 04fc651685f..b1d59b648b3 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1925,7 +1925,7 @@ $db->close(); * @param int $nostyle Hide style * @return void */ -function show_elem($fieldssource,$pos,$key,$var,$nostyle='') +function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') { global $langs,$bc; @@ -1997,7 +1997,7 @@ function show_elem($fieldssource,$pos,$key,$var,$nostyle='') * @param array $listofkey Array of keys * @return integer */ -function getnewkey(&$fieldssource,&$listofkey) +function getnewkey(&$fieldssource, &$listofkey) { $i=count($fieldssource)+1; // Max number of key diff --git a/htdocs/index.php b/htdocs/index.php index 1ef48ea9bae..3a6802abbf8 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -696,7 +696,7 @@ $db->close(); * @param string $options More parameters on img tag * @return string Return img tag of weather */ -function showWeather($totallate,$text,$options) +function showWeather($totallate, $text, $options) { global $conf; diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 54b34b89e8c..6c2cdcead72 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -374,7 +374,7 @@ function conf($dolibarr_main_document_root) * @param string $csstable Css for table * @return void */ -function pHeader($subtitle,$next,$action='set',$param='',$forcejqueryurl='',$csstable='main-inside') +function pHeader($subtitle, $next, $action = 'set', $param = '', $forcejqueryurl = '', $csstable = 'main-inside') { global $conf; global $langs; @@ -451,7 +451,7 @@ function pHeader($subtitle,$next,$action='set',$param='',$forcejqueryurl='',$css * @param integer $withpleasewait Add also please wait tags * @return void */ -function pFooter($nonext=0,$setuplang='',$jscheckfunction='', $withpleasewait=0) +function pFooter($nonext = 0, $setuplang = '', $jscheckfunction = '', $withpleasewait = 0) { global $conf,$langs; @@ -508,7 +508,7 @@ function pFooter($nonext=0,$setuplang='',$jscheckfunction='', $withpleasewait=0) * @param int $level Level of log * @return void */ -function dolibarr_install_syslog($message, $level=LOG_DEBUG) +function dolibarr_install_syslog($message, $level = LOG_DEBUG) { if (! defined('LOG_DEBUG')) define('LOG_DEBUG',6); dol_syslog($message,$level); diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 48fdb15b655..a55c14195e5 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -816,7 +816,7 @@ if ($ret) exit($ret); * @param string $main_dir Full path name to main.inc.php file * @return void */ -function write_main_file($mainfile,$main_dir) +function write_main_file($mainfile, $main_dir) { $fp = @fopen("$mainfile", "w"); if($fp) @@ -837,7 +837,7 @@ function write_main_file($mainfile,$main_dir) * @param string $main_dir Full path name to master.inc.php file * @return void */ -function write_master_file($masterfile,$main_dir) +function write_master_file($masterfile, $main_dir) { $fp = @fopen("$masterfile", "w"); if($fp) diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index cf6cbf28e45..acddde53988 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -590,7 +590,7 @@ if ($ret) exit($ret); * @param Conf $conf Object conf * @return void */ -function migrate_paiements($db,$langs,$conf) +function migrate_paiements($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -684,7 +684,7 @@ function migrate_paiements($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_paiements_orphelins_1($db,$langs,$conf) +function migrate_paiements_orphelins_1($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -811,7 +811,7 @@ function migrate_paiements_orphelins_1($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_paiements_orphelins_2($db,$langs,$conf) +function migrate_paiements_orphelins_2($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -954,7 +954,7 @@ function migrate_paiements_orphelins_2($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_contracts_det($db,$langs,$conf) +function migrate_contracts_det($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1052,7 +1052,7 @@ function migrate_contracts_det($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_links_transfert($db,$langs,$conf) +function migrate_links_transfert($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1136,7 +1136,7 @@ function migrate_links_transfert($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_contracts_date1($db,$langs,$conf) +function migrate_contracts_date1($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1167,7 +1167,7 @@ function migrate_contracts_date1($db,$langs,$conf) /* * Mise a jour date contrat avec date min effective mise en service si inferieur */ -function migrate_contracts_date2($db,$langs,$conf) +function migrate_contracts_date2($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1236,7 +1236,7 @@ function migrate_contracts_date2($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_contracts_date3($db,$langs,$conf) +function migrate_contracts_date3($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1263,7 +1263,7 @@ function migrate_contracts_date3($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_contracts_open($db,$langs,$conf) +function migrate_contracts_open($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -1322,7 +1322,7 @@ function migrate_contracts_open($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_paiementfourn_facturefourn($db,$langs,$conf) +function migrate_paiementfourn_facturefourn($db, $langs, $conf) { global $bc; @@ -1439,7 +1439,7 @@ function migrate_paiementfourn_facturefourn($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_facture($db,$langs,$conf) +function migrate_price_facture($db, $langs, $conf) { $err=0; @@ -1558,7 +1558,7 @@ function migrate_price_facture($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_propal($db,$langs,$conf) +function migrate_price_propal($db, $langs, $conf) { $tmpmysoc=new Societe($db); $tmpmysoc->setMysoc($conf); @@ -1666,7 +1666,7 @@ function migrate_price_propal($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_contrat($db,$langs,$conf) +function migrate_price_contrat($db, $langs, $conf) { $db->begin(); @@ -1755,7 +1755,7 @@ function migrate_price_contrat($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_commande($db,$langs,$conf) +function migrate_price_commande($db, $langs, $conf) { $db->begin(); @@ -1872,7 +1872,7 @@ function migrate_price_commande($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_price_commande_fournisseur($db,$langs,$conf) +function migrate_price_commande_fournisseur($db, $langs, $conf) { $db->begin(); @@ -1989,7 +1989,7 @@ function migrate_price_commande_fournisseur($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_modeles($db,$langs,$conf) +function migrate_modeles($db, $langs, $conf) { //print '<br>'; //print '<b>'.$langs->trans('UpdateModelsTable')."</b><br>\n"; @@ -2047,7 +2047,7 @@ function migrate_modeles($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_commande_expedition($db,$langs,$conf) +function migrate_commande_expedition($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_commande_expedition"); @@ -2124,7 +2124,7 @@ function migrate_commande_expedition($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_commande_livraison($db,$langs,$conf) +function migrate_commande_livraison($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_commande_livraison"); @@ -2217,7 +2217,7 @@ function migrate_commande_livraison($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_detail_livraison($db,$langs,$conf) +function migrate_detail_livraison($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_detail_livraison"); @@ -2338,7 +2338,7 @@ function migrate_detail_livraison($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_stocks($db,$langs,$conf) +function migrate_stocks($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_stocks"); @@ -2412,7 +2412,7 @@ function migrate_stocks($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_menus($db,$langs,$conf) +function migrate_menus($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_menus"); @@ -2494,7 +2494,7 @@ function migrate_menus($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_commande_deliveryaddress($db,$langs,$conf) +function migrate_commande_deliveryaddress($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_commande_deliveryaddress"); @@ -2578,7 +2578,7 @@ function migrate_commande_deliveryaddress($db,$langs,$conf) * @param Conf $conf Object conf * @return integer|null */ -function migrate_restore_missing_links($db,$langs,$conf) +function migrate_restore_missing_links($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_restore_missing_links"); @@ -2734,7 +2734,7 @@ function migrate_restore_missing_links($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_project_user_resp($db,$langs,$conf) +function migrate_project_user_resp($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_project_user_resp"); @@ -2831,7 +2831,7 @@ function migrate_project_user_resp($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_project_task_actors($db,$langs,$conf) +function migrate_project_task_actors($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_project_task_actors"); @@ -2928,7 +2928,7 @@ function migrate_project_task_actors($db,$langs,$conf) * @param string $targettype Type of element target * @return void */ -function migrate_relationship_tables($db,$langs,$conf,$table,$fk_source,$sourcetype,$fk_target,$targettype) +function migrate_relationship_tables($db, $langs, $conf, $table, $fk_source, $sourcetype, $fk_target, $targettype) { print '<tr><td colspan="4">'; @@ -3024,7 +3024,7 @@ function migrate_relationship_tables($db,$langs,$conf,$table,$fk_source,$sourcet * @param Conf $conf Object conf * @return void */ -function migrate_project_task_time($db,$langs,$conf) +function migrate_project_task_time($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_project_task_time"); @@ -3145,7 +3145,7 @@ function migrate_project_task_time($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_customerorder_shipping($db,$langs,$conf) +function migrate_customerorder_shipping($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3246,7 +3246,7 @@ function migrate_customerorder_shipping($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_shipping_delivery($db,$langs,$conf) +function migrate_shipping_delivery($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3358,7 +3358,7 @@ function migrate_shipping_delivery($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_shipping_delivery2($db,$langs,$conf) +function migrate_shipping_delivery2($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3442,7 +3442,7 @@ function migrate_shipping_delivery2($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_actioncomm_element($db,$langs,$conf) +function migrate_actioncomm_element($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3508,7 +3508,7 @@ function migrate_actioncomm_element($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_mode_reglement($db,$langs,$conf) +function migrate_mode_reglement($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3608,7 +3608,7 @@ function migrate_mode_reglement($db,$langs,$conf) * @param string $versionto Version target * @return void */ -function migrate_clean_association($db,$langs,$conf,$versionto) +function migrate_clean_association($db, $langs, $conf, $versionto) { $result = $db->DDLDescTable(MAIN_DB_PREFIX."categorie_association"); if ($result) // result defined for version 3.2 or - @@ -3695,7 +3695,7 @@ function migrate_clean_association($db,$langs,$conf,$versionto) * @param Conf $conf Object conf * @return void */ -function migrate_categorie_association($db,$langs,$conf) +function migrate_categorie_association($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3788,7 +3788,7 @@ function migrate_categorie_association($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_event_assignement($db,$langs,$conf) +function migrate_event_assignement($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3865,7 +3865,7 @@ function migrate_event_assignement($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_event_assignement_contact($db,$langs,$conf) +function migrate_event_assignement_contact($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -3943,7 +3943,7 @@ function migrate_event_assignement_contact($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_reset_blocked_log($db,$langs,$conf) +function migrate_reset_blocked_log($db, $langs, $conf) { global $user; @@ -4061,7 +4061,7 @@ function migrate_reset_blocked_log($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_remise_entity($db,$langs,$conf) +function migrate_remise_entity($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -4138,7 +4138,7 @@ function migrate_remise_entity($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_remise_except_entity($db,$langs,$conf) +function migrate_remise_except_entity($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -4250,7 +4250,7 @@ function migrate_remise_except_entity($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_user_rights_entity($db,$langs,$conf) +function migrate_user_rights_entity($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -4326,7 +4326,7 @@ function migrate_user_rights_entity($db,$langs,$conf) * @param Conf $conf Object conf * @return void */ -function migrate_usergroup_rights_entity($db,$langs,$conf) +function migrate_usergroup_rights_entity($db, $langs, $conf) { print '<tr><td colspan="4">'; @@ -4536,7 +4536,7 @@ function migrate_delete_old_dir($db, $langs, $conf) * @param int $force 1=Reload module even if not already loaded * @return void */ -function migrate_reload_modules($db, $langs, $conf, $listofmodule=array(), $force=0) +function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $force = 0) { if (count($listofmodule) == 0) return; @@ -4786,7 +4786,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule=array(), $forc * @param string $versionto Version target * @return void */ -function migrate_reload_menu($db,$langs,$conf,$versionto) +function migrate_reload_menu($db, $langs, $conf, $versionto) { global $conf; dolibarr_install_syslog("upgrade2::migrate_reload_menu"); diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 9968f4d3d38..db1f81be705 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -554,7 +554,7 @@ class Livraison extends CommonObject * @param array $array_options extrafields array * @return int <0 if KO, >0 if OK */ - function update_line($id, $array_options=0) + function update_line($id, $array_options = 0) { // phpcs:enable global $conf; @@ -716,7 +716,7 @@ class Livraison extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $save_lastsearch_value = -1) { global $langs; @@ -811,7 +811,7 @@ class Livraison extends CommonObject * @param int $mode Mode * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -824,7 +824,7 @@ class Livraison extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; @@ -1035,7 +1035,7 @@ class Livraison extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function generateDocument($modele, $outputlangs = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$user,$langs; diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 3805704fbb9..09fddcb5599 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -393,7 +393,7 @@ class Loan extends CommonObject * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - function getLibStatut($mode=0,$alreadypaid=-1) + function getLibStatut($mode = 0, $alreadypaid = -1) { return $this->LibStatut($this->paid,$mode,$alreadypaid); } @@ -407,7 +407,7 @@ class Loan extends CommonObject * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - function LibStatut($statut,$mode=0,$alreadypaid=-1) + function LibStatut($statut, $mode = 0, $alreadypaid = -1) { // phpcs:enable global $langs; @@ -460,7 +460,7 @@ class Loan extends CommonObject * @param int $maxlen Label max length * @return string Chaine with URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index 7373bfb4ab1..09adf4b3e16 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -270,7 +270,7 @@ class LoanSchedule extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - public function update($user=0, $notrigger=0) + public function update($user = 0, $notrigger = 0) { global $conf, $langs; $error=0; @@ -354,7 +354,7 @@ class LoanSchedule extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - public function delete($user, $notrigger=0) + public function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index b9cbe0d6b58..f11842bf0c1 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -273,7 +273,7 @@ class PaymentLoan extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { global $conf, $langs; $error=0; @@ -361,7 +361,7 @@ class PaymentLoan extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -546,7 +546,7 @@ class PaymentLoan extends CommonObject * @param int $maxlen Max length label * @return string Chaine with URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto = 0, $maxlen = 0) { global $langs; diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index 213febdc4b5..fadf6ecf778 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -321,7 +321,7 @@ class MailmanSpip * @param array $listes To force mailing-list (string separated with ,) * @return int <0 if KO, >=0 if OK */ - function add_to_mailman($object,$listes='') + function add_to_mailman($object, $listes = '') { // phpcs:enable global $conf,$langs,$user; @@ -395,7 +395,7 @@ class MailmanSpip * @param array $listes To force mailing-list (string separated with ,) * @return int <0 if KO, >=0 if OK */ - function del_to_mailman($object,$listes='') + function del_to_mailman($object, $listes = '') { // phpcs:enable global $conf,$langs,$user; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index e7bdbe07f67..2fd75e4f4c6 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1074,7 +1074,7 @@ if (! function_exists("llxHeader")) * @param string $replacemainareaby Replace call to main_area() by a print of this string * @return void */ - function llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='') + function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '') { global $conf; @@ -1112,7 +1112,7 @@ if (! function_exists("llxHeader")) * @param int $forcenocache Force disabling of cache for the page * @return void */ -function top_httphead($contenttype='text/html', $forcenocache=0) +function top_httphead($contenttype = 'text/html', $forcenocache = 0) { global $db, $conf, $hookmanager; @@ -1178,7 +1178,7 @@ function top_httphead($contenttype='text/html', $forcenocache=0) * @param int $disablenofollow Disable no follow tag * @return void */ -function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disablejmobile=0, $disablenofollow=0) +function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $disablejmobile = 0, $disablenofollow = 0) { global $db, $conf, $langs, $user, $hookmanager; @@ -1501,7 +1501,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs * For other external page: http://server/url * @return void */ -function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $helppagename='') +function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $helppagename = '') { global $user, $conf, $langs, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -1706,7 +1706,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a * @param string $acceptdelayedhtml 1 if caller request to have html delayed content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) * @return void */ -function left_menu($menu_array_before, $helppagename='', $notused='', $menu_array_after='', $leftmenuwithoutmainarea=0, $title='', $acceptdelayedhtml=0) +function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_array_after = '', $leftmenuwithoutmainarea = 0, $title = '', $acceptdelayedhtml = 0) { global $user, $conf, $langs, $db, $form; global $hookmanager, $menumanager; @@ -1883,7 +1883,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra * @param string $title Title * @return void */ -function main_area($title='') +function main_area($title = '') { global $conf, $langs; @@ -1904,7 +1904,7 @@ function main_area($title='') * @param Translate $langs Language * @return array Array of help urls */ -function getHelpParamFor($helppagename,$langs) +function getHelpParamFor($helppagename, $langs) { $helpbaseurl=''; $helppage=''; @@ -1957,7 +1957,7 @@ function getHelpParamFor($helppagename,$langs) * @param string $autofocus Set autofocus on field * @return string */ -function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinputname, $accesskey='', $prefhtmlinputname='',$img='', $showtitlebefore=0, $autofocus=0) +function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinputname, $accesskey = '', $prefhtmlinputname = '', $img = '', $showtitlebefore = 0, $autofocus = 0) { global $conf,$langs,$user; @@ -1994,7 +1994,7 @@ if (! function_exists("llxFooter")) * @param int $disabledoutputofmessages Clear all messages stored into session without diplaying them * @return void */ - function llxFooter($comment='',$zone='private', $disabledoutputofmessages=0) + function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = 0) { global $conf, $langs, $user, $object; global $delayedhtmlcontent; diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php index 64076e07359..9143d8bf273 100644 --- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php @@ -76,7 +76,7 @@ class ActionsMyModule * =0 if OK but we want to process standard actions too, * >0 if OK and we want to replace standard actions. */ - function getNomUrl($parameters,&$object,&$action) + function getNomUrl($parameters, &$object, &$action) { global $db,$langs,$conf,$user; $this->resprints = ''; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 6f3b76a4f1b..b1ebc9759d9 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -340,7 +340,7 @@ class MyObject extends CommonObject * @param string $filtermode Filter mode (AND or OR) * @return array|int int <0 if KO, array of pages if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter=array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { global $conf; @@ -442,7 +442,7 @@ class MyObject extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -512,7 +512,7 @@ class MyObject extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function getLibStatut($mode=0) + public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } @@ -525,7 +525,7 @@ class MyObject extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - public function LibStatut($status, $mode=0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelstatus)) diff --git a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php index 460df7e96bf..c9364284f0a 100644 --- a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php @@ -192,7 +192,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets * @param string $option Options * @return int Nb of recipients or -1 if KO */ - function getNbOfRecipients($filter=1,$option='') + function getNbOfRecipients($filter = 1, $option = '') { $a=parent::getNbOfRecipients("select count(distinct(email)) as nb from ".MAIN_DB_PREFIX."myobject as p where email IS NOT NULL AND email != ''"); diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 5781b93e94d..279411c33c2 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -309,7 +309,7 @@ class modMyModule extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - public function init($options='') + public function init($options = '') { $result=$this->_load_tables('/mymodule/sql/'); if ($result < 0) return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default') diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php index 549f0fd411a..e1a68a18acd 100644 --- a/htdocs/multicurrency/class/multicurrency.class.php +++ b/htdocs/multicurrency/class/multicurrency.class.php @@ -519,7 +519,7 @@ class MultiCurrency extends CommonObject * @return array [0] => id currency * [1] => rate */ - public static function getIdAndTxFromCode(&$db, $code, $date_document='') + public static function getIdAndTxFromCode(&$db, $code, $date_document = '') { global $conf; @@ -556,7 +556,7 @@ class MultiCurrency extends CommonObject * @param string $table facture or facture_fourn * @return double amount converted */ - public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way='dolibarr', $table='facture') + public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way = 'dolibarr', $table = 'facture') { global $db; @@ -577,7 +577,7 @@ class MultiCurrency extends CommonObject * @param string $table facture or facture_fourn * @return bool */ - public static function getInvoiceRate($fk_facture, $table='facture') + public static function getInvoiceRate($fk_facture, $table = 'facture') { global $db; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 807d550e35c..fa114b1e8ea 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -121,7 +121,7 @@ class Opensurveysondage extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create(User $user, $notrigger=0) + function create(User $user, $notrigger = 0) { $error=0; @@ -208,7 +208,7 @@ class Opensurveysondage extends CommonObject * @param string $numsurvey Ref of survey (admin or not) * @return int <0 if KO, >0 if OK */ - function fetch($id, $numsurvey='') + function fetch($id, $numsurvey = '') { $sql = "SELECT"; $sql.= " t.id_sondage,"; @@ -283,7 +283,7 @@ class Opensurveysondage extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update(User $user, $notrigger=0) + function update(User $user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -356,7 +356,7 @@ class Opensurveysondage extends CommonObject * @param string $numsondage Num sondage admin to delete * @return int <0 if KO, >0 if OK */ - function delete(User $user, $notrigger=0, $numsondage='') + function delete(User $user, $notrigger = 0, $numsondage = '') { global $conf, $langs; $error=0; @@ -424,7 +424,7 @@ class Opensurveysondage extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -637,7 +637,7 @@ class Opensurveysondage extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode) + function LibStatut($status, $mode) { // phpcs:enable global $langs, $conf; diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 3df5b37c88f..e0cce1ae150 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -69,7 +69,7 @@ function opensurvey_prepare_head(Opensurveysondage $object) * @param array $arrayofcss Array of complementary css files * @return void */ -function llxHeaderSurvey($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='') +function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') { global $conf, $mysoc; diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index 849d8a7129c..5ccc09b6bc3 100644 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -36,7 +36,7 @@ * @param string $TAG Full tag * @return int 1 if OK, -1 if ERROR */ -function print_paybox_redirect($PRICE,$CURRENCY,$EMAIL,$urlok,$urlko,$TAG) +function print_paybox_redirect($PRICE, $CURRENCY, $EMAIL, $urlok, $urlko, $TAG) { global $conf, $langs, $db; diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 37cc2fdbeba..5dcf57dca66 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -62,7 +62,7 @@ function paypaladmin_prepare_head() * @param string $ref Ref of object * @return string Url string */ -function showPaypalPaymentUrl($type,$ref) +function showPaypalPaymentUrl($type, $ref) { global $conf, $langs; @@ -88,7 +88,7 @@ function showPaypalPaymentUrl($type,$ref) * @param string $freetag Free tag * @return string Url string */ -function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_free_tag') +function getPaypalPaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_free_tag') { global $conf; @@ -194,7 +194,7 @@ function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f * @param string $tag Full tag * @return string No return (a redirect is done) if OK, or Error message if KO */ -function print_paypal_redirect($paymentAmount,$currencyCodeType,$paymentType,$returnURL,$cancelURL,$tag) +function print_paypal_redirect($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag) { //declaring of global variables global $conf, $langs; @@ -330,7 +330,7 @@ function print_paypal_redirect($paymentAmount,$currencyCodeType,$paymentType,$re * @param string $desc Description * @return array Array */ -function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag, $solutionType, $landingPage, $shipToName, $shipToStreet, $shipToCity, $shipToState, $shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum, $email='', $desc='') +function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag, $solutionType, $landingPage, $shipToName, $shipToStreet, $shipToCity, $shipToState, $shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum, $email = '', $desc = '') { //------------------------------------------------------------------------------------------------------------------------------------ // Construct the parameter string that describes the SetExpressCheckout API call in the shortcut implementation @@ -583,7 +583,7 @@ function DirectPayment($paymentType, $paymentAmount, $creditCardType, $creditCar * @param string $nvpStr is nvp string. * @return array returns an associtive array containing the response from the server. */ -function hash_call($methodName,$nvpStr) +function hash_call($methodName, $nvpStr) { //declaring of global variables global $conf, $langs; diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index cf9fcff98c8..897f9e98c6b 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -73,7 +73,7 @@ class ActionsCardProduct * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $limit, $offset, $sortfield, $sortorder; diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 7ba746af06e..fefa1f4da1f 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -48,7 +48,7 @@ class ActionsCardService * @param string $canvas Name of canvas * @param string $card Name of tab (sub-canvas) */ - function __construct($db,$targetmodule,$canvas,$card) + function __construct($db, $targetmodule, $canvas, $card) { $this->db = $db; $this->targetmodule = $targetmodule; @@ -72,7 +72,7 @@ class ActionsCardService * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $limit, $offset, $sortfield, $sortorder; diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index afacbb158b5..c0e0b485d71 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -68,7 +68,7 @@ class Products extends DolibarrApi * @throws 403 * @throws 404 */ - function get($id, $ref='', $ref_ext='', $barcode='', $includestockdata=0) + function get($id, $ref = '', $ref_ext = '', $barcode = '', $includestockdata = 0) { if (empty($id) && empty($ref) && empty($ref_ext) && empty($barcode)) { throw new RestException(400, 'bad value for parameter id, ref, ref_ext or barcode'); diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 9a22c93d042..4ddda70c7c0 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -69,7 +69,7 @@ class FormProduct * @param array $exclude warehouses ids to exclude * @return int Nb of loaded lines, 0 if already loaded, <0 if KO */ - function loadWarehouses($fk_product=0, $batch = '', $status='', $sumStock = true, $exclude='') + function loadWarehouses($fk_product = 0, $batch = '', $status = '', $sumStock = true, $exclude = '') { global $conf, $langs; @@ -173,7 +173,7 @@ class FormProduct * @param String $final_label full label with all parents, separated by ' >> ' (completed on each call) * @return String full label with all parents, separated by ' >> ' */ - private function get_parent_path($tab, $final_label='') + private function get_parent_path($tab, $final_label = '') { //phpcs:enable if(empty($final_label)) $final_label = $tab['label']; @@ -210,7 +210,7 @@ class FormProduct * @param int $showfullpath 1=Show full path of name (parent ref into label), 0=Show only ref of current warehouse * @return string HTML select */ - function selectWarehouses($selected='',$htmlname='idwarehouse',$filterstatus='',$empty=0,$disabled=0,$fk_product=0,$empty_label='', $showstock=0, $forcecombo=0, $events=array(), $morecss='minwidth200', $exclude='', $showfullpath=1) + function selectWarehouses($selected = '', $htmlname = 'idwarehouse', $filterstatus = '', $empty = 0, $disabled = 0, $fk_product = 0, $empty_label = '', $showstock = 0, $forcecombo = 0, $events = array(), $morecss = 'minwidth200', $exclude = '', $showfullpath = 1) { global $conf,$langs,$user; @@ -255,7 +255,7 @@ class FormProduct * @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @return void */ - function formSelectWarehouses($page, $selected='', $htmlname='warehouse_id', $addempty=0) + function formSelectWarehouses($page, $selected = '', $htmlname = 'warehouse_id', $addempty = 0) { global $langs; if ($htmlname != "none") { @@ -291,7 +291,7 @@ class FormProduct * @param int $adddefault Add empty unit called "Default" * @return void */ - function select_measuring_units($name='measuring_units', $measuring_style='', $default='0', $adddefault=0) + function select_measuring_units($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0) { //phpcs:enable print $this->load_measuring_units($name, $measuring_style, $default, $adddefault); @@ -308,7 +308,7 @@ class FormProduct * @param int $adddefault Add empty unit called "Default" * @return string */ - function load_measuring_units($name='measuring_units', $measuring_style='', $default='0', $adddefault=0) + function load_measuring_units($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0) { //phpcs:enable global $langs,$conf,$mysoc; @@ -358,7 +358,7 @@ class FormProduct * * @return string HTML select */ - function selectLotStock($selected='',$htmlname='batch_id',$filterstatus='',$empty=0,$disabled=0,$fk_product=0,$fk_entrepot=0,$objectLines = array(),$empty_label='', $forcecombo=0, $events=array(), $morecss='minwidth200') + function selectLotStock($selected = '', $htmlname = 'batch_id', $filterstatus = '', $empty = 0, $disabled = 0, $fk_product = 0, $fk_entrepot = 0, $objectLines = array(), $empty_label = '', $forcecombo = 0, $events = array(), $morecss = 'minwidth200') { global $langs; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e299921488b..8eae7052a74 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -423,7 +423,7 @@ class Product extends CommonObject * @param int $notrigger Disable triggers * @return int Id of product/service if OK, < 0 if KO */ - function create($user,$notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -727,7 +727,7 @@ class Product extends CommonObject * -2 ErrorBarCodeRequired * -3 ErrorBarCodeAlreadyUsed */ - function check_barcode($valuetotest,$typefortest) + function check_barcode($valuetotest, $typefortest) { // phpcs:enable global $conf; @@ -764,7 +764,7 @@ class Product extends CommonObject * @param string $action Current action for hookmanager ('add' or 'update') * @return int 1 if OK, -1 if ref already exists, -2 if other error */ - function update($id, $user, $notrigger=false, $action='update') + function update($id, $user, $notrigger = false, $action = 'update') { global $langs, $conf, $hookmanager; @@ -1056,7 +1056,7 @@ class Product extends CommonObject * @param int $notrigger Do not execute trigger * @return int < 0 if KO, 0 = Not possible, > 0 if OK */ - function delete(User $user, $notrigger=0) + function delete(User $user, $notrigger = 0) { // Deprecation warning if ($id > 0) { @@ -1466,7 +1466,7 @@ class Product extends CommonObject * @param int $level price level to change * @return int <0 if KO, >0 if OK */ - function _log_price($user,$level=0) + function _log_price($user, $level = 0) { // phpcs:enable global $conf; @@ -1536,7 +1536,7 @@ class Product extends CommonObject * @return array Array of price information * @see get_buyprice() */ - function getSellPrice($thirdparty_seller, $thirdparty_buyer, $pqp=0) + function getSellPrice($thirdparty_seller, $thirdparty_buyer, $pqp = 0) { global $conf, $db; @@ -1648,7 +1648,7 @@ class Product extends CommonObject * @return int <-1 if KO, -1 if qty not enough, 0 if OK but nothing found, id_product if OK and found. May also initialize some properties like (->ref_supplier, buyprice, fourn_pu, vatrate_supplier...) * @see getSellPrice() */ - function get_buyprice($prodfournprice, $qty, $product_id=0, $fourn_ref='', $fk_soc=0) + function get_buyprice($prodfournprice, $qty, $product_id = 0, $fourn_ref = '', $fk_soc = 0) { // phpcs:enable global $conf; @@ -1798,7 +1798,7 @@ class Product extends CommonObject * @param string $newdefaultvatcode Default vat code * @return int <0 if KO, >0 if OK */ - function updatePrice($newprice, $newpricebase, $user, $newvat='',$newminprice=0, $level=0, $newnpr=0, $newpbq=0, $ignore_autogen=0, $localtaxes_array=array(), $newdefaultvatcode='') + function updatePrice($newprice, $newpricebase, $user, $newvat = '', $newminprice = 0, $level = 0, $newnpr = 0, $newpbq = 0, $ignore_autogen = 0, $localtaxes_array = array(), $newdefaultvatcode = '') { global $conf,$langs; @@ -1980,7 +1980,7 @@ class Product extends CommonObject * @param int $ignore_expression Ignores the math expression for calculating price and uses the db value instead * @return int <0 if KO, 0 if not found, >0 if OK */ - function fetch($id='', $ref='', $ref_ext='', $barcode='', $ignore_expression=0) + function fetch($id = '', $ref = '', $ref_ext = '', $barcode = '', $ignore_expression = 0) { include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -2333,7 +2333,7 @@ class Product extends CommonObject * @param int $socid Id societe * @return array Tableau des stats */ - function load_stats_propale($socid=0) + function load_stats_propale($socid = 0) { // phpcs:enable global $conf; @@ -2380,7 +2380,7 @@ class Product extends CommonObject * @param int $socid Id thirdparty * @return array Tableau des stats */ - function load_stats_proposal_supplier($socid=0) + function load_stats_proposal_supplier($socid = 0) { // phpcs:enable global $conf; @@ -2429,7 +2429,7 @@ class Product extends CommonObject * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. * @return array Array of stats (nb=nb of order, qty=qty ordered) */ - function load_stats_commande($socid=0,$filtrestatut='', $forVirtualStock = 0) + function load_stats_commande($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable global $conf,$user; @@ -2524,7 +2524,7 @@ class Product extends CommonObject * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. * @return array Tableau des stats */ - function load_stats_commande_fournisseur($socid=0,$filtrestatut='', $forVirtualStock = 0) + function load_stats_commande_fournisseur($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable global $conf,$user; @@ -2572,7 +2572,7 @@ class Product extends CommonObject * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. * @return array Tableau des stats */ - function load_stats_sending($socid=0,$filtrestatut='', $forVirtualStock = 0) + function load_stats_sending($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable global $conf,$user; @@ -2624,7 +2624,7 @@ class Product extends CommonObject * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. * @return array Tableau des stats */ - function load_stats_reception($socid=0,$filtrestatut='', $forVirtualStock = 0) + function load_stats_reception($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable global $conf,$user; @@ -2670,7 +2670,7 @@ class Product extends CommonObject * @param int $socid Id societe * @return array Tableau des stats */ - function load_stats_contrat($socid=0) + function load_stats_contrat($socid = 0) { // phpcs:enable global $conf; @@ -2716,7 +2716,7 @@ class Product extends CommonObject * @param int $socid Id societe * @return array Tableau des stats */ - function load_stats_facture($socid=0) + function load_stats_facture($socid = 0) { // phpcs:enable global $conf; @@ -2762,7 +2762,7 @@ class Product extends CommonObject * @param int $socid Id societe * @return array Tableau des stats */ - function load_stats_facture_fournisseur($socid=0) + function load_stats_facture_fournisseur($socid = 0) { // phpcs:enable global $conf; @@ -2810,7 +2810,7 @@ class Product extends CommonObject * @param int $year Year (0=current year) * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function _get_stats($sql, $mode, $year=0) + function _get_stats($sql, $mode, $year = 0) { // phpcs:enable $resql = $this->db->query($sql); @@ -2876,7 +2876,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_vente($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_vente($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf; @@ -2921,7 +2921,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_achat($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_achat($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf; @@ -2965,7 +2965,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_propal($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_propal($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf; @@ -3009,7 +3009,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_propalsupplier($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_propalsupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf; @@ -3053,7 +3053,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_order($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_order($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf, $user; @@ -3096,7 +3096,7 @@ class Product extends CommonObject * @param string $morefilter More sql filters * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 */ - function get_nb_ordersupplier($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='') + function get_nb_ordersupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable global $conf, $user; @@ -3138,7 +3138,7 @@ class Product extends CommonObject * @param int $incdec 1=Increase/decrease stock of child when parent stock increase/decrease * @return int < 0 if KO, > 0 if OK */ - function add_sousproduit($id_pere, $id_fils, $qty, $incdec=1) + function add_sousproduit($id_pere, $id_fils, $qty, $incdec = 1) { // phpcs:enable // Clean parameters @@ -3196,7 +3196,7 @@ class Product extends CommonObject * @param int $incdec 1=Increase/decrease stock of child when parent stock increase/decrease * @return int < 0 if KO, > 0 if OK */ - function update_sousproduit($id_pere, $id_fils, $qty, $incdec=1) + function update_sousproduit($id_pere, $id_fils, $qty, $incdec = 1) { // phpcs:enable // Clean parameters @@ -3543,7 +3543,7 @@ class Product extends CommonObject * @param int $id_parent Id parent * @return void */ - function fetch_prod_arbo($prod, $compl_path="", $multiply=1, $level=1, $id_parent=0) + function fetch_prod_arbo($prod, $compl_path = "", $multiply = 1, $level = 1, $id_parent = 0) { // phpcs:enable global $conf,$langs; @@ -3600,7 +3600,7 @@ class Product extends CommonObject * @param int $multiply Because each sublevel must be multiplicated by parent nb * @return array $this->res */ - function get_arbo_each_prod($multiply=1) + function get_arbo_each_prod($multiply = 1) { // phpcs:enable $this->res = array(); @@ -3735,7 +3735,7 @@ class Product extends CommonObject * @param int $level Level of recursing call (start to 1) * @return array Return array(prodid=>array(0=prodid, 1=>qty, 2=> ...) */ - public function getChildsArbo($id, $firstlevelonly=0, $level=1) + public function getChildsArbo($id, $firstlevelonly = 0, $level = 1) { global $alreadyfound; @@ -3823,7 +3823,7 @@ class Product extends CommonObject * @param int $notooltip No tooltip * @return string String with URL */ - public function getNomUrl($withpicto=0, $option='', $maxlength=0, $save_lastsearch_value=-1, $notooltip=0) + public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs, $hookmanager; include_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; @@ -3965,7 +3965,7 @@ class Product extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$user,$langs; @@ -3994,7 +3994,7 @@ class Product extends CommonObject * @param int $type 0=Sell, 1=Buy, 2=Batch Number management * @return string Label of status */ - public function getLibStatut($mode=0, $type=0) + public function getLibStatut($mode = 0, $type = 0) { switch ($type) { @@ -4019,7 +4019,7 @@ class Product extends CommonObject * @param int $type 0=Status "to sell", 1=Status "to buy", 2=Status "to Batch" * @return string Label of status */ - function LibStatut($status,$mode=0,$type=0) + function LibStatut($status, $mode = 0, $type = 0) { // phpcs:enable global $conf, $langs; @@ -4122,7 +4122,7 @@ class Product extends CommonObject * @param int $origin_id Origin id of element * @return int <0 if KO, >0 if OK */ - function correct_stock($user, $id_entrepot, $nbpiece, $movement, $label='', $price=0, $inventorycode='', $origin_element='', $origin_id=null) + function correct_stock($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $inventorycode = '', $origin_element = '', $origin_id = null) { // phpcs:enable if ($id_entrepot) { @@ -4170,7 +4170,7 @@ class Product extends CommonObject * @param int $origin_id Origin id of element * @return int <0 if KO, >0 if OK */ - function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $label='', $price=0, $dlc='', $dluo='',$lot='', $inventorycode='', $origin_element='', $origin_id=null) + function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $dlc = '', $dluo = '', $lot = '', $inventorycode = '', $origin_element = '', $origin_id = null) { // phpcs:enable if ($id_entrepot) { @@ -4210,7 +4210,7 @@ class Product extends CommonObject * @return int < 0 if KO, > 0 if OK * @see load_virtual_stock(), loadBatchInfo() */ - function load_stock($option='') + function load_stock($option = '') { // phpcs:enable global $conf; @@ -4477,7 +4477,7 @@ class Product extends CommonObject * @param int $nbmax Nombre maximum de photos (0=pas de max) * @return array Tableau de photos */ - function liste_photos($dir,$nbmax=0) + function liste_photos($dir, $nbmax = 0) { // phpcs:enable include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -4648,7 +4648,7 @@ class Product extends CommonObject * @param string $type Barcode type (ean, isbn, ...) * @return void */ - function get_barcode($object,$type='') + function get_barcode($object, $type = '') { // phpcs:enable global $conf; @@ -4724,7 +4724,7 @@ class Product extends CommonObject * @param string $type Label type (long or short) * @return string|int <0 if ko, label if ok */ - function getLabelOfUnit($type='long') + function getLabelOfUnit($type = 'long') { global $langs; diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index d16c6ccc6ec..5dd1fbbb0d4 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -70,7 +70,7 @@ class Productbatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -201,7 +201,7 @@ class Productbatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -271,7 +271,7 @@ class Productbatch extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -420,7 +420,7 @@ class Productbatch extends CommonObject * @param string $batch_number batch number for object * @return int <0 if KO, >0 if OK */ - function find($fk_product_stock=0, $eatby='',$sellby='',$batch_number='') + function find($fk_product_stock = 0, $eatby = '', $sellby = '', $batch_number = '') { global $langs; $where = array(); @@ -480,7 +480,7 @@ class Productbatch extends CommonObject * @param int $fk_product If set to a product id, get eatby and sellby from table llx_product_lot * @return array <0 if KO, array of batch */ - public static function findAll($db, $fk_product_stock, $with_qty=0, $fk_product=0) + public static function findAll($db, $fk_product_stock, $with_qty = 0, $fk_product = 0) { global $langs; $ret = array(); diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index 3aeae37249c..f487a909b82 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -72,7 +72,7 @@ class Propalmergepdfproduct extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -228,7 +228,7 @@ class Propalmergepdfproduct extends CommonObject * @param string $lang Lang string code * @return int <0 if KO, >0 if OK */ - function fetch_by_product($product_id, $lang='') + function fetch_by_product($product_id, $lang = '') { // phpcs:enable global $langs,$conf; @@ -303,7 +303,7 @@ class Propalmergepdfproduct extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { global $conf, $langs; $error=0; @@ -379,7 +379,7 @@ class Propalmergepdfproduct extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; $error=0; @@ -440,7 +440,7 @@ class Propalmergepdfproduct extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete_by_product($user, $product_id, $lang_id='', $notrigger=0) + function delete_by_product($user, $product_id, $lang_id = '', $notrigger = 0) { // phpcs:enable global $conf, $langs; diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 6b73b413522..f02aa4a1fd1 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -75,7 +75,7 @@ class PriceExpression * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { $error=0; @@ -257,7 +257,7 @@ class PriceExpression * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { $error=0; @@ -317,7 +317,7 @@ class PriceExpression * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete(User $user, $notrigger=0) + function delete(User $user, $notrigger = 0) { $error=0; diff --git a/htdocs/product/dynamic_price/class/price_global_variable.class.php b/htdocs/product/dynamic_price/class/price_global_variable.class.php index 4cd900979ab..f93b0f3d708 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -81,7 +81,7 @@ class PriceGlobalVariable * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { $error=0; @@ -182,7 +182,7 @@ class PriceGlobalVariable * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { $error=0; @@ -242,7 +242,7 @@ class PriceGlobalVariable * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($rowid, $user, $notrigger=0) + function delete($rowid, $user, $notrigger = 0) { $error=0; diff --git a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php index c4dda3481bb..bf770ed97bf 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php @@ -93,7 +93,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { $error=0; @@ -202,7 +202,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=0, $notrigger=0) + function update($user = 0, $notrigger = 0) { $error=0; @@ -265,7 +265,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($rowid, $user, $notrigger=0) + function delete($rowid, $user, $notrigger = 0) { $error=0; @@ -569,7 +569,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update_next_update($next_update, $user=0, $notrigger=0) + function update_next_update($next_update, $user = 0, $notrigger = 0) { // phpcs:enable $error=0; @@ -615,7 +615,7 @@ class PriceGlobalVariableUpdater * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update_status($last_status, $user=0, $notrigger=0) + function update_status($last_status, $user = 0, $notrigger = 0) { // phpcs:enable $error=0; diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 076e3392bc0..691d08ec970 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -321,7 +321,7 @@ class Inventory extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -370,7 +370,7 @@ class Inventory extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -383,7 +383,7 @@ class Inventory extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/product/inventory/lib/inventory.lib.php b/htdocs/product/inventory/lib/inventory.lib.php index d6230e4f3e7..175c772cb61 100644 --- a/htdocs/product/inventory/lib/inventory.lib.php +++ b/htdocs/product/inventory/lib/inventory.lib.php @@ -64,7 +64,7 @@ function inventoryAdminPrepareHead() * * @return array Array of head */ -function inventoryPrepareHead(&$inventory, $title='Inventory', $get='') +function inventoryPrepareHead(&$inventory, $title = 'Inventory', $get = '') { global $langs; diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 9bc0fd8477f..454f7870bcf 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -252,7 +252,7 @@ class Entrepot extends CommonObject * @param int $notrigger 1=No trigger * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { $this->db->begin(); @@ -323,7 +323,7 @@ class Entrepot extends CommonObject * @param string $ref Warehouse label * @return int >0 if OK, <0 if KO */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -434,7 +434,7 @@ class Entrepot extends CommonObject * @param int $status Status * @return array Array list of warehouses */ - function list_array($status=1) + function list_array($status = 1) { // phpcs:enable $liste = array(); @@ -535,7 +535,7 @@ class Entrepot extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -548,7 +548,7 @@ class Entrepot extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -599,7 +599,7 @@ class Entrepot extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $option='',$showfullpath=0, $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $showfullpath = 0, $notooltip = 0) { global $conf, $langs; $langs->load("stocks"); @@ -747,7 +747,7 @@ class Entrepot extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function generateDocument($modele, $outputlangs = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$user,$langs; diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index e19df0aaa1a..82fc8cb7561 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -111,7 +111,7 @@ class MouvementStock extends CommonObject * @param int $id_product_batch Id product_batch (when skip_batch is false and we already know which record of product_batch to use) * @return int <0 if KO, 0 if fk_product is null, >0 if OK */ - function _create($user, $fk_product, $entrepot_id, $qty, $type, $price=0, $label='', $inventorycode='', $datem='',$eatby='',$sellby='',$batch='',$skip_batch=false, $id_product_batch=0) + function _create($user, $fk_product, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $skip_batch = false, $id_product_batch = 0) { global $conf, $langs; @@ -640,7 +640,7 @@ class MouvementStock extends CommonObject * @param string $inventorycode Inventory code * @return int <0 if KO, 0 if OK */ - function _createSubProduct($user, $idProduct, $entrepot_id, $qty, $type, $price=0, $label='', $inventorycode='') + function _createSubProduct($user, $idProduct, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '') { global $langs; @@ -712,7 +712,7 @@ class MouvementStock extends CommonObject * @param int $id_product_batch Id product_batch * @return int <0 if KO, >0 if OK */ - function livraison($user, $fk_product, $entrepot_id, $qty, $price=0, $label='', $datem='', $eatby='', $sellby='', $batch='', $id_product_batch=0) + function livraison($user, $fk_product, $entrepot_id, $qty, $price = 0, $label = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $id_product_batch = 0) { global $conf; @@ -735,7 +735,7 @@ class MouvementStock extends CommonObject * @param string $batch batch number * @return int <0 if KO, >0 if OK */ - function reception($user, $fk_product, $entrepot_id, $qty, $price=0, $label='', $eatby='', $sellby='', $batch='') + function reception($user, $fk_product, $entrepot_id, $qty, $price = 0, $label = '', $eatby = '', $sellby = '', $batch = '') { return $this->_create($user, $fk_product, $entrepot_id, $qty, 3, $price, $label, '', '', $eatby, $sellby, $batch); } @@ -994,7 +994,7 @@ class MouvementStock extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; @@ -1027,7 +1027,7 @@ class MouvementStock extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($mode); } @@ -1039,7 +1039,7 @@ class MouvementStock extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($mode=0) + function LibStatut($mode = 0) { // phpcs:enable global $langs; @@ -1076,7 +1076,7 @@ class MouvementStock extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs='',$hidedetails=0,$hidedesc=0,$hideref=0) + public function generateDocument($modele, $outputlangs = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$user,$langs; diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 60ce7bc02d2..287a8f9f1d6 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -485,7 +485,7 @@ class Productlot extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut(0,$mode); } @@ -498,7 +498,7 @@ class Productlot extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -521,7 +521,7 @@ class Productlot extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '', $save_lastsearch_value = -1) { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index c5c66ad8d50..9acf70a3bed 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -166,7 +166,7 @@ class ProductStockEntrepot extends CommonObject * @param int $fk_entrepot Id warehouse * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $fk_product=0, $fk_entrepot=0) + public function fetch($id, $fk_product = 0, $fk_entrepot = 0) { if(empty($id) && (empty($fk_product) || empty($fk_entrepot))) return -1; @@ -237,7 +237,7 @@ class ProductStockEntrepot extends CommonObject * * @return int <0 if KO, >0 if OK */ - public function fetchAll($fk_product='', $fk_entrepot='', $sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($fk_product = '', $fk_entrepot = '', $sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -478,7 +478,7 @@ class ProductStockEntrepot extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -512,7 +512,7 @@ class ProductStockEntrepot extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -525,7 +525,7 @@ class ProductStockEntrepot extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/projet/class/api_projects.class.php b/htdocs/projet/class/api_projects.class.php index a1f2ce6d26c..3afccd3c129 100644 --- a/htdocs/projet/class/api_projects.class.php +++ b/htdocs/projet/class/api_projects.class.php @@ -215,7 +215,7 @@ class Projects extends DolibarrApi * * @url GET {id}/tasks */ - function getLines($id, $includetimespent=0) + function getLines($id, $includetimespent = 0) { if(! DolibarrApiAccess::$user->rights->projet->lire) { throw new RestException(401); @@ -258,7 +258,7 @@ class Projects extends DolibarrApi * * @return int */ - function getRoles($id, $userid=0) + function getRoles($id, $userid = 0) { global $db; @@ -503,7 +503,7 @@ class Projects extends DolibarrApi * "notrigger": 0 * } */ - function validate($id, $notrigger=0) + function validate($id, $notrigger = 0) { if(! DolibarrApiAccess::$user->rights->projet->creer) { throw new RestException(401); diff --git a/htdocs/projet/class/api_tasks.class.php b/htdocs/projet/class/api_tasks.class.php index 050e7313e95..e64c9fed7a1 100644 --- a/htdocs/projet/class/api_tasks.class.php +++ b/htdocs/projet/class/api_tasks.class.php @@ -64,7 +64,7 @@ class Tasks extends DolibarrApi * * @throws RestException */ - function get($id, $includetimespent=0) + function get($id, $includetimespent = 0) { if(! DolibarrApiAccess::$user->rights->projet->lire) { throw new RestException(401); @@ -265,7 +265,7 @@ class Tasks extends DolibarrApi * * @return int */ - function getRoles($id, $userid=0) + function getRoles($id, $userid = 0) { global $db; @@ -505,7 +505,7 @@ class Tasks extends DolibarrApi * * @return array */ - function addTimeSpent($id, $date, $duration, $user_id=0, $note='') + function addTimeSpent($id, $date, $duration, $user_id = 0, $note = '') { diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 6cb54cfb572..454ccf446e0 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -170,7 +170,7 @@ class Project extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, id of created project if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -299,7 +299,7 @@ class Project extends CommonObject * @param int $notrigger 1=Disable all triggers * @return int <=0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { global $langs, $conf; @@ -431,7 +431,7 @@ class Project extends CommonObject * @param string $ref Ref of project * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $conf; @@ -515,7 +515,7 @@ class Project extends CommonObject * @param int $socid To filter on a particular third party * @return array List of projects */ - function liste_array($socid='') + function liste_array($socid = '') { // phpcs:enable global $conf; @@ -563,7 +563,7 @@ class Project extends CommonObject * @param string $projectkey Equivalent key to fk_projet for actual type * @return mixed Array list of object ids linked to project, < 0 or string if error */ - function get_element_list($type, $tablename, $datefieldname='', $dates='', $datee='', $projectkey='fk_projet') + function get_element_list($type, $tablename, $datefieldname = '', $dates = '', $datee = '', $projectkey = 'fk_projet') { // phpcs:enable $elements = array(); @@ -647,7 +647,7 @@ class Project extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, 0 if not possible, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $langs, $conf; require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; @@ -811,7 +811,7 @@ class Project extends CommonObject * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >0 if OK */ - function setValid($user, $notrigger=0) + function setValid($user, $notrigger = 0) { global $langs, $conf; @@ -937,7 +937,7 @@ class Project extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut, $mode); } @@ -950,7 +950,7 @@ class Project extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut, $mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -1013,7 +1013,7 @@ class Project extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $addlabel=0, $moreinpopup='', $sep=' - ', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user, $hookmanager; @@ -1147,7 +1147,7 @@ class Project extends CommonObject * @param string $mode Type of permission we want to know: 'read', 'write' * @return int >0 if user has permission, <0 if user has no permission */ - function restrictedProjectArea($user, $mode='read') + function restrictedProjectArea($user, $mode = 'read') { // To verify role of users $userAccess = 0; @@ -1200,7 +1200,7 @@ class Project extends CommonObject * @param string $filter additionnal filter on project (statut, ref, ...) * @return array or string Array of projects id, or string with projects id separated with "," if list is 1 */ - function getProjectsAuthorizedForUser($user, $mode=0, $list=0, $socid=0, $filter='') + function getProjectsAuthorizedForUser($user, $mode = 0, $list = 0, $socid = 0, $filter = '') { $projects = array(); $temp = array(); @@ -1300,7 +1300,7 @@ class Project extends CommonObject * @param int $newthirdpartyid New thirdparty id * @return int New id of clone */ - function createFromClone($fromid,$clone_contact=false,$clone_task=true,$clone_project_file=false,$clone_task_file=false,$clone_note=true,$move_date=true,$notrigger=0,$newthirdpartyid=0) + function createFromClone($fromid, $clone_contact = false, $clone_task = true, $clone_project_file = false, $clone_task_file = false, $clone_note = true, $move_date = true, $notrigger = 0, $newthirdpartyid = 0) { global $user,$langs,$conf; @@ -1693,7 +1693,7 @@ class Project extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$langs; @@ -1725,7 +1725,7 @@ class Project extends CommonObject * @param int $userid Time spent by a particular user * @return int <0 if OK, >0 if KO */ - public function loadTimeSpent($datestart, $taskid=0, $userid=0) + public function loadTimeSpent($datestart, $taskid = 0, $userid = 0) { $error=0; diff --git a/htdocs/projet/class/projectstats.class.php b/htdocs/projet/class/projectstats.class.php index ae30ac43dae..5f771574dc7 100644 --- a/htdocs/projet/class/projectstats.class.php +++ b/htdocs/projet/class/projectstats.class.php @@ -193,7 +193,7 @@ class ProjectStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; @@ -222,7 +222,7 @@ class ProjectStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getAmountByMonth($year, $format=0) + function getAmountByMonth($year, $format = 0) { global $user; @@ -253,7 +253,7 @@ class ProjectStats extends Stats * @param int $wonlostfilter Add a filter on status won/lost * @return array Array of values */ - function getWeightedAmountByMonthWithPrevYear($endyear,$startyear,$cachedelay=0,$wonlostfilter=1) + function getWeightedAmountByMonthWithPrevYear($endyear, $startyear, $cachedelay = 0, $wonlostfilter = 1) { global $conf,$user,$langs; @@ -346,7 +346,7 @@ class ProjectStats extends Stats * @param int $wonlostfilter Add a filter on status won/lost * @return array Array with amount by month */ - function getWeightedAmountByMonth($year, $wonlostfilter=1) + function getWeightedAmountByMonth($year, $wonlostfilter = 1) { global $user; @@ -456,7 +456,7 @@ class ProjectStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array with amount by month */ - function getTransformRateByMonth($year, $format=0) + function getTransformRateByMonth($year, $format = 0) { global $user; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 49e0c34a0dc..b7fd084e2fd 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -132,7 +132,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs; @@ -231,7 +231,7 @@ class Task extends CommonObject * @param int $loadparentdata Also load parent data * @return int <0 if KO, 0 if not found, >0 if OK */ - function fetch($id, $ref='', $loadparentdata=0) + function fetch($id, $ref = '', $loadparentdata = 0) { global $langs, $conf; @@ -333,7 +333,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <=0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs; $error=0; @@ -444,7 +444,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf, $langs; @@ -643,7 +643,7 @@ class Task extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$option='',$mode='task', $addlabel=0, $sep=' - ', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $mode = 'task', $addlabel = 0, $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $user; @@ -731,7 +731,7 @@ class Task extends CommonObject * @param string $filterontaskuser Filter on user assigned to task * @return array Array of tasks */ - function getTasksArray($usert=null, $userp=null, $projectid=0, $socid=0, $mode=0, $filteronproj='', $filteronprojstatus='-1', $morewherefilter='',$filteronprojuser=0,$filterontaskuser=0) + function getTasksArray($usert = null, $userp = null, $projectid = 0, $socid = 0, $mode = 0, $filteronproj = '', $filteronprojstatus = '-1', $morewherefilter = '', $filteronprojuser = 0, $filterontaskuser = 0) { global $conf; @@ -890,7 +890,7 @@ class Task extends CommonObject * @param integer $filteronprojstatus Filter on project status if userp is set. Not used if userp not defined. * @return array Array (projectid => 'list of roles for project' or taskid => 'list of roles for task') */ - function getUserRolesForProjectsOrTasks($userp, $usert, $projectid='', $taskid=0, $filteronprojstatus=-1) + function getUserRolesForProjectsOrTasks($userp, $usert, $projectid = '', $taskid = 0, $filteronprojstatus = -1) { $arrayroles = array(); @@ -967,7 +967,7 @@ class Task extends CommonObject * @param string $source Source * @return array Array of id of contacts */ - function getListContactId($source='internal') + function getListContactId($source = 'internal') { $contactAlreadySelected = array(); $tab = $this->liste_contact(-1,$source); @@ -991,7 +991,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <=0 if KO, >0 if OK */ - function addTimeSpent($user, $notrigger=0) + function addTimeSpent($user, $notrigger = 0) { global $conf,$langs; @@ -1096,7 +1096,7 @@ class Task extends CommonObject * @param string $morewherefilter Add more filter into where SQL request (must start with ' AND ...') * @return array Array of info for task array('min_date', 'max_date', 'total_duration', 'total_amount', 'nblines', 'nblinesnull') */ - function getSummaryOfTimeSpent($userobj=null, $morewherefilter='') + function getSummaryOfTimeSpent($userobj = null, $morewherefilter = '') { global $langs; @@ -1159,7 +1159,7 @@ class Task extends CommonObject * @param string $datee End date (ex 23:59:59) * @return array Array of info for task array('amount','nbseconds','nblinesnull') */ - function getSumOfAmount($fuser='', $dates='', $datee='') + function getSumOfAmount($fuser = '', $dates = '', $datee = '') { global $langs; @@ -1266,7 +1266,7 @@ class Task extends CommonObject * @param string $morewherefilter Add more filter into where SQL request (must start with ' AND ...') * @return int <0 if KO, array of time spent if OK */ - function fetchAllTimeSpent(User $userobj, $morewherefilter='') + function fetchAllTimeSpent(User $userobj, $morewherefilter = '') { global $langs; @@ -1356,7 +1356,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function updateTimeSpent($user, $notrigger=0) + function updateTimeSpent($user, $notrigger = 0) { global $conf,$langs; @@ -1441,7 +1441,7 @@ class Task extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function delTimeSpent($user, $notrigger=0) + function delTimeSpent($user, $notrigger = 0) { global $conf, $langs; @@ -1516,7 +1516,7 @@ class Task extends CommonObject * @param bool $clone_prog clone progress of project * @return int New id of clone */ - function createFromClone($fromid,$project_id,$parent_task_id,$clone_change_dt=false,$clone_affectation=false,$clone_time=false,$clone_file=false,$clone_note=false,$clone_prog=false) + function createFromClone($fromid, $project_id, $parent_task_id, $clone_change_dt = false, $clone_affectation = false, $clone_time = false, $clone_file = false, $clone_note = false, $clone_prog = false) { global $user,$langs,$conf; @@ -1743,7 +1743,7 @@ class Task extends CommonObject * @param integer $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->fk_statut, $mode); } @@ -1756,7 +1756,7 @@ class Task extends CommonObject * @param integer $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut, $mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable // list of Statut of the task @@ -1844,7 +1844,7 @@ class Task extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$langs; diff --git a/htdocs/projet/class/taskstats.class.php b/htdocs/projet/class/taskstats.class.php index 4164c1427b6..c71a2ea0746 100644 --- a/htdocs/projet/class/taskstats.class.php +++ b/htdocs/projet/class/taskstats.class.php @@ -166,7 +166,7 @@ class TaskStats extends Stats * @param int $format 0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month * @return array Array of values */ - function getNbByMonth($year, $format=0) + function getNbByMonth($year, $format = 0) { global $user; diff --git a/htdocs/projet/ganttchart.inc.php b/htdocs/projet/ganttchart.inc.php index dc76e098b59..c1c38e1ae66 100644 --- a/htdocs/projet/ganttchart.inc.php +++ b/htdocs/projet/ganttchart.inc.php @@ -168,7 +168,7 @@ else * @param int $project_id Id of project * @return void */ -function constructGanttLine($tarr, $task, $task_dependencies, $level=0, $project_id=null) +function constructGanttLine($tarr, $task, $task_dependencies, $level = 0, $project_id = null) { global $langs; global $dateformatinput2; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 79485ee9820..669c64877ba 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -91,7 +91,7 @@ $user->loadDefaultValues(); * @param array $arrayofcss Array of complementary css files * @return void */ -function llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='') +function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') { global $user, $conf, $langs, $mysoc; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 4cddbb1134e..8f3c45b3128 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -176,7 +176,7 @@ class Reception extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si erreur, id reception creee si ok */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $hookmanager; @@ -358,7 +358,7 @@ class Reception extends CommonObject * @param string $ref_int Internal reference of other object * @return int >0 if OK, 0 if not found, <0 if KO */ - function fetch($id, $ref='', $ref_ext='', $ref_int='') + function fetch($id, $ref = '', $ref_ext = '', $ref_int = '') { global $conf; @@ -488,7 +488,7 @@ class Reception extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if OK, >0 if KO */ - function valid($user, $notrigger=0) + function valid($user, $notrigger = 0) { global $conf, $langs; @@ -712,7 +712,7 @@ class Reception extends CommonObject * @param string $batch Lot number * @return int <0 if KO, >0 if OK */ - function addline($entrepot_id, $id, $qty, $array_options=0, $comment='', $eatby='', $sellby='', $batch='') + function addline($entrepot_id, $id, $qty, $array_options = 0, $comment = '', $eatby = '', $sellby = '', $batch = '') { global $conf, $langs, $user; @@ -763,7 +763,7 @@ class Reception extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf; $error=0; @@ -1082,7 +1082,7 @@ class Reception extends CommonObject * @param int $notooltip 1=No tooltip * @return string String with URL */ - function getNomUrl($withpicto=0,$option=0,$max=0,$short=0,$notooltip=0) + function getNomUrl($withpicto = 0, $option = 0, $max = 0, $short = 0, $notooltip = 0) { global $langs; $result=''; @@ -1123,7 +1123,7 @@ class Reception extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -1136,7 +1136,7 @@ class Reception extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - function LibStatut($statut,$mode) + function LibStatut($statut, $mode) { // phpcs:enable global $langs; @@ -1322,7 +1322,7 @@ class Reception extends CommonObject * @param int $id only this carrier, all if none * @return void */ - function list_delivery_methods($id='') + function list_delivery_methods($id = '') { // phpcs:enable global $langs; @@ -1359,7 +1359,7 @@ class Reception extends CommonObject * * @return void */ - function update_delivery_method($id='') + function update_delivery_method($id = '') { // phpcs:enable if ($id=='') @@ -1422,7 +1422,7 @@ class Reception extends CommonObject * @param string $value Value * @return void */ - function getUrlTrackingStatus($value='') + function getUrlTrackingStatus($value = '') { if (! empty($this->shipping_method_id)) { @@ -1935,7 +1935,7 @@ class Reception extends CommonObject * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs,$hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { global $conf,$langs; diff --git a/htdocs/reception/class/receptionstats.class.php b/htdocs/reception/class/receptionstats.class.php index 3f60a9846fb..9a25d5944d1 100644 --- a/htdocs/reception/class/receptionstats.class.php +++ b/htdocs/reception/class/receptionstats.class.php @@ -52,7 +52,7 @@ class ReceptionStats extends Stats * @param string $mode Option (not used) * @param int $userid Id user for filter (creation user) */ - function __construct($db, $socid, $mode, $userid=0) + function __construct($db, $socid, $mode, $userid = 0) { global $user, $conf; diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index ec184cd856d..6cc403b9ade 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -77,7 +77,7 @@ class Dolresource extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf, $langs, $hookmanager; $error=0; @@ -181,7 +181,7 @@ class Dolresource extends CommonObject * @param string $ref Ref of object * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref = '') { global $langs; $sql = "SELECT"; @@ -242,7 +242,7 @@ class Dolresource extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user = null, $notrigger = 0) { global $conf, $langs, $hookmanager; $error=0; @@ -405,7 +405,7 @@ class Dolresource extends CommonObject * @param int $notrigger Disable all triggers * @return int >0 if OK, <0 if KO */ - function delete($rowid, $notrigger=0) + function delete($rowid, $notrigger = 0) { global $user,$langs,$conf; @@ -495,7 +495,7 @@ class Dolresource extends CommonObject * @param array $filter filter output * @return int <0 if KO, >0 if OK */ - function fetch_all($sortorder, $sortfield, $limit, $offset, $filter='') + function fetch_all($sortorder, $sortfield, $limit, $offset, $filter = '') { // phpcs:enable global $conf; @@ -592,7 +592,7 @@ class Dolresource extends CommonObject * @param array $filter filter output * @return int <0 if KO, >0 if OK */ - function fetch_all_resources($sortorder, $sortfield, $limit, $offset, $filter='') + function fetch_all_resources($sortorder, $sortfield, $limit, $offset, $filter = '') { // phpcs:enable global $conf; @@ -670,7 +670,7 @@ class Dolresource extends CommonObject * @param array $filter filter output * @return int <0 if KO, >0 if OK */ - function fetch_all_used($sortorder, $sortfield, $limit, $offset=1, $filter='') + function fetch_all_used($sortorder, $sortfield, $limit, $offset = 1, $filter = '') { // phpcs:enable global $conf; @@ -769,7 +769,7 @@ class Dolresource extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update_element_resource($user=null, $notrigger=0) + function update_element_resource($user = null, $notrigger = 0) { // phpcs:enable global $conf, $langs; @@ -839,7 +839,7 @@ class Dolresource extends CommonObject * @param string $resource_type Type * @return array Aray of resources */ - function getElementResources($element,$element_id,$resource_type='') + function getElementResources($element, $element_id, $resource_type = '') { // Links beetween objects are stored in this table $sql = 'SELECT rowid, resource_id, resource_type, busy, mandatory'; @@ -878,7 +878,7 @@ class Dolresource extends CommonObject * * @return int */ - function fetchElementResources($element,$element_id) + function fetchElementResources($element, $element_id) { $resources = $this->getElementResources($element,$element_id); $i=0; @@ -941,7 +941,7 @@ class Dolresource extends CommonObject * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0,$option='', $get_params='', $notooltip=0) + function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0) { global $langs; @@ -973,7 +973,7 @@ class Dolresource extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -986,7 +986,7 @@ class Dolresource extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index c118643aa7d..6d641aedce7 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -75,7 +75,7 @@ class FormResource * @param int $limit Limit number of answers * @return string HTML string with */ - function select_resource_list($selected='',$htmlname='fk_resource',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $event=array(), $filterkey='', $outputmode=0, $limit=20) + function select_resource_list($selected = '', $htmlname = 'fk_resource', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $event = array(), $filterkey = '', $outputmode = 0, $limit = 20) { // phpcs:enable global $conf,$user,$langs; @@ -168,7 +168,7 @@ class FormResource * @param int $maxlength Max length of label * @return void */ - function select_types_resource($selected='',$htmlname='type_resource',$filtertype='',$format=0, $empty=0, $noadmininfo=0,$maxlength=0) + function select_types_resource($selected = '', $htmlname = 'type_resource', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0) { // phpcs:enable global $langs,$user; diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index ffcd7c7a00f..3b2fd88c6c6 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -61,7 +61,7 @@ abstract class ActionsCardCommon * @param ref $ref Object ref * @return object Object loaded */ - protected function getObject($id,$ref='') + protected function getObject($id, $ref = '') { //$ret = $this->getInstanceDao(); @@ -79,7 +79,7 @@ abstract class ActionsCardCommon * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $conf, $langs, $user, $mysoc, $canvas; diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index c8b1a296e24..5184fa36264 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -76,7 +76,7 @@ class ActionsCardCompany extends ActionsCardCommon * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $conf, $langs, $user, $mysoc; @@ -215,7 +215,7 @@ class ActionsCardCompany extends ActionsCardCommon * @param string $dbt_select Field name for select if not rowid. (optional) * @return int 1 */ - function restrictedArea($user, $features='societe', $objectid=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') + function restrictedArea($user, $features = 'societe', $objectid = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid') { return restrictedArea($user,$features,$objectid,$dbtablename,$feature2,$dbt_keyfield,$dbt_select); } diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index 6107d8ac8b1..842cc096a71 100644 --- a/htdocs/societe/canvas/individual/actions_card_individual.class.php +++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php @@ -93,7 +93,7 @@ class ActionsCardIndividual extends ActionsCardCommon * @param string $ref Ref of object * @return void */ - function assign_values(&$action, $id=0, $ref='') + function assign_values(&$action, $id = 0, $ref = '') { // phpcs:enable global $conf, $langs; @@ -132,7 +132,7 @@ class ActionsCardIndividual extends ActionsCardCommon * @param string $dbt_select Field name for select if not rowid. (optional) * @return int 1 */ - function restrictedArea($user, $features='societe', $objectid=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') + function restrictedArea($user, $features = 'societe', $objectid = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid') { return restrictedArea($user,$features,$objectid,$dbtablename,$feature2,$dbt_keyfield,$dbt_select); } diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index b381e7cf8a2..90ec5911dd0 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -85,7 +85,7 @@ class Address * @param User $user Object user making creation * @return int 0 if OK, < 0 if KO */ - function create($socid, $user='') + function create($socid, $user = '') { global $langs,$conf; @@ -175,7 +175,7 @@ class Address * @param User $user Utilisateur qui demande la mise a jour * @return int <0 if KO, >=0 if OK */ - function update($id, $socid, $user='') + function update($id, $socid, $user = '') { global $langs; @@ -251,7 +251,7 @@ class Address * @param User $user Objet de l'utilisateur * @return int >0 si ok, <0 si ko */ - function fetch_lines($socid, $user=null) + function fetch_lines($socid, $user = null) { // phpcs:enable global $langs, $conf; @@ -346,7 +346,7 @@ class Address * @param User $user Objet de l'utilisateur * @return int >0 si ok, <0 si ko */ - function fetch_address($id, $user=null) + function fetch_address($id, $user = null) { // phpcs:enable global $langs; @@ -415,7 +415,7 @@ class Address * @param int $socid id third party * @return <0 KO >0 OK */ - function delete($id,$socid) + function delete($id, $socid) { dol_syslog("Address::Delete"); @@ -440,7 +440,7 @@ class Address * @param string $option Where the link point to * @return string String with URL */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto = 0, $option = '') { global $langs; diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 50d9710be40..08d61651e68 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -117,7 +117,7 @@ class Thirdparties extends DolibarrApi * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.nom:like:'TheCompany%') and (t.date_creation:<:'20160101')" * @return array Array of thirdparty objects */ - function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $mode=0, $sqlfilters = '') + function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $mode = 0, $sqlfilters = '') { global $db, $conf; @@ -739,7 +739,7 @@ class Thirdparties extends DolibarrApi * @throws 401 * @throws 404 */ - function getOutStandingProposals($id, $mode='customer') + function getOutStandingProposals($id, $mode = 'customer') { $obj_ret = array(); @@ -783,7 +783,7 @@ class Thirdparties extends DolibarrApi * @throws 401 * @throws 404 */ - function getOutStandingOrder($id, $mode='customer') + function getOutStandingOrder($id, $mode = 'customer') { $obj_ret = array(); @@ -826,7 +826,7 @@ class Thirdparties extends DolibarrApi * @throws 401 * @throws 404 */ - function getOutStandingInvoices($id, $mode='customer') + function getOutStandingInvoices($id, $mode = 'customer') { $obj_ret = array(); @@ -872,7 +872,7 @@ class Thirdparties extends DolibarrApi * @throws 404 * @throws 503 */ - function getFixedAmountDiscounts($id, $filter="none", $sortfield = "f.type", $sortorder = 'ASC') + function getFixedAmountDiscounts($id, $filter = "none", $sortfield = "f.type", $sortorder = 'ASC') { $obj_ret = array(); @@ -1281,7 +1281,7 @@ class Thirdparties extends DolibarrApi * * @url GET {id}/gateways/ */ - function getSocieteAccounts($id, $site=null) + function getSocieteAccounts($id, $site = null) { global $db, $conf; diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php index 39a90c43eb9..fb1110e52ac 100644 --- a/htdocs/societe/class/client.class.php +++ b/htdocs/societe/class/client.class.php @@ -98,7 +98,7 @@ class Client extends Societe * @param int $active 1=Active only, 0=Not active only, -1=All * @return int <0 if KO, >0 if OK */ - function loadCacheOfProspStatus($active=1) + function loadCacheOfProspStatus($active = 1) { global $langs; diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 2891724ac7e..bd41e5edad7 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -67,7 +67,7 @@ class CompanyBankAccount extends Account * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >= 0 if OK */ - function create(User $user = null, $notrigger=0) + function create(User $user = null, $notrigger = 0) { $now = dol_now(); $error = 0; @@ -201,7 +201,7 @@ class CompanyBankAccount extends Account * @param int $type If id of company filled, we say if we want record of this type only * @return int <0 if KO, >0 if OK */ - function fetch($id, $socid=0, $default=1, $type='ban') + function fetch($id, $socid = 0, $default = 1, $type = 'ban') { if (empty($id) && empty($socid)) return -1; @@ -263,7 +263,7 @@ class CompanyBankAccount extends Account * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >0 if OK */ - function delete(User $user = null, $notrigger=0) + function delete(User $user = null, $notrigger = 0) { global $conf; @@ -333,7 +333,7 @@ class CompanyBankAccount extends Account * @param int $rib RIB id * @return int 0 if KO, 1 if OK */ - function setAsDefault($rib=0) + function setAsDefault($rib = 0) { $sql1 = "SELECT rowid as id, fk_soc FROM ".MAIN_DB_PREFIX."societe_rib"; $sql1.= " WHERE rowid = ".($rib?$rib:$this->id); diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 3594773e7f8..9b41d666cdf 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -349,7 +349,7 @@ class CompanyPaymentMode extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -407,7 +407,7 @@ class CompanyPaymentMode extends CommonObject * @param string $alltypes 1=The default is for all payment types instead of per type * @return int 0 if KO, 1 if OK */ - function setAsDefault($id=0, $alltypes=0) + function setAsDefault($id = 0, $alltypes = 0) { $sql1 = "SELECT rowid as id, fk_soc, type FROM ".MAIN_DB_PREFIX."societe_rib"; $sql1.= " WHERE rowid = ".($id?$id:$this->id); @@ -467,7 +467,7 @@ class CompanyPaymentMode extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -480,7 +480,7 @@ class CompanyPaymentMode extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 1e152331aff..0c68562cb75 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -812,7 +812,7 @@ class Societe extends CommonObject * @param int $nosyncmember Do not synchronize info of linked member * @return int <0 if KO, >=0 if OK */ - function update($id, $user='', $call_trigger=1, $allowmodcodeclient=0, $allowmodcodefournisseur=0, $action='update', $nosyncmember=1) + function update($id, $user = '', $call_trigger = 1, $allowmodcodeclient = 0, $allowmodcodefournisseur = 0, $action = 'update', $nosyncmember = 1) { global $langs,$conf,$hookmanager; @@ -1224,7 +1224,7 @@ class Societe extends CommonObject * @param string $ref_alias Name_alias of third party (Warning, this can return several records) * @return int >0 if OK, <0 if KO or if two records found for same ref or idprof, 0 if not found. */ - function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $idprof1='',$idprof2='',$idprof3='',$idprof4='',$idprof5='',$idprof6='', $email='', $ref_alias='') + function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '', $idprof1 = '', $idprof2 = '', $idprof3 = '', $idprof4 = '', $idprof5 = '', $idprof6 = '', $email = '', $ref_alias = '') { global $langs; global $conf; @@ -1449,7 +1449,7 @@ class Societe extends CommonObject * @param int $call_trigger 0=No, 1=yes * @return int <0 if KO, 0 if nothing done, >0 if OK */ - function delete($id, User $fuser=null, $call_trigger=1) + function delete($id, User $fuser = null, $call_trigger = 1) { global $langs, $conf, $user; @@ -1745,7 +1745,7 @@ class Societe extends CommonObject * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return int <0 if KO, id of discount record if OK */ - function set_remise_except($remise, User $user, $desc, $tva_tx=0, $discount_type=0) + function set_remise_except($remise, User $user, $desc, $tva_tx = 0, $discount_type = 0) { // phpcs:enable global $langs; @@ -1805,7 +1805,7 @@ class Societe extends CommonObject * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return int <0 if KO, Credit note amount otherwise */ - function getAvailableDiscounts($user='',$filter='',$maxvalue=0,$discount_type=0) + function getAvailableDiscounts($user = '', $filter = '', $maxvalue = 0, $discount_type = 0) { require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; @@ -1829,7 +1829,7 @@ class Societe extends CommonObject * @param int $mode 0=Array with properties, 1=Array of id. * @return array Array of sales representatives of third party */ - function getSalesRepresentatives(User $user, $mode=0) + function getSalesRepresentatives(User $user, $mode = 0) { global $conf; @@ -2000,7 +2000,7 @@ class Societe extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $maxlen=0, $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $notooltip = 0, $save_lastsearch_value = -1) { global $conf, $langs, $hookmanager; @@ -2195,7 +2195,7 @@ class Societe extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -2208,7 +2208,7 @@ class Societe extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Libelle du statut */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -2258,7 +2258,7 @@ class Societe extends CommonObject * @param int $addthirdparty 1=Add also a record for thirdparty email * @return array Array of contacts emails */ - function thirdparty_and_contact_email_array($addthirdparty=0) + function thirdparty_and_contact_email_array($addthirdparty = 0) { // phpcs:enable global $langs; @@ -2303,7 +2303,7 @@ class Societe extends CommonObject * @param int $hidedisabled 1=Hide contact if disabled * @return array Array of contacts emails or mobile. Example: array(id=>'Name <email>') */ - function contact_property_array($mode='email', $hidedisabled=0) + function contact_property_array($mode = 'email', $hidedisabled = 0) { // phpcs:enable global $langs; @@ -2444,7 +2444,7 @@ class Societe extends CommonObject * @param string $mode 'email' or 'mobile' * @return string Email of contact with format: "Full name <email>" */ - function contact_get_property($rowid,$mode) + function contact_get_property($rowid, $mode) { // phpcs:enable $contact_property=''; @@ -2483,7 +2483,7 @@ class Societe extends CommonObject * @param string $mode 'label' or 'rum' or 'format' * @return string Bank number */ - function display_rib($mode='label') + function display_rib($mode = 'label') { // phpcs:enable require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php'; @@ -2553,7 +2553,7 @@ class Societe extends CommonObject * @param int $type Should be 0 to say customer * @return void */ - function get_codeclient($objsoc=0,$type=0) + function get_codeclient($objsoc = 0, $type = 0) { // phpcs:enable global $conf; @@ -2585,7 +2585,7 @@ class Societe extends CommonObject * @param int $type Should be 1 to say supplier * @return void */ - function get_codefournisseur($objsoc=0,$type=1) + function get_codefournisseur($objsoc = 0, $type = 1) { // phpcs:enable global $conf; @@ -2884,7 +2884,7 @@ class Societe extends CommonObject * @param int $socid Id of thirdparty to exclude (if update) * @return boolean True if exists, False if not */ - function id_prof_exists($idprof, $value, $socid=0) + function id_prof_exists($idprof, $value, $socid = 0) { // phpcs:enable $field = $idprof; @@ -2944,7 +2944,7 @@ class Societe extends CommonObject * @return int <=0 if KO, >0 if OK * TODO better to have this in a lib than into a business class */ - function id_prof_check($idprof,$soc) + function id_prof_check($idprof, $soc) { // phpcs:enable global $conf; @@ -3095,7 +3095,7 @@ class Societe extends CommonObject * @return string Url or empty string if no URL known * TODO better in a lib than into business class */ - function id_prof_url($idprof,$thirdparty) + function id_prof_url($idprof, $thirdparty) { // phpcs:enable global $conf,$langs,$hookmanager; @@ -3310,7 +3310,7 @@ class Societe extends CommonObject * @param string $customercode Customer code * @return int <0 if KO, id of created account if OK */ - function create_from_member(Adherent $member, $socname='', $socalias='', $customercode='') + function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '') { // phpcs:enable global $user,$langs; @@ -3508,7 +3508,7 @@ class Societe extends CommonObject * @param int $localTaxNum To get info for only localtax1 or localtax2 * @return boolean true or false */ - function useLocalTax($localTaxNum=0) + function useLocalTax($localTaxNum = 0) { $sql = "SELECT t.localtax1, t.localtax2"; $sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c"; @@ -3627,7 +3627,7 @@ class Societe extends CommonObject * @param string $label Label to use for status for added status * @return string Libelle */ - function getLibProspCommStatut($mode=0, $label='') + function getLibProspCommStatut($mode = 0, $label = '') { return $this->LibProspCommStatut($this->stcomm_id, $mode, $label); } @@ -3641,7 +3641,7 @@ class Societe extends CommonObject * @param string $label Label to use for status for added status * @return string Libelle du statut */ - function LibProspCommStatut($statut, $mode=0, $label='') + function LibProspCommStatut($statut, $mode = 0, $label = '') { // phpcs:enable global $langs; @@ -3707,7 +3707,7 @@ class Societe extends CommonObject * @param string $mode 'customer' or 'supplier' * @return array array('opened'=>Amount, 'total'=>Total amount) */ - function getOutstandingProposals($mode='customer') + function getOutstandingProposals($mode = 'customer') { $table='propal'; if ($mode == 'supplier') $table = 'supplier_proposal'; @@ -3747,7 +3747,7 @@ class Societe extends CommonObject * @param string $mode 'customer' or 'supplier' * @return array array('opened'=>Amount, 'total'=>Total amount) */ - function getOutstandingOrders($mode='customer') + function getOutstandingOrders($mode = 'customer') { $table='commande'; if ($mode == 'supplier') $table = 'commande_fournisseur'; @@ -3787,7 +3787,7 @@ class Societe extends CommonObject * @param string $mode 'customer' or 'supplier' * @return array array('opened'=>Amount, 'total'=>Total amount) */ - function getOutstandingBills($mode='customer') + function getOutstandingBills($mode = 'customer') { $table='facture'; if ($mode == 'supplier') $table = 'facture_fourn'; @@ -3942,7 +3942,7 @@ class Societe extends CommonObject * @param null|array $moreparams Array to provide more information * @return int <0 if KO, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$user,$langs; diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 153959938e5..a1a713d334c 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -288,7 +288,7 @@ class SocieteAccount extends CommonObject * @param int $status Status (0=test, 1=live) * @return string Stripe customer ref 'cu_xxxxxxxxxxxxx' or '' */ - public function getCustomerAccount($id, $site, $status=0) + public function getCustomerAccount($id, $site, $status = 0) { $sql = "SELECT sa.key_account as key_account, sa.entity"; $sql.= " FROM " . MAIN_DB_PREFIX . "societe_account as sa"; @@ -348,7 +348,7 @@ class SocieteAccount extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -407,7 +407,7 @@ class SocieteAccount extends CommonObject * @param int $withpicto Add download picto into link * @return string HTML link to file */ - function getDirectExternalLink($withpicto=0) + function getDirectExternalLink($withpicto = 0) { return 'todo'; } @@ -418,7 +418,7 @@ class SocieteAccount extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -431,7 +431,7 @@ class SocieteAccount extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ - static function LibStatut($status,$mode=0) + static function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index d8e7168e5c0..55d989a7075 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -80,7 +80,7 @@ class Stripe extends CommonObject * @param string $mode 'StripeTest' or 'StripeLive' * @return string Stripe account 'acc_....' or '' if no OAuth token found */ - public function getStripeAccount($mode='StripeTest') + public function getStripeAccount($mode = 'StripeTest') { global $conf; @@ -120,7 +120,7 @@ class Stripe extends CommonObject * @param int $status Status * @return string Stripe customer ref 'cu_xxxxxxxxxxxxx' or '' */ - public function getStripeCustomerAccount($id, $status=0) + public function getStripeCustomerAccount($id, $status = 0) { include_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; $societeaccount = new SocieteAccount($this->db); @@ -137,7 +137,7 @@ class Stripe extends CommonObject * @param int $createifnotlinkedtostripe 1=Create the stripe customer and the link if the thirdparty is not yet linked to a stripe customer * @return \Stripe\StripeCustomer|null Stripe Customer or null if not found */ - public function customerStripe(Societe $object, $key='', $status=0, $createifnotlinkedtostripe=0) + public function customerStripe(Societe $object, $key = '', $status = 0, $createifnotlinkedtostripe = 0) { global $conf, $user; @@ -248,7 +248,7 @@ class Stripe extends CommonObject * @param int $createifnotlinkedtostripe 1=Create the stripe card and the link if the card is not yet linked to a stripe card * @return \Stripe\StripeCard|null Stripe Card or null if not found */ - public function cardStripe($cu, CompanyPaymentMode $object, $stripeacc='', $status=0, $createifnotlinkedtostripe=0) + public function cardStripe($cu, CompanyPaymentMode $object, $stripeacc = '', $status = 0, $createifnotlinkedtostripe = 0) { global $conf, $user; @@ -358,7 +358,7 @@ class Stripe extends CommonObject * @param boolean $capture Set capture flag to true (take payment) or false (wait) * @return Stripe */ - public function createPaymentStripe($amount, $currency, $origin, $item, $source, $customer, $account, $status=0, $usethirdpartyemailforreceiptemail=0, $capture=true) + public function createPaymentStripe($amount, $currency, $origin, $item, $source, $customer, $account, $status = 0, $usethirdpartyemailforreceiptemail = 0, $capture = true) { global $conf; diff --git a/htdocs/stripe/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php index fbafd47c3ab..bafa83c21cf 100644 --- a/htdocs/stripe/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -60,7 +60,7 @@ function stripeadmin_prepare_head() * @param string $ref Ref of object * @return string Url string */ -function showStripePaymentUrl($type,$ref) +function showStripePaymentUrl($type, $ref) { global $conf, $langs; @@ -87,7 +87,7 @@ function showStripePaymentUrl($type,$ref) * @param string $freetag Free tag * @return string Url string */ -function getStripePaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_free_tag') +function getStripePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_free_tag') { global $conf; @@ -140,7 +140,7 @@ function getStripePaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f * @param Translate $langs Output language * @return void */ -function html_print_stripe_footer($fromcompany,$langs) +function html_print_stripe_footer($fromcompany, $langs) { global $conf; diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index a32b973d00a..4582d2582b0 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -211,7 +211,7 @@ class SupplierProposal extends CommonObject * @param int $socid Id third party * @param int $supplier_proposalid Id supplier_proposal */ - function __construct($db, $socid="", $supplier_proposalid=0) + function __construct($db, $socid = "", $supplier_proposalid = 0) { global $conf,$langs; @@ -237,7 +237,7 @@ class SupplierProposal extends CommonObject * TODO Remplacer les appels a cette fonction par generation objet Ligne * insere dans tableau $this->products */ - function add_product($idproduct, $qty, $remise_percent=0) + function add_product($idproduct, $qty, $remise_percent = 0) { // phpcs:enable global $conf, $mysoc; @@ -394,7 +394,7 @@ class SupplierProposal extends CommonObject * * @see add_product */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$array_option=0, $ref_supplier='', $fk_unit='', $origin='', $origin_id=0, $pu_ht_devise=0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $pu_ttc = 0, $info_bits = 0, $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $array_option = 0, $ref_supplier = '', $fk_unit = '', $origin = '', $origin_id = 0, $pu_ht_devise = 0) { global $mysoc, $conf; @@ -656,7 +656,7 @@ class SupplierProposal extends CommonObject * @param int $fk_unit Id of the unit to use. * @return int 0 if OK, <0 if KO */ - function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $array_option=0, $ref_supplier='', $fk_unit='') + function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $array_option = 0, $ref_supplier = '', $fk_unit = '') { global $conf,$user,$langs, $mysoc; @@ -841,7 +841,7 @@ class SupplierProposal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >=0 if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $langs, $conf, $mysoc, $hookmanager; $error=0; @@ -1119,7 +1119,7 @@ class SupplierProposal extends CommonObject * @param int $socid Id of thirdparty * @return int New id of clone */ - function createFromClone($socid=0) + function createFromClone($socid = 0) { global $user,$langs,$conf,$hookmanager; @@ -1214,7 +1214,7 @@ class SupplierProposal extends CommonObject * @param string $ref Ref of proposal * @return int >0 if OK, <0 if KO */ - function fetch($rowid,$ref='') + function fetch($rowid, $ref = '') { global $conf; @@ -1424,7 +1424,7 @@ class SupplierProposal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >=0 if OK */ - function valid($user, $notrigger=0) + function valid($user, $notrigger = 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1643,7 +1643,7 @@ class SupplierProposal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function reopen($user, $statut, $note='', $notrigger=0) + function reopen($user, $statut, $note = '', $notrigger = 0) { global $langs,$conf; @@ -1912,7 +1912,7 @@ class SupplierProposal extends CommonObject * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ - function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datec', $sortorder='DESC') + function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datec', $sortorder = 'DESC') { // phpcs:enable global $conf,$user; @@ -1983,7 +1983,7 @@ class SupplierProposal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int 1 if ok, otherwise if error */ - function delete($user, $notrigger=0) + function delete($user, $notrigger = 0) { global $conf,$langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2156,7 +2156,7 @@ class SupplierProposal extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -2169,7 +2169,7 @@ class SupplierProposal extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - function LibStatut($statut,$mode=1) + function LibStatut($statut, $mode = 1) { // phpcs:enable // Init/load array of translation of status @@ -2214,7 +2214,7 @@ class SupplierProposal extends CommonObject * @param int $mode "opened" for askprice to close, "signed" for proposal to invoice * @return int <0 if KO, >0 if OK */ - function load_board($user,$mode) + function load_board($user, $mode) { // phpcs:enable global $conf, $user, $langs; @@ -2480,7 +2480,7 @@ class SupplierProposal extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $get_params='', $notooltip=0, $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1) { global $langs, $conf, $user; @@ -2638,7 +2638,7 @@ class SupplierProposal extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $langs; @@ -2941,7 +2941,7 @@ class SupplierProposalLine extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - function insert($notrigger=0) + function insert($notrigger = 0) { global $conf,$langs,$user; @@ -3126,7 +3126,7 @@ class SupplierProposalLine extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function update($notrigger=0) + function update($notrigger = 0) { global $conf,$langs,$user; diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index c1cf83097b6..9b975db5dc3 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -201,7 +201,7 @@ function conf($dolibarr_main_document_root) * @param string $action Action code * @return void */ -function pHeader($soutitre,$next,$action='none') +function pHeader($soutitre, $next, $action = 'none') { global $conf; global $langs; @@ -241,7 +241,7 @@ function pHeader($soutitre,$next,$action='none') * @param string $setuplang Language code * @return void */ -function pFooter($nonext=0,$setuplang='') +function pFooter($nonext = 0, $setuplang = '') { global $langs; $langs->load("main"); diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index e67cd7a313c..b4a106d48e5 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -109,7 +109,7 @@ class ActionsTicket * @param Ticket $object Object Ticket * @return int 0 */ - public function doActions(&$action = '', Ticket $object=null) + public function doActions(&$action = '', Ticket $object = null) { global $conf, $user, $langs, $mysoc; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 43002f30f99..28ba0ce4938 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1329,7 +1329,7 @@ class Ticket extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $db, $conf, $langs; global $dolibarr_main_authentication, $dolibarr_main_demo; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 2c189ad07d1..8a7c778ad0e 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -219,7 +219,7 @@ class User extends CommonObject * @param int $entity If a value is >= 0, we force the search on a specific entity. If -1, means search depens on default setup. * @return int <0 if KO, 0 not found, >0 if OK */ - function fetch($id='', $login='', $sid='', $loadpersonalconf=0, $entity=-1) + function fetch($id = '', $login = '', $sid = '', $loadpersonalconf = 0, $entity = -1) { global $conf, $user; @@ -501,7 +501,7 @@ class User extends CommonObject * @return int > 0 if OK, < 0 if KO * @see clearrights, delrights, getrights */ - function addrights($rid, $allmodule='', $allperms='', $entity=0, $notrigger=0) + function addrights($rid, $allmodule = '', $allperms = '', $entity = 0, $notrigger = 0) { global $conf, $user, $langs; @@ -627,7 +627,7 @@ class User extends CommonObject * @return int > 0 if OK, < 0 if OK * @see clearrights, addrights, getrights */ - function delrights($rid, $allmodule='', $allperms='', $entity=0, $notrigger=0) + function delrights($rid, $allmodule = '', $allperms = '', $entity = 0, $notrigger = 0) { global $conf, $user, $langs; @@ -762,7 +762,7 @@ class User extends CommonObject * @return void * @see clearrights, delrights, addrights */ - function getrights($moduletag='', $forcereload=0) + function getrights($moduletag = '', $forcereload = 0) { global $conf; @@ -1102,7 +1102,7 @@ class User extends CommonObject * @param int $notrigger 1=do not execute triggers, 0 otherwise * @return int <0 if KO, id of created user if OK */ - function create($user, $notrigger=0) + function create($user, $notrigger = 0) { global $conf,$langs; global $mysoc; @@ -1236,7 +1236,7 @@ class User extends CommonObject * @param string $password Password to force * @return int <0 if error, if OK returns id of created user */ - function create_from_contact($contact,$login='',$password='') + function create_from_contact($contact, $login = '', $password = '') { // phpcs:enable global $conf,$user,$langs; @@ -1316,7 +1316,7 @@ class User extends CommonObject * @param string $login Login to force * @return int <0 if KO, if OK, return id of created account */ - function create_from_member($member,$login='') + function create_from_member($member, $login = '') { // phpcs:enable global $conf,$user,$langs; @@ -1438,7 +1438,7 @@ class User extends CommonObject * @param int $nosynccontact 0=Synchronize linked contact, 1=Do not synchronize linked contact * @return int <0 si KO, >=0 si OK */ - function update($user, $notrigger=0, $nosyncmember=0, $nosyncmemberpass=0, $nosynccontact=0) + function update($user, $notrigger = 0, $nosyncmember = 0, $nosyncmemberpass = 0, $nosynccontact = 0) { global $conf, $langs; @@ -1777,7 +1777,7 @@ class User extends CommonObject * @param int $nosyncmember Do not synchronize linked member * @return string If OK return clear password, 0 if no change, < 0 if error */ - function setPassword($user, $password='', $changelater=0, $notrigger=0, $nosyncmember=0) + function setPassword($user, $password = '', $changelater = 0, $notrigger = 0, $nosyncmember = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT .'/core/lib/security2.lib.php'; @@ -1909,7 +1909,7 @@ class User extends CommonObject * @param int $changelater 0=Send clear passwod into email, 1=Change password only after clicking on confirm email. @TODO Add method 2 = Send link to reset password * @return int < 0 si erreur, > 0 si ok */ - function send_password($user, $password='', $changelater=0) + function send_password($user, $password = '', $changelater = 0) { // phpcs:enable global $conf, $langs; @@ -2102,7 +2102,7 @@ class User extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function SetInGroup($group, $entity, $notrigger=0) + function SetInGroup($group, $entity, $notrigger = 0) { // phpcs:enable global $conf, $langs, $user; @@ -2164,7 +2164,7 @@ class User extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function RemoveFromGroup($group, $entity, $notrigger=0) + function RemoveFromGroup($group, $entity, $notrigger = 0) { // phpcs:enable global $conf,$langs,$user; @@ -2224,7 +2224,7 @@ class User extends CommonObject * @param string $imagesize 'mini', 'small' or '' (original) * @return string String with URL link */ - function getPhotoUrl($width, $height, $cssclass='', $imagesize='') + function getPhotoUrl($width, $height, $cssclass = '', $imagesize = '') { $result ='<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">'; $result.=Form::showphoto('userphoto', $this, $width, $height, 0, $cssclass, $imagesize); @@ -2248,7 +2248,7 @@ class User extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpictoimg=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='',$morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpictoimg = 0, $option = '', $infologin = 0, $notooltip = 0, $maxlen = 24, $hidethirdpartylogo = 0, $mode = '', $morecss = '', $save_lastsearch_value = -1) { global $langs, $conf, $db, $hookmanager, $user; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -2385,7 +2385,7 @@ class User extends CommonObject * @param string $option Sur quoi pointe le lien * @return string Chaine avec URL */ - function getLoginUrl($withpicto=0,$option='') + function getLoginUrl($withpicto = 0, $option = '') { global $langs, $user; @@ -2422,7 +2422,7 @@ class User extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->statut,$mode); } @@ -2435,7 +2435,7 @@ class User extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -2484,7 +2484,7 @@ class User extends CommonObject * 2=Return key only (RDN) (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; @@ -2735,7 +2735,7 @@ class User extends CommonObject * @param int $admin Filter on admin tag * @return int Number of users */ - function getNbOfUsers($limitTo, $option='', $admin=-1) + function getNbOfUsers($limitTo, $option = '', $admin = -1) { global $conf; @@ -2891,7 +2891,7 @@ class User extends CommonObject * @param string $filter SQL filter on users * @return array Array of users $this->users. Note: $this->parentof is also set. */ - function get_full_tree($deleteafterid=0, $filter='') + function get_full_tree($deleteafterid = 0, $filter = '') { // phpcs:enable global $conf, $user; @@ -2993,7 +2993,7 @@ class User extends CommonObject * @return array Array of user id lower than user (all levels under user). This overwrite this->users. * @see get_children */ - function getAllChildIds($addcurrentuser=0) + function getAllChildIds($addcurrentuser = 0) { $childids=array(); @@ -3031,7 +3031,7 @@ class User extends CommonObject * @param int $protection Deep counter to avoid infinite loop (no more required, a protection is added with array useridfound) * @return int < 0 if KO (infinit loop), >= 0 if OK */ - function build_path_from_id_user($id_user,$protection=0) + function build_path_from_id_user($id_user, $protection = 0) { // phpcs:enable dol_syslog(get_class($this)."::build_path_from_id_user id_user=".$id_user." protection=".$protection, LOG_DEBUG); @@ -3134,7 +3134,7 @@ class User extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf, $user, $langs; @@ -3166,7 +3166,7 @@ class User extends CommonObject * @param string $mode 'email' or 'mobile' * @return string Email of user with format: "Full name <email>" */ - function user_get_property($rowid,$mode) + function user_get_property($rowid, $mode) { // phpcs:enable $user_property=''; @@ -3208,7 +3208,7 @@ class User extends CommonObject * @param string $filtermode Filter mode (AND or OR) * @return int <0 if KO, >0 if OK */ - function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, $filter=array(), $filtermode='AND') + function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = array(), $filtermode = 'AND') { global $conf; diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php index 7870fe9c35e..d18ece1f89e 100644 --- a/htdocs/user/class/userbankaccount.class.php +++ b/htdocs/user/class/userbankaccount.class.php @@ -62,7 +62,7 @@ class UserBankAccount extends Account * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >= 0 if OK */ - function create(User $user=null, $notrigger=0) + function create(User $user = null, $notrigger = 0) { $now=dol_now(); @@ -92,7 +92,7 @@ class UserBankAccount extends Account * @param int $notrigger 1=Disable triggers * @return int <=0 if KO, >0 if OK */ - function update(User $user=null, $notrigger=0) + function update(User $user = null, $notrigger = 0) { global $conf; @@ -139,7 +139,7 @@ class UserBankAccount extends Account * @param int $userid User id * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='', $userid=0) + function fetch($id, $ref = '', $userid = 0) { if (empty($id) && empty($ref) && empty($userid)) return -1; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index f70f61e2ed6..0695e1b84bb 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -107,7 +107,7 @@ class UserGroup extends CommonObject * @param boolean $load_members Load all members of the group * @return int <0 if KO, >0 if OK */ - function fetch($id='', $groupname='', $load_members = true) + function fetch($id = '', $groupname = '', $load_members = true) { global $conf; @@ -224,7 +224,7 @@ class UserGroup extends CommonObject * @param int $mode 0=Return array of user instance, 1=Return array of users id only * @return mixed Array of users or -1 on error */ - function listUsersForGroup($excludefilter='', $mode=0) + function listUsersForGroup($excludefilter = '', $mode = 0) { global $conf, $user; @@ -289,7 +289,7 @@ class UserGroup extends CommonObject * @param int $entity Entity to use * @return int > 0 if OK, < 0 if KO */ - function addrights($rid, $allmodule='', $allperms='', $entity=0) + function addrights($rid, $allmodule = '', $allperms = '', $entity = 0) { global $conf, $user, $langs; @@ -415,7 +415,7 @@ class UserGroup extends CommonObject * @param int $entity Entity to use * @return int > 0 if OK, < 0 if OK */ - function delrights($rid, $allmodule='', $allperms='', $entity=0) + function delrights($rid, $allmodule = '', $allperms = '', $entity = 0) { global $conf, $user, $langs; @@ -537,7 +537,7 @@ class UserGroup extends CommonObject * @param string $moduletag Name of module we want permissions ('' means all) * @return int <0 if KO, >0 if OK */ - function getrights($moduletag='') + function getrights($moduletag = '') { global $conf; @@ -676,7 +676,7 @@ class UserGroup extends CommonObject * @param int $notrigger 0=triggers enabled, 1=triggers disabled * @return int <0 if KO, >=0 if OK */ - function create($notrigger=0) + function create($notrigger = 0) { global $user, $conf, $langs, $hookmanager; @@ -747,7 +747,7 @@ class UserGroup extends CommonObject * @param int $notrigger 0=triggers enabled, 1=triggers disabled * @return int <0 if KO, >=0 if OK */ - function update($notrigger=0) + function update($notrigger = 0) { global $user, $conf, $langs, $hookmanager; @@ -817,7 +817,7 @@ class UserGroup extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut(0,$mode); } @@ -830,7 +830,7 @@ class UserGroup extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($statut,$mode=0) + function LibStatut($statut, $mode = 0) { // phpcs:enable global $langs; @@ -849,7 +849,7 @@ class UserGroup extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $langs, $conf, $db, $hookmanager; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -925,7 +925,7 @@ class UserGroup extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - function _load_ldap_dn($info,$mode=0) + function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; @@ -1011,7 +1011,7 @@ class UserGroup extends CommonObject * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { global $conf,$user,$langs; diff --git a/htdocs/webservices/server_actioncomm.php b/htdocs/webservices/server_actioncomm.php index a9edcb0557a..763dd500366 100644 --- a/htdocs/webservices/server_actioncomm.php +++ b/htdocs/webservices/server_actioncomm.php @@ -244,7 +244,7 @@ $server->register( * @param int $id Id of object * @return mixed */ -function getActionComm($authentication,$id) +function getActionComm($authentication, $id) { global $db,$conf,$langs; @@ -408,7 +408,7 @@ function getListActionCommType($authentication) * @param ActionComm $actioncomm $actioncomm * @return array Array result */ -function createActionComm($authentication,$actioncomm) +function createActionComm($authentication, $actioncomm) { global $db,$conf,$langs; @@ -491,7 +491,7 @@ function createActionComm($authentication,$actioncomm) * @param ActionComm $actioncomm $actioncomm * @return array Array result */ -function updateActionComm($authentication,$actioncomm) +function updateActionComm($authentication, $actioncomm) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_category.php b/htdocs/webservices/server_category.php index a941c2aceff..491122f748c 100644 --- a/htdocs/webservices/server_category.php +++ b/htdocs/webservices/server_category.php @@ -186,7 +186,7 @@ $server->register( * @param int $id Id of object * @return mixed */ -function getCategory($authentication,$id) +function getCategory($authentication, $id) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index edb429af0d3..8143b4cd178 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -235,7 +235,7 @@ $server->register( * @param string $ref_ext Ref external of object * @return mixed */ -function getContact($authentication,$id,$ref_ext) +function getContact($authentication, $id, $ref_ext) { global $db,$conf,$langs; @@ -352,7 +352,7 @@ function getContact($authentication,$id,$ref_ext) * @param Contact $contact $contact * @return array Array result */ -function createContact($authentication,$contact) +function createContact($authentication, $contact) { global $db,$conf,$langs; @@ -463,7 +463,7 @@ function createContact($authentication,$contact) * @param int $idthirdparty Id thirdparty * @return array Array result */ -function getContactsForThirdParty($authentication,$idthirdparty) +function getContactsForThirdParty($authentication, $idthirdparty) { global $db,$conf,$langs; @@ -595,7 +595,7 @@ function getContactsForThirdParty($authentication,$idthirdparty) * @param Contact $contact Contact * @return array Array result */ -function updateContact($authentication,$contact) +function updateContact($authentication, $contact) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index 4e8d3ec41d8..8287d3bff48 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -286,7 +286,7 @@ $server->register( * @param string $ref_ext Ref_ext * @return array Array result */ -function getInvoice($authentication,$id='',$ref='',$ref_ext='') +function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -399,7 +399,7 @@ function getInvoice($authentication,$id='',$ref='',$ref_ext='') * @param int $idthirdparty Id thirdparty * @return array Array result */ -function getInvoicesForThirdParty($authentication,$idthirdparty) +function getInvoicesForThirdParty($authentication, $idthirdparty) { global $db,$conf,$langs; @@ -534,7 +534,7 @@ function getInvoicesForThirdParty($authentication,$idthirdparty) * @param Facture $invoice Invoice * @return array Array result */ -function createInvoice($authentication,$invoice) +function createInvoice($authentication, $invoice) { global $db,$conf,$langs; @@ -654,7 +654,7 @@ function createInvoice($authentication,$invoice) * @param string $ref_ext_order ref_ext of order to copy invoice from * @return array Array result */ -function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $ref_ext_order='') +function createInvoiceFromOrder($authentication, $id_order = '', $ref_order = '', $ref_ext_order = '') { global $db,$conf; @@ -740,7 +740,7 @@ function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $re * @param Facture $invoice Invoice * @return array Array result */ -function updateInvoice($authentication,$invoice) +function updateInvoice($authentication, $invoice) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_order.php b/htdocs/webservices/server_order.php index c74b5660873..0d38d601b99 100644 --- a/htdocs/webservices/server_order.php +++ b/htdocs/webservices/server_order.php @@ -344,7 +344,7 @@ $server->register( * @param string $ref_ext Ref_ext * @return array Array result */ -function getOrder($authentication,$id='',$ref='',$ref_ext='') +function getOrder($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -496,7 +496,7 @@ function getOrder($authentication,$id='',$ref='',$ref_ext='') * @param int $idthirdparty Id of thirdparty * @return array Array result */ -function getOrdersForThirdParty($authentication,$idthirdparty) +function getOrdersForThirdParty($authentication, $idthirdparty) { global $db,$conf,$langs; @@ -655,7 +655,7 @@ function getOrdersForThirdParty($authentication,$idthirdparty) * @param array $order Order info * @return int Id of new order */ -function createOrder($authentication,$order) +function createOrder($authentication, $order) { global $db,$conf,$langs; @@ -795,7 +795,7 @@ function createOrder($authentication,$order) * @param int $id_warehouse Id of warehouse to use for stock decrease * @return array Array result */ -function validOrder($authentication,$id='',$id_warehouse=0) +function validOrder($authentication, $id = '', $id_warehouse = 0) { global $db,$conf,$langs; @@ -875,7 +875,7 @@ function validOrder($authentication,$id='',$id_warehouse=0) * @param array $order Order info * @return array Array result */ -function updateOrder($authentication,$order) +function updateOrder($authentication, $order) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_other.php b/htdocs/webservices/server_other.php index 895e5d55af4..6037b5285e0 100644 --- a/htdocs/webservices/server_other.php +++ b/htdocs/webservices/server_other.php @@ -181,7 +181,7 @@ function getVersions($authentication) * @param string $refname Ref of object to check permission for external users (autodetect if not provided) * @return void */ -function getDocument($authentication, $modulepart, $file, $refname='') +function getDocument($authentication, $modulepart, $file, $refname = '') { global $db,$conf,$langs,$mysoc; diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 1e301350063..93e85827c14 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -333,7 +333,7 @@ $server->register( * @param string $lang Lang to force * @return mixed */ -function getProductOrService($authentication,$id='',$ref='',$ref_ext='',$lang='') +function getProductOrService($authentication, $id = '', $ref = '', $ref_ext = '', $lang = '') { global $db,$conf,$langs; @@ -467,7 +467,7 @@ function getProductOrService($authentication,$id='',$ref='',$ref_ext='',$lang='' * @param Product $product Product * @return array Array result */ -function createProductOrService($authentication,$product) +function createProductOrService($authentication, $product) { global $db,$conf,$langs; @@ -635,7 +635,7 @@ function createProductOrService($authentication,$product) * @param Product $product Product * @return array Array result */ -function updateProductOrService($authentication,$product) +function updateProductOrService($authentication, $product) { global $db,$conf,$langs; @@ -823,7 +823,7 @@ function updateProductOrService($authentication,$product) * @param string $listofidstring List of id with comma * @return array Array result */ -function deleteProductOrService($authentication,$listofidstring) +function deleteProductOrService($authentication, $listofidstring) { global $db,$conf,$langs; @@ -920,7 +920,7 @@ function deleteProductOrService($authentication,$listofidstring) * @param array $filterproduct Filter fields * @return array Array result */ -function getListOfProductsOrServices($authentication,$filterproduct) +function getListOfProductsOrServices($authentication, $filterproduct) { global $db,$conf,$langs; @@ -997,7 +997,7 @@ function getListOfProductsOrServices($authentication,$filterproduct) * @param $lang $lang Force lang * @return array Array result */ -function getProductsForCategory($authentication,$id,$lang='') +function getProductsForCategory($authentication, $id, $lang = '') { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_project.php b/htdocs/webservices/server_project.php index 822081011aa..a064eff1ebc 100644 --- a/htdocs/webservices/server_project.php +++ b/htdocs/webservices/server_project.php @@ -329,7 +329,7 @@ function createProject($authentication, $project) * @param string $ref internal reference * @return array Array result */ -function getProject($authentication,$id='',$ref='') +function getProject($authentication, $id = '', $ref = '') { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_supplier_invoice.php b/htdocs/webservices/server_supplier_invoice.php index 50e5498dbe1..c5005dab24d 100644 --- a/htdocs/webservices/server_supplier_invoice.php +++ b/htdocs/webservices/server_supplier_invoice.php @@ -223,7 +223,7 @@ $server->register( * @param string $ref_ext Ref_ext * @return array Array result */ -function getSupplierInvoice($authentication,$id='',$ref='',$ref_ext='') +function getSupplierInvoice($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -333,7 +333,7 @@ function getSupplierInvoice($authentication,$id='',$ref='',$ref_ext='') * @return array Array result * */ -function getSupplierInvoicesForThirdParty($authentication,$idthirdparty) +function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index 7f0b590ee9a..1587a403940 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -283,7 +283,7 @@ $server->register( * @param string $ref_ext external reference * @return array Array result */ -function getThirdParty($authentication,$id='',$ref='',$ref_ext='') +function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -399,7 +399,7 @@ function getThirdParty($authentication,$id='',$ref='',$ref_ext='') * @param Societe $thirdparty Thirdparty * @return array Array result */ -function createThirdParty($authentication,$thirdparty) +function createThirdParty($authentication, $thirdparty) { global $db,$conf,$langs; @@ -525,7 +525,7 @@ function createThirdParty($authentication,$thirdparty) * @param Societe $thirdparty Thirdparty * @return array Array result */ -function updateThirdParty($authentication,$thirdparty) +function updateThirdParty($authentication, $thirdparty) { global $db,$conf,$langs; @@ -655,7 +655,7 @@ function updateThirdParty($authentication,$thirdparty) * @param array $filterthirdparty Filter fields (key=>value to filer on. For example 'client'=>2, 'supplier'=>1, 'category'=>idcateg, 'name'=>'searchstring', ...) * @return array Array result */ -function getListOfThirdParties($authentication,$filterthirdparty) +function getListOfThirdParties($authentication, $filterthirdparty) { global $db,$conf,$langs; @@ -760,7 +760,7 @@ function getListOfThirdParties($authentication,$filterthirdparty) * @param string $ref_ext external reference * @return array Array result */ -function deleteThirdParty($authentication,$id='',$ref='',$ref_ext='') +function deleteThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') { global $db,$conf,$langs; diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index 81702c55456..5bc8350d563 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -301,7 +301,7 @@ $server->register( * @param string $ref_ext Ref external of object * @return mixed */ -function getUser($authentication,$id,$ref='',$ref_ext='') +function getUser($authentication, $id, $ref = '', $ref_ext = '') { global $db,$conf,$langs; @@ -473,7 +473,7 @@ function getListOfGroups($authentication) * @param array $thirdpartywithuser Datas * @return mixed */ -function createUserFromThirdparty($authentication,$thirdpartywithuser) +function createUserFromThirdparty($authentication, $thirdpartywithuser) { global $db,$conf,$langs; @@ -681,7 +681,7 @@ function createUserFromThirdparty($authentication,$thirdpartywithuser) * @param array $shortuser Array of login/password info * @return mixed */ -function setUserPassword($authentication,$shortuser) +function setUserPassword($authentication, $shortuser) { global $db,$conf,$langs; diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 0e6ee83aa9d..e0cd985ced1 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -301,7 +301,7 @@ class Website extends CommonObject * * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -517,7 +517,7 @@ class Website extends CommonObject * @param string $newlang New language * @return mixed New object created, <0 if KO */ - public function createFromClone($user, $fromid, $newref, $newlang='') + public function createFromClone($user, $fromid, $newref, $newlang = '') { global $hookmanager, $langs; global $dolibarr_main_data_root; @@ -671,7 +671,7 @@ class Website extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -707,7 +707,7 @@ class Website extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -720,7 +720,7 @@ class Website extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -1094,7 +1094,7 @@ class Website extends CommonObject * @param string $htmlname Suffix for HTML name * @return string HTML select component */ - public function componentSelectLang($languagecodes, $weblangs, $morecss='', $htmlname='') + public function componentSelectLang($languagecodes, $weblangs, $morecss = '', $htmlname = '') { global $websitepagefile, $website; diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index ffa2176f142..778998f8ac2 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -256,7 +256,7 @@ class WebsitePage extends CommonObject * @param string $filtermode Filter mode (AND or OR) * @return array|int int <0 if KO, array of pages if OK */ - public function fetchAll($websiteid, $sortorder='', $sortfield='', $limit=0, $offset=0, array $filter=array(), $filtermode='AND') + public function fetchAll($websiteid, $sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -407,7 +407,7 @@ class WebsitePage extends CommonObject * @param int $keeptitleunchanged 1=Keep title unchanged * @return mixed New object created, <0 if KO */ - public function createFromClone(User $user, $fromid, $newref, $newlang='', $istranslation=0, $newwebsite=0, $keeptitleunchanged=0) + public function createFromClone(User $user, $fromid, $newref, $newlang = '', $istranslation = 0, $newwebsite = 0, $keeptitleunchanged = 0) { global $hookmanager, $langs; @@ -472,7 +472,7 @@ class WebsitePage extends CommonObject * @param string $morecss Add more css on link * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -507,7 +507,7 @@ class WebsitePage extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function getLibStatut($mode=0) + function getLibStatut($mode = 0) { return $this->LibStatut($this->status,$mode); } @@ -520,7 +520,7 @@ class WebsitePage extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - function LibStatut($status,$mode=0) + function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/scripts/contracts/email_expire_services_to_customers.php b/scripts/contracts/email_expire_services_to_customers.php index 43a0b2524e6..9e51804857c 100755 --- a/scripts/contracts/email_expire_services_to_customers.php +++ b/scripts/contracts/email_expire_services_to_customers.php @@ -220,7 +220,7 @@ else * @param int $duration_value duration value * @return int <0 if KO, >0 if OK */ -function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldtarget,$duration_value) +function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget, $duration_value) { global $conf,$langs; diff --git a/scripts/contracts/email_expire_services_to_representatives.php b/scripts/contracts/email_expire_services_to_representatives.php index a23652a779f..8ee56ddf2eb 100755 --- a/scripts/contracts/email_expire_services_to_representatives.php +++ b/scripts/contracts/email_expire_services_to_representatives.php @@ -187,7 +187,7 @@ else * @param int $duration_value duration value * @return int <0 if KO, >0 if OK */ -function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresentative,$duration_value) +function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepresentative, $duration_value) { global $conf,$langs; diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 873fc0ae9fb..228f130dbb3 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -255,7 +255,7 @@ exit(0); * @param string $script_file filename * @return void */ -function usage($path,$script_file) +function usage($path, $script_file) { global $conf; diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php index 57fdeeed76f..23026336347 100755 --- a/scripts/invoices/email_unpaid_invoices_to_customers.php +++ b/scripts/invoices/email_unpaid_invoices_to_customers.php @@ -218,7 +218,7 @@ else * @param string $oldtarget Target name * @return int <0 if KO, >0 if OK */ -function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldtarget) +function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) { global $conf,$langs; diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index 37b421bcefd..d79d402863e 100755 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -192,7 +192,7 @@ else * @param string $oldsalerepresentative Old sale representative * @return int <0 if KO, >0 if OK */ -function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresentative) +function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepresentative) { global $conf,$langs; diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php index 07d728eb0ec..432c3556ff0 100644 --- a/test/phpunit/FactureRecTest.php +++ b/test/phpunit/FactureRecTest.php @@ -171,7 +171,7 @@ class FactureRecTest extends PHPUnit_Framework_TestCase * @param array $fieldstoignorearray Array of fields to ignore in diff * @return array Array with differences */ - public function objCompare($oA,$oB,$ignoretype=true,$fieldstoignorearray=array('id')) + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) { $retAr=array(); diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index cb23c7d092e..abf1f286a90 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -349,7 +349,7 @@ class FactureTest extends PHPUnit_Framework_TestCase * @param array $fieldstoignorearray Array of fields to ignore in diff * @return array Array with differences */ - public function objCompare($oA,$oB,$ignoretype=true,$fieldstoignorearray=array('id')) + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) { $retAr=array(); diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index 9b8e5217183..58e08affb69 100644 --- a/test/phpunit/UserTest.php +++ b/test/phpunit/UserTest.php @@ -321,7 +321,7 @@ class UserTest extends PHPUnit_Framework_TestCase * @param array $fieldstoignorearray Array of fields to ignore in diff * @return array Array with differences */ - public function objCompare($oA,$oB,$ignoretype=true,$fieldstoignorearray=array('id')) + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) { $retAr=array(); From b8ec33d29b7c8e3707eec2b47c6dfe3cc9e69feb Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Sun, 27 Jan 2019 17:28:18 +0100 Subject: [PATCH 104/183] fix translations --- .../core/modules/expedition/modules_expedition.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index a22ae0d0f99..583e315d564 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com> + * Copyright (C) 2011-2019 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> * * This program is free software; you can redistribute it and/or modify @@ -44,7 +44,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** - * Return list of active generation modules + * Return list of active generation models * * @param DoliDB $db Database handler * @param integer $maxfilenamelength Max length of value to show @@ -56,12 +56,12 @@ abstract class ModelePdfExpedition extends CommonDocGenerator global $conf; $type='shipping'; - $liste=array(); + $list=array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste=getListOfModels($db,$type,$maxfilenamelength); + $list=getListOfModels($db,$type,$maxfilenamelength); - return $liste; + return $list; } } @@ -112,7 +112,7 @@ abstract class ModelNumRefExpedition /** * Test if existing numbers make problems with numbering * - * @return boolean false if conflit, true if ok + * @return boolean false if conflict, true if ok */ function canBeActivated() { From d59097f65c25c9b8529a402475f1ac211aaed850 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 27 Jan 2019 17:40:56 +0100 Subject: [PATCH 105/183] Fix upload of module file --- htdocs/admin/modules.php | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index ae87a19e433..7a9241fb9d4 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -141,6 +141,12 @@ if ($action=='install') setEventMessages($langs->trans("ErrorFilenameDosNotMatchDolibarrPackageRules",$original_file, 'module_*-x.y*.zip'), null, 'errors'); $error++; } + if (empty($_FILES['fileinstall']['tmp_name'])) + { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); + $error++; + } } if (! $error) @@ -151,14 +157,14 @@ if ($action=='install') dol_mkdir($conf->admin->dir_temp.'/'.$original_file); } - $tmpdir=preg_replace('/\.zip$/','',$original_file).'.dir'; + $tmpdir=preg_replace('/\.zip$/i','',$original_file).'.dir'; if ($tmpdir) { @dol_delete_dir_recursive($conf->admin->dir_temp.'/'.$tmpdir); dol_mkdir($conf->admin->dir_temp.'/'.$tmpdir); } - $result=dol_move_uploaded_file($_FILES['fileinstall']['tmp_name'],$newfile,1,0,$_FILES['fileinstall']['error']); + $result=dol_move_uploaded_file($_FILES['fileinstall']['tmp_name'], $newfile, 1, 0, $_FILES['fileinstall']['error']); if ($result > 0) { $result=dol_uncompress($newfile,$conf->admin->dir_temp.'/'.$tmpdir); @@ -206,6 +212,7 @@ if ($action=='install') } else { + setEventMessages($langs->trans("ErrorFailToRenameFile", $_FILES['fileinstall']['tmp_name'], $newfile), null, 'errors'); $error++; } } @@ -1002,6 +1009,7 @@ if ($mode == 'deploy') print '<br>'; print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">'; + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="install">'; print '<input type="hidden" name="mode" value="deploy">'; @@ -1027,6 +1035,20 @@ if ($mode == 'deploy') print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">'; + if (! empty($conf->global->MAIN_UPLOAD_DOC)) + { + if ($user->admin) + { + $langs->load('other'); + print ' '; + print info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1); + } + } + else + { + print ' ('.$langs->trans("UploadDisabled").')'; + } + print '</form>'; print '<br>'; From 56838bc6598a568e5154a06f222fbe8ee04815a3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 27 Jan 2019 18:11:18 +0100 Subject: [PATCH 106/183] Fix missing field into migration --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 83a34b80db5..2d2fc43e1ef 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -90,3 +90,7 @@ ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank, url_id, type); ALTER TABLE llx_actioncomm ADD COLUMN calling_duration integer; + + +ALTER TABLE llx_don ADD COLUMN fk_soc integer NULL; + From 97545af1fde0d59ba5f3de0d40387d0722becb9d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 27 Jan 2019 18:26:18 +0100 Subject: [PATCH 107/183] Translation --- build/exe/doliwamp/Languages/MyEnglish.isl | 6 +++--- build/exe/doliwamp/Languages/MyFrench.isl | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/exe/doliwamp/Languages/MyEnglish.isl b/build/exe/doliwamp/Languages/MyEnglish.isl index 8a8ced59ddb..18068087804 100644 --- a/build/exe/doliwamp/Languages/MyEnglish.isl +++ b/build/exe/doliwamp/Languages/MyEnglish.isl @@ -11,9 +11,9 @@ LaunchProgram=Launch %1 AssocFileExtension=&Associate %1 with the %2 file extension AssocingFileExtension=Associating %1 with the %2 file extension... -YouWillInstallDoliWamp=You will install or upgrade DoliWamp (Apache+Mysql+PHP+Dolibarr) on your computer. -ThisAssistantInstallOrUpgrade=This assistant installs or upgrades Dolibarr ERP-CRM and all required third party softwares (Apache, Mysql and PHP) optimized for a Dolibarr usage. -IfYouHaveTechnicalKnowledge=If you are looking for a hosted version in the Cloud, you should look at https://saas.dolibarr.org. If you have technical knowledge and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing Apache, Mysql and PHP installation. +YouWillInstallDoliWamp=You will install or upgrade DoliWamp (so Dolibarr + all required third party softwares like Apache, Mysql and PHP) on your computer. +ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer break down, you can lose all your data. Do this if you are ready to manage backup yourself seriously. If not, use an installation in Saas instead (see https://saas.dolibarr.org). +IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledges and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing server with Apache, Mysql and PHP. ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way... DoYouWantToStart=Do you want to start installation/upgrade process ? diff --git a/build/exe/doliwamp/Languages/MyFrench.isl b/build/exe/doliwamp/Languages/MyFrench.isl index 1caaf25b693..2e93a44081e 100644 --- a/build/exe/doliwamp/Languages/MyFrench.isl +++ b/build/exe/doliwamp/Languages/MyFrench.isl @@ -11,10 +11,10 @@ LaunchProgram=Ex AssocFileExtension=&Associer %1 avec l'extension de fichier %2 AssocingFileExtension=Associe %1 avec l'extension de fichier %2... -YouWillInstallDoliWamp=Vous allez installer ou mettre jour DoliWamp (Apache+Mysql+PHP+Dolibarr) sur votre ordinateur. -ThisAssistantInstallOrUpgrade=Cet assistant installe ou met jour Dolibarr ERP-CRM et tous ses composants prrequis (Apache, Mysql et PHP) optimiss pour une utilisation de Dolibarr. -IfYouHaveTechnicalKnowledge=Si vous avez des comptences techniques et envisagez de partager votre Apache, Mysql et PHP avec d'autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutt une installation manuelle de Dolibarr sur un socle Apache, Mysql et PHP existant. -ButIfYouLook=Mais si vous recherchez une installation cl en main automatise, vous tes sur la bonne voie... +YouWillInstallDoliWamp=Vous allez installer ou mettre jour DoliWamp sur votre ordinateur (donc Dolibarr + tous ses composants prrequis comme Apache, Mysql et PHP). +ThisAssistantInstallOrUpgrade=AVERTISSEMENT: L'utilisation d'un ERP CRM install sur un ordinateur local peut tre dangereuse: si votre ordinateur tombe en panne, vous pouvez perdre toutes vos donnes. Faites-le si vous tes prt grer les sauvegardes vous-mme srieusement. Sinon, utilisez plutt une installation en Saas (voir https://saas.dolibarr.org). +IfYouHaveTechnicalKnowledge=De plus, si vous avez des comptences techniques et envisagez de partager votre Apache, Mysql et PHP avec d''autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutt une installation manuelle de Dolibarr sur un serveur existant quip de Apache, Mysql et PHP. +ButIfYouLook=Mais si vous recherchez une installation cl en main automatise sur une poste local, vous tes sur la bonne voie... DoYouWantToStart=Voulez-vous dmarrer le processus d'installation/mise jour ? TechnicalParameters=Paramtres techniques From de0a057b8aff3914f3888e565683611176a73d77 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 27 Jan 2019 19:41:14 +0100 Subject: [PATCH 108/183] Fix div not closed --- htdocs/societe/checkvat/checkVatPopup.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 0c125ae3b4c..689df14f3d7 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -40,8 +40,7 @@ $conf->dol_hide_leftmenu=1; llxHeader('', $langs->trans("VATIntraCheckableOnEUSite")); -print '<div>'; -print '<div>'; +print '<div class="vatcheckarea" style="margin-bottom: 10px">'; print load_fiche_titre($langs->trans("VATIntraCheckableOnEUSite"),'','title_setup'); @@ -174,6 +173,8 @@ if ($messagetoshow) print nl2br($messagetoshow); } +print '</div>'; + // End of page llxFooter(); $db->close(); From b2c57cb4f2e9f2f2f83851b70523b60336600ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic34@users.noreply.github.com> Date: Sun, 27 Jan 2019 19:43:56 +0100 Subject: [PATCH 109/183] fix travis --- htdocs/core/modules/expensereport/mod_expensereport_jade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 4690b64e0b5..1be0c815bd9 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -78,7 +78,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Test whether the numbers already in force in the base do not cause conflicts + * Test whether the numbers already in force in the base do not cause conflicts * that would prevent this numbering from working. * * @return boolean false si conflit, true si ok From 46bc078481f0a82623f133ea82f574200e1cbaf6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 27 Jan 2019 23:10:10 +0100 Subject: [PATCH 110/183] Fix phpcs --- htdocs/core/modules/expensereport/mod_expensereport_jade.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 4690b64e0b5..e5fc023010b 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -44,7 +44,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** * @var string Nom du modele * @deprecated - * @see name + * @see $name */ public $nom='Jade'; @@ -78,7 +78,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Test whether the numbers already in force in the base do not cause conflicts + * Test whether the numbers already in force in the base do not cause conflicts * that would prevent this numbering from working. * * @return boolean false si conflit, true si ok @@ -154,7 +154,6 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport endif; $ref_number_int = ($newref+1)-1; - $update_number_int = true; $user_author_infos = dolGetFirstLastname($fuser->firstname, $fuser->lastname); From 764a928cd6f1b51b800039a30aef82b3ff513b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic.france@free.fr> Date: Sun, 27 Jan 2019 23:48:36 +0100 Subject: [PATCH 111/183] wip --- htdocs/core/modules/expensereport/mod_expensereport_jade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 4690b64e0b5..1be0c815bd9 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -78,7 +78,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Test whether the numbers already in force in the base do not cause conflicts + * Test whether the numbers already in force in the base do not cause conflicts * that would prevent this numbering from working. * * @return boolean false si conflit, true si ok From 26dea99375473046cc264b6c9f1bfc05e135dab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= <frederic34@users.noreply.github.com> Date: Mon, 28 Jan 2019 00:07:38 +0100 Subject: [PATCH 112/183] Update box_task.php --- htdocs/core/boxes/box_task.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index bfcf5d2c301..5f576c3a83d 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2012-2018 Charlene BENKE <charlie@patas-monkey.com> - * Copyright (C) 2015 Frederic France <frederic.france@free.fr> + * Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -104,12 +104,10 @@ class box_task extends ModeleBoxes $sql.= $db->plimit($max, 0); $result = $db->query($sql); - if ($result) - { + $i = 0; + if ($result) { $num = $db->num_rows($result); - $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); $this->info_box_contents[$i][] = array( 'td' => '', @@ -131,11 +129,11 @@ class box_task extends ModeleBoxes $i++; } - } - else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } } - // Add the sum at the bottom of the boxes $this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")." ".$textHead); $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks")); From f7bcd1ef6d01a628c711406edee7cb9bd4c0f4d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 01:35:12 +0100 Subject: [PATCH 113/183] Fix trans --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 03172f2c54d..cf25ab9d9ab 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4650,7 +4650,7 @@ else if ($id > 0 || ! empty($ref)) } else { - print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseDispatchedInAccounting") . '">' . $langs->trans('Modify') . '</span></div>'; + print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseDispatchedInBookkeeping") . '">' . $langs->trans('Modify') . '</span></div>'; } } From 4398649af6b5ff956aa3e83634fc184f5166f5c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 01:46:59 +0100 Subject: [PATCH 114/183] Add hooks to add column in list of payment modes --- htdocs/modulebuilder/template/myobject_list.php | 1 + htdocs/societe/paymentmodes.php | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index eeabbb11b1e..6eb76ae0360 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -446,6 +446,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; +// Action column print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n"; print '</tr>'."\n"; diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 0853b7ee571..3e72c33c142 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -832,6 +832,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '<td align="center">'.$langs->trans('Default').'</td>'; print '<td>'.$langs->trans('Note').'</td>'; print '<td>'.$langs->trans('DateModification').'</td>'; + // Hook fields + $parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>''); + $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column print "<td></td>"; print "</tr>\n"; @@ -917,6 +922,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '<td>'; print dol_print_date($companypaymentmodetemp->tms, 'dayhour'); print '</td>'; + // Fields from hook + $parameters=array('arrayfields'=>array(), 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column print '<td align="right" class="nowraponall">'; if ($user->rights->societe->creer) { From 31f4513a7e13f3d3c2eb4451b2ca24fcb9f8d97f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 02:46:31 +0100 Subject: [PATCH 115/183] Fix bad function --- htdocs/public/payment/paymentok.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 2831da07b13..763edcce559 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -663,7 +663,7 @@ if ($ispaymentok) $result=$paiement->addPaymentToBank($user,'payment',$label, $bankaccountid, '', ''); if ($result < 0) { - $postactionmessages[] = $paiement->error.' '.joint("<br>\n", $paiement->errors); + $postactionmessages[] = $paiement->error.' '.join("<br>\n", $paiement->errors); $ispostactionok = -1; $error++; } From 273c396fb992c71e0d8619cd13ee95e6c0fa3e77 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 02:46:31 +0100 Subject: [PATCH 116/183] Fix bad function --- htdocs/public/payment/paymentok.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index e48fc014749..7537d281feb 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -663,7 +663,7 @@ if ($ispaymentok) $result=$paiement->addPaymentToBank($user,'payment',$label, $bankaccountid, '', ''); if ($result < 0) { - $postactionmessages[] = $paiement->error.' '.joint("<br>\n", $paiement->errors); + $postactionmessages[] = $paiement->error.' '.join("<br>\n", $paiement->errors); $ispostactionok = -1; $error++; } From 1ebd7048fb5d802f7dc88289543c41bff776dd66 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 03:00:28 +0100 Subject: [PATCH 117/183] Add hook in list of stripe payment mode list --- htdocs/societe/paymentmodes.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 3e72c33c142..5f0cdb4d4c0 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -833,7 +833,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '<td>'.$langs->trans('Note').'</td>'; print '<td>'.$langs->trans('DateModification').'</td>'; // Hook fields - $parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>''); + $parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>'', 'linetype'=>'stripetitle'); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -851,7 +851,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $companypaymentmodetemp = new CompanyPaymentMode($db); $sql='SELECT rowid FROM '.MAIN_DB_PREFIX."societe_rib"; - $sql.=" WHERE type in ('card', 'paypal')"; + $sql.=" WHERE type in ('card')"; $sql.=" AND fk_soc = ".$object->id; $sql.=" AND status = ".$servicestatus; @@ -923,7 +923,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print dol_print_date($companypaymentmodetemp->tms, 'dayhour'); print '</td>'; // Fields from hook - $parameters=array('arrayfields'=>array(), 'obj'=>$obj); + $parameters=array('arrayfields'=>array(), 'obj'=>$obj, 'linetype'=>'stripecard'); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -1052,6 +1052,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' //var_dump($src); print ''; print '</td>'; + // Fields from hook + $parameters=array('arrayfields'=>array(), 'stripesource'=>$src, 'linetype'=>'stripecardremoteonly'); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column print '<td align="right" class="nowraponall">'; if ($user->rights->societe->creer) { From 5dbc9ddae09e2034cd1929211ae9b688a1736c30 Mon Sep 17 00:00:00 2001 From: John BOTELLA <john.botella@atm-consulting.fr> Date: Mon, 28 Jan 2019 11:56:20 +0100 Subject: [PATCH 118/183] fix travis --- htdocs/compta/sociales/class/chargesociales.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index da8f7c8f250..fbba5c13e63 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -280,7 +280,7 @@ class ChargeSociales extends CommonObject * @param User $user Utilisateur qui modifie * @return int <0 si erreur, >0 si ok */ - function update($user, $notrigger=0) + function update($user,$notrigger=0) { $error=0; $this->db->begin(); From 6f12cdf23686aab9f29b0a048f74915ecb2eb1e0 Mon Sep 17 00:00:00 2001 From: John BOTELLA <john.botella@atm-consulting.fr> Date: Mon, 28 Jan 2019 11:58:16 +0100 Subject: [PATCH 119/183] Fix travis --- htdocs/compta/sociales/class/chargesociales.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index fbba5c13e63..c3995a2202d 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -278,6 +278,7 @@ class ChargeSociales extends CommonObject * Met a jour une charge sociale * * @param User $user Utilisateur qui modifie + * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 si erreur, >0 si ok */ function update($user,$notrigger=0) From 2dea4f01f598849f8245f8928298d45095ebbbda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 16:22:36 +0100 Subject: [PATCH 120/183] Fix lang format of en_ZA --- htdocs/langs/en_ZA/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 4c30b385ef8..58dfee14958 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -7,7 +7,7 @@ SeparatorThousand=, FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd -FormatDateShortJavaInput=yyyy/MM/yy +FormatDateShortJavaInput=yyyy/MM/dd FormatDateShortJQuery=yy/mm/yy FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI From 820db4e78b3970b2059707cd817a2c6ef52cac1d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 16:22:53 +0100 Subject: [PATCH 121/183] Fix lang format --- htdocs/langs/en_ZA/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 58dfee14958..1f6a0b9245d 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -8,7 +8,7 @@ FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd FormatDateShortJavaInput=yyyy/MM/dd -FormatDateShortJQuery=yy/mm/yy +FormatDateShortJQuery=yy/mm/dd FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI FormatHourShort=%H:%M From 4545c0f13ad30da02ab2b9ef2e8f9c157b03dcfc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 16:22:36 +0100 Subject: [PATCH 122/183] Fix lang format of en_ZA --- htdocs/langs/en_ZA/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 4c30b385ef8..58dfee14958 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -7,7 +7,7 @@ SeparatorThousand=, FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd -FormatDateShortJavaInput=yyyy/MM/yy +FormatDateShortJavaInput=yyyy/MM/dd FormatDateShortJQuery=yy/mm/yy FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI From 9dbf41d6b2728ccc6ed5a28328b2a234c2834af4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 16:22:53 +0100 Subject: [PATCH 123/183] Fix lang format --- htdocs/langs/en_ZA/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 58dfee14958..1f6a0b9245d 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -8,7 +8,7 @@ FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd FormatDateShortJavaInput=yyyy/MM/dd -FormatDateShortJQuery=yy/mm/yy +FormatDateShortJQuery=yy/mm/dd FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI FormatHourShort=%H:%M From 9d1a02b0d7feb3f067f64cbb1a57d6e57325221a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 28 Jan 2019 16:25:37 +0100 Subject: [PATCH 124/183] Fix language --- htdocs/langs/en_ZA/main.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 4c30b385ef8..1f6a0b9245d 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -7,8 +7,8 @@ SeparatorThousand=, FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd -FormatDateShortJavaInput=yyyy/MM/yy -FormatDateShortJQuery=yy/mm/yy +FormatDateShortJavaInput=yyyy/MM/dd +FormatDateShortJQuery=yy/mm/dd FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI FormatHourShort=%H:%M From cc88c4f8ffc705937e184f5328a75fe1c6d08d48 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO <aspangaro.dolibarr@gmail.com> Date: Mon, 28 Jan 2019 21:39:22 +0100 Subject: [PATCH 125/183] Move my email to the new one --- .mailmap | 6 +++--- htdocs/accountancy/admin/account.php | 2 +- htdocs/accountancy/admin/accountmodel.php | 2 +- htdocs/accountancy/admin/card.php | 2 +- htdocs/accountancy/admin/categories.php | 2 +- htdocs/accountancy/admin/categories_list.php | 2 +- htdocs/accountancy/admin/export.php | 2 +- htdocs/accountancy/admin/fiscalyear.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 2 +- htdocs/accountancy/admin/fiscalyear_info.php | 2 +- htdocs/accountancy/admin/importaccounts.php | 2 +- htdocs/accountancy/admin/index.php | 2 +- htdocs/accountancy/admin/journals_list.php | 2 +- htdocs/accountancy/admin/productaccount.php | 2 +- htdocs/accountancy/bookkeeping/balance.php | 2 +- htdocs/accountancy/bookkeeping/balancebymonth.php | 2 +- htdocs/accountancy/bookkeeping/card.php | 2 +- htdocs/accountancy/bookkeeping/list.php | 2 +- htdocs/accountancy/bookkeeping/listbyaccount.php | 2 +- .../bookkeeping/thirdparty_lettering_customer.php | 2 +- .../bookkeeping/thirdparty_lettering_supplier.php | 2 +- htdocs/accountancy/class/accountancycategory.class.php | 2 +- htdocs/accountancy/class/accountancyexport.class.php | 2 +- htdocs/accountancy/class/accountancysystem.class.php | 2 +- htdocs/accountancy/class/accountingaccount.class.php | 2 +- htdocs/accountancy/class/accountingjournal.class.php | 2 +- htdocs/accountancy/class/bookkeeping.class.php | 2 +- htdocs/accountancy/class/lettering.class.php | 2 +- htdocs/accountancy/customer/card.php | 2 +- htdocs/accountancy/customer/index.php | 2 +- htdocs/accountancy/customer/lines.php | 2 +- htdocs/accountancy/expensereport/card.php | 2 +- htdocs/accountancy/expensereport/index.php | 2 +- htdocs/accountancy/expensereport/lines.php | 2 +- htdocs/accountancy/expensereport/list.php | 2 +- htdocs/accountancy/journal/expensereportsjournal.php | 2 +- htdocs/accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- htdocs/accountancy/supplier/card.php | 2 +- htdocs/accountancy/supplier/index.php | 2 +- htdocs/accountancy/supplier/lines.php | 2 +- htdocs/accountancy/supplier/list.php | 2 +- htdocs/accountancy/tpl/export_journal.tpl.php | 2 +- htdocs/adherents/card.php | 2 +- htdocs/adherents/class/adherent.class.php | 2 +- htdocs/adherents/list.php | 2 +- htdocs/adherents/subscription.php | 2 +- htdocs/adherents/type.php | 2 +- htdocs/admin/accountant.php | 2 +- htdocs/admin/company.php | 2 +- htdocs/admin/dict.php | 2 +- htdocs/admin/loan.php | 2 +- htdocs/admin/mails_templates.php | 2 +- htdocs/admin/openinghours.php | 2 +- htdocs/admin/salaries.php | 2 +- htdocs/admin/taxes.php | 2 +- htdocs/asset/admin/assets_extrafields.php | 2 +- htdocs/asset/admin/assets_type_extrafields.php | 2 +- htdocs/asset/admin/setup.php | 2 +- htdocs/asset/card.php | 2 +- htdocs/asset/class/asset.class.php | 2 +- htdocs/asset/class/asset_type.class.php | 2 +- htdocs/asset/document.php | 2 +- htdocs/asset/info.php | 2 +- htdocs/asset/list.php | 2 +- htdocs/asset/note.php | 2 +- htdocs/asset/type.php | 2 +- htdocs/comm/action/card.php | 2 +- htdocs/comm/card.php | 2 +- htdocs/compta/bank/bankentries_list.php | 2 +- htdocs/compta/bank/card.php | 2 +- htdocs/compta/bank/class/account.class.php | 2 +- htdocs/compta/bank/class/paymentvarious.class.php | 2 +- htdocs/compta/bank/ligne.php | 2 +- htdocs/compta/bank/various_payment/card.php | 2 +- htdocs/compta/bank/various_payment/document.php | 2 +- htdocs/compta/bank/various_payment/info.php | 2 +- htdocs/compta/bank/various_payment/list.php | 2 +- htdocs/compta/cashcontrol/report.php | 2 +- htdocs/compta/charges/index.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/compta/facture/fiche-rec.php | 2 +- htdocs/compta/facture/invoicetemplate_list.php | 2 +- htdocs/compta/journal/purchasesjournal.php | 2 +- htdocs/compta/journal/sellsjournal.php | 2 +- htdocs/compta/paiement/cheque/card.php | 2 +- htdocs/compta/paiement/cheque/list.php | 2 +- htdocs/compta/paiement/list.php | 2 +- htdocs/compta/resultat/result.php | 2 +- htdocs/compta/salaries/card.php | 2 +- htdocs/compta/salaries/class/paymentsalary.class.php | 2 +- htdocs/compta/salaries/class/salariesstats.class.php | 2 +- htdocs/compta/salaries/document.php | 2 +- htdocs/compta/salaries/info.php | 2 +- htdocs/compta/salaries/list.php | 2 +- htdocs/compta/salaries/stats/index.php | 2 +- htdocs/compta/sociales/card.php | 2 +- htdocs/compta/sociales/class/chargesociales.class.php | 2 +- htdocs/compta/sociales/payments.php | 2 +- htdocs/compta/tva/card.php | 2 +- htdocs/compta/tva/class/tva.class.php | 2 +- htdocs/compta/tva/info.php | 2 +- htdocs/compta/tva/list.php | 2 +- htdocs/contact/agenda.php | 2 +- htdocs/contact/card.php | 2 +- htdocs/contact/class/contact.class.php | 2 +- htdocs/contact/document.php | 2 +- htdocs/contact/list.php | 2 +- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/fiscalyear.class.php | 2 +- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/class/html.formaccounting.class.php | 2 +- htdocs/core/class/html.formbank.class.php | 2 +- htdocs/core/lib/accounting.lib.php | 2 +- htdocs/core/lib/asset.lib.php | 2 +- htdocs/core/lib/bank.lib.php | 2 +- htdocs/core/lib/company.lib.php | 2 +- htdocs/core/lib/doleditor.lib.php | 2 +- htdocs/core/lib/donation.lib.php | 2 +- htdocs/core/lib/fiscalyear.lib.php | 2 +- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/lib/hrm.lib.php | 2 +- htdocs/core/lib/loan.lib.php | 2 +- htdocs/core/lib/member.lib.php | 2 +- htdocs/core/lib/usergroups.lib.php | 2 +- htdocs/core/lib/vat.lib.php | 2 +- htdocs/core/modules/dons/html_cerfafr.modules.php | 2 +- .../core/modules/expensereport/doc/pdf_standard.modules.php | 2 +- htdocs/core/modules/modAccounting.class.php | 2 +- htdocs/core/modules/modAdherent.class.php | 2 +- htdocs/core/modules/modAsset.class.php | 2 +- htdocs/core/modules/modDon.class.php | 2 +- htdocs/core/modules/modHRM.class.php | 2 +- htdocs/core/modules/modLoan.class.php | 2 +- htdocs/core/modules/modSalaries.class.php | 2 +- htdocs/core/modules/modSocialNetworks.class.php | 2 +- htdocs/core/modules/modStripe.class.php | 2 +- .../supplier_invoice/mod_facture_fournisseur_cactus.php | 2 +- .../supplier_invoice/mod_facture_fournisseur_tulip.php | 2 +- htdocs/don/admin/donation.php | 2 +- htdocs/don/admin/donation_extrafields.php | 2 +- htdocs/don/card.php | 2 +- htdocs/don/class/don.class.php | 2 +- htdocs/don/class/paymentdonation.class.php | 2 +- htdocs/don/document.php | 2 +- htdocs/don/info.php | 2 +- htdocs/don/note.php | 2 +- htdocs/don/payment/card.php | 2 +- htdocs/don/payment/payment.php | 2 +- htdocs/don/stats/index.php | 2 +- htdocs/ecm/dir_add_card.php | 2 +- htdocs/ecm/index_auto.php | 2 +- htdocs/expensereport/card.php | 2 +- htdocs/expensereport/class/expensereport.class.php | 2 +- htdocs/expensereport/class/paymentexpensereport.class.php | 2 +- htdocs/expensereport/index.php | 2 +- htdocs/expensereport/list.php | 2 +- htdocs/expensereport/payment/card.php | 2 +- htdocs/expensereport/payment/info.php | 2 +- htdocs/expensereport/payment/payment.php | 2 +- htdocs/fichinter/card-rec.php | 2 +- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/fourn/facture/document.php | 2 +- htdocs/fourn/facture/info.php | 2 +- htdocs/fourn/facture/paiement.php | 2 +- htdocs/holiday/card.php | 2 +- htdocs/hrm/admin/admin_establishment.php | 2 +- htdocs/hrm/admin/admin_hrm.php | 2 +- htdocs/hrm/class/establishment.class.php | 2 +- htdocs/hrm/establishment/card.php | 2 +- htdocs/hrm/establishment/info.php | 2 +- htdocs/hrm/index.php | 2 +- htdocs/install/mysql/data/llx_00_c_country.sql | 2 +- htdocs/install/mysql/data/llx_accounting_abc.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_be.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_bf.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_bj.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cd.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cf.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cg.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_ci.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cl.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cm.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_dk.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_es.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_fr.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_ga.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_gq.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_km.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_ml.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_ne.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_sn.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_td.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_tg.sql | 2 +- htdocs/install/mysql/data/llx_accounting_category.sql | 2 +- htdocs/install/mysql/data/llx_c_hrm_department.sql | 2 +- htdocs/install/mysql/data/llx_c_hrm_function.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_account.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql | 2 +- .../install/mysql/tables/llx_accounting_bookkeeping_tmp.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_journal.key.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_journal.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_system.sql | 2 +- htdocs/install/mysql/tables/llx_asset.key.sql | 2 +- htdocs/install/mysql/tables/llx_asset.sql | 2 +- htdocs/install/mysql/tables/llx_asset_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_asset_type.key.sql | 2 +- htdocs/install/mysql/tables/llx_asset_type.sql | 2 +- .../install/mysql/tables/llx_asset_type_extrafields.key.sql | 2 +- htdocs/install/mysql/tables/llx_asset_type_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_bank_account.sql | 2 +- .../install/mysql/tables/llx_c_accounting_category.key.sql | 2 +- htdocs/install/mysql/tables/llx_c_accounting_category.sql | 2 +- htdocs/install/mysql/tables/llx_c_country.sql | 2 +- htdocs/install/mysql/tables/llx_c_hrm_department.sql | 2 +- htdocs/install/mysql/tables/llx_c_hrm_function.sql | 2 +- htdocs/install/mysql/tables/llx_c_paiement.sql | 2 +- htdocs/install/mysql/tables/llx_c_tva.sql | 2 +- htdocs/install/mysql/tables/llx_c_type_fees.sql | 2 +- htdocs/install/mysql/tables/llx_chargesociales.sql | 2 +- htdocs/install/mysql/tables/llx_don.sql | 2 +- htdocs/install/mysql/tables/llx_don_extrafields.key.sql | 2 +- htdocs/install/mysql/tables/llx_don_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_establishment.sql | 2 +- htdocs/install/mysql/tables/llx_loan.sql | 2 +- htdocs/install/mysql/tables/llx_loan_schedule.sql | 2 +- htdocs/install/mysql/tables/llx_payment_donation.sql | 2 +- htdocs/install/mysql/tables/llx_payment_expensereport.sql | 2 +- htdocs/install/mysql/tables/llx_payment_loan.sql | 2 +- htdocs/install/mysql/tables/llx_payment_salary.sql | 2 +- htdocs/install/mysql/tables/llx_payment_various.sql | 2 +- htdocs/install/mysql/tables/llx_user_rib.sql | 2 +- htdocs/langs/en_US/assets.lang | 2 +- htdocs/langs/fr_FR/assets.lang | 2 +- htdocs/langs/lv_LV/assets.lang | 2 +- htdocs/langs/pt_BR/assets.lang | 2 +- htdocs/loan/card.php | 2 +- htdocs/loan/class/loan.class.php | 2 +- htdocs/loan/class/paymentloan.class.php | 2 +- htdocs/loan/createschedule.php | 2 +- htdocs/loan/document.php | 2 +- htdocs/loan/info.php | 2 +- htdocs/loan/list.php | 2 +- htdocs/loan/note.php | 2 +- htdocs/loan/payment/card.php | 2 +- htdocs/loan/payment/payment.php | 2 +- htdocs/loan/schedule.php | 2 +- htdocs/opensurvey/wizard/create_survey.php | 2 +- htdocs/product/class/product.class.php | 2 +- htdocs/product/fournisseurs.php | 2 +- htdocs/product/price.php | 2 +- htdocs/projet/element.php | 2 +- htdocs/public/members/new.php | 2 +- htdocs/public/members/public_card.php | 2 +- htdocs/public/stripe/newpayment.php | 2 +- htdocs/societe/card.php | 2 +- htdocs/societe/class/societe.class.php | 2 +- htdocs/societe/contact.php | 2 +- htdocs/stripe/admin/stripe.php | 2 +- htdocs/stripe/config.php | 2 +- htdocs/stripe/lib/stripe.lib.php | 2 +- htdocs/theme/md/style.css.php | 2 +- htdocs/user/bank.php | 2 +- htdocs/user/card.php | 2 +- htdocs/user/class/user.class.php | 2 +- htdocs/user/class/userbankaccount.class.php | 2 +- htdocs/user/list.php | 2 +- scripts/accountancy/export-thirdpartyaccount.php | 2 +- 270 files changed, 272 insertions(+), 272 deletions(-) diff --git a/.mailmap b/.mailmap index 436b557ee63..ae4b0eb7146 100644 --- a/.mailmap +++ b/.mailmap @@ -21,9 +21,9 @@ Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry.mail@gmail. Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-conept.pro> Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry@open-concept.pro> Florian Henry <florian.henry@open-concept.pro> HENRY Florian <florian.henry@open-concept.pro> -Alexandre Spangaro <aspangaro.dolibarr@gmail.com> aspangaro <aspangaro.dolibarr@gmail.com> -Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Spangaro Alexandre <aspangaro.dolibarr@gmail.com> -Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Alexandre SPANGARO <aspangaro.dolibarr@gmail.com> +Alexandre Spangaro <aspangaro@open-dsi.fr> aspangaro <aspangaro@open-dsi.fr> +Alexandre Spangaro <aspangaro@open-dsi.fr> Spangaro Alexandre <aspangaro@open-dsi.fr> +Alexandre Spangaro <aspangaro@open-dsi.fr> Alexandre SPANGARO <aspangaro@open-dsi.fr> Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> Raphaël Doursenaud <rdoursenaud@free.fr> Philippe Grand <philippe.grand@atoo-net.com> Grand Philippe <contact@atoo-net.com> Philippe Grand <philippe.grand@atoo-net.com> Philippe GRAND <philippe.grand@atoo-net.com> diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 45ecb5cd6e6..78493da1e71 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 0d1d5625958..159173ce1af 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes <ryounes@gmail.com> * Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr> - * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index b8e6945b632..449d425b846 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 290aa93c0b7..14eec9fa58a 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro> - * Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index ebd8011469e..a508b7ed6c8 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 6ef4bdda90b..21fef9a1930 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 26620c635e2..06641d7d0a9 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 42a6710c3c1..19f6da0c922 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index 3141a624194..9dfa7a681e2 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/accountancy/admin/importaccounts.php b/htdocs/accountancy/admin/importaccounts.php index d3a62b5a6ab..236ca09cfee 100644 --- a/htdocs/accountancy/admin/importaccounts.php +++ b/htdocs/accountancy/admin/importaccounts.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 536b3c38148..b3b8a67241b 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index f26aba437e5..f9d495968ac 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index bce4f12e559..78d2ac08e14 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com> diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 6a323121a6e..8b35c9b4cec 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index a01c42b285a..a5327a6cd35 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 4cc03f7a529..105c87409c1 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 509dcd88abe..41939ffd0ce 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index c2991ce2598..34481d7680d 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr> * Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 19e0dcbaaac..7ca432bbbc1 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -3,7 +3,7 @@ * Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index 27d04962e1b..f9489040c36 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -3,7 +3,7 @@ * Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 70752f6d268..6885df63b61 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro> - * Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 6f9c0534d2f..d61932884dc 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr> - * Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com> * Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr> diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index b70fa7238bb..65852258867 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 38f4e49f2a6..681073332d7 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com> diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 94cfbf3bd66..2a2d050af7b 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 047628a7b96..2aaf918b197 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2014-2017 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015-2017 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index 1130020b01d..a0b2c763d96 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 7d506c6c72c..5c1dfc5ccbb 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 36f840315aa..9c9d0db38a4 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 4a4cfa928ac..0a4065762aa 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2014-2016 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index b245e2539a7..eb620d7bf14 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index f34456a95b9..81b1f81416a 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index c6fa1202171..12182bdaa43 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 078a91bc96e..c0d77fc753a 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index cb58737b6f5..34a8d219b90 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -3,7 +3,7 @@ * Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 2ff45e51bd5..54024fe6471 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -3,7 +3,7 @@ * Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 09bc9a18e9a..9526bc763ec 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -4,7 +4,7 @@ * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 8de24e09a9e..10e52d6c029 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index d63f8ee52fa..fcc6bbecd81 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 585c8400680..cf5d36d6e80 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 1a315897f02..e04be12df3b 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s diff --git a/htdocs/accountancy/tpl/export_journal.tpl.php b/htdocs/accountancy/tpl/export_journal.tpl.php index ca3c9c49ea0..97f0da548ca 100644 --- a/htdocs/accountancy/tpl/export_journal.tpl.php +++ b/htdocs/accountancy/tpl/export_journal.tpl.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com> * * 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 2f2c5f9dde8..7a6898da9d3 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2018 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2012 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2012-2018 Philippe Grand <philippe.grand@atoo-net.com> - * Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index d12d4b31aa2..959dacba2c1 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2009-2017 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015-2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 8a8186fcd2b..d27c2365f47 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 86c31e6cd04..0c5618ca1d9 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012-2017 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index b5407646359..499f41dce3e 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index 92d80464088..7b24260cd8d 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 41786c2c55b..c0599a666dc 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com> * * 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 c57a511b3c9..990bbec2932 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes <ryounes@gmail.com> * Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr> - * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 419f6efbee9..20e0b59199a 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 35f5e5d6e72..49db8b8af23 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes <ryounes@gmail.com> * Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr> - * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> diff --git a/htdocs/admin/openinghours.php b/htdocs/admin/openinghours.php index 19225273bfc..da5aed70c81 100644 --- a/htdocs/admin/openinghours.php +++ b/htdocs/admin/openinghours.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index f724bd9e50c..057c2cfa3db 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2014-2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 76e7496cc4e..b3fd9ef4359 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/admin/assets_extrafields.php b/htdocs/asset/admin/assets_extrafields.php index f220d5cb849..2735981b564 100644 --- a/htdocs/asset/admin/assets_extrafields.php +++ b/htdocs/asset/admin/assets_extrafields.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/admin/assets_type_extrafields.php b/htdocs/asset/admin/assets_type_extrafields.php index a791078f37b..7038f6df5a0 100644 --- a/htdocs/asset/admin/assets_type_extrafields.php +++ b/htdocs/asset/admin/assets_type_extrafields.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 57738309abd..236315b52d8 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index d8b8f3aa056..e24e6a96c83 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 93f2e88f725..aafdbacc791 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index 54421b8910f..29851185391 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php index c1332ed10a2..6433b30a543 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/info.php b/htdocs/asset/info.php index e01316ae685..3c6260ffde7 100644 --- a/htdocs/asset/info.php +++ b/htdocs/asset/info.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index fa1ef9f2760..c6710f290cc 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index f76c6ea028f..7e74ec0a805 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 861bbd2130e..31c328d9326 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 0c2bbb2e10f..053d6809c40 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 916143b896a..cc5a0e6e29a 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> * Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * 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 a3928cbc0ca..67e6deace4c 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -6,7 +6,7 @@ * Copyright (C) 2014 Florian Henry <florian.henry@open-cooncept.pro> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index b63136c8581..d20802dabbd 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2016 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 9e94d262c18..7c72ad8c362 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index cb8f21ecc5a..e126937e95c 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index d359a5c814f..f73073f2fe1 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Christophe Combelles <ccomb@free.fr> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2016 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index d2adc857ec7..d9fa5c3c9a1 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index c255ef19c16..6b864c09f81 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php index d9f8709b155..34be85c6975 100644 --- a/htdocs/compta/bank/various_payment/info.php +++ b/htdocs/compta/bank/various_payment/info.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 91608666601..c6e5d95e3db 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 01c5aed49e7..85ef39a6c97 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -6,7 +6,7 @@ * Copyright (C) 2014 Florian Henry <florian.henry@open-cooncept.pro> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 66dc955aee7..9fe05e57bd9 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 14d01419037..9ed5e234882 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -15,7 +15,7 @@ * Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 7cc63b10e72..c0dd351f009 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -6,7 +6,7 @@ * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr> * Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 1b70c50c8f4..a025829f274 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -6,7 +6,7 @@ * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 2ab17905715..e979e297dd7 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -3,7 +3,7 @@ * Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info> * Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2011-2012 Alexandre spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2011-2012 Alexandre spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 42b2c8a95af..5aec70b1dec 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -3,7 +3,7 @@ * Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info> * Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2011-2012 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2011-2012 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index e186dfce4cd..f710ff2615e 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -4,7 +4,7 @@ * Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2011-2016 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com> - * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * 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 d84b26f78b2..ab074e58541 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 12669947cff..9234ca1e68d 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -5,7 +5,7 @@ * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com> * diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 16d2631686c..85f38cb9905 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2016-2017 Jamal Elbaz <jamelbaz@gmail.com> - * Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Laurent Destailleur <eldy@destailleur.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 474fcd0a6cb..91c0e169b5d 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com> diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 8f55b5804cc..21423f85e87 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php index 1a96fbc56aa..befd0dd5c51 100644 --- a/htdocs/compta/salaries/class/salariesstats.class.php +++ b/htdocs/compta/salaries/class/salariesstats.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (c) 2018 Fidesio <contact@fidesio.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index 33e92ecaf3b..0ce0fb66e52 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -6,7 +6,7 @@ * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> * Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/compta/salaries/info.php b/htdocs/compta/salaries/info.php index 87d24ceb406..c7a180346fb 100644 --- a/htdocs/compta/salaries/info.php +++ b/htdocs/compta/salaries/info.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com> - * Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/compta/salaries/list.php b/htdocs/compta/salaries/list.php index c7f5970723e..761d40a5227 100644 --- a/htdocs/compta/salaries/list.php +++ b/htdocs/compta/salaries/list.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * diff --git a/htdocs/compta/salaries/stats/index.php b/htdocs/compta/salaries/stats/index.php index 6471f66cf57..5b1d5c1b973 100644 --- a/htdocs/compta/salaries/stats/index.php +++ b/htdocs/compta/salaries/stats/index.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Fidesio <contact@fidesio.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 6a0d53d6987..b31339a8d5f 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2016-2018 Frédéric France <frederic.france@netlogic.fr> - * Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 1828e750914..57646cebc7c 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2016 Frédéric France <frederic.france@free.fr> - * Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index efdd39d2205..bb194f8cb3e 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index d5779266661..985c0b834a5 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 5da7b0e144c..fba25b0e752 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php index 4a2308bd0bd..feea451f1db 100644 --- a/htdocs/compta/tva/info.php +++ b/htdocs/compta/tva/info.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 0d3b7ec135d..d54a99acc76 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index fbd3e46b9a7..3df7945a08e 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 9371f1e3200..6b6bc9f69da 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4dbd78f5085..bd7819ee299 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be> * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index d118c4de3b9..3dbf5f660a7 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com> * diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 087db5ddea6..8ca5ce040ac 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es> diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 649b9d317b7..fecc8b560c0 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Bahfir abbes <dolipar@dolipar.org> * Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr> * Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com> diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index cf6a3cf345d..e3f52f703b3 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index bb710c5e29f..68edd564020 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -15,7 +15,7 @@ * Copyright (C) 2012-2016 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> - * Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 41476fb4966..8b4c4e5390d 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2016 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/class/html.formbank.class.php b/htdocs/core/class/html.formbank.class.php index 9cf60cc45b1..b4fd2df88f3 100644 --- a/htdocs/core/class/html.formbank.class.php +++ b/htdocs/core/class/html.formbank.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Marcos García <marcosgdf@gmail.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 30ace607536..3eebbde72e5 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/asset.lib.php b/htdocs/core/lib/asset.lib.php index b0a4a6b81a9..2a7fbba5fc1 100644 --- a/htdocs/core/lib/asset.lib.php +++ b/htdocs/core/lib/asset.lib.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index c03cd09ff16..15a2e90e7bf 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2006-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 55b4d80ac68..c63883bdb29 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -6,7 +6,7 @@ * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Christophe Battarel <contact@altairis.fr> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015-2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com> diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index 5ed80465428..5df18c652bf 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/lib/donation.lib.php b/htdocs/core/lib/donation.lib.php index 665ff7cb4e3..77de332f5e3 100644 --- a/htdocs/core/lib/donation.lib.php +++ b/htdocs/core/lib/donation.lib.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/lib/fiscalyear.lib.php b/htdocs/core/lib/fiscalyear.lib.php index 083930ee9f9..6ea24bfacc2 100644 --- a/htdocs/core/lib/fiscalyear.lib.php +++ b/htdocs/core/lib/fiscalyear.lib.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 81a3adecdd6..52e5257907d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9,7 +9,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> * Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr> * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> diff --git a/htdocs/core/lib/hrm.lib.php b/htdocs/core/lib/hrm.lib.php index 08b0e3be01a..f38d72ec275 100644 --- a/htdocs/core/lib/hrm.lib.php +++ b/htdocs/core/lib/hrm.lib.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php index 0b617bb0d5c..0624a7df072 100644 --- a/htdocs/core/lib/loan.lib.php +++ b/htdocs/core/lib/loan.lib.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index a5016579cd4..7a6ed21cb4a 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com> * diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 224d8407c48..70566cc8e0e 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2010-2017 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/vat.lib.php b/htdocs/core/lib/vat.lib.php index 1cb564da4ac..9ba4a1617ae 100644 --- a/htdocs/core/lib/vat.lib.php +++ b/htdocs/core/lib/vat.lib.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index faf5b00d2c7..0673ed304e3 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2012 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2014-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2014-2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Benoit Bruchard <benoitb21@gmail.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index ec65dd80f93..db1c5c51bd2 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016-2018 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018 Francis Appels <francis.appels@z-application.com> diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index c47e8d310f1..aea8a7f9ae2 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net> diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 006c529fc02..192ed2ae953 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2014-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/modules/modAsset.class.php b/htdocs/core/modules/modAsset.class.php index fc123cb3cd6..2cb6f7031dc 100644 --- a/htdocs/core/modules/modAsset.class.php +++ b/htdocs/core/modules/modAsset.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index 10665c91b93..f92c1cea2a5 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index 9c2559f1218..4a083f272c0 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/modules/modLoan.class.php b/htdocs/core/modules/modLoan.class.php index 2c098961cc1..2624d6075a8 100644 --- a/htdocs/core/modules/modLoan.class.php +++ b/htdocs/core/modules/modLoan.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php index 9fe00cead73..a35070ef303 100644 --- a/htdocs/core/modules/modSalaries.class.php +++ b/htdocs/core/modules/modSalaries.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2014 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/modules/modSocialNetworks.class.php b/htdocs/core/modules/modSocialNetworks.class.php index 137547bfb15..dfc325d3e68 100644 --- a/htdocs/core/modules/modSocialNetworks.class.php +++ b/htdocs/core/modules/modSocialNetworks.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index 9a1584da477..5124d46e69a 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Saasprov <saasprov@gmail.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index b4954a1dd9b..80bdd94c2c2 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com> - * Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 39efa7d676b..6f2106fd380 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index 99a801e9e25..7fda34c1508 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012-2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013-2017 Philippe Grand <philippe.grand@atoo-net.com> - * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Benoit Bruchard <benoitb21@gmail.com> * Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net> * diff --git a/htdocs/don/admin/donation_extrafields.php b/htdocs/don/admin/donation_extrafields.php index c819cde1e08..82e3a92c2b0 100644 --- a/htdocs/don/admin/donation_extrafields.php +++ b/htdocs/don/admin/donation_extrafields.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 0efcd09f2f0..ef7dd8cf84c 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index ec0e3006974..d62b81708a6 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net> * diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index ba322f9fe08..7012a7f6601 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/don/document.php b/htdocs/don/document.php index cdcb5648501..fa738702b80 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -6,7 +6,7 @@ * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> * Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/don/info.php b/htdocs/don/info.php index 30c2129b6c6..a57070190ad 100644 --- a/htdocs/don/info.php +++ b/htdocs/don/info.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/don/note.php b/htdocs/don/note.php index 60bf2c1939f..be95e0db0d1 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index bf9c2768815..c18c3bc1790 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index e016bb80a8e..948646996a2 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index 56657694f80..383a57fd59d 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index a2c0762321c..c1aba1b628b 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2008-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2008-2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index a3390475f44..3c13a221e2b 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2008-2010 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index a2713bd836f..ac4b86c172a 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index de310fe0516..52768896073 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com> * Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (c) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es> diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index b18eae8c514..0762a8c0cf5 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index 4748bd2c2a4..516f4a5a534 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 7e94a10418a..0278c2d37c8 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com> * diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index 7e1a1bf0d61..4593129a7fc 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/expensereport/payment/info.php b/htdocs/expensereport/payment/info.php index 6c7f8dd99c6..2de6684cf1b 100644 --- a/htdocs/expensereport/payment/info.php +++ b/htdocs/expensereport/payment/info.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2013 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index a4346ce34bc..3985f813edd 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 837b77eb3aa..62e16c0e483 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -6,7 +6,7 @@ * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016-2018 Charlie Benke <charlie@patas-monkey.com> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index e4463d7ba65..1f8b7b3ba8b 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -10,7 +10,7 @@ * Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com> * Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> - * Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 5c616a70b0e..a2a96762d9d 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -8,7 +8,7 @@ * Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index c13be230789..6954473ee43 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -4,7 +4,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> - * Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index dfca394c7cb..4fd287b1eb5 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index c5194aa7344..377407831de 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -8,7 +8,7 @@ * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index f6b6586a9ec..3360a150959 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2012-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012-2016 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2017 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index 98221ce6594..bd6e5b012cd 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php index c61480347bb..13f678e40d8 100644 --- a/htdocs/hrm/admin/admin_hrm.php +++ b/htdocs/hrm/admin/admin_hrm.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 7e967176582..e686a93aefd 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 4343e3a2c50..0bb32c4f4c3 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/hrm/establishment/info.php b/htdocs/hrm/establishment/info.php index 35e4f483e3d..7fee0e8bc79 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 3129760bc7a..af334e3c456 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com> * Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012-2014 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql index 0ea1a55d3d3..a4c09f8ae30 100644 --- a/htdocs/install/mysql/data/llx_00_c_country.sql +++ b/htdocs/install/mysql/data/llx_00_c_country.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> --- Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_abc.sql b/htdocs/install/mysql/data/llx_accounting_abc.sql index 6e4c62d8228..b1dcdb64c35 100644 --- a/htdocs/install/mysql/data/llx_accounting_abc.sql +++ b/htdocs/install/mysql/data/llx_accounting_abc.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> --- Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> -- Copyright (C) 2015-2017 Juanjo Menent <jmenent@2byte.es> -- Copyright (C) 2018 Abbes bahfir <dolipar@dolipar.org> -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_be.sql b/htdocs/install/mysql/data/llx_accounting_account_be.sql index 610913ed36e..75ee10f7de8 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_be.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_be.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> --- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_bf.sql b/htdocs/install/mysql/data/llx_accounting_account_bf.sql index 337ae5b905d..51961097b77 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_bf.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_bf.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_bj.sql b/htdocs/install/mysql/data/llx_accounting_account_bj.sql index 0bca4b646a4..13aa8b135e7 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_bj.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_bj.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_cd.sql b/htdocs/install/mysql/data/llx_accounting_account_cd.sql index 0df56ea4bbf..25e1e5b7809 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cd.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cd.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_cf.sql b/htdocs/install/mysql/data/llx_accounting_account_cf.sql index b38c3c02a09..6968641d6ae 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cf.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cf.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_cg.sql b/htdocs/install/mysql/data/llx_accounting_account_cg.sql index 7317b8f0bee..92d3fa34428 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cg.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cg.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_ci.sql b/htdocs/install/mysql/data/llx_accounting_account_ci.sql index b12a8e1068f..9df71c78316 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ci.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ci.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_cl.sql b/htdocs/install/mysql/data/llx_accounting_account_cl.sql index 3029bc9350d..3e962a18680 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cl.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cl.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> --- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es> -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/data/llx_accounting_account_cm.sql b/htdocs/install/mysql/data/llx_accounting_account_cm.sql index 26bbbce4338..c2514a83379 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cm.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cm.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_dk.sql b/htdocs/install/mysql/data/llx_accounting_account_dk.sql index f7b3ea7e519..83d9942d9db 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_dk.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_dk.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> --- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_es.sql b/htdocs/install/mysql/data/llx_accounting_account_es.sql index ef7d5aaa634..93a80265bb9 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_es.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_es.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> --- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_fr.sql b/htdocs/install/mysql/data/llx_accounting_account_fr.sql index ef8ef176597..267602143f3 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_fr.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_fr.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> --- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_ga.sql b/htdocs/install/mysql/data/llx_accounting_account_ga.sql index 06a14f69214..f99a42df171 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ga.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ga.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_gq.sql b/htdocs/install/mysql/data/llx_accounting_account_gq.sql index f38dc2365f8..dd82a35d64c 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_gq.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_gq.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_km.sql b/htdocs/install/mysql/data/llx_accounting_account_km.sql index 64b42ee3730..14cb877f999 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_km.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_km.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_ml.sql b/htdocs/install/mysql/data/llx_accounting_account_ml.sql index c18fb8a4166..d54f0fb7844 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ml.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ml.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_ne.sql b/htdocs/install/mysql/data/llx_accounting_account_ne.sql index dbdf2837bda..e43ff41a0a1 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ne.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ne.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_sn.sql b/htdocs/install/mysql/data/llx_accounting_account_sn.sql index 525f927bf17..c4eec7245a5 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_sn.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_sn.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_td.sql b/htdocs/install/mysql/data/llx_accounting_account_td.sql index c09548f12e3..71871663bc3 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_td.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_td.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_account_tg.sql b/htdocs/install/mysql/data/llx_accounting_account_tg.sql index 31bcbe2ae27..21e3989fd74 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_tg.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_tg.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_accounting_category.sql b/htdocs/install/mysql/data/llx_accounting_category.sql index 3d96ea205eb..a569114506e 100644 --- a/htdocs/install/mysql/data/llx_accounting_category.sql +++ b/htdocs/install/mysql/data/llx_accounting_category.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> -- Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/data/llx_c_hrm_department.sql b/htdocs/install/mysql/data/llx_c_hrm_department.sql index c4865ad9e30..714963896cc 100644 --- a/htdocs/install/mysql/data/llx_c_hrm_department.sql +++ b/htdocs/install/mysql/data/llx_c_hrm_department.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr> --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/data/llx_c_hrm_function.sql b/htdocs/install/mysql/data/llx_c_hrm_function.sql index dd5c6e832bd..900439f9709 100644 --- a/htdocs/install/mysql/data/llx_c_hrm_function.sql +++ b/htdocs/install/mysql/data/llx_c_hrm_function.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr> --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_accounting_account.sql b/htdocs/install/mysql/tables/llx_accounting_account.sql index 79215115cfb..727965f6a9d 100644 --- a/htdocs/install/mysql/tables/llx_accounting_account.sql +++ b/htdocs/install/mysql/tables/llx_accounting_account.sql @@ -1,7 +1,7 @@ -- ============================================================================ -- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> --- Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index af6cd66826d..af693c273a4 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> --- Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql index 2798a3d48e9..d8b1fd81066 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com> --- Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql index 89fd3ac8780..4cff341ed52 100644 --- a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql +++ b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_accounting_journal.key.sql b/htdocs/install/mysql/tables/llx_accounting_journal.key.sql index 701c39e06a2..7e16f707710 100644 --- a/htdocs/install/mysql/tables/llx_accounting_journal.key.sql +++ b/htdocs/install/mysql/tables/llx_accounting_journal.key.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_accounting_journal.sql b/htdocs/install/mysql/tables/llx_accounting_journal.sql index 51f1f972859..80d129ba3f6 100644 --- a/htdocs/install/mysql/tables/llx_accounting_journal.sql +++ b/htdocs/install/mysql/tables/llx_accounting_journal.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_accounting_system.sql b/htdocs/install/mysql/tables/llx_accounting_system.sql index 69f31eaa15f..cbee4ee25d3 100644 --- a/htdocs/install/mysql/tables/llx_accounting_system.sql +++ b/htdocs/install/mysql/tables/llx_accounting_system.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net> --- Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_asset.key.sql b/htdocs/install/mysql/tables/llx_asset.key.sql index 31bed33a3ee..101a5d50250 100644 --- a/htdocs/install/mysql/tables/llx_asset.key.sql +++ b/htdocs/install/mysql/tables/llx_asset.key.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_asset.sql b/htdocs/install/mysql/tables/llx_asset.sql index d6eba5ed93b..a0891ef4b0e 100644 --- a/htdocs/install/mysql/tables/llx_asset.sql +++ b/htdocs/install/mysql/tables/llx_asset.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_asset_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_extrafields.sql index bc5eedae6d6..19a3edf6ddc 100644 --- a/htdocs/install/mysql/tables/llx_asset_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_extrafields.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_asset_type.key.sql b/htdocs/install/mysql/tables/llx_asset_type.key.sql index 2186a4aafd2..412f2ffff20 100644 --- a/htdocs/install/mysql/tables/llx_asset_type.key.sql +++ b/htdocs/install/mysql/tables/llx_asset_type.key.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_asset_type.sql b/htdocs/install/mysql/tables/llx_asset_type.sql index 6b6a8b23db1..7a8866456b1 100644 --- a/htdocs/install/mysql/tables/llx_asset_type.sql +++ b/htdocs/install/mysql/tables/llx_asset_type.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql b/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql index dbcc2500df8..22c2eee9753 100644 --- a/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql index 1b98bd3f524..2faae65702b 100644 --- a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_bank_account.sql b/htdocs/install/mysql/tables/llx_bank_account.sql index 3da5a8d4ec8..ebe6672e70d 100644 --- a/htdocs/install/mysql/tables/llx_bank_account.sql +++ b/htdocs/install/mysql/tables/llx_bank_account.sql @@ -2,7 +2,7 @@ -- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> --- Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql b/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql index be927f6e761..91fe439e46d 100644 --- a/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql +++ b/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_c_accounting_category.sql b/htdocs/install/mysql/tables/llx_c_accounting_category.sql index 9df9a9d6ab0..275e001f18d 100644 --- a/htdocs/install/mysql/tables/llx_c_accounting_category.sql +++ b/htdocs/install/mysql/tables/llx_c_accounting_category.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> -- Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro> -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_c_country.sql b/htdocs/install/mysql/tables/llx_c_country.sql index a955d76ea81..ab3935c3103 100644 --- a/htdocs/install/mysql/tables/llx_c_country.sql +++ b/htdocs/install/mysql/tables/llx_c_country.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> --- Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_c_hrm_department.sql b/htdocs/install/mysql/tables/llx_c_hrm_department.sql index f9432d8b821..3407f38d0bd 100644 --- a/htdocs/install/mysql/tables/llx_c_hrm_department.sql +++ b/htdocs/install/mysql/tables/llx_c_hrm_department.sql @@ -1,6 +1,6 @@ -- -- Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr> --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_c_hrm_function.sql b/htdocs/install/mysql/tables/llx_c_hrm_function.sql index f3f87461866..38b63bfc5db 100644 --- a/htdocs/install/mysql/tables/llx_c_hrm_function.sql +++ b/htdocs/install/mysql/tables/llx_c_hrm_function.sql @@ -1,6 +1,6 @@ -- -- Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr> --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_c_paiement.sql b/htdocs/install/mysql/tables/llx_c_paiement.sql index 9e752b7e186..8286e4c8e1f 100644 --- a/htdocs/install/mysql/tables/llx_c_paiement.sql +++ b/htdocs/install/mysql/tables/llx_c_paiement.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net> --- Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> -- Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com> -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_c_tva.sql b/htdocs/install/mysql/tables/llx_c_tva.sql index 91e141ad4d1..62d5b04125f 100644 --- a/htdocs/install/mysql/tables/llx_c_tva.sql +++ b/htdocs/install/mysql/tables/llx_c_tva.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es> --- Copyright (C) 2011-2012 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2011-2012 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_c_type_fees.sql b/htdocs/install/mysql/tables/llx_c_type_fees.sql index 15c6fe52182..787aac8d2c8 100644 --- a/htdocs/install/mysql/tables/llx_c_type_fees.sql +++ b/htdocs/install/mysql/tables/llx_c_type_fees.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> --- Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_chargesociales.sql b/htdocs/install/mysql/tables/llx_chargesociales.sql index e1556689a29..9efef8aec68 100644 --- a/htdocs/install/mysql/tables/llx_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_chargesociales.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql index 4cb081045ee..c9948133954 100644 --- a/htdocs/install/mysql/tables/llx_don.sql +++ b/htdocs/install/mysql/tables/llx_don.sql @@ -2,7 +2,7 @@ -- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net> --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_don_extrafields.key.sql b/htdocs/install/mysql/tables/llx_don_extrafields.key.sql index e8da3084d34..46a77f1c162 100644 --- a/htdocs/install/mysql/tables/llx_don_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_don_extrafields.key.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_don_extrafields.sql b/htdocs/install/mysql/tables/llx_don_extrafields.sql index 72b4d0a862a..a854098a20f 100644 --- a/htdocs/install/mysql/tables/llx_don_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_don_extrafields.sql @@ -1,5 +1,5 @@ -- ======================================================================== --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_establishment.sql b/htdocs/install/mysql/tables/llx_establishment.sql index 667d512762d..cb9aa676d40 100644 --- a/htdocs/install/mysql/tables/llx_establishment.sql +++ b/htdocs/install/mysql/tables/llx_establishment.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_loan.sql b/htdocs/install/mysql/tables/llx_loan.sql index f153e25dd22..abb1eab0c09 100644 --- a/htdocs/install/mysql/tables/llx_loan.sql +++ b/htdocs/install/mysql/tables/llx_loan.sql @@ -1,5 +1,5 @@ -- ======================================================================== --- Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> -- Copyright (C) 2015 Frederic France <frederic.france@free.fr> -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_loan_schedule.sql b/htdocs/install/mysql/tables/llx_loan_schedule.sql index 005ae07528e..11c167ae305 100644 --- a/htdocs/install/mysql/tables/llx_loan_schedule.sql +++ b/htdocs/install/mysql/tables/llx_loan_schedule.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> -- Copyright (C) 2015 Frederic France <frederic.france@free.fr> -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_payment_donation.sql b/htdocs/install/mysql/tables/llx_payment_donation.sql index d452d4da054..67f6eade0f0 100644 --- a/htdocs/install/mysql/tables/llx_payment_donation.sql +++ b/htdocs/install/mysql/tables/llx_payment_donation.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_payment_expensereport.sql b/htdocs/install/mysql/tables/llx_payment_expensereport.sql index deeb82f615c..aadd0a090fd 100644 --- a/htdocs/install/mysql/tables/llx_payment_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_payment_expensereport.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_payment_loan.sql b/htdocs/install/mysql/tables/llx_payment_loan.sql index 10801fc7454..28edaf6cb37 100644 --- a/htdocs/install/mysql/tables/llx_payment_loan.sql +++ b/htdocs/install/mysql/tables/llx_payment_loan.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr> -- Copyright (C) 2015 Frederic France <frederic.france@free.fr> -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_payment_salary.sql b/htdocs/install/mysql/tables/llx_payment_salary.sql index c56e6459aa0..3540725173b 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_payment_various.sql b/htdocs/install/mysql/tables/llx_payment_various.sql index d3351287e58..880fb4b5698 100644 --- a/htdocs/install/mysql/tables/llx_payment_various.sql +++ b/htdocs/install/mysql/tables/llx_payment_various.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +-- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/install/mysql/tables/llx_user_rib.sql b/htdocs/install/mysql/tables/llx_user_rib.sql index 05738ce4582..d6d397c5787 100644 --- a/htdocs/install/mysql/tables/llx_user_rib.sql +++ b/htdocs/install/mysql/tables/llx_user_rib.sql @@ -1,5 +1,5 @@ -- ============================================================================= --- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/htdocs/langs/en_US/assets.lang b/htdocs/langs/en_US/assets.lang index 6fb40755fdb..293d9b205f6 100644 --- a/htdocs/langs/en_US/assets.lang +++ b/htdocs/langs/en_US/assets.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +# Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/htdocs/langs/fr_FR/assets.lang b/htdocs/langs/fr_FR/assets.lang index 356245e8761..847e5a6cb15 100644 --- a/htdocs/langs/fr_FR/assets.lang +++ b/htdocs/langs/fr_FR/assets.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +# Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/htdocs/langs/lv_LV/assets.lang b/htdocs/langs/lv_LV/assets.lang index f632913c15e..7afddf85d74 100644 --- a/htdocs/langs/lv_LV/assets.lang +++ b/htdocs/langs/lv_LV/assets.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +# Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/htdocs/langs/pt_BR/assets.lang b/htdocs/langs/pt_BR/assets.lang index 877bd41ecd1..56f4a48c9fc 100644 --- a/htdocs/langs/pt_BR/assets.lang +++ b/htdocs/langs/pt_BR/assets.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> +# Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 3bab5474b08..9edb77dee7f 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> * diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 09fddcb5599..6f99adb5cbd 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015-2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index f11842bf0c1..8f65617d2a2 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015-2018 Frederic France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/createschedule.php b/htdocs/loan/createschedule.php index 7a68d3e38a8..203ab1d8c19 100644 --- a/htdocs/loan/createschedule.php +++ b/htdocs/loan/createschedule.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2017 Franck Moreau <franck.moreau@theobald.com> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 553bbc258e8..e24a77c82cf 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/info.php b/htdocs/loan/info.php index cc923b17fea..276528fc721 100644 --- a/htdocs/loan/info.php +++ b/htdocs/loan/info.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index 780d28df081..707ae473358 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net> diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index e066ef07a8e..a4ed60de2f0 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2015 Frederic France <frederic.france@free.fr> - * Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 017f6a26254..cd916c6e868 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 2ca310a1689..f09ae3d1cce 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015-2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index 30ba126aefb..7f5b0cf53bc 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2017 Franck Moreau <franck.moreau@theobald.com> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 8664e616c55..7add3ffc425 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 9e07dc90d46..8205b54c0b7 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013-2014 Cedric GROSS <c.gross@kreiz-it.fr> * Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro> * Copyright (C) 2014-2016 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2014 Ion agorria <ion@agorria.com> diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index e190e3a55d1..1e643c7f192 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2014 Ion Agorria <ion@agorria.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 1c73758c5f2..804dabe7e4f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -8,7 +8,7 @@ * Copyright (C) 2014-2018 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2014-2019 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2014 Ion agorria <ion@agorria.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index d4b0e4c8dae..66eeeedc97f 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2015-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2016 Josep Lluís Amador <joseplluis@lliuretic.cat> * diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index efbf449ae26..fe5116137f2 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -5,7 +5,7 @@ * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index c2df82fb2f2..cee3bb1ee16 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2018 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/public/stripe/newpayment.php b/htdocs/public/stripe/newpayment.php index cb22aa72cd4..25fa3365840 100644 --- a/htdocs/public/stripe/newpayment.php +++ b/htdocs/public/stripe/newpayment.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Saasprov <saasprov@gmail.com> * Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index dbb7fbcd91b..9518e3db0c8 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net> * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2011-2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2011-2013 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 90c20ca1cf2..bc368a10b2c 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net> * Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr> * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> diff --git a/htdocs/societe/contact.php b/htdocs/societe/contact.php index 4077a0b1815..112ac46900c 100644 --- a/htdocs/societe/contact.php +++ b/htdocs/societe/contact.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net> * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2011-2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2011-2013 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index 6a4dd8713f7..a0846cdd79e 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2017 Saasprov <saasprov@gmail.com> * Copyright (C) 2018 ptibogxiv <support@ptibogxiv.net> diff --git a/htdocs/stripe/config.php b/htdocs/stripe/config.php index cea97efe0a3..b313e97b9fa 100644 --- a/htdocs/stripe/config.php +++ b/htdocs/stripe/config.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Saasprov <saasprov@gmail.com> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es.com> * diff --git a/htdocs/stripe/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php index bafa83c21cf..099bffefa45 100644 --- a/htdocs/stripe/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com> +/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index e20ffbe43e2..d3e2368217e 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -4,7 +4,7 @@ * Copyright (C) 2007-2017 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index c76cab34f3b..527a7af5cb7 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr> * Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/user/card.php b/htdocs/user/card.php index f4799e7b17f..f0b3aa361cc 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Herve Prot <herve.prot@symeos.com> * Copyright (C) 2012-2018 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015-2017 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com> diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index fbc0237c37b..15139bd0291 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2005 Lionel Cousteix <etm_ltd@tiscali.co.uk> * Copyright (C) 2011 Herve Prot <herve.prot@symeos.com> * Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com> - * Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2018 charlene Benke <charlie@patas-monkey.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php index d18ece1f89e..8e9ad2745c3 100644 --- a/htdocs/user/class/userbankaccount.class.php +++ b/htdocs/user/class/userbankaccount.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2010-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Marcos García <marcosgdf@gmail.com> * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/user/list.php b/htdocs/user/list.php index ea8d340e0ae..4a449771a64 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016 Marcos García <marcosgdf@gmail.com> * * This program is free software; you can redistribute it and/or modify diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php index e8468d64ece..90a072ebeba 100755 --- a/scripts/accountancy/export-thirdpartyaccount.php +++ b/scripts/accountancy/export-thirdpartyaccount.php @@ -1,7 +1,7 @@ #!/usr/bin/env php <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * From 64975b3b9eb4d017c0de9f33b442b414f86fef4c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO <aspangaro.dolibarr@gmail.com> Date: Mon, 28 Jan 2019 22:27:55 +0100 Subject: [PATCH 126/183] NEW: When you create product or service, sell accountancy account by default are proposed --- htdocs/accountancy/admin/defaultaccounts.php | 4 ++- htdocs/langs/en_US/accountancy.lang | 2 ++ htdocs/product/card.php | 30 ++++++++++++++++---- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 2f41dfa4bfd..1cd00627aa3 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> @@ -55,6 +55,8 @@ $list_account_main = array ( $list_account = array ( 'ACCOUNTING_PRODUCT_BUY_ACCOUNT', 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT', + 'ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT', + 'ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT', 'ACCOUNTING_SERVICE_BUY_ACCOUNT', 'ACCOUNTING_SERVICE_SOLD_ACCOUNT', 'ACCOUNTING_VAT_BUY_ACCOUNT', diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 144caf49dde..c85593925f5 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -155,6 +155,8 @@ ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Accounting account to register subscript ACCOUNTING_PRODUCT_BUY_ACCOUNT=Accounting account by default for bought products (used if not defined in the product sheet) ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT_INTRA=Accounting account by default for the sold products in CEE (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT_EXPORT=Accounting account by default for the sold products export out of CEE (used if not defined in the product sheet) ACCOUNTING_SERVICE_BUY_ACCOUNT=Accounting account by default for the bought services (used if not defined in the service sheet) ACCOUNTING_SERVICE_SOLD_ACCOUNT=Accounting account by default for the sold services (used if not defined in the service sheet) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 512a5caa322..46f57193eb2 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1176,7 +1176,13 @@ else // Accountancy_code_sell print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>'; print '<td>'; - print $formaccounting->select_account(GETPOST('accountancy_code_sell'), 'accountancy_code_sell', 1, null, 1, 1, ''); + if($type = 0) + { + $accountancy_code_sell = (GETPOST('accountancy_code_sell','alpha')?(GETPOST('accountancy_code_sell','alpha')):$conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT); + } else { + $accountancy_code_sell = (GETPOST('accountancy_code_sell','alpha')?(GETPOST('accountancy_code_sell','alpha')):$conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT); + } + print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, ''); print '</td></tr>'; // Accountancy_code_sell_intra @@ -1184,20 +1190,32 @@ else { print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>'; print '<td>'; - print $formaccounting->select_account(GETPOST('accountancy_code_sell_intra'), 'accountancy_code_sell_intra', 1, null, 1, 1, ''); - print '</td></tr>'; + if($type = 0) + { + $accountancy_code_sell_intra = (GETPOST('accountancy_code_sell_intra','alpha')?(GETPOST('accountancy_code_sell_intra','alpha')):$conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT); + } else { + $accountancy_code_sell_intra = GETPOST('accountancy_code_sell_intra','alpha'); + } + print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, ''); + print '</td></tr>'; } // Accountancy_code_sell_export print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellExportCode").'</td>'; print '<td>'; - print $formaccounting->select_account(GETPOST('accountancy_code_sell_export'), 'accountancy_code_sell_export', 1, null, 1, 1, ''); - print '</td></tr>'; + if($type = 0) + { + $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export','alpha')?(GETPOST('accountancy_code_sell_export','alpha')):$conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT); + } else { + $accountancy_code_sell_export = GETPOST('accountancy_code_sell_export','alpha'); + } + print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, ''); + print '</td></tr>'; // Accountancy_code_buy print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>'; print '<td>'; - print $formaccounting->select_account(GETPOST('accountancy_code_buy'), 'accountancy_code_buy', 1, null, 1, 1, ''); + print $formaccounting->select_account(GETPOST('accountancy_code_buy','alpha'), 'accountancy_code_buy', 1, null, 1, 1, ''); print '</td></tr>'; } else // For external software From b24f5fda68f3f6800a68fce44676db8dcb59d910 Mon Sep 17 00:00:00 2001 From: Xebax <xebax@wanadoo.fr> Date: Tue, 29 Jan 2019 08:47:46 +0100 Subject: [PATCH 127/183] FIX Fix PHP warning "count(): Parameter must be an array..." --- htdocs/api/class/api.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 2d18568bf2d..b9e7f2075ef 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -251,7 +251,7 @@ class DolibarrApi //$tmp=preg_replace_all('/'.$regexstring.'/', '', $sqlfilters); $tmp=$sqlfilters; $ok=0; - $i=0; $nb=count($tmp); + $i=0; $nb=strlen($tmp); $counter=0; while ($i < $nb) { From f6be0f768648ebea75c359d9e3d26acd877e9d6f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 10:48:45 +0100 Subject: [PATCH 128/183] Fix duplicate log when using mass action email send --- htdocs/core/actions_massactions.inc.php | 2212 ++++++++++++----------- 1 file changed, 1143 insertions(+), 1069 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 5b4f0c28d0e..d01f0705817 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -37,8 +37,8 @@ // Protection if (empty($objectclass) || empty($uploaddir)) { - dol_print_error(null, 'include of actions_massactions.inc.php is done but var $massaction or $objectclass or $uploaddir was not defined'); - exit; + dol_print_error(null, 'include of actions_massactions.inc.php is done but var $massaction or $objectclass or $uploaddir was not defined'); + exit; } @@ -46,1047 +46,1060 @@ if (empty($objectclass) || empty($uploaddir)) $maxformassaction=(empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS)?1000:$conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS); if (! empty($massaction) && count($toselect) < 1) { - $error++; - setEventMessages($langs->trans("NoRecordSelected"), null, "warnings"); + $error++; + setEventMessages($langs->trans("NoRecordSelected"), null, "warnings"); } if (! $error && is_array($toselect) && count($toselect) > $maxformassaction) { - setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors'); - $error++; + setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors'); + $error++; } if (! $error && $massaction == 'confirm_presend' && ! GETPOST('sendmail')) // If we do not choose button send (for example when we change template or limit), we must not send email, but keep on send email form { - $massaction='presend'; + $massaction='presend'; } if (! $error && $massaction == 'confirm_presend') { - $resaction = ''; - $nbsent = 0; - $nbignored = 0; - $langs->load("mails"); - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - - $listofobjectid=array(); - $listofobjectthirdparties=array(); - $listofobjectref=array(); - - if (! $error) - { - $thirdparty=new Societe($db); - if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); - if ($objecttmp->element == 'holiday') $thirdparty=new User($db); - - $objecttmp=new $objectclass($db); - foreach($toselect as $toselectid) - { - $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use - $result=$objecttmp->fetch($toselectid); - if ($result > 0) - { - $listofobjectid[$toselectid]=$toselectid; - $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); - if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; - if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; - if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; - $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; - $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; - } - } - } - - // Check mandatory parameters - if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) - { - $error++; - setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); - $massaction='presend'; - } - - $receiver=$_POST['receiver']; - if (! is_array($receiver)) - { - if (empty($receiver) || $receiver == '-1') $receiver=array(); - else $receiver=array($receiver); - } - if (! trim($_POST['sendto']) && count($receiver) == 0 && count($listofobjectthirdparties) == 1) // if only one recipient, receiver is mandatory - { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); - $massaction='presend'; - } - - if (! GETPOST('subject','none')) - { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); - $massaction='presend'; - } - - // Loop on each recipient/thirdparty - if (! $error) - { - foreach ($listofobjectthirdparties as $thirdpartyid) - { - $result = $thirdparty->fetch($thirdpartyid); - if ($result < 0) - { - dol_print_error($db); - exit; - } - - $sendto=''; - $sendtocc=''; - $sendtobcc=''; - $sendtoid = array(); - - // Define $sendto - $tmparray=array(); - if (trim($_POST['sendto'])) - { - // Recipients are provided into free text - $tmparray[] = trim($_POST['sendto']); - } - if (count($receiver)>0) - { - foreach($receiver as $key=>$val) - { - // Recipient was provided from combo list - if ($val == 'thirdparty') // Id of third party or user - { - $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; - } - elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact - { - $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); - $sendtoid[] = $val; - } - } - } - $sendto=implode(',',$tmparray); - - // Define $sendtocc - $receivercc=$_POST['receivercc']; - if (! is_array($receivercc)) - { - if ($receivercc == '-1') $receivercc=array(); - else $receivercc=array($receivercc); - } - $tmparray=array(); - if (trim($_POST['sendtocc'])) - { - $tmparray[] = trim($_POST['sendtocc']); - } - if (count($receivercc) > 0) - { - foreach($receivercc as $key=>$val) - { - // Recipient was provided from combo list - if ($val == 'thirdparty') // Id of third party - { - $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; - } - elseif ($val) // Id du contact - { - $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); - //$sendtoid[] = $val; TODO Add also id of contact in CC ? - } - } - } - $sendtocc=implode(',',$tmparray); - - //var_dump($listofobjectref);exit; - $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); - $listofqualifiedobj=array(); - $listofqualifiedref=array(); - $thirdpartywithoutemail=array(); - - foreach($listofobjectref[$thirdpartyid] as $objectid => $objectobj) - { - //var_dump($thirdpartyid.' - '.$objectid.' - '.$objectobj->statut); - if ($objectclass == 'Propal' && $objectobj->statut == Propal::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction.='<div class="error">'.$langs->trans('ErrorOnlyProposalNotDraftCanBeSentInMassAction',$objectobj->ref).'</div><br>'; - continue; // Payment done or started or canceled - } - if ($objectclass == 'Commande' && $objectoj->statut == Commande::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction.='<div class="error">'.$langs->trans('ErrorOnlyOrderNotDraftCanBeSentInMassAction',$objectobj->ref).'</div><br>'; - continue; - } - if ($objectclass == 'Facture' && $objectobj->statut == Facture::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction.='<div class="error">'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$objectobj->ref).'</div><br>'; - continue; // Payment done or started or canceled - } - - // Test recipient - if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) - { - if ($objectobj->element == 'expensereport') - { - $fuser = new User($db); - $fuser->fetch($objectobj->fk_user_author); - $sendto = $fuser->email; - } - else - { - $objectobj->fetch_thirdparty(); - $sendto = $objectobj->thirdparty->email; - } - } - - if (empty($sendto)) - { - //print "No recipient for thirdparty ".$objectobj->thirdparty->name; - $nbignored++; - if (empty($thirdpartywithoutemail[$objectobj->thirdparty->id])) - { - $resaction.='<div class="error">'.$langs->trans('NoRecipientEmail',$objectobj->thirdparty->name).'</div><br>'; - } - dol_syslog('No recipient for thirdparty: '.$objectobj->thirdparty->name, LOG_WARNING); - $thirdpartywithoutemail[$objectobj->thirdparty->id]=1; - continue; - } - - if ($_POST['addmaindocfile']) - { - // TODO Use future field $objectobj->fullpathdoc to know where is stored default file - // TODO If not defined, use $objectobj->modelpdf (or defaut invoice config) to know what is template to use to regenerate doc. - $filename=dol_sanitizeFileName($objectobj->ref).'.pdf'; - $filedir=$uploaddir . '/' . dol_sanitizeFileName($objectobj->ref); - $file = $filedir . '/' . $filename; - $mime = dol_mimetype($file); - - if (dol_is_file($file)) - { - // Create form object - $attachedfiles=array( - 'paths'=>array_merge($attachedfiles['paths'],array($file)), - 'names'=>array_merge($attachedfiles['names'],array($filename)), - 'mimes'=>array_merge($attachedfiles['mimes'],array($mime)) - ); - } - else - { - $nbignored++; - $langs->load("errors"); - $resaction.='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div><br>'; - dol_syslog('Failed to read file: '.$file, LOG_WARNING); - continue; - } - } - - // Object of thirdparty qualified - $listofqualifiedobj[$objectid]=$objectobj; - $listofqualifiedref[$objectid]=$objectobj->ref; - - - //var_dump($listofqualifiedref); - } - - // Send email if there is at least one qualified record - if (count($listofqualifiedobj) > 0) - { - $langs->load("commercial"); - - $fromtype = GETPOST('fromtype'); - if ($fromtype === 'user') { - $from = $user->getFullName($langs) .' <'.$user->email.'>'; - } - elseif ($fromtype === 'company') { - $from = $conf->global->MAIN_INFO_SOCIETE_NOM .' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; - } - elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { - $tmp=explode(',', $user->email_aliases); - $from = trim($tmp[($reg[1] - 1)]); - } - elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) { - $tmp=explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES); - $from = trim($tmp[($reg[1] - 1)]); - } - elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) { - $sql='SELECT rowid, label, email FROM '.MAIN_DB_PREFIX.'c_email_senderprofile WHERE rowid = '.(int) $reg[1]; - $resql = $db->query($sql); - $obj = $db->fetch_object($resql); - if ($obj) - { - $from = $obj->label.' <'.$obj->email.'>'; - } - } - else { - $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; - } - - $replyto = $from; - $subject = GETPOST('subject','none'); - $message = GETPOST('message','none'); - - $sendtobcc = GETPOST('sendtoccc'); - if ($objectclass == 'Propal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); - if ($objectclass == 'Commande') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)); - if ($objectclass == 'Facture') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)); - if ($objectclass == 'Supplier_Proposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)); - if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); - if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); - - // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) - $oneemailperrecipient=(GETPOST('oneemailperrecipient')=='on'?1:0); - $looparray=array(); - if (! $oneemailperrecipient) - { - $looparray = $listofqualifiedobj; - foreach ($looparray as $key => $objecttmp) - { - $looparray[$key]->thirdparty = $thirdparty; - } - } - else - { - $objectforloop=new $objectclass($db); - $objectforloop->thirdparty = $thirdparty; - $looparray[0]=$objectforloop; - } - //var_dump($looparray);exit; - - foreach ($looparray as $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per record - { - // Make substitution in email content - $substitutionarray=getCommonSubstitutionArray($langs, 0, null, $objecttmp); - $substitutionarray['__ID__'] = ($oneemailperrecipient ? join(', ',array_keys($listofqualifiedobj)) : $objecttmp->id); - $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ',$listofqualifiedref) : $objecttmp->ref); - $substitutionarray['__EMAIL__'] = $thirdparty->email; - $substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>'; - - $parameters=array('mode'=>'formemail'); - - if ( ! empty( $listofobjectthirdparties ) ) { - $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; - } - if ( ! empty( $listofobjectref ) ) { - $parameters['listofobjectref'] = $listofobjectref; - } - - complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); - - $subject=make_substitutions($subject, $substitutionarray); - $message=make_substitutions($message, $substitutionarray); - - $filepath = $attachedfiles['paths']; - $filename = $attachedfiles['names']; - $mimetype = $attachedfiles['mimes']; - - // Define the trackid when emails sent from the mass action - if ($oneemailperrecipient) - { - $trackid='thi'.$thirdparty->id; - if ($objecttmp->element == 'expensereport') $trackid='use'.$thirdparty->id; - if ($objecttmp->element == 'holiday') $trackid='use'.$thirdparty->id; - } - else - { - $trackid=strtolower(get_class($objecttmp)); - if (get_class($objecttmp)=='Contrat') $trackid='con'; - if (get_class($objecttmp)=='Propal') $trackid='pro'; - if (get_class($objecttmp)=='Commande') $trackid='ord'; - if (get_class($objecttmp)=='Facture') $trackid='inv'; - if (get_class($objecttmp)=='Supplier_Proposal') $trackid='spr'; - if (get_class($objecttmp)=='CommandeFournisseur') $trackid='sor'; - if (get_class($objecttmp)=='FactureFournisseur') $trackid='sin'; - - $trackid.=$objecttmp->id; - } - //var_dump($filepath); - //var_dump($trackid);exit; - - // Send mail (substitutionarray must be done just before this) - require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); - if ($mailfile->error) - { - $resaction.='<div class="error">'.$mailfile->error.'</div>'; - } - else - { - $result=$mailfile->sendfile(); - if ($result) - { - $resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'<br>'; // Must not contain " - - $error=0; - - // Insert logs into agenda - foreach($listofqualifiedobj as $objid => $objectobj) - { - dol_syslog("Try to insert email event into agenda for objid=".$objid." => objectobj=".get_class($objectobj)); - - /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; - if ($objectclass == 'Commande') $actiontypecode='AC_COM'; - if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; - if ($objectclass == 'Supplier_Proposal') $actiontypecode='AC_SUP_PRO'; - if ($objectclass == 'CommandeFournisseur') $actiontypecode='AC_SUP_ORD'; - if ($objectclass == 'FactureFournisseur') $actiontypecode='AC_SUP_INV';*/ - - $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; - if ($message) - { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); - } - $actionmsg2=''; - - // Initialisation donnees - $objectobj->sendtoid = 0; - $objectobj->actionmsg = $actionmsg; // Long text - $objectobj->actionmsg2 = $actionmsg2; // Short text - $objectobj->fk_element = $objid; - $objectobj->elementtype = $objectobj->element; - - $triggername = strtoupper(get_class($objectobj)) .'_SENTBYMAIL'; - if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; - if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; - if ($triggername == 'COMMANDE_SENTBYMAIL') $triggername = 'ORDER_SENTBYMAIL'; - if ($triggername == 'FACTURE_SENTBYMAIL') $triggername = 'BILL_SENTBYMAIL'; - if ($triggername == 'EXPEDITION_SENTBYMAIL') $triggername = 'SHIPPING_SENTBYMAIL'; - if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; - if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; - if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; - - if (! empty($triggername)) - { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"; - $interface=new Interfaces($db); - $result=$interface->run_triggers($triggername, $objectobj, $user, $langs, $conf); - if ($result < 0) { $error++; $errors=$interface->errors; } - // Fin appel triggers - - if ($error) - { - setEventMessages($db->lasterror(), $errors, 'errors'); - dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); - } - } - - $nbsent++; - } - } - else - { - $langs->load("other"); - if ($mailfile->error) - { - $resaction.=$langs->trans('ErrorFailedToSendMail',$from,$sendto); - $resaction.='<br><div class="error">'.$mailfile->error.'</div>'; - } - else - { - $resaction.='<div class="warning">No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS</div>'; - } - } - } - } - } - } - - $resaction.=($resaction?'<br>':$resaction); - $resaction.='<strong>'.$langs->trans("ResultOfMailSending").':</strong><br>'."\n"; - $resaction.=$langs->trans("NbSelected").': '.count($toselect)."\n<br>"; - $resaction.=$langs->trans("NbIgnored").': '.($nbignored?$nbignored:0)."\n<br>"; - $resaction.=$langs->trans("NbSent").': '.($nbsent?$nbsent:0)."\n<br>"; - - if ($nbsent) - { - $action=''; // Do not show form post if there was at least one successfull sent - //setEventMessages($langs->trans("EMailSentToNRecipients", $nbsent.'/'.count($toselect)), null, 'mesgs'); - setEventMessages($langs->trans("EMailSentForNElements", $nbsent.'/'.count($toselect)), null, 'mesgs'); - setEventMessages($resaction, null, 'mesgs'); - } - else - { - //setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings'); // May be object has no generated PDF file - setEventMessages($resaction, null, 'warnings'); - } - - $action='list'; - $massaction=''; - } + $resaction = ''; + $nbsent = 0; + $nbignored = 0; + $langs->load("mails"); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $listofobjectid=array(); + $listofobjectthirdparties=array(); + $listofobjectref=array(); + + if (! $error) + { + $thirdparty=new Societe($db); + + $objecttmp=new $objectclass($db); + if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); + if ($objecttmp->element == 'holiday') $thirdparty=new User($db); + + foreach($toselect as $toselectid) + { + $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + $listofobjectid[$toselectid]=$toselectid; + + $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); + if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; + if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; + if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; + if (empty($thirdpartyid)) $thirdpartyid=0; + + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; + $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; + } + } + } + + // Check mandatory parameters + if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) + { + $error++; + setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); + $massaction='presend'; + } + + $receiver=$_POST['receiver']; + if (! is_array($receiver)) + { + if (empty($receiver) || $receiver == '-1') $receiver=array(); + else $receiver=array($receiver); + } + if (! trim($_POST['sendto']) && count($receiver) == 0 && count($listofobjectthirdparties) == 1) // if only one recipient, receiver is mandatory + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); + $massaction='presend'; + } + + if (! GETPOST('subject','none')) + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); + $massaction='presend'; + } + + // Loop on each recipient/thirdparty + if (! $error) + { + foreach ($listofobjectthirdparties as $thirdpartyid) + { + $result = $thirdparty->fetch($thirdpartyid); + if ($result < 0) + { + dol_print_error($db); + exit; + } + + $sendto=''; + $sendtocc=''; + $sendtobcc=''; + $sendtoid = array(); + + // Define $sendto + $tmparray=array(); + if (trim($_POST['sendto'])) + { + // Recipients are provided into free text + $tmparray[] = trim($_POST['sendto']); + } + if (count($receiver)>0) + { + foreach($receiver as $key=>$val) + { + // Recipient was provided from combo list + if ($val == 'thirdparty') // Id of third party or user + { + $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; + } + elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact + { + $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); + $sendtoid[] = $val; + } + } + } + $sendto=implode(',',$tmparray); + + // Define $sendtocc + $receivercc=$_POST['receivercc']; + if (! is_array($receivercc)) + { + if ($receivercc == '-1') $receivercc=array(); + else $receivercc=array($receivercc); + } + $tmparray=array(); + if (trim($_POST['sendtocc'])) + { + $tmparray[] = trim($_POST['sendtocc']); + } + if (count($receivercc) > 0) + { + foreach($receivercc as $key=>$val) + { + // Recipient was provided from combo list + if ($val == 'thirdparty') // Id of third party + { + $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; + } + elseif ($val) // Id du contact + { + $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); + //$sendtoid[] = $val; TODO Add also id of contact in CC ? + } + } + } + $sendtocc=implode(',',$tmparray); + + //var_dump($listofobjectref);exit; + $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); + $listofqualifiedobj=array(); + $listofqualifiedref=array(); + $thirdpartywithoutemail=array(); + + foreach($listofobjectref[$thirdpartyid] as $objectid => $objectobj) + { + //var_dump($thirdpartyid.' - '.$objectid.' - '.$objectobj->statut); + if ($objectclass == 'Propal' && $objectobj->statut == Propal::STATUS_DRAFT) + { + $langs->load("errors"); + $nbignored++; + $resaction.='<div class="error">'.$langs->trans('ErrorOnlyProposalNotDraftCanBeSentInMassAction',$objectobj->ref).'</div><br>'; + continue; // Payment done or started or canceled + } + if ($objectclass == 'Commande' && $objectoj->statut == Commande::STATUS_DRAFT) + { + $langs->load("errors"); + $nbignored++; + $resaction.='<div class="error">'.$langs->trans('ErrorOnlyOrderNotDraftCanBeSentInMassAction',$objectobj->ref).'</div><br>'; + continue; + } + if ($objectclass == 'Facture' && $objectobj->statut == Facture::STATUS_DRAFT) + { + $langs->load("errors"); + $nbignored++; + $resaction.='<div class="error">'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$objectobj->ref).'</div><br>'; + continue; // Payment done or started or canceled + } + + // Test recipient + if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) + { + if ($objectobj->element == 'expensereport') + { + $fuser = new User($db); + $fuser->fetch($objectobj->fk_user_author); + $sendto = $fuser->email; + } + elseif ($objectobj->element == 'holiday') + { + $fuser = new User($db); + $fuser->fetch($objectobj->fk_user); + $sendto = $fuser->email; + } + else + { + $objectobj->fetch_thirdparty(); + $sendto = $objectobj->thirdparty->email; + } + } + + if (empty($sendto)) + { + //print "No recipient for thirdparty ".$objectobj->thirdparty->name; + $nbignored++; + if (empty($thirdpartywithoutemail[$objectobj->thirdparty->id])) + { + $resaction.='<div class="error">'.$langs->trans('NoRecipientEmail',$objectobj->thirdparty->name).'</div><br>'; + } + dol_syslog('No recipient for thirdparty: '.$objectobj->thirdparty->name, LOG_WARNING); + $thirdpartywithoutemail[$objectobj->thirdparty->id]=1; + continue; + } + + if ($_POST['addmaindocfile']) + { + // TODO Use future field $objectobj->fullpathdoc to know where is stored default file + // TODO If not defined, use $objectobj->modelpdf (or defaut invoice config) to know what is template to use to regenerate doc. + $filename=dol_sanitizeFileName($objectobj->ref).'.pdf'; + $filedir=$uploaddir . '/' . dol_sanitizeFileName($objectobj->ref); + $file = $filedir . '/' . $filename; + $mime = dol_mimetype($file); + + if (dol_is_file($file)) + { + // Create form object + $attachedfiles=array( + 'paths'=>array_merge($attachedfiles['paths'],array($file)), + 'names'=>array_merge($attachedfiles['names'],array($filename)), + 'mimes'=>array_merge($attachedfiles['mimes'],array($mime)) + ); + } + else + { + $nbignored++; + $langs->load("errors"); + $resaction.='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div><br>'; + dol_syslog('Failed to read file: '.$file, LOG_WARNING); + continue; + } + } + + // Object of thirdparty qualified, we add it + $listofqualifiedobj[$objectid]=$objectobj; + $listofqualifiedref[$objectid]=$objectobj->ref; + + //var_dump($listofqualifiedref); + } + + // Send email if there is at least one qualified object for current thirdparty + if (count($listofqualifiedobj) > 0) + { + $langs->load("commercial"); + + $fromtype = GETPOST('fromtype'); + if ($fromtype === 'user') { + $from = $user->getFullName($langs) .' <'.$user->email.'>'; + } + elseif ($fromtype === 'company') { + $from = $conf->global->MAIN_INFO_SOCIETE_NOM .' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; + } + elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { + $tmp=explode(',', $user->email_aliases); + $from = trim($tmp[($reg[1] - 1)]); + } + elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) { + $tmp=explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES); + $from = trim($tmp[($reg[1] - 1)]); + } + elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) { + $sql='SELECT rowid, label, email FROM '.MAIN_DB_PREFIX.'c_email_senderprofile WHERE rowid = '.(int) $reg[1]; + $resql = $db->query($sql); + $obj = $db->fetch_object($resql); + if ($obj) + { + $from = $obj->label.' <'.$obj->email.'>'; + } + } + else { + $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; + } + + $replyto = $from; + $subject = GETPOST('subject','none'); + $message = GETPOST('message','none'); + + $sendtobcc = GETPOST('sendtoccc'); + if ($objectclass == 'Propal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); + if ($objectclass == 'Commande') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)); + if ($objectclass == 'Facture') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)); + if ($objectclass == 'Supplier_Proposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)); + if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); + if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); + + // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) + // $looparray will be an array with number of email to send for the current thirdparty (so 1 or n if n object for same thirdparty) + $oneemailperrecipient=(GETPOST('oneemailperrecipient','alpha')=='on'?1:0); + $looparray=array(); + if (! $oneemailperrecipient) + { + $looparray = $listofqualifiedobj; + foreach ($looparray as $key => $objecttmp) + { + $looparray[$key]->thirdparty = $thirdparty; // Force thirdparty on object + } + } + else + { + $objectforloop=new $objectclass($db); + $objectforloop->thirdparty = $thirdparty; // Force thirdparty on object (even if object was not loaded) + $looparray[0]=$objectforloop; + } + //var_dump($looparray);exit; + dol_syslog("We have set an array of ".count($looparray)." emails to send"); + + foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object + { + // Make substitution in email content + $substitutionarray=getCommonSubstitutionArray($langs, 0, null, $objecttmp); + $substitutionarray['__ID__'] = ($oneemailperrecipient ? join(', ',array_keys($listofqualifiedobj)) : $objecttmp->id); + $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ',$listofqualifiedref) : $objecttmp->ref); + $substitutionarray['__EMAIL__'] = $thirdparty->email; + $substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>'; + + $parameters=array('mode'=>'formemail'); + + if ( ! empty( $listofobjectthirdparties ) ) { + $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; + } + if ( ! empty( $listofobjectref ) ) { + $parameters['listofobjectref'] = $listofobjectref; + } + + complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); + + $subject=make_substitutions($subject, $substitutionarray); + $message=make_substitutions($message, $substitutionarray); + + $filepath = $attachedfiles['paths']; + $filename = $attachedfiles['names']; + $mimetype = $attachedfiles['mimes']; + + // Define the trackid when emails sent from the mass action + if ($oneemailperrecipient) + { + $trackid='thi'.$thirdparty->id; + if ($objecttmp->element == 'expensereport') $trackid='use'.$thirdparty->id; + if ($objecttmp->element == 'holiday') $trackid='use'.$thirdparty->id; + } + else + { + $trackid=strtolower(get_class($objecttmp)); + if (get_class($objecttmp)=='Contrat') $trackid='con'; + if (get_class($objecttmp)=='Propal') $trackid='pro'; + if (get_class($objecttmp)=='Commande') $trackid='ord'; + if (get_class($objecttmp)=='Facture') $trackid='inv'; + if (get_class($objecttmp)=='Supplier_Proposal') $trackid='spr'; + if (get_class($objecttmp)=='CommandeFournisseur') $trackid='sor'; + if (get_class($objecttmp)=='FactureFournisseur') $trackid='sin'; + + $trackid.=$objecttmp->id; + } + //var_dump($filepath); + //var_dump($trackid);exit; + + // Send mail (substitutionarray must be done just before this) + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); + if ($mailfile->error) + { + $resaction.='<div class="error">'.$mailfile->error.'</div>'; + } + else + { + $result=$mailfile->sendfile(); + if ($result) + { + $resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'<br>'; // Must not contain " + + $error=0; + + // Insert logs into agenda + foreach($listofqualifiedobj as $objid2 => $objectobj2) + { + if ((! $oneemailperrecipient) && $objid2 != $objid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + + dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); + + /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; + if ($objectclass == 'Commande') $actiontypecode='AC_COM'; + if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; + if ($objectclass == 'Supplier_Proposal') $actiontypecode='AC_SUP_PRO'; + if ($objectclass == 'CommandeFournisseur') $actiontypecode='AC_SUP_ORD'; + if ($objectclass == 'FactureFournisseur') $actiontypecode='AC_SUP_INV';*/ + + $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; + if ($message) + { + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); + } + $actionmsg2=''; + + // Initialisation donnees + $objectobj2->sendtoid = 0; + $objectobj2->actionmsg = $actionmsg; // Long text + $objectobj2->actionmsg2 = $actionmsg2; // Short text + $objectobj2->fk_element = $objid2; + $objectobj2->elementtype = $objectobj2->element; + + $triggername = strtoupper(get_class($objectobj2)) .'_SENTBYMAIL'; + if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; + if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; + if ($triggername == 'COMMANDE_SENTBYMAIL') $triggername = 'ORDER_SENTBYMAIL'; + if ($triggername == 'FACTURE_SENTBYMAIL') $triggername = 'BILL_SENTBYMAIL'; + if ($triggername == 'EXPEDITION_SENTBYMAIL') $triggername = 'SHIPPING_SENTBYMAIL'; + if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; + if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; + if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; + + if (! empty($triggername)) + { + // Appel des triggers + include_once DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"; + $interface=new Interfaces($db); + $result=$interface->run_triggers($triggername, $objectobj2, $user, $langs, $conf); + if ($result < 0) { $error++; $errors=$interface->errors; } + // Fin appel triggers + + if ($error) + { + setEventMessages($db->lasterror(), $errors, 'errors'); + dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); + } + } + } + + $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) + } + else + { + $langs->load("other"); + if ($mailfile->error) + { + $resaction.=$langs->trans('ErrorFailedToSendMail',$from,$sendto); + $resaction.='<br><div class="error">'.$mailfile->error.'</div>'; + } + else + { + $resaction.='<div class="warning">No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS</div>'; + } + } + } + } + } + } + + $resaction.=($resaction?'<br>':$resaction); + $resaction.='<strong>'.$langs->trans("ResultOfMailSending").':</strong><br>'."\n"; + $resaction.=$langs->trans("NbSelected").': '.count($toselect)."\n<br>"; + $resaction.=$langs->trans("NbIgnored").': '.($nbignored?$nbignored:0)."\n<br>"; + $resaction.=$langs->trans("NbSent").': '.($nbsent?$nbsent:0)."\n<br>"; + + if ($nbsent) + { + $action=''; // Do not show form post if there was at least one successfull sent + //setEventMessages($langs->trans("EMailSentToNRecipients", $nbsent.'/'.count($toselect)), null, 'mesgs'); + setEventMessages($langs->trans("EMailSentForNElements", $nbsent.'/'.count($toselect)), null, 'mesgs'); + setEventMessages($resaction, null, 'mesgs'); + } + else + { + //setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings'); // May be object has no generated PDF file + setEventMessages($resaction, null, 'warnings'); + } + + $action='list'; + $massaction=''; + } } if ($massaction == 'confirm_createbills') { - $orders = GETPOST('toselect','array'); - $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); - $validate_invoices = GETPOST('valdate_invoices', 'int'); - - $TFact = array(); - $TFactThird = array(); - - $nb_bills_created = 0; - - $db->begin(); - - foreach($orders as $id_order) - { - $cmd = new Commande($db); - if ($cmd->fetch($id_order) <= 0) continue; - - $objecttmp = new Facture($db); - if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. - else { - // Load extrafields of order - $cmd->fetch_optionals(); - - $objecttmp->socid = $cmd->socid; - $objecttmp->type = Facture::TYPE_STANDARD; - $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; - $objecttmp->mode_reglement_id = $cmd->mode_reglement_id; - $objecttmp->fk_project = $cmd->fk_project; - - $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - if (empty($datefacture)) - { - $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); - } - - $objecttmp->date = $datefacture; - $objecttmp->origin = 'commande'; - $objecttmp->origin_id = $id_order; - - $objecttmp->array_options = $cmd->array_options; // Copy extrafields - - $res = $objecttmp->create($user); - - if($res > 0) $nb_bills_created++; - } - - if ($objecttmp->id > 0) - { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; - $sql.= "fk_source"; - $sql.= ", sourcetype"; - $sql.= ", fk_target"; - $sql.= ", targettype"; - $sql.= ") VALUES ("; - $sql.= $id_order; - $sql.= ", '".$objecttmp->origin."'"; - $sql.= ", ".$objecttmp->id; - $sql.= ", '".$objecttmp->element."'"; - $sql.= ")"; - - if (! $db->query($sql)) - { - $error++; - } - - if (! $error) - { - $lines = $cmd->lines; - if (empty($lines) && method_exists($cmd, 'fetch_lines')) - { - $cmd->fetch_lines(); - $lines = $cmd->lines; - } - - $fk_parent_line=0; - $num=count($lines); - - for ($i=0;$i<$num;$i++) - { - $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); - if ($lines[$i]->subprice < 0) - { - // Negative line, we create a discount line - $discount = new DiscountAbsolute($db); - $discount->fk_soc=$objecttmp->socid; - $discount->amount_ht=abs($lines[$i]->total_ht); - $discount->amount_tva=abs($lines[$i]->total_tva); - $discount->amount_ttc=abs($lines[$i]->total_ttc); - $discount->tva_tx=$lines[$i]->tva_tx; - $discount->fk_user=$user->id; - $discount->description=$desc; - $discountid=$discount->create($user); - if ($discountid > 0) - { - $result=$objecttmp->insert_discount($discountid); - //$result=$discount->link_to_invoice($lineid,$id); - } - else - { - setEventMessages($discount->error, $discount->errors, 'errors'); - $error++; - break; - } - } - else - { - // Positive line - $product_type=($lines[$i]->product_type?$lines[$i]->product_type:0); - // Date start - $date_start=false; - if ($lines[$i]->date_debut_prevue) $date_start=$lines[$i]->date_debut_prevue; - if ($lines[$i]->date_debut_reel) $date_start=$lines[$i]->date_debut_reel; - if ($lines[$i]->date_start) $date_start=$lines[$i]->date_start; - //Date end - $date_end=false; - if ($lines[$i]->date_fin_prevue) $date_end=$lines[$i]->date_fin_prevue; - if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel; - if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end; - // Reset fk_parent_line for no child products and special product - if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) - { - $fk_parent_line = 0; - } - - // Extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { - $lines[$i]->fetch_optionals($lines[$i]->rowid); - $array_options = $lines[$i]->array_options; - } - - $result = $objecttmp->addline( - $desc, - $lines[$i]->subprice, - $lines[$i]->qty, - $lines[$i]->tva_tx, - $lines[$i]->localtax1_tx, - $lines[$i]->localtax2_tx, - $lines[$i]->fk_product, - $lines[$i]->remise_percent, - $date_start, - $date_end, - 0, - $lines[$i]->info_bits, - $lines[$i]->fk_remise_except, - 'HT', - 0, - $product_type, - $ii, - $lines[$i]->special_code, - $objecttmp->origin, - $lines[$i]->rowid, - $fk_parent_line, - $lines[$i]->fk_fournprice, - $lines[$i]->pa_ht, - $lines[$i]->label, - $array_options - ); - if ($result > 0) - { - $lineid=$result; - } - else - { - $lineid=0; - $error++; - break; - } - // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) - { - $fk_parent_line = $result; - } - } - } - } - } - - //$cmd->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module. - - if(!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $objecttmp; - else $TFact[$objecttmp->id] = $objecttmp; - } - - // Build doc with all invoices - $TAllFact = empty($createbills_onebythird) ? $TFact : $TFactThird; - $toselect = array(); - - if (! $error && $validate_invoices) - { - $massaction = $action = 'builddoc'; - - foreach($TAllFact as &$objecttmp) - { - $result = $objecttmp->validate($user); - if ($result <= 0) - { - $error++; - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - break; - } - - $id = $objecttmp->id; // For builddoc action - $object = $objecttmp; - - // Builddoc - $donotredirect = 1; - $upload_dir = $conf->facture->dir_output; - $permissioncreate=$user->rights->facture->creer; - - // Call action to build doc - $savobject = $object; - $object = $objecttmp; - include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - $object = $savobject; - } - - $massaction = $action = 'confirm_createbills'; - } - - if (! $error) - { - $db->commit(); - setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); - - // Make a redirect to avoid to bill twice if we make a refresh or back - $param=''; - if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); - if ($sall) $param.='&sall='.urlencode($sall); - if ($socid > 0) $param.='&socid='.urlencode($socid); - if ($viewstatut != '') $param.='&viewstatut='.urlencode($viewstatut); - if ($search_orderday) $param.='&search_orderday='.urlencode($search_orderday); - if ($search_ordermonth) $param.='&search_ordermonth='.urlencode($search_ordermonth); - if ($search_orderyear) $param.='&search_orderyear='.urlencode($search_orderyear); - if ($search_deliveryday) $param.='&search_deliveryday='.urlencode($search_deliveryday); - if ($search_deliverymonth) $param.='&search_deliverymonth='.urlencode($search_deliverymonth); - if ($search_deliveryyear) $param.='&search_deliveryyear='.urlencode($search_deliveryyear); - if ($search_ref) $param.='&search_ref='.urlencode($search_ref); - if ($search_company) $param.='&search_company='.urlencode($search_company); - if ($search_ref_customer) $param.='&search_ref_customer='.urlencode($search_ref_customer); - if ($search_user > 0) $param.='&search_user='.urlencode($search_user); - if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale); - if ($search_total_ht != '') $param.='&search_total_ht='.urlencode($search_total_ht); - if ($search_total_vat != '') $param.='&search_total_vat='.urlencode($search_total_vat); - if ($search_total_ttc != '') $param.='&search_total_ttc='.urlencode($search_total_ttc); - if ($search_project_ref >= 0) $param.="&search_project_ref=".urlencode($search_project_ref); - if ($show_files) $param.='&show_files=' .urlencode($show_files); - if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); - if ($billed != '') $param.='&billed='.urlencode($billed); - - header("Location: ".$_SERVER['PHP_SELF'].'?'.$param); - exit; - } - else - { - $db->rollback(); - $action='create'; - $_GET["origin"]=$_POST["origin"]; - $_GET["originid"]=$_POST["originid"]; - setEventMessages("Error", null, 'errors'); - $error++; - } + $orders = GETPOST('toselect','array'); + $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); + $validate_invoices = GETPOST('valdate_invoices', 'int'); + + $TFact = array(); + $TFactThird = array(); + + $nb_bills_created = 0; + + $db->begin(); + + foreach($orders as $id_order) + { + $cmd = new Commande($db); + if ($cmd->fetch($id_order) <= 0) continue; + + $objecttmp = new Facture($db); + if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. + else { + // Load extrafields of order + $cmd->fetch_optionals(); + + $objecttmp->socid = $cmd->socid; + $objecttmp->type = Facture::TYPE_STANDARD; + $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; + $objecttmp->mode_reglement_id = $cmd->mode_reglement_id; + $objecttmp->fk_project = $cmd->fk_project; + + $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + if (empty($datefacture)) + { + $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); + } + + $objecttmp->date = $datefacture; + $objecttmp->origin = 'commande'; + $objecttmp->origin_id = $id_order; + + $objecttmp->array_options = $cmd->array_options; // Copy extrafields + + $res = $objecttmp->create($user); + + if($res > 0) $nb_bills_created++; + } + + if ($objecttmp->id > 0) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; + $sql.= "fk_source"; + $sql.= ", sourcetype"; + $sql.= ", fk_target"; + $sql.= ", targettype"; + $sql.= ") VALUES ("; + $sql.= $id_order; + $sql.= ", '".$objecttmp->origin."'"; + $sql.= ", ".$objecttmp->id; + $sql.= ", '".$objecttmp->element."'"; + $sql.= ")"; + + if (! $db->query($sql)) + { + $error++; + } + + if (! $error) + { + $lines = $cmd->lines; + if (empty($lines) && method_exists($cmd, 'fetch_lines')) + { + $cmd->fetch_lines(); + $lines = $cmd->lines; + } + + $fk_parent_line=0; + $num=count($lines); + + for ($i=0;$i<$num;$i++) + { + $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); + if ($lines[$i]->subprice < 0) + { + // Negative line, we create a discount line + $discount = new DiscountAbsolute($db); + $discount->fk_soc=$objecttmp->socid; + $discount->amount_ht=abs($lines[$i]->total_ht); + $discount->amount_tva=abs($lines[$i]->total_tva); + $discount->amount_ttc=abs($lines[$i]->total_ttc); + $discount->tva_tx=$lines[$i]->tva_tx; + $discount->fk_user=$user->id; + $discount->description=$desc; + $discountid=$discount->create($user); + if ($discountid > 0) + { + $result=$objecttmp->insert_discount($discountid); + //$result=$discount->link_to_invoice($lineid,$id); + } + else + { + setEventMessages($discount->error, $discount->errors, 'errors'); + $error++; + break; + } + } + else + { + // Positive line + $product_type=($lines[$i]->product_type?$lines[$i]->product_type:0); + // Date start + $date_start=false; + if ($lines[$i]->date_debut_prevue) $date_start=$lines[$i]->date_debut_prevue; + if ($lines[$i]->date_debut_reel) $date_start=$lines[$i]->date_debut_reel; + if ($lines[$i]->date_start) $date_start=$lines[$i]->date_start; + //Date end + $date_end=false; + if ($lines[$i]->date_fin_prevue) $date_end=$lines[$i]->date_fin_prevue; + if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel; + if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end; + // Reset fk_parent_line for no child products and special product + if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) + { + $fk_parent_line = 0; + } + + // Extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { + $lines[$i]->fetch_optionals($lines[$i]->rowid); + $array_options = $lines[$i]->array_options; + } + + $result = $objecttmp->addline( + $desc, + $lines[$i]->subprice, + $lines[$i]->qty, + $lines[$i]->tva_tx, + $lines[$i]->localtax1_tx, + $lines[$i]->localtax2_tx, + $lines[$i]->fk_product, + $lines[$i]->remise_percent, + $date_start, + $date_end, + 0, + $lines[$i]->info_bits, + $lines[$i]->fk_remise_except, + 'HT', + 0, + $product_type, + $ii, + $lines[$i]->special_code, + $objecttmp->origin, + $lines[$i]->rowid, + $fk_parent_line, + $lines[$i]->fk_fournprice, + $lines[$i]->pa_ht, + $lines[$i]->label, + $array_options + ); + if ($result > 0) + { + $lineid=$result; + } + else + { + $lineid=0; + $error++; + break; + } + // Defined the new fk_parent_line + if ($result > 0 && $lines[$i]->product_type == 9) + { + $fk_parent_line = $result; + } + } + } + } + } + + //$cmd->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module. + + if(!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $objecttmp; + else $TFact[$objecttmp->id] = $objecttmp; + } + + // Build doc with all invoices + $TAllFact = empty($createbills_onebythird) ? $TFact : $TFactThird; + $toselect = array(); + + if (! $error && $validate_invoices) + { + $massaction = $action = 'builddoc'; + + foreach($TAllFact as &$objecttmp) + { + $result = $objecttmp->validate($user); + if ($result <= 0) + { + $error++; + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + break; + } + + $id = $objecttmp->id; // For builddoc action + $object = $objecttmp; + + // Builddoc + $donotredirect = 1; + $upload_dir = $conf->facture->dir_output; + $permissioncreate=$user->rights->facture->creer; + + // Call action to build doc + $savobject = $object; + $object = $objecttmp; + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + $object = $savobject; + } + + $massaction = $action = 'confirm_createbills'; + } + + if (! $error) + { + $db->commit(); + setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); + + // Make a redirect to avoid to bill twice if we make a refresh or back + $param=''; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); + if ($sall) $param.='&sall='.urlencode($sall); + if ($socid > 0) $param.='&socid='.urlencode($socid); + if ($viewstatut != '') $param.='&viewstatut='.urlencode($viewstatut); + if ($search_orderday) $param.='&search_orderday='.urlencode($search_orderday); + if ($search_ordermonth) $param.='&search_ordermonth='.urlencode($search_ordermonth); + if ($search_orderyear) $param.='&search_orderyear='.urlencode($search_orderyear); + if ($search_deliveryday) $param.='&search_deliveryday='.urlencode($search_deliveryday); + if ($search_deliverymonth) $param.='&search_deliverymonth='.urlencode($search_deliverymonth); + if ($search_deliveryyear) $param.='&search_deliveryyear='.urlencode($search_deliveryyear); + if ($search_ref) $param.='&search_ref='.urlencode($search_ref); + if ($search_company) $param.='&search_company='.urlencode($search_company); + if ($search_ref_customer) $param.='&search_ref_customer='.urlencode($search_ref_customer); + if ($search_user > 0) $param.='&search_user='.urlencode($search_user); + if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale); + if ($search_total_ht != '') $param.='&search_total_ht='.urlencode($search_total_ht); + if ($search_total_vat != '') $param.='&search_total_vat='.urlencode($search_total_vat); + if ($search_total_ttc != '') $param.='&search_total_ttc='.urlencode($search_total_ttc); + if ($search_project_ref >= 0) $param.="&search_project_ref=".urlencode($search_project_ref); + if ($show_files) $param.='&show_files=' .urlencode($show_files); + if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); + if ($billed != '') $param.='&billed='.urlencode($billed); + + header("Location: ".$_SERVER['PHP_SELF'].'?'.$param); + exit; + } + else + { + $db->rollback(); + $action='create'; + $_GET["origin"]=$_POST["origin"]; + $_GET["originid"]=$_POST["originid"]; + setEventMessages("Error", null, 'errors'); + $error++; + } } if (!$error && $massaction == 'cancelorders') { - - $db->begin(); - - $nbok = 0; - - - $orders = GETPOST('toselect', 'array'); - foreach ($orders as $id_order) - { - - $cmd = new Commande($db); - if ($cmd->fetch($id_order) <= 0) - continue; - - if ($cmd->statut != Commande::STATUS_VALIDATED) - { - $langs->load('errors'); - setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidToBeCanceled", $cmd->ref), null, 'errors'); - $error++; - break; - } - else - $result = $cmd->cancel(); - - if ($result < 0) - { - setEventMessages($cmd->error, $cmd->errors, 'errors'); - $error++; - break; - } - else - $nbok++; - } - if (!$error) - { - if ($nbok > 1) - setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else - setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - $db->commit(); - } - else - { - $db->rollback(); - } + + $db->begin(); + + $nbok = 0; + + + $orders = GETPOST('toselect', 'array'); + foreach ($orders as $id_order) + { + + $cmd = new Commande($db); + if ($cmd->fetch($id_order) <= 0) + continue; + + if ($cmd->statut != Commande::STATUS_VALIDATED) + { + $langs->load('errors'); + setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidToBeCanceled", $cmd->ref), null, 'errors'); + $error++; + break; + } + else + $result = $cmd->cancel(); + + if ($result < 0) + { + setEventMessages($cmd->error, $cmd->errors, 'errors'); + $error++; + break; + } + else + $nbok++; + } + if (!$error) + { + if ($nbok > 1) + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } } if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_search')) { - if (empty($diroutputmassaction)) - { - dol_print_error(null, 'include of actions_massactions.inc.php is done but var $diroutputmassaction was not defined'); - exit; - } - - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - - $objecttmp=new $objectclass($db); - $listofobjectid=array(); - $listofobjectthirdparties=array(); - $listofobjectref=array(); - foreach($toselect as $toselectid) - { - $objecttmp=new $objectclass($db); // must create new instance because instance is saved into $listofobjectref array for future use - $result=$objecttmp->fetch($toselectid); - if ($result > 0) - { - $listofobjectid[$toselectid]=$toselectid; - $thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid; - $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; - $listofobjectref[$toselectid]=$objecttmp->ref; - } - } - - $arrayofinclusion=array(); - foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'\.pdf$'; - foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files - $listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true); - - // build list of files with full path - $files = array(); - foreach($listofobjectref as $basename) - { - $basename = dol_sanitizeFileName($basename); - foreach($listoffiles as $filefound) - { - if (strstr($filefound["name"],$basename)) - { - $files[] = $uploaddir.'/'.$basename.'/'.$filefound["name"]; - break; - } - } - } - - // Define output language (Here it is not used because we do only merging existing PDF) - $outputlangs = $langs; - $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objecttmp->thirdparty->default_lang; - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - - if (!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) - { - // Create output dir if not exists - dol_mkdir($diroutputmassaction); - - // Defined name of merged file - $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); - $filename=preg_replace('/\s/','_',$filename); - - // Save merged file - if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) - { - if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); - else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); - } - if ($year) $filename.='_'.$year; - if ($month) $filename.='_'.$month; - - if (count($files)>0) - { - $now=dol_now(); - $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; - - $input_files = ''; - foreach($files as $f) { - $input_files.=' '.escapeshellarg($f); - } - - $cmd = 'pdftk '.escapeshellarg($input_files).' cat output '.escapeshellarg($file); - exec($cmd); - - if (! empty($conf->global->MAIN_UMASK)) - @chmod($file, octdec($conf->global->MAIN_UMASK)); - - $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); - } - else - { - setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); - } - } - else { - // Create empty PDF - $formatarray=pdf_getFormat(); - $page_largeur = $formatarray['width']; - $page_hauteur = $formatarray['height']; - $format = array($page_largeur,$page_hauteur); - - $pdf=pdf_getInstance($format); - - if (class_exists('TCPDF')) - { - $pdf->setPrintHeader(false); - $pdf->setPrintFooter(false); - } - $pdf->SetFont(pdf_getPDFFont($outputlangs)); - - if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); - - // Add all others - foreach($files as $file) - { - // Charge un document PDF depuis un fichier. - $pagecount = $pdf->setSourceFile($file); - for ($i = 1; $i <= $pagecount; $i++) - { - $tplidx = $pdf->importPage($i); - $s = $pdf->getTemplatesize($tplidx); - $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); - $pdf->useTemplate($tplidx); - } - } - - // Create output dir if not exists - dol_mkdir($diroutputmassaction); - - // Defined name of merged file - $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); - $filename=preg_replace('/\s/','_',$filename); - - // Save merged file - if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) - { - if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); - else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); - } - if ($year) $filename.='_'.$year; - if ($month) $filename.='_'.$month; - if ($pagecount) - { - $now=dol_now(); - $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; - $pdf->Output($file,'F'); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($file, octdec($conf->global->MAIN_UMASK)); - - $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); - } - else - { - setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); - } - } + if (empty($diroutputmassaction)) + { + dol_print_error(null, 'include of actions_massactions.inc.php is done but var $diroutputmassaction was not defined'); + exit; + } + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + + $objecttmp=new $objectclass($db); + $listofobjectid=array(); + $listofobjectthirdparties=array(); + $listofobjectref=array(); + foreach($toselect as $toselectid) + { + $objecttmp=new $objectclass($db); // must create new instance because instance is saved into $listofobjectref array for future use + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + $listofobjectid[$toselectid]=$toselectid; + $thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid; + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; + $listofobjectref[$toselectid]=$objecttmp->ref; + } + } + + $arrayofinclusion=array(); + foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'\.pdf$'; + foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files + $listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true); + + // build list of files with full path + $files = array(); + foreach($listofobjectref as $basename) + { + $basename = dol_sanitizeFileName($basename); + foreach($listoffiles as $filefound) + { + if (strstr($filefound["name"],$basename)) + { + $files[] = $uploaddir.'/'.$basename.'/'.$filefound["name"]; + break; + } + } + } + + // Define output language (Here it is not used because we do only merging existing PDF) + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objecttmp->thirdparty->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + if (!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) + { + // Create output dir if not exists + dol_mkdir($diroutputmassaction); + + // Defined name of merged file + $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); + $filename=preg_replace('/\s/','_',$filename); + + // Save merged file + if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) + { + if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); + else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + } + if ($year) $filename.='_'.$year; + if ($month) $filename.='_'.$month; + + if (count($files)>0) + { + $now=dol_now(); + $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; + + $input_files = ''; + foreach($files as $f) { + $input_files.=' '.escapeshellarg($f); + } + + $cmd = 'pdftk '.escapeshellarg($input_files).' cat output '.escapeshellarg($file); + exec($cmd); + + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + + $langs->load("exports"); + setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); + } + } + else { + // Create empty PDF + $formatarray=pdf_getFormat(); + $page_largeur = $formatarray['width']; + $page_hauteur = $formatarray['height']; + $format = array($page_largeur,$page_hauteur); + + $pdf=pdf_getInstance($format); + + if (class_exists('TCPDF')) + { + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + } + $pdf->SetFont(pdf_getPDFFont($outputlangs)); + + if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + + // Add all others + foreach($files as $file) + { + // Charge un document PDF depuis un fichier. + $pagecount = $pdf->setSourceFile($file); + for ($i = 1; $i <= $pagecount; $i++) + { + $tplidx = $pdf->importPage($i); + $s = $pdf->getTemplatesize($tplidx); + $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); + $pdf->useTemplate($tplidx); + } + } + + // Create output dir if not exists + dol_mkdir($diroutputmassaction); + + // Defined name of merged file + $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); + $filename=preg_replace('/\s/','_',$filename); + + // Save merged file + if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) + { + if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); + else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + } + if ($year) $filename.='_'.$year; + if ($month) $filename.='_'.$month; + if ($pagecount) + { + $now=dol_now(); + $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; + $pdf->Output($file,'F'); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + + $langs->load("exports"); + setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); + } + } } // Remove a file from massaction area if ($action == 'remove_file') { - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - - $langs->load("other"); - $upload_dir = $diroutputmassaction; - $file = $upload_dir . '/' . GETPOST('file'); - $ret=dol_delete_file($file); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); - $action=''; + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $langs->load("other"); + $upload_dir = $diroutputmassaction; + $file = $upload_dir . '/' . GETPOST('file'); + $ret=dol_delete_file($file); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); + $action=''; } // Validate records if (! $error && $massaction == 'validate' && $permtocreate) { - $objecttmp=new $objectclass($db); - - if ($objecttmp->element == 'invoice' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) - { - $langs->load("errors"); - setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); - $error++; - } - if ($objecttmp->element == 'invoice_supplier' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) - { - $langs->load("errors"); - setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); - $error++; - } - if (! $error) - { - $db->begin(); - - $nbok = 0; - foreach($toselect as $toselectid) - { - $result=$objecttmp->fetch($toselectid); - if ($result > 0) - { - //if (in_array($objecttmp->element, array('societe','member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); - //else - $result = $objecttmp->validate($user); - if ($result == 0) - { - $langs->load("errors"); - setEventMessages($langs->trans("ErrorObjectMustHaveStatusDraftToBeValidated", $objecttmp->ref), null, 'errors'); - $error++; - break; - } - elseif ($result < 0) - { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; - } - else $nbok++; - } - else - { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; - } - } - - if (! $error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - $db->commit(); - } - else - { - $db->rollback(); - } - //var_dump($listofobjectthirdparties);exit; - } + $objecttmp=new $objectclass($db); + + if ($objecttmp->element == 'invoice' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) + { + $langs->load("errors"); + setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); + $error++; + } + if ($objecttmp->element == 'invoice_supplier' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) + { + $langs->load("errors"); + setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); + $error++; + } + if (! $error) + { + $db->begin(); + + $nbok = 0; + foreach($toselect as $toselectid) + { + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + //if (in_array($objecttmp->element, array('societe','member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); + //else + $result = $objecttmp->validate($user); + if ($result == 0) + { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorObjectMustHaveStatusDraftToBeValidated", $objecttmp->ref), null, 'errors'); + $error++; + break; + } + elseif ($result < 0) + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + else $nbok++; + } + else + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (! $error) + { + if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } + //var_dump($listofobjectthirdparties);exit; + } } // Closed records if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) { $db->begin(); - + $objecttmp = new $objectclass($db); $nbok = 0; foreach ($toselect as $toselectid) { @@ -1106,13 +1119,13 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo break; } } - + if (!$error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else - setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - $db->commit(); + else + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); } else { $db->rollback(); @@ -1121,66 +1134,127 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo // Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before) if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete) { - $db->begin(); + $db->begin(); + + $objecttmp=new $objectclass($db); + $nbok = 0; + foreach($toselect as $toselectid) + { + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + // Refuse deletion for some objects/status + if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT) + { + $langs->load("errors"); + $nbignored++; + $resaction.='<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'</div><br>'; + continue; + } + + if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) + { + $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id; + $res = $db->query($sql); + + if (!$res) + { + setEventMessage('ErrorRecordParentingNotModified', 'errors'); + $error++; + } + } + + if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); + else $result = $objecttmp->delete($user); + + if ($result <= 0) + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + else $nbok++; + } + else + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (! $error) + { + if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } + //var_dump($listofobjectthirdparties);exit; +} - $objecttmp=new $objectclass($db); - $nbok = 0; - foreach($toselect as $toselectid) - { - $result=$objecttmp->fetch($toselectid); - if ($result > 0) - { - // Refuse deletion for some objects/status - if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction.='<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'</div><br>'; - continue; - } - - if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) - { - $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id; - $res = $db->query($sql); - - if (!$res) - { - setEventMessage('ErrorRecordParentingNotModified', 'errors'); - $error++; - } - } - - if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); - else $result = $objecttmp->delete($user); - - if ($result <= 0) - { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; - } - else $nbok++; - } - else - { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; - } - } - - if (! $error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); - $db->commit(); - } - else - { - $db->rollback(); - } - //var_dump($listofobjectthirdparties);exit; +// Generate document foreach object according to model linked to object +// @TODO : propose model selection +if (! $error && $massaction == 'generate_doc' && $permtoread) +{ + $db->begin(); + + $objecttmp=new $objectclass($db); + $nbok = 0; + foreach($toselect as $toselectid) + { + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + $outputlangs = $langs; + $newlang=''; + + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->thirdparty->default_lang)) $newlang=$objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ... + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) $newlang=$objecttmp->default_lang; // for thirdparty + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + // To be sure vars is defined + if (empty($hidedetails)) $hidedetails=0; + if (empty($hidedesc)) $hidedesc=0; + if (empty($hideref)) $hideref=0; + if (empty($moreparams)) $moreparams=null; + + $result= $objecttmp->generateDocument($objecttmp->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + + if ($result <= 0) + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + else $nbok++; + } + else + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (! $error) + { + if ($nbok > 1) setEventMessages($langs->trans("RecordsGenerated", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordGenerated", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } } $parameters['toselect']=$toselect; From c84b189a05474228beba41cff703211538fb43f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 10:40:25 +0100 Subject: [PATCH 129/183] Fix duplicate recording of event when using mass action send --- htdocs/core/actions_massactions.inc.php | 57 +++++++++++++++---------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 630c67e9979..9839c39cfe9 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -74,10 +74,11 @@ if (! $error && $massaction == 'confirm_presend') if (! $error) { $thirdparty=new Societe($db); + + $objecttmp=new $objectclass($db); if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); if ($objecttmp->element == 'holiday') $thirdparty=new User($db); - $objecttmp=new $objectclass($db); foreach($toselect as $toselectid) { $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use @@ -85,12 +86,15 @@ if (! $error && $massaction == 'confirm_presend') if ($result > 0) { $listofobjectid[$toselectid]=$toselectid; + $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; - $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; - $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; + if (empty($thirdpartyid)) $thirdpartyid=0; + + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; + $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; } } } @@ -235,6 +239,12 @@ if (! $error && $massaction == 'confirm_presend') $fuser->fetch($objectobj->fk_user_author); $sendto = $fuser->email; } + elseif ($objectobj->element == 'holiday') + { + $fuser = new User($db); + $fuser->fetch($objectobj->fk_user); + $sendto = $fuser->email; + } else { $objectobj->fetch_thirdparty(); @@ -283,15 +293,14 @@ if (! $error && $massaction == 'confirm_presend') } } - // Object of thirdparty qualified + // Object of thirdparty qualified, we add it $listofqualifiedobj[$objectid]=$objectobj; $listofqualifiedref[$objectid]=$objectobj->ref; - //var_dump($listofqualifiedref); } - // Send email if there is at least one qualified record + // Send email if there is at least one qualified object for current thirdparty if (count($listofqualifiedobj) > 0) { $langs->load("commercial"); @@ -337,25 +346,27 @@ if (! $error && $massaction == 'confirm_presend') if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) - $oneemailperrecipient=(GETPOST('oneemailperrecipient')=='on'?1:0); + // $looparray will be an array with number of email to send for the current thirdparty (so 1 or n if n object for same thirdparty) + $oneemailperrecipient=(GETPOST('oneemailperrecipient','alpha')=='on'?1:0); $looparray=array(); if (! $oneemailperrecipient) { $looparray = $listofqualifiedobj; foreach ($looparray as $key => $objecttmp) { - $looparray[$key]->thirdparty = $thirdparty; + $looparray[$key]->thirdparty = $thirdparty; // Force thirdparty on object } } else { $objectforloop=new $objectclass($db); - $objectforloop->thirdparty = $thirdparty; + $objectforloop->thirdparty = $thirdparty; // Force thirdparty on object (even if object was not loaded) $looparray[0]=$objectforloop; } //var_dump($looparray);exit; + dol_syslog("We have set an array of ".count($looparray)." emails to send"); - foreach ($looparray as $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per record + foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object { // Make substitution in email content $substitutionarray=getCommonSubstitutionArray($langs, 0, null, $objecttmp); @@ -422,9 +433,11 @@ if (! $error && $massaction == 'confirm_presend') $error=0; // Insert logs into agenda - foreach($listofqualifiedobj as $objid => $objectobj) + foreach($listofqualifiedobj as $objid2 => $objectobj2) { - dol_syslog("Try to insert email event into agenda for objid=".$objid." => objectobj=".get_class($objectobj)); + if (()! $oneemailperrecipient) && $objid2 != $objid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + + dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; if ($objectclass == 'Commande') $actiontypecode='AC_COM'; @@ -444,13 +457,13 @@ if (! $error && $massaction == 'confirm_presend') $actionmsg2=''; // Initialisation donnees - $objectobj->sendtoid = 0; - $objectobj->actionmsg = $actionmsg; // Long text - $objectobj->actionmsg2 = $actionmsg2; // Short text - $objectobj->fk_element = $objid; - $objectobj->elementtype = $objectobj->element; + $objectobj2->sendtoid = 0; + $objectobj2->actionmsg = $actionmsg; // Long text + $objectobj2->actionmsg2 = $actionmsg2; // Short text + $objectobj2->fk_element = $objid2; + $objectobj2->elementtype = $objectobj2->element; - $triggername = strtoupper(get_class($objectobj)) .'_SENTBYMAIL'; + $triggername = strtoupper(get_class($objectobj2)) .'_SENTBYMAIL'; if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; if ($triggername == 'COMMANDE_SENTBYMAIL') $triggername = 'ORDER_SENTBYMAIL'; @@ -465,7 +478,7 @@ if (! $error && $massaction == 'confirm_presend') // Appel des triggers include_once DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"; $interface=new Interfaces($db); - $result=$interface->run_triggers($triggername, $objectobj, $user, $langs, $conf); + $result=$interface->run_triggers($triggername, $objectobj2, $user, $langs, $conf); if ($result < 0) { $error++; $errors=$interface->errors; } // Fin appel triggers @@ -475,9 +488,9 @@ if (! $error && $massaction == 'confirm_presend') dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); } } - - $nbsent++; } + + $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) } else { @@ -544,7 +557,7 @@ if ($massaction == 'confirm_createbills') else { // Load extrafields of order $cmd->fetch_optionals(); - + $objecttmp->socid = $cmd->socid; $objecttmp->type = Facture::TYPE_STANDARD; $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; From 77e322b2503b001694715760ac365b205812b947 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 10:49:51 +0100 Subject: [PATCH 130/183] Fix bad var --- htdocs/core/actions_massactions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 9839c39cfe9..ba94300ae22 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -435,7 +435,7 @@ if (! $error && $massaction == 'confirm_presend') // Insert logs into agenda foreach($listofqualifiedobj as $objid2 => $objectobj2) { - if (()! $oneemailperrecipient) && $objid2 != $objid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + if ((! $oneemailperrecipient) && $objid2 != $objectid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); From 43c0a2232ceaa785e97fd27d98362aea9c85fc27 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 10:51:34 +0100 Subject: [PATCH 131/183] Fix massaction --- htdocs/core/actions_massactions.inc.php | 250 ++++++++++++------------ 1 file changed, 125 insertions(+), 125 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index d01f0705817..0c0dba126c7 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -66,19 +66,19 @@ if (! $error && $massaction == 'confirm_presend') $nbignored = 0; $langs->load("mails"); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - + $listofobjectid=array(); $listofobjectthirdparties=array(); $listofobjectref=array(); - + if (! $error) { $thirdparty=new Societe($db); - + $objecttmp=new $objectclass($db); if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); if ($objecttmp->element == 'holiday') $thirdparty=new User($db); - + foreach($toselect as $toselectid) { $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use @@ -86,19 +86,19 @@ if (! $error && $massaction == 'confirm_presend') if ($result > 0) { $listofobjectid[$toselectid]=$toselectid; - + $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; if (empty($thirdpartyid)) $thirdpartyid=0; - + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; } } } - + // Check mandatory parameters if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) { @@ -106,7 +106,7 @@ if (! $error && $massaction == 'confirm_presend') setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); $massaction='presend'; } - + $receiver=$_POST['receiver']; if (! is_array($receiver)) { @@ -119,14 +119,14 @@ if (! $error && $massaction == 'confirm_presend') setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); $massaction='presend'; } - + if (! GETPOST('subject','none')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); $massaction='presend'; } - + // Loop on each recipient/thirdparty if (! $error) { @@ -138,12 +138,12 @@ if (! $error && $massaction == 'confirm_presend') dol_print_error($db); exit; } - + $sendto=''; $sendtocc=''; $sendtobcc=''; $sendtoid = array(); - + // Define $sendto $tmparray=array(); if (trim($_POST['sendto'])) @@ -168,7 +168,7 @@ if (! $error && $massaction == 'confirm_presend') } } $sendto=implode(',',$tmparray); - + // Define $sendtocc $receivercc=$_POST['receivercc']; if (! is_array($receivercc)) @@ -198,13 +198,13 @@ if (! $error && $massaction == 'confirm_presend') } } $sendtocc=implode(',',$tmparray); - + //var_dump($listofobjectref);exit; $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); $listofqualifiedobj=array(); $listofqualifiedref=array(); $thirdpartywithoutemail=array(); - + foreach($listofobjectref[$thirdpartyid] as $objectid => $objectobj) { //var_dump($thirdpartyid.' - '.$objectid.' - '.$objectobj->statut); @@ -229,7 +229,7 @@ if (! $error && $massaction == 'confirm_presend') $resaction.='<div class="error">'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$objectobj->ref).'</div><br>'; continue; // Payment done or started or canceled } - + // Test recipient if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) { @@ -251,7 +251,7 @@ if (! $error && $massaction == 'confirm_presend') $sendto = $objectobj->thirdparty->email; } } - + if (empty($sendto)) { //print "No recipient for thirdparty ".$objectobj->thirdparty->name; @@ -264,7 +264,7 @@ if (! $error && $massaction == 'confirm_presend') $thirdpartywithoutemail[$objectobj->thirdparty->id]=1; continue; } - + if ($_POST['addmaindocfile']) { // TODO Use future field $objectobj->fullpathdoc to know where is stored default file @@ -273,7 +273,7 @@ if (! $error && $massaction == 'confirm_presend') $filedir=$uploaddir . '/' . dol_sanitizeFileName($objectobj->ref); $file = $filedir . '/' . $filename; $mime = dol_mimetype($file); - + if (dol_is_file($file)) { // Create form object @@ -292,19 +292,19 @@ if (! $error && $massaction == 'confirm_presend') continue; } } - + // Object of thirdparty qualified, we add it $listofqualifiedobj[$objectid]=$objectobj; $listofqualifiedref[$objectid]=$objectobj->ref; - + //var_dump($listofqualifiedref); } - + // Send email if there is at least one qualified object for current thirdparty if (count($listofqualifiedobj) > 0) { $langs->load("commercial"); - + $fromtype = GETPOST('fromtype'); if ($fromtype === 'user') { $from = $user->getFullName($langs) .' <'.$user->email.'>'; @@ -332,11 +332,11 @@ if (! $error && $massaction == 'confirm_presend') else { $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; } - + $replyto = $from; $subject = GETPOST('subject','none'); $message = GETPOST('message','none'); - + $sendtobcc = GETPOST('sendtoccc'); if ($objectclass == 'Propal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); if ($objectclass == 'Commande') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)); @@ -344,7 +344,7 @@ if (! $error && $massaction == 'confirm_presend') if ($objectclass == 'Supplier_Proposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)); if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); - + // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) // $looparray will be an array with number of email to send for the current thirdparty (so 1 or n if n object for same thirdparty) $oneemailperrecipient=(GETPOST('oneemailperrecipient','alpha')=='on'?1:0); @@ -365,7 +365,7 @@ if (! $error && $massaction == 'confirm_presend') } //var_dump($looparray);exit; dol_syslog("We have set an array of ".count($looparray)." emails to send"); - + foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object { // Make substitution in email content @@ -374,25 +374,25 @@ if (! $error && $massaction == 'confirm_presend') $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ',$listofqualifiedref) : $objecttmp->ref); $substitutionarray['__EMAIL__'] = $thirdparty->email; $substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>'; - + $parameters=array('mode'=>'formemail'); - + if ( ! empty( $listofobjectthirdparties ) ) { $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; } if ( ! empty( $listofobjectref ) ) { $parameters['listofobjectref'] = $listofobjectref; } - + complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); - + $subject=make_substitutions($subject, $substitutionarray); $message=make_substitutions($message, $substitutionarray); - + $filepath = $attachedfiles['paths']; $filename = $attachedfiles['names']; $mimetype = $attachedfiles['mimes']; - + // Define the trackid when emails sent from the mass action if ($oneemailperrecipient) { @@ -410,12 +410,12 @@ if (! $error && $massaction == 'confirm_presend') if (get_class($objecttmp)=='Supplier_Proposal') $trackid='spr'; if (get_class($objecttmp)=='CommandeFournisseur') $trackid='sor'; if (get_class($objecttmp)=='FactureFournisseur') $trackid='sin'; - + $trackid.=$objecttmp->id; } //var_dump($filepath); //var_dump($trackid);exit; - + // Send mail (substitutionarray must be done just before this) require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); @@ -429,23 +429,23 @@ if (! $error && $massaction == 'confirm_presend') if ($result) { $resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'<br>'; // Must not contain " - + $error=0; - + // Insert logs into agenda foreach($listofqualifiedobj as $objid2 => $objectobj2) { - if ((! $oneemailperrecipient) && $objid2 != $objid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level - + if ((! $oneemailperrecipient) && $objid2 != $objectid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); - + /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; if ($objectclass == 'Commande') $actiontypecode='AC_COM'; if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; if ($objectclass == 'Supplier_Proposal') $actiontypecode='AC_SUP_PRO'; if ($objectclass == 'CommandeFournisseur') $actiontypecode='AC_SUP_ORD'; if ($objectclass == 'FactureFournisseur') $actiontypecode='AC_SUP_INV';*/ - + $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { @@ -455,14 +455,14 @@ if (! $error && $massaction == 'confirm_presend') $actionmsg = dol_concatdesc($actionmsg, $message); } $actionmsg2=''; - + // Initialisation donnees $objectobj2->sendtoid = 0; $objectobj2->actionmsg = $actionmsg; // Long text $objectobj2->actionmsg2 = $actionmsg2; // Short text $objectobj2->fk_element = $objid2; $objectobj2->elementtype = $objectobj2->element; - + $triggername = strtoupper(get_class($objectobj2)) .'_SENTBYMAIL'; if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; @@ -472,7 +472,7 @@ if (! $error && $massaction == 'confirm_presend') if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; - + if (! empty($triggername)) { // Appel des triggers @@ -481,7 +481,7 @@ if (! $error && $massaction == 'confirm_presend') $result=$interface->run_triggers($triggername, $objectobj2, $user, $langs, $conf); if ($result < 0) { $error++; $errors=$interface->errors; } // Fin appel triggers - + if ($error) { setEventMessages($db->lasterror(), $errors, 'errors'); @@ -489,7 +489,7 @@ if (! $error && $massaction == 'confirm_presend') } } } - + $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) } else @@ -509,13 +509,13 @@ if (! $error && $massaction == 'confirm_presend') } } } - + $resaction.=($resaction?'<br>':$resaction); $resaction.='<strong>'.$langs->trans("ResultOfMailSending").':</strong><br>'."\n"; $resaction.=$langs->trans("NbSelected").': '.count($toselect)."\n<br>"; $resaction.=$langs->trans("NbIgnored").': '.($nbignored?$nbignored:0)."\n<br>"; $resaction.=$langs->trans("NbSent").': '.($nbsent?$nbsent:0)."\n<br>"; - + if ($nbsent) { $action=''; // Do not show form post if there was at least one successfull sent @@ -528,7 +528,7 @@ if (! $error && $massaction == 'confirm_presend') //setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings'); // May be object has no generated PDF file setEventMessages($resaction, null, 'warnings'); } - + $action='list'; $massaction=''; } @@ -539,48 +539,48 @@ if ($massaction == 'confirm_createbills') $orders = GETPOST('toselect','array'); $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); $validate_invoices = GETPOST('valdate_invoices', 'int'); - + $TFact = array(); $TFactThird = array(); - + $nb_bills_created = 0; - + $db->begin(); - + foreach($orders as $id_order) { $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) continue; - + $objecttmp = new Facture($db); if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. else { // Load extrafields of order $cmd->fetch_optionals(); - + $objecttmp->socid = $cmd->socid; $objecttmp->type = Facture::TYPE_STANDARD; $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; $objecttmp->mode_reglement_id = $cmd->mode_reglement_id; $objecttmp->fk_project = $cmd->fk_project; - + $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($datefacture)) { $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); } - + $objecttmp->date = $datefacture; $objecttmp->origin = 'commande'; $objecttmp->origin_id = $id_order; - + $objecttmp->array_options = $cmd->array_options; // Copy extrafields - + $res = $objecttmp->create($user); - + if($res > 0) $nb_bills_created++; } - + if ($objecttmp->id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; @@ -594,12 +594,12 @@ if ($massaction == 'confirm_createbills') $sql.= ", ".$objecttmp->id; $sql.= ", '".$objecttmp->element."'"; $sql.= ")"; - + if (! $db->query($sql)) { $error++; } - + if (! $error) { $lines = $cmd->lines; @@ -608,10 +608,10 @@ if ($massaction == 'confirm_createbills') $cmd->fetch_lines(); $lines = $cmd->lines; } - + $fk_parent_line=0; $num=count($lines); - + for ($i=0;$i<$num;$i++) { $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); @@ -658,13 +658,13 @@ if ($massaction == 'confirm_createbills') { $fk_parent_line = 0; } - + // Extrafields if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { $lines[$i]->fetch_optionals($lines[$i]->rowid); $array_options = $lines[$i]->array_options; } - + $result = $objecttmp->addline( $desc, $lines[$i]->subprice, @@ -711,21 +711,21 @@ if ($massaction == 'confirm_createbills') } } } - + //$cmd->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module. - + if(!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $objecttmp; else $TFact[$objecttmp->id] = $objecttmp; } - + // Build doc with all invoices $TAllFact = empty($createbills_onebythird) ? $TFact : $TFactThird; $toselect = array(); - + if (! $error && $validate_invoices) { $massaction = $action = 'builddoc'; - + foreach($TAllFact as &$objecttmp) { $result = $objecttmp->validate($user); @@ -735,30 +735,30 @@ if ($massaction == 'confirm_createbills') setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); break; } - + $id = $objecttmp->id; // For builddoc action $object = $objecttmp; - + // Builddoc $donotredirect = 1; $upload_dir = $conf->facture->dir_output; $permissioncreate=$user->rights->facture->creer; - + // Call action to build doc $savobject = $object; $object = $objecttmp; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; $object = $savobject; } - + $massaction = $action = 'confirm_createbills'; } - + if (! $error) { $db->commit(); setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); - + // Make a redirect to avoid to bill twice if we make a refresh or back $param=''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); @@ -784,7 +784,7 @@ if ($massaction == 'confirm_createbills') if ($show_files) $param.='&show_files=' .urlencode($show_files); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); if ($billed != '') $param.='&billed='.urlencode($billed); - + header("Location: ".$_SERVER['PHP_SELF'].'?'.$param); exit; } @@ -801,20 +801,20 @@ if ($massaction == 'confirm_createbills') if (!$error && $massaction == 'cancelorders') { - + $db->begin(); - + $nbok = 0; - - + + $orders = GETPOST('toselect', 'array'); foreach ($orders as $id_order) { - + $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) continue; - + if ($cmd->statut != Commande::STATUS_VALIDATED) { $langs->load('errors'); @@ -824,7 +824,7 @@ if (!$error && $massaction == 'cancelorders') } else $result = $cmd->cancel(); - + if ($result < 0) { setEventMessages($cmd->error, $cmd->errors, 'errors'); @@ -856,11 +856,11 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se dol_print_error(null, 'include of actions_massactions.inc.php is done but var $diroutputmassaction was not defined'); exit; } - + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - + $objecttmp=new $objectclass($db); $listofobjectid=array(); $listofobjectthirdparties=array(); @@ -877,12 +877,12 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $listofobjectref[$toselectid]=$objecttmp->ref; } } - + $arrayofinclusion=array(); foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'\.pdf$'; foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files $listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true); - + // build list of files with full path $files = array(); foreach($listofobjectref as $basename) @@ -897,7 +897,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se } } } - + // Define output language (Here it is not used because we do only merging existing PDF) $outputlangs = $langs; $newlang=''; @@ -908,16 +908,16 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - + if (!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) { // Create output dir if not exists dol_mkdir($diroutputmassaction); - + // Defined name of merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); $filename=preg_replace('/\s/','_',$filename); - + // Save merged file if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) { @@ -926,23 +926,23 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se } if ($year) $filename.='_'.$year; if ($month) $filename.='_'.$month; - + if (count($files)>0) { $now=dol_now(); $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; - + $input_files = ''; foreach($files as $f) { $input_files.=' '.escapeshellarg($f); } - + $cmd = 'pdftk '.escapeshellarg($input_files).' cat output '.escapeshellarg($file); exec($cmd); - + if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - + $langs->load("exports"); setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); } @@ -957,18 +957,18 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $page_largeur = $formatarray['width']; $page_hauteur = $formatarray['height']; $format = array($page_largeur,$page_hauteur); - + $pdf=pdf_getInstance($format); - + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } $pdf->SetFont(pdf_getPDFFont($outputlangs)); - + if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); - + // Add all others foreach($files as $file) { @@ -982,14 +982,14 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $pdf->useTemplate($tplidx); } } - + // Create output dir if not exists dol_mkdir($diroutputmassaction); - + // Defined name of merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); $filename=preg_replace('/\s/','_',$filename); - + // Save merged file if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) { @@ -1005,7 +1005,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $pdf->Output($file,'F'); if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - + $langs->load("exports"); setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); } @@ -1020,7 +1020,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se if ($action == 'remove_file') { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - + $langs->load("other"); $upload_dir = $diroutputmassaction; $file = $upload_dir . '/' . GETPOST('file'); @@ -1034,7 +1034,7 @@ if ($action == 'remove_file') if (! $error && $massaction == 'validate' && $permtocreate) { $objecttmp=new $objectclass($db); - + if ($objecttmp->element == 'invoice' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) { $langs->load("errors"); @@ -1050,7 +1050,7 @@ if (! $error && $massaction == 'validate' && $permtocreate) if (! $error) { $db->begin(); - + $nbok = 0; foreach($toselect as $toselectid) { @@ -1082,7 +1082,7 @@ if (! $error && $massaction == 'validate' && $permtocreate) break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); @@ -1099,7 +1099,7 @@ if (! $error && $massaction == 'validate' && $permtocreate) // Closed records if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) { $db->begin(); - + $objecttmp = new $objectclass($db); $nbok = 0; foreach ($toselect as $toselectid) { @@ -1119,7 +1119,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo break; } } - + if (!$error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); @@ -1135,7 +1135,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete) { $db->begin(); - + $objecttmp=new $objectclass($db); $nbok = 0; foreach($toselect as $toselectid) @@ -1151,22 +1151,22 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == $resaction.='<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'</div><br>'; continue; } - + if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id; $res = $db->query($sql); - + if (!$res) { setEventMessage('ErrorRecordParentingNotModified', 'errors'); $error++; } } - + if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); else $result = $objecttmp->delete($user); - + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); @@ -1182,7 +1182,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); @@ -1201,7 +1201,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == if (! $error && $massaction == 'generate_doc' && $permtoread) { $db->begin(); - + $objecttmp=new $objectclass($db); $nbok = 0; foreach($toselect as $toselectid) @@ -1211,7 +1211,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) { $outputlangs = $langs; $newlang=''; - + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->thirdparty->default_lang)) $newlang=$objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ... if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) $newlang=$objecttmp->default_lang; // for thirdparty @@ -1220,15 +1220,15 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - + // To be sure vars is defined if (empty($hidedetails)) $hidedetails=0; if (empty($hidedesc)) $hidedesc=0; if (empty($hideref)) $hideref=0; if (empty($moreparams)) $moreparams=null; - + $result= $objecttmp->generateDocument($objecttmp->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); - + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); @@ -1244,7 +1244,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsGenerated", $nbok), null, 'mesgs'); From 08a181bfbf7ed1105aae0d30452eb413f56b7e78 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 11:00:17 +0100 Subject: [PATCH 132/183] Fix substitution of REF_CLIENT and REF_SUPPLIER --- htdocs/core/lib/functions.lib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index fffe95cbb0c..7187a765de4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5858,8 +5858,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob { $substitutionarray['__ID__'] = '__ID__'; $substitutionarray['__REF__'] = '__REF__'; - $substitutionarray['__REFCLIENT__'] = '__REFCLIENT__'; - $substitutionarray['__REFSUPPLIER__'] = '__REFSUPPLIER__'; + $substitutionarray['__REF_CLIENT__'] = '__REF_CLIENT__'; + $substitutionarray['__REF_SUPPLIER__'] = '__REF_SUPPLIER__'; $substitutionarray['__EXTRAFIELD_XXX__'] = '__EXTRAFIELD_XXX__'; $substitutionarray['__THIRDPARTY_ID__'] = '__THIRDPARTY_ID__'; @@ -5905,6 +5905,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob { $substitutionarray['__ID__'] = $object->id; $substitutionarray['__REF__'] = $object->ref; + $substitutionarray['__REF_CLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); + $substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); + // For backward compatibility $substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); $substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); From eca1a2cd6472efa4b6ffae90e91263da8536e0db Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 11:08:13 +0100 Subject: [PATCH 133/183] Update societe.class.php --- htdocs/societe/class/societe.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index a240c83b89f..18a4dbda8f2 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3798,6 +3798,7 @@ class Societe extends CommonObject $sql .= " WHERE fk_soc = ". $this->id; $sql .= " AND paye = 0"; $sql .= " AND fk_statut <> 0"; // Not a draft + $sql .= " AND entity IN (".getEntity('invoice').")"; //$sql .= " AND (fk_statut <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason $sql .= " AND fk_statut <> 3"; // Not abandonned $sql .= " AND fk_statut <> 2"; // Not clasified as paid From 508fb5c9cb82234a6523a35560d3c10cce473091 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 11:13:11 +0100 Subject: [PATCH 134/183] =?UTF-8?q?Prise=20en=20charge=20des=20Travaux=20s?= =?UTF-8?q?uppl=C3=A9mentaires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige la filtration lors des situations client afin de prendre en compte la possibilité d'ajouter des travaux en cours de chantier. --- htdocs/core/tpl/objectline_view.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 313a4ee4def..ac2de384ddc 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -283,7 +283,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; <td class="linecoldelete" align="center"><?php $coldisplay++; ?> <?php - if (($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disableremove)) { + if (($line->fk_prev_id == NULL ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&action=ask_deleteline&lineid=' . $line->id . '">'; print img_delete(); print '</a>'; From 30548d977fc46ccb6dee6952e5523e2438a01745 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 11:19:11 +0100 Subject: [PATCH 135/183] =?UTF-8?q?Prise=20en=20charge=20des=20Travaux=20s?= =?UTF-8?q?uppl=C3=A9mentaires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige la filtration pour permettre l'ajout de ligne lors de la présence de travaux supplémentaires en cours de chantier. --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 9ad79393499..bec4097935f 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4540,7 +4540,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') { if ($action != 'editline' && $action != 'selectlines') { From e5d6c551dd6e0c101d2eb7877f1fd8a6fe2b8260 Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Tue, 29 Jan 2019 11:27:53 +0100 Subject: [PATCH 136/183] fix translation --- htdocs/expedition/card.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 4f08da56365..ebc3b2995fe 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -205,8 +205,7 @@ if (empty($reshook)) $date_delivery = dol_mktime(GETPOST('date_deliveryhour','int'), GETPOST('date_deliverymin','int'), 0, GETPOST('date_deliverymonth','int'), GETPOST('date_deliveryday','int'), GETPOST('date_deliveryyear','int')); - // On va boucler sur chaque ligne du document d'origine pour completer objet expedition - // avec info diverses + qte a livrer + // We will loop on each line of the original document to complete the shipping object with various info and quantity to deliver $classname = ucfirst($object->origin); $objectsrc = new $classname($db); $objectsrc->fetch($object->origin_id); @@ -839,13 +838,13 @@ if (empty($reshook)) } else { - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited exit(); } } elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited exit(); } From dd0f6b38290a6660b2a68b0bd1960cd882c1d110 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 11:30:14 +0100 Subject: [PATCH 137/183] =?UTF-8?q?Edition=20Ligne=20Travaux=20Suppl=C3=A9?= =?UTF-8?q?mentaires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correction pour permettre l'édition si la ligne n'existe pas dans une précédente situation. Permet l'édition d'une ligne si elle a été ajouté dans la situation actuelle. --- htdocs/core/tpl/objectline_edit.tpl.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index d3dc9807c5a..62387001de5 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -99,7 +99,7 @@ $coldisplay=-1; // We remove first td } // Do not allow editing during a situation cycle - if (empty($this->situation_cycle_ref) || $this->situation_counter == 1) + if ($line->fk_prev_id == NULL ) { // editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -137,7 +137,7 @@ $coldisplay=-1; // We remove first td } $coldisplay++; - if ($this->situation_counter == 1 || !$this->situation_cycle_ref) { + if ($line->fk_prev_id == NULL ) { print '<td align="right">' . $form->load_tva('tva_tx', $line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1) . '</td>'; } else { print '<td align="right"><input size="1" type="text" class="flat right" name="tva_tx" value="' . price($line->tva_tx) . '" readonly />%</td>'; @@ -145,7 +145,7 @@ $coldisplay=-1; // We remove first td $coldisplay++; print '<td align="right"><input type="text" class="flat right" size="5" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"'; - if ($this->situation_counter > 1) print ' readonly'; + if ($line->fk_prev_id != NULL ) print ' readonly'; print '></td>'; if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { @@ -156,7 +156,7 @@ $coldisplay=-1; // We remove first td { $coldisplay++; print '<td align="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(isset($line->pu_ttc)?price($line->pu_ttc,0,'',0):'').'"'; - if ($this->situation_counter > 1) print ' readonly'; + if ($line->fk_prev_id != NULL ) print ' readonly'; print '></td>'; } ?> @@ -167,7 +167,7 @@ $coldisplay=-1; // We remove first td // must also not be output for most entities (proposal, intervention, ...) //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; print '<input size="3" type="text" class="flat right" name="qty" id="qty" value="' . $line->qty . '"'; - if ($this->situation_counter > 1) print ' readonly'; + if ($line->fk_prev_id != NULL ) print ' readonly'; print '>'; } else { ?>   @@ -186,7 +186,7 @@ $coldisplay=-1; // We remove first td <td align="right" class="nowrap"><?php $coldisplay++; ?> <?php if (($line->info_bits & 2) != 2) { print '<input size="1" type="text" class="flat right" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"'; - if ($this->situation_counter > 1) print ' readonly'; + if ($line->fk_prev_id != NULL ) print ' readonly'; print '>%'; } else { ?>   From f9b86225454e6a15f141fdec5c264fc45d0ae476 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 11:33:22 +0100 Subject: [PATCH 138/183] Prise en charge de Multicompany MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correction pour éviter que les factures appartenant à d'autres entités n'apparaissent dans celle qui est consultée sur le moment. --- htdocs/fourn/recap-fourn.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index e680c18074e..577ffc6a99a 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -76,6 +77,7 @@ if ($socid > 0) $sql.= " u.login, u.rowid as userid"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$societe->id; + $sql.= " AND f.entity IN (".getEntity("facture_fourn").")"; // Reconaissance de l'entité attribuée à cette facture pour Multicompany $sql.= " AND f.fk_user_valid = u.rowid"; $sql.= " ORDER BY f.datef DESC"; From e75170137e5ded0c3bd1145c2b87ac71aac12ab1 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 11:42:44 +0100 Subject: [PATCH 139/183] =?UTF-8?q?Correction=20de=20la=20filtration=20de?= =?UTF-8?q?=20l'entit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige pour que la marge réalisée sur d'autres entités n'apparaisse pas sur celle sur laquelle l'utilisateur est connecté. --- htdocs/margin/tabs/productMargins.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index e6c51e2217d..3b826501614 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -147,7 +147,7 @@ if ($id > 0 || ! empty($ref)) if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE f.fk_soc = s.rowid"; $sql.= " AND f.fk_statut > 0"; - $sql.= " AND s.entity = ".$conf->entity; + $sql.= " AND f.entity IN (".getEntity('invoice').")"; $sql.= " AND d.fk_facture = f.rowid"; $sql.= " AND d.fk_product =".$object->id; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; From b6df02e795664a188d3f9981f49d7707b8594386 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 11:47:39 +0100 Subject: [PATCH 140/183] Correction oubli date de livraison Corrige l'oubli de la substitution de la date de livraison pour les commandes et demande de prix fournisseurs --- htdocs/core/lib/functions.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 90167504f3f..792da337aac 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5993,6 +5993,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob $substitutionarray['__REF__'] = $object->ref; $substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : '')); $substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : ''); + $substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs): ''); // TODO Use this ? $msgishtml = 0; From 39b696af026dffc11362fc02ddae7436e861daa7 Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis.houssin@inodbox.com> Date: Tue, 29 Jan 2019 12:01:40 +0100 Subject: [PATCH 141/183] FIX multicompany compatibility --- htdocs/comm/card.php | 2 +- htdocs/fourn/class/fournisseur.product.class.php | 3 ++- htdocs/societe/class/societe.class.php | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 2cf3c120af6..fc2c027713a 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -387,7 +387,7 @@ if ($object->id > 0) print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.img_edit($langs->trans("Modify")).'</a>'; } print '</td></tr></table>'; - print '</td><td>'.($object->remise_percent?'<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.$object->remise_percent.'%</a>':'').'</td>'; + print '</td><td>'.($object->remise_percent?'<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.price2num($object->remise_percent).'%</a>':'').'</td>'; print '</tr>'; // Absolute discounts (Discounts-Drawbacks-Rebates) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 5c50597195a..781eaa3cd1e 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -653,11 +653,12 @@ class ProductFournisseur extends Product $sql.= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= " WHERE s.entity IN (".getEntity('societe').")"; + $sql.= " AND pfp.entity = ".$conf->entity; // only current entity $sql.= " AND pfp.fk_product = ".$prodid; $sql.= " AND pfp.fk_soc = s.rowid"; $sql.= " AND s.status = 1"; // only enabled society if ($qty > 0) $sql.= " AND pfp.quantity <= ".$qty; - if ($socid > 0) $sql.= ' AND pfp.fk_soc = '.$socid; + if ($socid > 0) $sql.= ' AND pfp.fk_soc = '.$socid; dol_syslog(get_class($this)."::find_min_price_product_fournisseur", LOG_DEBUG); diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index fcdf4e9741a..1b86c04bbc8 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1162,7 +1162,7 @@ class Societe extends CommonObject $sql .= ', s.fk_forme_juridique as forme_juridique_code'; $sql .= ', s.webservices_url, s.webservices_key'; $sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode'; - $sql .= ', s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.remise_supplier, s.mode_reglement, s.cond_reglement, s.fk_account, s.tva_assuj'; + $sql .= ', s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_supplier, s.mode_reglement, s.cond_reglement, s.fk_account, s.tva_assuj'; $sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo'; $sql .= ', s.fk_shipping_method'; $sql .= ', s.outstanding_limit, s.import_key, s.canvas, s.fk_incoterms, s.location_incoterms'; @@ -1175,6 +1175,7 @@ class Societe extends CommonObject $sql .= ', st.libelle as stcomm'; $sql .= ', te.code as typent_code'; $sql .= ', i.libelle as libelle_incoterms'; + $sql .= ', sr.remise_client'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as e ON s.fk_effectif = e.id'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid'; @@ -1183,6 +1184,7 @@ class Societe extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as te ON s.fk_typent = te.id'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON s.fk_incoterms = i.rowid'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_remise as sr ON sr.fk_soc = s.rowid AND sr.rowid = (SELECT MAX(rowid) FROM '.MAIN_DB_PREFIX.'societe_remise WHERE entity = '.$conf->entity.')'; $sql .= ' WHERE s.entity IN ('.getEntity($this->element).')'; if ($rowid) $sql .= ' AND s.rowid = '.$rowid; From 9539bea68ad112ad1c717e44aef843a618cb7a13 Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis.houssin@inodbox.com> Date: Tue, 29 Jan 2019 12:17:51 +0100 Subject: [PATCH 142/183] FIX bad sql request --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 1b86c04bbc8..e4f5a32783c 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1184,7 +1184,7 @@ class Societe extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as te ON s.fk_typent = te.id'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON s.fk_incoterms = i.rowid'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_remise as sr ON sr.fk_soc = s.rowid AND sr.rowid = (SELECT MAX(rowid) FROM '.MAIN_DB_PREFIX.'societe_remise WHERE entity = '.$conf->entity.')'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_remise as sr ON sr.rowid = (SELECT MAX(rowid) FROM '.MAIN_DB_PREFIX.'societe_remise WHERE fk_soc = s.rowid AND entity = '.$conf->entity.')'; $sql .= ' WHERE s.entity IN ('.getEntity($this->element).')'; if ($rowid) $sql .= ' AND s.rowid = '.$rowid; From 835d22254383b73a84622cd35c3b7b2bd20d6667 Mon Sep 17 00:00:00 2001 From: ptibogxiv <support@ptibogxiv.net> Date: Tue, 29 Jan 2019 14:10:08 +0100 Subject: [PATCH 143/183] ADD: list of stripe's payout --- htdocs/stripe/payout.php | 231 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 htdocs/stripe/payout.php diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php new file mode 100644 index 00000000000..e80b818ece3 --- /dev/null +++ b/htdocs/stripe/payout.php @@ -0,0 +1,231 @@ +<?php +/* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net> + * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +// Put here all includes required by your class file + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; +//require_once DOL_DOCUMENT_ROOT.'/core/lib/stripe.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); + +// Security check +$socid = GETPOST("socid","int"); +if ($user->societe_id) $socid=$user->societe_id; +//$result = restrictedArea($user, 'salaries', '', '', ''); + +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; +$rowid = GETPOST("rowid",'alpha'); +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page",'int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +$offset = $conf->liste_limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; + + + +/* + * View + */ + +$form = new Form($db); +$societestatic = new Societe($db); +$memberstatic = new Adherent($db); +$acc = new Account($db); +$stripe = new Stripe($db); + +llxHeader('', $langs->trans("StripePayoutList")); + +if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha'))) +{ + $service = 'StripeTest'; + $servicestatus = '0'; + dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); +} +else +{ + $service = 'StripeLive'; + $servicestatus = '1'; +} + +$stripeacc = $stripe->getStripeAccount($service); +/*if (empty($stripeaccount)) +{ + print $langs->trans('ErrorStripeAccountNotDefined'); +}*/ + +if (! $rowid) { + + print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; + if ($optioncss != '') + print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; + print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; + print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; + print '<input type="hidden" name="action" value="list">'; + print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; + print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; + print '<input type="hidden" name="page" value="' . $page . '">'; + + $title=$langs->trans("StripePayoutList"); + $title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)'); + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); + + print '<div class="div-table-responsive">'; + print '<table class="tagtable liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; + + print '<tr class="liste_titre">'; + print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + //print_liste_field_titre("StripeCustomerId",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder); + //print_liste_field_titre("CustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + //print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "", "", "", 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("DateOperation", $_SERVER["PHP_SELF"], "", "", "", 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "", "", "", 'align="left"', $sortfield, $sortorder); + print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Fee", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", 'align="right"'); + print "</tr>\n"; + + print "</tr>\n"; + + if ($stripeacc) + { + $payout = \Stripe\Payout::all(array("limit" => $limit), array("stripe_account" => $stripeacc)); + } + else + { + $payout = \Stripe\Payout::all(array("limit" => $limit)); + } + + foreach ($payout->data as $payout) + { + //$charge = $payout; + //var_dump($payout); + + // The metadata FULLTAG is defined by the online payment page + /*$FULLTAG=$charge->metadata->FULLTAG; + + // Save into $tmparray all metadata + $tmparray = dolExplodeIntoArray($FULLTAG,'.','='); + // Load origin object according to metadata + if (! empty($tmparray['CUS'])) + { + $societestatic->fetch($tmparray['CUS']); + } + else + { + $societestatic->id = 0; + } + if (! empty($tmparray['MEM'])) + { + $memberstatic->fetch($tmparray['MEM']); + } + else + { + $memberstatic->id = 0; + }*/ + + $societestatic->fetch($charge->metadata->idcustomer); + $societestatic->id = $charge->metadata->idcustomer; + $societestatic->lastname = $obj->lastname; + $societestatic->firstname = $obj->firstname; + $societestatic->admin = $obj->admin; + $societestatic->login = $obj->login; + $societestatic->email = $obj->email; + $societestatic->societe_id = $obj->fk_soc; + + print '<tr class="oddeven">'; + + // Ref + if (!empty($stripeacc)) $connect=$stripeacc.'/'; + + $url='https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id; + if ($servicestatus) { + $url='https://dashboard.stripe.com/'.$connect.'/payouts/'.$payout->id; + } + + print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $payout->id . "</a></td>\n"; + + + // Stripe customer + //print "<td>".$charge->customer."</td>\n"; + // Link + /*print "<td>"; + if ($societestatic->id > 0) + { + print $societestatic->getNomUrl(1); + } + if ($memberstatic->id > 0) + { + print $memberstatic->getNomUrl(1); + } + print "</td>\n";*/ + // Origine + //print "<td>"; + ////if ($charge->metadata->dol_type=="order"){ + // $object = new Commande($db); + // $object->fetch($charge->metadata->dol_id); + // print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$charge->metadata->dol_id."'>".img_picto('', 'object_order')." ".$object->ref."</a>"; + //} elseif ($charge->metadata->dol_type=="invoice"){ + // $object = new Facture($db); + // $object->fetch($charge->metadata->dol_id); + // print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>"; + //} + //print "</td>\n"; + // Date payment + print '<td align="center">' . dol_print_date($payout->created, '%d/%m/%Y %H:%M') . "</td>\n"; + // Date payment + print '<td align="center">' . dol_print_date($payout->arrival_date, '%d/%m/%Y %H:%M') . "</td>\n"; + // Type + print '<td>' . $payout->description . '</td>'; + // Amount + print "<td align=\"right\">" . price(($payout->amount) / 100, 0, '', 1, - 1, - 1, strtoupper($payout->currency)) . "</td>"; + print "<td align=\"right\">" . price(($payout->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($payout->currency)) . "</td>"; + // Status + print "<td align='right'>"; + if ($payout->status=='paid') + {print img_picto($langs->trans("".$payout->status.""),'statut4');} + elseif ($payout->status=='pending') + {print img_picto($langs->trans("".$payout->status.""),'statut7');} + elseif ($payout->status=='in_transit') + {print img_picto($langs->trans("".$payout->status.""),'statut7');} + elseif ($payout->status=='failed') + {print img_picto($langs->trans("".$payout->status.""),'statut7');} + elseif ($payout->status=='canceled') + {print img_picto($langs->trans("".$payout->status.""),'statut8');} + print '</td>'; + print "</tr>\n"; + } + print "</table>"; + print '</div>'; + print '</form>'; +} + +// End of page +llxFooter(); +$db->close(); From a3b648824ab58bbdae1619f142c1308c4aee948f Mon Sep 17 00:00:00 2001 From: ptibogxiv <support@ptibogxiv.net> Date: Tue, 29 Jan 2019 14:12:35 +0100 Subject: [PATCH 144/183] ADD payout link --- htdocs/core/modules/modStripe.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index 9a1584da477..039f4a68fca 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -150,6 +150,18 @@ class modStripe extends DolibarrModules 'target' => '', 'user' => 0 ); + $this->menu[$r] = array( + 'fk_menu' => 'fk_mainmenu=bank,fk_leftmenu=stripe', + 'type' => 'left', + 'titre' => 'StripePayoutList', + 'url' => '/stripe/payout.php', + 'langs' => 'stripe', + 'position' => 103, + 'enabled' => '$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1', + 'perms' => '$user->rights->banque->lire', + 'target' => '', + 'user' => 0 + ); // Exports $r=1; From 85b402ab5753d503d4b34ad36e3e6e54bf309f03 Mon Sep 17 00:00:00 2001 From: ptibogxiv <support@ptibogxiv.net> Date: Tue, 29 Jan 2019 14:14:42 +0100 Subject: [PATCH 145/183] Update payout.php --- htdocs/stripe/payout.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php index e80b818ece3..db2d2f4f7d7 100644 --- a/htdocs/stripe/payout.php +++ b/htdocs/stripe/payout.php @@ -1,6 +1,5 @@ <?php -/* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> +/* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 5ea1cf077502d05f7f89fd20a24113579a8726f5 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 14:25:34 +0100 Subject: [PATCH 146/183] Update objectline_edit.tpl.php --- htdocs/core/tpl/objectline_edit.tpl.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 62387001de5..00fc4f8e885 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -99,7 +99,7 @@ $coldisplay=-1; // We remove first td } // Do not allow editing during a situation cycle - if ($line->fk_prev_id == NULL ) + if ($line->fk_prev_id == null ) { // editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -137,7 +137,7 @@ $coldisplay=-1; // We remove first td } $coldisplay++; - if ($line->fk_prev_id == NULL ) { + if ($line->fk_prev_id == null ) { print '<td align="right">' . $form->load_tva('tva_tx', $line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1) . '</td>'; } else { print '<td align="right"><input size="1" type="text" class="flat right" name="tva_tx" value="' . price($line->tva_tx) . '" readonly />%</td>'; @@ -145,7 +145,7 @@ $coldisplay=-1; // We remove first td $coldisplay++; print '<td align="right"><input type="text" class="flat right" size="5" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"'; - if ($line->fk_prev_id != NULL ) print ' readonly'; + if ($line->fk_prev_id != null ) print ' readonly'; print '></td>'; if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { @@ -156,7 +156,7 @@ $coldisplay=-1; // We remove first td { $coldisplay++; print '<td align="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(isset($line->pu_ttc)?price($line->pu_ttc,0,'',0):'').'"'; - if ($line->fk_prev_id != NULL ) print ' readonly'; + if ($line->fk_prev_id != null ) print ' readonly'; print '></td>'; } ?> @@ -167,7 +167,7 @@ $coldisplay=-1; // We remove first td // must also not be output for most entities (proposal, intervention, ...) //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; print '<input size="3" type="text" class="flat right" name="qty" id="qty" value="' . $line->qty . '"'; - if ($line->fk_prev_id != NULL ) print ' readonly'; + if ($line->fk_prev_id != null ) print ' readonly'; print '>'; } else { ?>   @@ -186,7 +186,7 @@ $coldisplay=-1; // We remove first td <td align="right" class="nowrap"><?php $coldisplay++; ?> <?php if (($line->info_bits & 2) != 2) { print '<input size="1" type="text" class="flat right" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"'; - if ($line->fk_prev_id != NULL ) print ' readonly'; + if ($line->fk_prev_id != null ) print ' readonly'; print '>%'; } else { ?>   From 80cfe86508535e74b407fa118de6def4c69f8343 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 14:26:14 +0100 Subject: [PATCH 147/183] Update objectline_view.tpl.php --- htdocs/core/tpl/objectline_view.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index ac2de384ddc..e8ede7c59e7 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -283,7 +283,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; <td class="linecoldelete" align="center"><?php $coldisplay++; ?> <?php - if (($line->fk_prev_id == NULL ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation + if (($line->fk_prev_id == null ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&action=ask_deleteline&lineid=' . $line->id . '">'; print img_delete(); print '</a>'; From c6755b3cf1196c812f6095ef0dafa943f61eae47 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 15:59:41 +0100 Subject: [PATCH 148/183] Fix formatting of number in quantity field --- htdocs/core/tpl/objectline_view.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 313a4ee4def..603412daf15 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -209,7 +209,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated // must also not be output for most entities (proposal, intervention, ...) //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; - echo $line->qty; + echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price } else echo ' '; ?> </td> From f4ecf843eeb33ef84f139aab8b4ef885087ceec4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 18:30:12 +0100 Subject: [PATCH 149/183] FIX Exclude not required field from log --- htdocs/blockedlog/class/blockedlog.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 2b4198eb08e..0d24b71b343 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -385,7 +385,7 @@ class BlockedLog $this->object_data=new stdClass(); // Add fields to exclude $arrayoffieldstoexclude = array( - 'table_element','fields','ref_previous','ref_next','origin','origin_id','oldcopy','picto','error','errors','modelpdf','civility_id','contact','contact_id', + 'table_element','fields','ref_previous','ref_next','origin','origin_id','oldcopy','picto','error','errors','modelpdf','last_main_doc','civility_id','contact','contact_id', 'table_element_line','ismultientitymanaged','isextrafieldmanaged', 'linkedObjectsIds','linkedObjects','fk_delivery_address', 'context', From 9ef93bcecac1fea04d72cc9961457cb79abe5d11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 18:40:47 +0100 Subject: [PATCH 150/183] FIX last_main_doc var not saved --- htdocs/core/class/commonobject.class.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 649b9d317b7..1eed6c82a11 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -310,6 +310,12 @@ abstract class CommonObject */ public $modelpdf; + /** + * @var string + * Contains relative path of last generated main file + */ + public $last_main_doc; + /** * @var int Bank account ID * @see SetBankAccount() @@ -4667,10 +4673,15 @@ abstract class CommonObject if (! empty($obj->update_main_doc_field)) $update_main_doc_field=1; if ($update_main_doc_field && ! empty($this->table_element)) { - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".($ecmfile->filepath.'/'.$ecmfile->filename)."'"; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; $sql.= ' WHERE rowid = '.$this->id; + $resql = $this->db->query($sql); if (! $resql) dol_print_error($this->db); + else + { + $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; + } } } } @@ -4900,7 +4911,7 @@ abstract class CommonObject //var_dump('key '.$key.' '.$value.' type='.$extrafields->attributes[$this->table_element]['type'][$key].' '.$this->array_options["options_".$key]); } } - + // If field is a computed field, value must become result of compute foreach ($tab as $key => $value) { if (! empty($extrafields) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) From 3215870ae6fdcc57baef86fe7b84adca707f92ce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 18:30:12 +0100 Subject: [PATCH 151/183] FIX Exclude not required field from log --- htdocs/blockedlog/class/blockedlog.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index b64524569c6..b723d6d19f8 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -385,7 +385,7 @@ class BlockedLog $this->object_data=new stdClass(); // Add fields to exclude $arrayoffieldstoexclude = array( - 'table_element','fields','ref_previous','ref_next','origin','origin_id','oldcopy','picto','error','errors','modelpdf','civility_id','contact','contact_id', + 'table_element','fields','ref_previous','ref_next','origin','origin_id','oldcopy','picto','error','errors','modelpdf','last_main_doc','civility_id','contact','contact_id', 'table_element_line','ismultientitymanaged','isextrafieldmanaged', 'linkedObjectsIds','linkedObjects','fk_delivery_address', 'context', From 3d218cadb77a4aaed3b18459293344afb15eed9c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 29 Jan 2019 18:40:47 +0100 Subject: [PATCH 152/183] FIX last_main_doc var not saved Conflicts: htdocs/core/class/commonobject.class.php --- htdocs/core/class/commonobject.class.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index bc414ed722c..09df72c6543 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -311,6 +311,12 @@ abstract class CommonObject */ public $modelpdf; + /** + * @var string + * Contains relative path of last generated main file + */ + public $last_main_doc; + /** * @var int Bank account ID * @see SetBankAccount() @@ -4611,10 +4617,15 @@ abstract class CommonObject if (! empty($obj->update_main_doc_field)) $update_main_doc_field=1; if ($update_main_doc_field && ! empty($this->table_element)) { - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".($ecmfile->filepath.'/'.$ecmfile->filename)."'"; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; $sql.= ' WHERE rowid = '.$this->id; + $resql = $this->db->query($sql); if (! $resql) dol_print_error($this->db); + else + { + $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; + } } } } From 99892c13b0eda7b26747701f14567e9ae0c79e72 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 23:26:08 +0100 Subject: [PATCH 153/183] FIX : Erreur dans le Total Corrige l'erreur de calcul dans le total des produits et services --- htdocs/product/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 9f11813fdee..bfd6f6ad18f 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -184,7 +184,7 @@ else if ($type == '1') else { print $statProducts.$statServices; - $total=round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2])+round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2]); + $total=round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2])+round($prodser[0][3])+round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2])+round($prodser[1][3]); //Calcul du Total des Produits et Services } print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'; print $total; From bb6159784aa3826db99aab8bc3cc1c5705de2a8e Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Wed, 30 Jan 2019 08:42:31 +0100 Subject: [PATCH 154/183] update with html5 compliant code --- htdocs/accountancy/admin/account.php | 2 +- htdocs/accountancy/admin/accountmodel.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 45ecb5cd6e6..067ba21af70 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -298,7 +298,7 @@ if ($resql) if (! empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="' . $search_pcgtype . '"></td>'; if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgsubtype" value="' . $search_pcgsubtype . '"></td>'; if (! empty($arrayfields['aa.active']['checked'])) print '<td class="liste_titre"> </td>'; - print '<td align="right" class="liste_titre">'; + print '<td class="liste_titre right">'; $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1); print $searchpicto; print '</td>'; diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 0d1d5625958..822c7ea789b 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -517,7 +517,7 @@ if ($id) // dans les dictionnaires de donnees $valuetoshow=ucfirst($fieldlist[$field]); // Par defaut $valuetoshow=$langs->trans($valuetoshow); // try to translate - $align="left"; + $class="left"; if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); } if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { @@ -573,7 +573,7 @@ if ($id) fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add'); } - print '<td colspan="3" align="right">'; + print '<td colspan="3" class="right">'; print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">'; print '</td>'; print "</tr>"; @@ -606,7 +606,7 @@ if ($id) // There is several pages if ($num > $listlimit) { - print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">'; + print '<tr class="none"><td class="right" colspan="'.(3+count($fieldlist)).'">'; print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>'); print '</td></tr>'; } @@ -634,7 +634,7 @@ if ($id) } } print '<td class="liste_titre"></td>'; - print '<td class="liste_titre" colspan="2" align="right">'; + print '<td class="liste_titre right" colspan="2">'; $searchpicto=$form->showFilterAndCheckAddButtons(0); print $searchpicto; print '</td>'; @@ -647,7 +647,7 @@ if ($id) // Determine le nom du champ par rapport aux noms possibles // dans les dictionnaires de donnees $showfield=1; // By defaut - $align="left"; + $class="left"; $sortable=1; $valuetoshow=''; /* @@ -702,7 +702,7 @@ if ($id) if (empty($reshook)) fieldListAccountModel($fieldlist,$obj,$tabname[$id],'edit'); - print '<td colspan="3" align="right"><a name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"> </a><input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">'; + print '<td colspan="3" class="right"><a name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"> </a><input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">'; print ' <input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>'; } else @@ -719,7 +719,7 @@ if ($id) { $showfield=1; - $align="left"; + $class="left"; $valuetoshow=$obj->{$fieldlist[$field]}; if ($value == 'type_template') { From cf27065ed1a53f9e880fdc1917dceba82b33384c Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Wed, 30 Jan 2019 09:24:22 +0100 Subject: [PATCH 155/183] update with html5 compliant code --- htdocs/accountancy/admin/categories_list.php | 10 +++++----- htdocs/accountancy/admin/journals_list.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index ebd8011469e..b268f83381e 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -467,7 +467,7 @@ if ($id) // dans les dictionnaires de donnees $valuetoshow=ucfirst($fieldlist[$field]); // Par defaut $valuetoshow=$langs->trans($valuetoshow); // try to translate - $align="left"; + $class="left"; if ($fieldlist[$field]=='type') { if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,'')); else $valuetoshow=$langs->trans("Type"); @@ -531,7 +531,7 @@ if ($id) fieldListAccountingCategories($fieldlist,$obj,$tabname[$id],'add'); } - print '<td colspan="4" align="right">'; + print '<td colspan="4" class="right">'; print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">'; print '</td>'; print "</tr>"; @@ -559,7 +559,7 @@ if ($id) // There is several pages if ($num > $listlimit) { - print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">'; + print '<tr class="none"><td class="right" colspan="'.(3+count($fieldlist)).'">'; print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>'); print '</td></tr>'; } @@ -607,7 +607,7 @@ if ($id) // Determine le nom du champ par rapport aux noms possibles // dans les dictionnaires de donnees $showfield=1; // By defaut - $align="left"; + $class="left"; $sortable=1; $valuetoshow=''; @@ -693,7 +693,7 @@ if ($id) { $showfield=1; - $align="left"; + $class="left"; $valuetoshow=$obj->{$fieldlist[$field]}; if ($value == 'category_type') { diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index f26aba437e5..706d7bfddd2 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -429,7 +429,7 @@ if ($id) // dans les dictionnaires de donnees $valuetoshow=ucfirst($fieldlist[$field]); // Par defaut $valuetoshow=$langs->trans($valuetoshow); // try to translate - $align="left"; + $class="left"; if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); } if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { @@ -480,7 +480,7 @@ if ($id) fieldListJournal($fieldlist,$obj,$tabname[$id],'add'); } - print '<td colspan="4" align="right">'; + print '<td colspan="4" class="right">'; print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">'; print '</td>'; print "</tr>"; @@ -508,7 +508,7 @@ if ($id) // There is several pages if ($num > $listlimit) { - print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">'; + print '<tr class="none"><td class="right" colspan="'.(3+count($fieldlist)).'">'; print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>'); print '</td></tr>'; } @@ -537,7 +537,7 @@ if ($id) // Determine le nom du champ par rapport aux noms possibles // dans les dictionnaires de donnees $showfield=1; // By defaut - $align="left"; + $class="left"; $sortable=1; $valuetoshow=''; /* @@ -606,7 +606,7 @@ if ($id) { $showfield=1; - $align="left"; + $class="left"; $valuetoshow=$obj->{$fieldlist[$field]}; if ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); From cda89c65cd1afb7f5b9a10491f80657fd1c1ada4 Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Wed, 30 Jan 2019 09:30:55 +0100 Subject: [PATCH 156/183] update with html5 compliant code --- htdocs/accountancy/bookkeeping/balance.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 6a323121a6e..df593d3e274 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -235,7 +235,7 @@ if ($action != 'export_csv') print $langs->trans('to'); print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, ''); print '</td>'; - print '<td align="right" class="liste_titre">'; + print '<td class="liste_titre right">'; $searchpicto=$form->showFilterAndCheckAddButtons(0); print $searchpicto; print '</td>'; @@ -245,9 +245,9 @@ if ($action != 'export_csv') print '<tr class="liste_titre">'; print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder); + print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder); + print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'class="right"', $sortfield, $sortorder); print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder); print "</tr>\n"; @@ -274,7 +274,7 @@ if ($action != 'export_csv') { // Affiche un Sous-Total par compte comptable if ($displayed_account != "") { - print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>'; + print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap right">' . price($sous_total_debit) . '</td><td class="nowrap right">' . price($sous_total_credit) . '</td><td class="nowrap right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>'; print "<td> </td>\n"; print '</tr>'; } @@ -305,11 +305,11 @@ if ($action != 'export_csv') $sous_total_credit += $line->credit; } - print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>'; + print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap right">' . price($sous_total_debit) . '</td><td class="nowrap right">' . price($sous_total_credit) . '</td><td class="nowrap right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>'; print "<td> </td>\n"; print '</tr>'; - print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">' . price($total_debit) . '</td><td class="nowrap" align="right">' . price($total_credit) . '</td><td class="nowrap" align="right">' . price(price2num($total_credit - $total_debit)) . '</td>'; + print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap right">' . price($total_debit) . '</td><td class="nowrap right">' . price($total_credit) . '</td><td class="nowrap right">' . price(price2num($total_credit - $total_debit)) . '</td>'; print "<td> </td>\n"; print '</tr>'; From 1eb57b65426f7bd6717e35cc8d70c647e79740ba Mon Sep 17 00:00:00 2001 From: Philippe GRAND <philippe.grand@atoo-net.com> Date: Wed, 30 Jan 2019 09:32:19 +0100 Subject: [PATCH 157/183] update with html5 compliant code --- .../bookkeeping/balancebymonth.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index a01c42b285a..05b7b2bb9f9 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -117,19 +117,19 @@ if ($resql) { $row = $db->fetch_row($resql); print '<tr class="oddeven"><td width="14%">' . length_accountg($row[0]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[1]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[2]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[3]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[4]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[5]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[6]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[7]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[8]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[9]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[10]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[11]) . '</td>'; - print '<td align="right" width="6.5%">' . price($row[12]) . '</td>'; - print '<td align="right" width="8%"><strong>' . price($row[13]) . '</strong></td>'; + print '<td class="right" width="6.5%">' . price($row[1]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[2]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[3]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[4]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[5]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[6]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[7]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[8]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[9]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[10]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[11]) . '</td>'; + print '<td class="right" width="6.5%">' . price($row[12]) . '</td>'; + print '<td class="right" width="8%"><strong>' . price($row[13]) . '</strong></td>'; print '</tr>'; $i ++; From 1b675ba0b61f0273458e8992e31fb6ac928d7ef4 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO <aspangaro.dolibarr@gmail.com> Date: Wed, 30 Jan 2019 09:51:29 +0100 Subject: [PATCH 158/183] FIX: FEC Compatibility for import in ledger --- htdocs/core/modules/modAccounting.class.php | 35 ++++++++++++++++----- htdocs/langs/en_US/accountancy.lang | 4 ++- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index c47e8d310f1..c2f9459c49b 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -262,15 +262,34 @@ class modAccounting extends DolibarrModules $this->import_icon[$r]=$this->picto; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('b'=>MAIN_DB_PREFIX.'accounting_bookkeeping'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('b.doc_date'=>"Docdate",'b.code_journal'=>'Codejournal','b.numero_compte'=>'AccountAccountingShort','b.label_operation'=>'LabelOperation','b.debit'=>"Debit",'b.credit'=>"Credit",'b.date_creation'=>"DateCreation"); - $this->import_fieldshidden_array[$r]=array('b.fk_user'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) - $this->import_convertvalue_array[$r]=array( - 't.fk_projet'=>array('rule'=>'fetchidfromref','classfile'=>'/projet/class/project.class.php','class'=>'Project','method'=>'fetch','element'=>'Project'), - 't.ref'=>array('rule'=>'getrefifauto') - ); - //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); + $this->import_fields_array[$r]=array( + 'b.doc_date'=>"Docdate", + 'b.piece_num'=>"TransactionNumShort", + 'b.code_journal'=>'Codejournal', + 'b.journal_label'=>'JournalLabel', + 'b.numero_compte'=>'AccountAccounting', + 'b.label_compte'=>'LabelAccount', + 'b.subledger_account'=>'SubledgerAccount', + 'b.subledger_label'=>'SubledgerAccountLabel', + 'b.label_operation'=>'LabelOperation', + 'b.debit'=>"Debit", + 'b.credit'=>"Credit" + ); + $this->import_fieldshidden_array[$r]=array('b.fk_user_author'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - //$this->import_examplevalues_array[$r]=array('t.fk_projet'=>'MyProjectRef','t.ref'=>"auto or TK2010-1234",'t.label'=>"My task",'t.progress'=>"0 (not started) to 100 (finished)",'t.datec'=>'1972-10-10','t.note_private'=>"My private note",'t.note_public'=>"My public note"); + $this->import_examplevalues_array[$r]=array( + 'b.doc_date'=>'2019-01-01', + 'b.piece_num'=>'1', + 'b.code_journal'=>"VTE", + 'b.journal_label'=>"Journal des ventes", + 'b.numero_compte'=>"707", + 'b.label_compte'=>'Ventes', + 'b.subledger_account'=>'', + 'b.subledger_label'=>'', + 'b.label_operation'=>"Ventes services", + 'b.debit'=>"0,00", + 'b.credit'=>"100,00" + ); // Chart of accounts $r++; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 144caf49dde..a118151355c 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -84,7 +84,8 @@ ChangeAndLoad=Change and load Addanaccount=Add an accounting account AccountAccounting=Accounting account AccountAccountingShort=Account -SubledgerAccount=Subledger Account +SubledgerAccount=Subledger account +SubledgerAccountLabel=Subledger account label ShowAccountingAccount=Show accounting account ShowAccountingJournal=Show accounting journal AccountAccountingSuggest=Accounting account suggested @@ -166,6 +167,7 @@ LabelOperation=Label operation Sens=Sens LetteringCode=Lettering code Codejournal=Journal +JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups From 412940b5ca801747636a7941afcb9b063a2eab65 Mon Sep 17 00:00:00 2001 From: gauthier <gauthier.verdol@atm-consulting.fr> Date: Wed, 30 Jan 2019 10:19:13 +0100 Subject: [PATCH 159/183] FIX : $conf->fournisseur->commande->enabled doesn't exist, we must use $conf->fournisseur->enabled --- .../triggers/interface_20_modWorkflow_WorkflowManager.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index 94aaaeaa542..e478e265652 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -175,7 +175,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers dol_syslog( "Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id ); // First classify billed the order to allow the proposal classify process - if (! empty($conf->fournisseur->commande->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER)) + if (! empty($conf->fournisseur->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER)) { $object->fetchObjectLinked('','order_supplier',$object->id,$object->element); if (! empty($object->linkedObjects)) From 94909292162a303223760a79da5a7d31c91e0ee0 Mon Sep 17 00:00:00 2001 From: gauthier <gauthier.verdol@atm-consulting.fr> Date: Wed, 30 Jan 2019 10:49:32 +0100 Subject: [PATCH 160/183] FIX : $conf->fournisseur->commande->enabled doesn't exist, we must use $conf->fournisseur->enabled --- .../triggers/interface_20_modWorkflow_WorkflowManager.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index 3c9880ef4ec..6ebbd24ac58 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -175,7 +175,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers dol_syslog( "Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id ); // First classify billed the order to allow the proposal classify process - if (! empty($conf->fournisseur->commande->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER)) + if (! empty($conf->fournisseur->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER)) { $object->fetchObjectLinked('','order_supplier',$object->id,$object->element); if (! empty($object->linkedObjects)) From 84ecfd96fb74a72226161f5cba7336669c37ea00 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO <aspangaro.dolibarr@gmail.com> Date: Wed, 30 Jan 2019 11:22:01 +0100 Subject: [PATCH 161/183] Update example --- htdocs/core/modules/modAccounting.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index c2f9459c49b..1ebb4b0f2d3 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -278,7 +278,7 @@ class modAccounting extends DolibarrModules $this->import_fieldshidden_array[$r]=array('b.fk_user_author'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); $this->import_examplevalues_array[$r]=array( - 'b.doc_date'=>'2019-01-01', + 'b.doc_date'=>'formatted as \'.dol_print_date(dol_now(),\'%Y-%m-%d\')', 'b.piece_num'=>'1', 'b.code_journal'=>"VTE", 'b.journal_label'=>"Journal des ventes", From f955f3f4eea6613eceb8c19395bb3397f0df68a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 12:23:34 +0100 Subject: [PATCH 162/183] Fix report error only if return code < 0 --- htdocs/core/tpl/card_presend.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 0d1fd84923c..8f68cf0748f 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -91,7 +91,7 @@ if ($action == 'presend') if ((! $file || ! is_readable($file)) && method_exists($object, 'generateDocument')) { $result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result <= 0) { + if ($result < 0) { dol_print_error($db, $object->error, $object->errors); exit(); } From 340412ed00996b21dc23a84f9e7963cca62cda2f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 14:07:50 +0100 Subject: [PATCH 163/183] FIX generation of document for supplie rinvoice --- htdocs/admin/supplier_invoice.php | 2 ++ htdocs/core/tpl/card_presend.tpl.php | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 45d588fb031..1e93448e659 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -43,6 +43,8 @@ accessforbidden(); $type=GETPOST('type', 'alpha'); $value=GETPOST('value', 'alpha'); $action=GETPOST('action', 'alpha'); + +$label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir','alpha'); $specimenthirdparty=new Societe($db); diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 8f68cf0748f..58758daab09 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -48,12 +48,15 @@ if ($action == 'presend') $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; - $fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); - // + // Special case if ($object->element == 'invoice_supplier') { $fileparams = dol_most_recent_file($diroutput . '/' . get_exdir($object->id,2,0,0,$object,$object->element).$ref, preg_quote($ref,'/').'([^\-])+'); } + else + { + $fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); + } $file = $fileparams['fullname']; } @@ -86,7 +89,10 @@ if ($action == 'presend') } // Build document if it not exists - if (! in_array($object->element, array('societe', 'user', 'member'))) + $forcebuilddoc=true; + if (in_array($object->element, array('societe', 'user', 'member'))) $forcebuilddoc=false; + if ($object->element == 'invoice_supplier' && empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) $forcebuilddoc=false; + if ($forcebuilddoc) // If there is no default value for supplier invoice, we do not generate file, even if modelpdf was set by a manual generation { if ((! $file || ! is_readable($file)) && method_exists($object, 'generateDocument')) { @@ -95,7 +101,15 @@ if ($action == 'presend') dol_print_error($db, $object->error, $object->errors); exit(); } - $fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); + if ($object->element == 'invoice_supplier') + { + $fileparams = dol_most_recent_file($diroutput . '/' . get_exdir($object->id,2,0,0,$object,$object->element).$ref, preg_quote($ref,'/').'([^\-])+'); + } + else + { + $fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); + } + $file = $fileparams['fullname']; } } From 1a292839ca411699defd953e0ced15ad83d241b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 15:31:18 +0100 Subject: [PATCH 164/183] Fix regression in look and feel (if empty, we do not sho value) --- htdocs/comm/card.php | 2 +- htdocs/societe/class/societe.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 1037d083514..3ac0ab2822b 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -387,7 +387,7 @@ if ($object->id > 0) print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.img_edit($langs->trans("Modify")).'</a>'; } print '</td></tr></table>'; - print '</td><td>'.($object->remise_percent?'<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.price2num($object->remise_percent).'%</a>':'').'</td>'; + print '</td><td>'.($object->remise_percent?'<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.$object->remise_percent.'%</a>':'').'</td>'; print '</tr>'; // Absolute discounts (Discounts-Drawbacks-Rebates) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 77849bf8e81..854ee1811f3 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1379,7 +1379,7 @@ class Societe extends CommonObject $this->prefix_comm = $obj->prefix_comm; - $this->remise_percent = $obj->remise_client; + $this->remise_percent = price2num($obj->remise_client); // 0.000000 must be 0 $this->remise_supplier_percent = $obj->remise_supplier; $this->mode_reglement_id = $obj->mode_reglement; $this->cond_reglement_id = $obj->cond_reglement; From 869159c09f41f5b585bdb93bd292f9518f000eb4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 15:31:18 +0100 Subject: [PATCH 165/183] Fix regression in look and feel (if empty, we do not sho value) --- htdocs/comm/card.php | 2 +- htdocs/societe/class/societe.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index fc2c027713a..2cf3c120af6 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -387,7 +387,7 @@ if ($object->id > 0) print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.img_edit($langs->trans("Modify")).'</a>'; } print '</td></tr></table>'; - print '</td><td>'.($object->remise_percent?'<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.price2num($object->remise_percent).'%</a>':'').'</td>'; + print '</td><td>'.($object->remise_percent?'<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.$object->remise_percent.'%</a>':'').'</td>'; print '</tr>'; // Absolute discounts (Discounts-Drawbacks-Rebates) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index e4f5a32783c..a78aaf83a9d 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1296,7 +1296,7 @@ class Societe extends CommonObject $this->prefix_comm = $obj->prefix_comm; - $this->remise_percent = $obj->remise_client; + $this->remise_percent = price2num($obj->remise_client); // 0.000000 must be 0 $this->remise_supplier_percent = $obj->remise_supplier; $this->mode_reglement_id = $obj->mode_reglement; $this->cond_reglement_id = $obj->cond_reglement; From 5fd75f0824a04868561551bd20b8923a44574178 Mon Sep 17 00:00:00 2001 From: ptibogxiv <support@ptibogxiv.net> Date: Wed, 30 Jan 2019 16:15:15 +0100 Subject: [PATCH 166/183] Fix url payout --- htdocs/stripe/payout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php index db2d2f4f7d7..8989adba058 100644 --- a/htdocs/stripe/payout.php +++ b/htdocs/stripe/payout.php @@ -165,7 +165,7 @@ if (! $rowid) { $url='https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id; if ($servicestatus) { - $url='https://dashboard.stripe.com/'.$connect.'/payouts/'.$payout->id; + $url='https://dashboard.stripe.com/'.$connect.'payouts/'.$payout->id; } print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $payout->id . "</a></td>\n"; From 6d992a6d7b4ebc98938fc63be60bd84bb5701d85 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 16:24:27 +0100 Subject: [PATCH 167/183] FIX #10440 --- htdocs/core/modules/stock/doc/pdf_standard.modules.php | 2 +- htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index db1fda75219..1b148aeed89 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -22,7 +22,7 @@ * \brief File of class to build PDF documents for stocks/services */ -require_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 45895a6e44d..447075ee5ef 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -22,7 +22,7 @@ * \brief File of class to build PDF documents for stocks movements */ -require_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_movement.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; From 97248a830bedf298d20ccdc330ad9f328a44a4b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 16:24:27 +0100 Subject: [PATCH 168/183] FIX #10440 --- htdocs/core/modules/stock/doc/pdf_standard.modules.php | 2 +- htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index ce01124211a..c27eb0e2f81 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -22,7 +22,7 @@ * \brief File of class to build PDF documents for stocks/services */ -require_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 3ea7e184e35..3a923286f65 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -22,7 +22,7 @@ * \brief File of class to build PDF documents for stocks movements */ -require_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_movement.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; From 7983a85bb275c8e21f4dd66d62486a5106459ca6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 16:29:45 +0100 Subject: [PATCH 169/183] Update accountancy.lang --- htdocs/langs/en_US/accountancy.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index c85593925f5..78e19f8cee2 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -155,8 +155,8 @@ ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Accounting account to register subscript ACCOUNTING_PRODUCT_BUY_ACCOUNT=Accounting account by default for bought products (used if not defined in the product sheet) ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_SOLD_ACCOUNT_INTRA=Accounting account by default for the sold products in CEE (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_SOLD_ACCOUNT_EXPORT=Accounting account by default for the sold products export out of CEE (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT_INTRA=Accounting account by default for the sold products in EEC (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT_EXPORT=Accounting account by default for the sold products export out of EEC (used if not defined in the product sheet) ACCOUNTING_SERVICE_BUY_ACCOUNT=Accounting account by default for the bought services (used if not defined in the service sheet) ACCOUNTING_SERVICE_SOLD_ACCOUNT=Accounting account by default for the sold services (used if not defined in the service sheet) From 200d30f2b95d39d6866acb2a20c7942658838cef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 20:01:55 +0100 Subject: [PATCH 170/183] Fix: text for empty line not visible in select --- htdocs/core/class/html.form.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 68edd564020..9401dce5622 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2004,7 +2004,7 @@ class Form } else { - print $this->select_produits_list($selected,$htmlname,$filtertype,$limit,$price_level,'',$status,$finished,0,$socid,$showempty,$forcecombo,$morecss,$hidepriceinlabel, $warehouseStatus); + print $this->select_produits_list($selected, $htmlname, $filtertype, $limit, $price_level, '', $status, $finished, 0, $socid, $showempty, $forcecombo, $morecss, $hidepriceinlabel, $warehouseStatus); } } @@ -2225,6 +2225,10 @@ class Form if ($showempty && ! is_numeric($showempty)) $textifempty=$langs->trans($showempty); else $textifempty.=$langs->trans("All"); } + else + { + if ($showempty && ! is_numeric($showempty)) $textifempty=$langs->trans($showempty); + } if ($showempty) $out.='<option value="0" selected>'.$textifempty.'</option>'; $i = 0; From b197ad72d3b1fcab70a3789da5c5b1ab457ab029 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 20:02:41 +0100 Subject: [PATCH 171/183] Work on billing projects --- htdocs/core/actions_massactions.inc.php | 249 ++++++++++++------------ htdocs/projet/tasks/time.php | 52 ++++- 2 files changed, 173 insertions(+), 128 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 7f9760345a1..36e6c4956bf 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -66,19 +66,19 @@ if (! $error && $massaction == 'confirm_presend') $nbignored = 0; $langs->load("mails"); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - + $listofobjectid=array(); $listofobjectthirdparties=array(); $listofobjectref=array(); - + if (! $error) { $thirdparty=new Societe($db); - + $objecttmp=new $objectclass($db); if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); if ($objecttmp->element == 'holiday') $thirdparty=new User($db); - + foreach($toselect as $toselectid) { $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use @@ -86,19 +86,19 @@ if (! $error && $massaction == 'confirm_presend') if ($result > 0) { $listofobjectid[$toselectid]=$toselectid; - + $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; if (empty($thirdpartyid)) $thirdpartyid=0; - + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; } } } - + // Check mandatory parameters if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) { @@ -106,7 +106,7 @@ if (! $error && $massaction == 'confirm_presend') setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); $massaction='presend'; } - + $receiver=$_POST['receiver']; if (! is_array($receiver)) { @@ -119,14 +119,14 @@ if (! $error && $massaction == 'confirm_presend') setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); $massaction='presend'; } - + if (! GETPOST('subject','none')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); $massaction='presend'; } - + // Loop on each recipient/thirdparty if (! $error) { @@ -138,12 +138,12 @@ if (! $error && $massaction == 'confirm_presend') dol_print_error($db); exit; } - + $sendto=''; $sendtocc=''; $sendtobcc=''; $sendtoid = array(); - + // Define $sendto $tmparray=array(); if (trim($_POST['sendto'])) @@ -168,7 +168,7 @@ if (! $error && $massaction == 'confirm_presend') } } $sendto=implode(',',$tmparray); - + // Define $sendtocc $receivercc=$_POST['receivercc']; if (! is_array($receivercc)) @@ -198,13 +198,13 @@ if (! $error && $massaction == 'confirm_presend') } } $sendtocc=implode(',',$tmparray); - + //var_dump($listofobjectref);exit; $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); $listofqualifiedobj=array(); $listofqualifiedref=array(); $thirdpartywithoutemail=array(); - + foreach($listofobjectref[$thirdpartyid] as $objectid => $objectobj) { //var_dump($thirdpartyid.' - '.$objectid.' - '.$objectobj->statut); @@ -229,7 +229,7 @@ if (! $error && $massaction == 'confirm_presend') $resaction.='<div class="error">'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$objectobj->ref).'</div><br>'; continue; // Payment done or started or canceled } - + // Test recipient if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) { @@ -251,7 +251,7 @@ if (! $error && $massaction == 'confirm_presend') $sendto = $objectobj->thirdparty->email; } } - + if (empty($sendto)) { //print "No recipient for thirdparty ".$objectobj->thirdparty->name; @@ -264,7 +264,7 @@ if (! $error && $massaction == 'confirm_presend') $thirdpartywithoutemail[$objectobj->thirdparty->id]=1; continue; } - + if ($_POST['addmaindocfile']) { // TODO Use future field $objectobj->fullpathdoc to know where is stored default file @@ -273,7 +273,7 @@ if (! $error && $massaction == 'confirm_presend') $filedir=$uploaddir . '/' . dol_sanitizeFileName($objectobj->ref); $file = $filedir . '/' . $filename; $mime = dol_mimetype($file); - + if (dol_is_file($file)) { // Create form object @@ -292,19 +292,19 @@ if (! $error && $massaction == 'confirm_presend') continue; } } - + // Object of thirdparty qualified, we add it $listofqualifiedobj[$objectid]=$objectobj; $listofqualifiedref[$objectid]=$objectobj->ref; - + //var_dump($listofqualifiedref); } - + // Send email if there is at least one qualified object for current thirdparty if (count($listofqualifiedobj) > 0) { $langs->load("commercial"); - + $fromtype = GETPOST('fromtype'); if ($fromtype === 'user') { $from = $user->getFullName($langs) .' <'.$user->email.'>'; @@ -332,11 +332,11 @@ if (! $error && $massaction == 'confirm_presend') else { $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; } - + $replyto = $from; $subject = GETPOST('subject','none'); $message = GETPOST('message','none'); - + $sendtobcc = GETPOST('sendtoccc'); if ($objectclass == 'Propal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); if ($objectclass == 'Commande') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)); @@ -344,7 +344,7 @@ if (! $error && $massaction == 'confirm_presend') if ($objectclass == 'Supplier_Proposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)); if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); - + // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) // $looparray will be an array with number of email to send for the current thirdparty (so 1 or n if n object for same thirdparty) $oneemailperrecipient=(GETPOST('oneemailperrecipient','alpha')=='on'?1:0); @@ -365,7 +365,7 @@ if (! $error && $massaction == 'confirm_presend') } //var_dump($looparray);exit; dol_syslog("We have set an array of ".count($looparray)." emails to send"); - + foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object { // Make substitution in email content @@ -374,25 +374,25 @@ if (! $error && $massaction == 'confirm_presend') $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ',$listofqualifiedref) : $objecttmp->ref); $substitutionarray['__EMAIL__'] = $thirdparty->email; $substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>'; - + $parameters=array('mode'=>'formemail'); - + if ( ! empty( $listofobjectthirdparties ) ) { $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; } if ( ! empty( $listofobjectref ) ) { $parameters['listofobjectref'] = $listofobjectref; } - + complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); - + $subject=make_substitutions($subject, $substitutionarray); $message=make_substitutions($message, $substitutionarray); - + $filepath = $attachedfiles['paths']; $filename = $attachedfiles['names']; $mimetype = $attachedfiles['mimes']; - + // Define the trackid when emails sent from the mass action if ($oneemailperrecipient) { @@ -410,12 +410,12 @@ if (! $error && $massaction == 'confirm_presend') if (get_class($objecttmp)=='Supplier_Proposal') $trackid='spr'; if (get_class($objecttmp)=='CommandeFournisseur') $trackid='sor'; if (get_class($objecttmp)=='FactureFournisseur') $trackid='sin'; - + $trackid.=$objecttmp->id; } //var_dump($filepath); //var_dump($trackid);exit; - + // Send mail (substitutionarray must be done just before this) require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); @@ -429,23 +429,23 @@ if (! $error && $massaction == 'confirm_presend') if ($result) { $resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'<br>'; // Must not contain " - + $error=0; - + // Insert logs into agenda foreach($listofqualifiedobj as $objid2 => $objectobj2) { if ((! $oneemailperrecipient) && $objid2 != $objectid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level - + dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); - + /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; if ($objectclass == 'Commande') $actiontypecode='AC_COM'; if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; if ($objectclass == 'Supplier_Proposal') $actiontypecode='AC_SUP_PRO'; if ($objectclass == 'CommandeFournisseur') $actiontypecode='AC_SUP_ORD'; if ($objectclass == 'FactureFournisseur') $actiontypecode='AC_SUP_INV';*/ - + $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { @@ -455,14 +455,14 @@ if (! $error && $massaction == 'confirm_presend') $actionmsg = dol_concatdesc($actionmsg, $message); } $actionmsg2=''; - + // Initialisation donnees $objectobj2->sendtoid = 0; $objectobj2->actionmsg = $actionmsg; // Long text $objectobj2->actionmsg2 = $actionmsg2; // Short text $objectobj2->fk_element = $objid2; $objectobj2->elementtype = $objectobj2->element; - + $triggername = strtoupper(get_class($objectobj2)) .'_SENTBYMAIL'; if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; @@ -472,7 +472,7 @@ if (! $error && $massaction == 'confirm_presend') if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; - + if (! empty($triggername)) { // Appel des triggers @@ -481,7 +481,7 @@ if (! $error && $massaction == 'confirm_presend') $result=$interface->run_triggers($triggername, $objectobj2, $user, $langs, $conf); if ($result < 0) { $error++; $errors=$interface->errors; } // Fin appel triggers - + if ($error) { setEventMessages($db->lasterror(), $errors, 'errors'); @@ -489,7 +489,7 @@ if (! $error && $massaction == 'confirm_presend') } } } - + $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) } else @@ -509,13 +509,13 @@ if (! $error && $massaction == 'confirm_presend') } } } - + $resaction.=($resaction?'<br>':$resaction); $resaction.='<strong>'.$langs->trans("ResultOfMailSending").':</strong><br>'."\n"; $resaction.=$langs->trans("NbSelected").': '.count($toselect)."\n<br>"; $resaction.=$langs->trans("NbIgnored").': '.($nbignored?$nbignored:0)."\n<br>"; $resaction.=$langs->trans("NbSent").': '.($nbsent?$nbsent:0)."\n<br>"; - + if ($nbsent) { $action=''; // Do not show form post if there was at least one successfull sent @@ -528,59 +528,59 @@ if (! $error && $massaction == 'confirm_presend') //setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings'); // May be object has no generated PDF file setEventMessages($resaction, null, 'warnings'); } - + $action='list'; $massaction=''; } } -if ($massaction == 'confirm_createbills') +if ($massaction == 'confirm_createbills') // Create bills from orders { $orders = GETPOST('toselect','array'); $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); $validate_invoices = GETPOST('valdate_invoices', 'int'); - + $TFact = array(); $TFactThird = array(); - + $nb_bills_created = 0; - + $db->begin(); - + foreach($orders as $id_order) { $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) continue; - + $objecttmp = new Facture($db); if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. else { // Load extrafields of order $cmd->fetch_optionals(); - + $objecttmp->socid = $cmd->socid; $objecttmp->type = Facture::TYPE_STANDARD; $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; $objecttmp->mode_reglement_id = $cmd->mode_reglement_id; $objecttmp->fk_project = $cmd->fk_project; - + $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($datefacture)) { $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); } - + $objecttmp->date = $datefacture; $objecttmp->origin = 'commande'; $objecttmp->origin_id = $id_order; - + $objecttmp->array_options = $cmd->array_options; // Copy extrafields - + $res = $objecttmp->create($user); - + if($res > 0) $nb_bills_created++; } - + if ($objecttmp->id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; @@ -594,12 +594,12 @@ if ($massaction == 'confirm_createbills') $sql.= ", ".$objecttmp->id; $sql.= ", '".$objecttmp->element."'"; $sql.= ")"; - + if (! $db->query($sql)) { $error++; } - + if (! $error) { $lines = $cmd->lines; @@ -608,10 +608,10 @@ if ($massaction == 'confirm_createbills') $cmd->fetch_lines(); $lines = $cmd->lines; } - + $fk_parent_line=0; $num=count($lines); - + for ($i=0;$i<$num;$i++) { $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); @@ -658,13 +658,13 @@ if ($massaction == 'confirm_createbills') { $fk_parent_line = 0; } - + // Extrafields if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { $lines[$i]->fetch_optionals($lines[$i]->rowid); $array_options = $lines[$i]->array_options; } - + $result = $objecttmp->addline( $desc, $lines[$i]->subprice, @@ -711,21 +711,21 @@ if ($massaction == 'confirm_createbills') } } } - + //$cmd->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module. - + if(!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $objecttmp; else $TFact[$objecttmp->id] = $objecttmp; } - + // Build doc with all invoices $TAllFact = empty($createbills_onebythird) ? $TFact : $TFactThird; $toselect = array(); - + if (! $error && $validate_invoices) { $massaction = $action = 'builddoc'; - + foreach($TAllFact as &$objecttmp) { $result = $objecttmp->validate($user); @@ -735,30 +735,30 @@ if ($massaction == 'confirm_createbills') setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); break; } - + $id = $objecttmp->id; // For builddoc action $object = $objecttmp; - + // Builddoc $donotredirect = 1; $upload_dir = $conf->facture->dir_output; $permissioncreate=$user->rights->facture->creer; - + // Call action to build doc $savobject = $object; $object = $objecttmp; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; $object = $savobject; } - + $massaction = $action = 'confirm_createbills'; } - + if (! $error) { $db->commit(); setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); - + // Make a redirect to avoid to bill twice if we make a refresh or back $param=''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); @@ -784,7 +784,7 @@ if ($massaction == 'confirm_createbills') if ($show_files) $param.='&show_files=' .urlencode($show_files); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); if ($billed != '') $param.='&billed='.urlencode($billed); - + header("Location: ".$_SERVER['PHP_SELF'].'?'.$param); exit; } @@ -801,20 +801,19 @@ if ($massaction == 'confirm_createbills') if (!$error && $massaction == 'cancelorders') { - $db->begin(); - + $nbok = 0; - - + + $orders = GETPOST('toselect', 'array'); foreach ($orders as $id_order) { - + $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) continue; - + if ($cmd->statut != Commande::STATUS_VALIDATED) { $langs->load('errors'); @@ -824,7 +823,7 @@ if (!$error && $massaction == 'cancelorders') } else $result = $cmd->cancel(); - + if ($result < 0) { setEventMessages($cmd->error, $cmd->errors, 'errors'); @@ -856,11 +855,11 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se dol_print_error(null, 'include of actions_massactions.inc.php is done but var $diroutputmassaction was not defined'); exit; } - + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - + $objecttmp=new $objectclass($db); $listofobjectid=array(); $listofobjectthirdparties=array(); @@ -877,12 +876,12 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $listofobjectref[$toselectid]=$objecttmp->ref; } } - + $arrayofinclusion=array(); foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'\.pdf$'; foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files $listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true); - + // build list of files with full path $files = array(); foreach($listofobjectref as $basename) @@ -897,7 +896,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se } } } - + // Define output language (Here it is not used because we do only merging existing PDF) $outputlangs = $langs; $newlang=''; @@ -908,16 +907,16 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - + if (!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) { // Create output dir if not exists dol_mkdir($diroutputmassaction); - + // Defined name of merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); $filename=preg_replace('/\s/','_',$filename); - + // Save merged file if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) { @@ -926,23 +925,23 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se } if ($year) $filename.='_'.$year; if ($month) $filename.='_'.$month; - + if (count($files)>0) { $now=dol_now(); $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; - + $input_files = ''; foreach($files as $f) { $input_files.=' '.escapeshellarg($f); } - + $cmd = 'pdftk '.escapeshellarg($input_files).' cat output '.escapeshellarg($file); exec($cmd); - + if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - + $langs->load("exports"); setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); } @@ -957,18 +956,18 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $page_largeur = $formatarray['width']; $page_hauteur = $formatarray['height']; $format = array($page_largeur,$page_hauteur); - + $pdf=pdf_getInstance($format); - + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } $pdf->SetFont(pdf_getPDFFont($outputlangs)); - + if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); - + // Add all others foreach($files as $file) { @@ -982,14 +981,14 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $pdf->useTemplate($tplidx); } } - + // Create output dir if not exists dol_mkdir($diroutputmassaction); - + // Defined name of merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); $filename=preg_replace('/\s/','_',$filename); - + // Save merged file if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) { @@ -1005,7 +1004,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $pdf->Output($file,'F'); if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - + $langs->load("exports"); setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); } @@ -1020,7 +1019,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se if ($action == 'remove_file') { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - + $langs->load("other"); $upload_dir = $diroutputmassaction; $file = $upload_dir . '/' . GETPOST('file'); @@ -1034,7 +1033,7 @@ if ($action == 'remove_file') if (! $error && $massaction == 'validate' && $permtocreate) { $objecttmp=new $objectclass($db); - + if ($objecttmp->element == 'invoice' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) { $langs->load("errors"); @@ -1050,7 +1049,7 @@ if (! $error && $massaction == 'validate' && $permtocreate) if (! $error) { $db->begin(); - + $nbok = 0; foreach($toselect as $toselectid) { @@ -1082,7 +1081,7 @@ if (! $error && $massaction == 'validate' && $permtocreate) break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); @@ -1099,7 +1098,7 @@ if (! $error && $massaction == 'validate' && $permtocreate) // Closed records if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) { $db->begin(); - + $objecttmp = new $objectclass($db); $nbok = 0; foreach ($toselect as $toselectid) { @@ -1119,7 +1118,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo break; } } - + if (!$error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); @@ -1135,7 +1134,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete) { $db->begin(); - + $objecttmp=new $objectclass($db); $nbok = 0; foreach($toselect as $toselectid) @@ -1151,22 +1150,22 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == $resaction.='<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'</div><br>'; continue; } - + if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id; $res = $db->query($sql); - + if (!$res) { setEventMessage('ErrorRecordParentingNotModified', 'errors'); $error++; } } - + if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); else $result = $objecttmp->delete($user); - + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); @@ -1182,7 +1181,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); @@ -1201,7 +1200,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == if (! $error && $massaction == 'generate_doc' && $permtoread) { $db->begin(); - + $objecttmp=new $objectclass($db); $nbok = 0; foreach($toselect as $toselectid) @@ -1211,7 +1210,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) { $outputlangs = $langs; $newlang=''; - + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->thirdparty->default_lang)) $newlang=$objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ... if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) $newlang=$objecttmp->default_lang; // for thirdparty @@ -1220,15 +1219,15 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - + // To be sure vars is defined if (empty($hidedetails)) $hidedetails=0; if (empty($hidedesc)) $hidedesc=0; if (empty($hideref)) $hideref=0; if (empty($moreparams)) $moreparams=null; - + $result= $objecttmp->generateDocument($objecttmp->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); - + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); @@ -1244,7 +1243,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsGenerated", $nbok), null, 'mesgs'); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index e2025812e65..bbb04cc3d76 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -98,6 +98,7 @@ $extralabels_task=$extrafields_task->fetch_name_optionals_label($object->table_e */ if (GETPOST('cancel','alpha')) { $action=''; } +if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_generateinvoice') { $massaction=''; } $parameters=array('socid'=>$socid, 'projectid'=>$projectid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks @@ -300,7 +301,7 @@ elseif (GETPOST('project_ref','alpha')) $withproject=1; } -if ($massaction == 'generateinvoice') +if ($massaction == 'confirm_generateinvoice') { if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); @@ -754,7 +755,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $arrayfields['t.note']=array('label'=>$langs->trans("Note"), 'checked'=>1); $arrayfields['t.task_duration']=array('label'=>$langs->trans("Duration"), 'checked'=>1); $arrayfields['value'] =array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>(empty($conf->salaries->enabled)?0:1)); - $arrayfields['valuebilled'] =array('label'=>$langs->trans("Billed"), 'checked'=>1, 'enabled'=>((! empty($conf->global->PROJECT_HIDE_TASKS) || empty($conf->global->PROJECT_BILL_TIME_SPENT))?0:1)); + $arrayfields['valuebilled'] =array('label'=>$langs->trans("Billed"), 'checked'=>1, 'enabled'=>(((! empty($conf->global->PROJECT_HIDE_TASKS) || empty($conf->global->PROJECT_BILL_TIME_SPENT))?0:1) && $projectstatic->bill_time)); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { @@ -771,7 +772,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) //'builddoc'=>$langs->trans("PDFMerge"), ); //if ($user->rights->projet->creer) $arrayofmassactions['predelete']=$langs->trans("Delete"); - if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); + if (in_array($massaction, array('presend','predelete','generateinvoice'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); } @@ -810,6 +811,51 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">'; print '<input type="hidden" name="withproject" value="'.$withproject.'">'; + if ($massaction == 'generateinvoice') + { + $langs->load("bills"); + + //var_dump($_REQUEST); + print '<input type="hidden" name="massaction" value="confirm_createbills">'; + + print '<table class="noborder" width="100%" >'; + print '<tr>'; + print '<td class="titlefield">'; + print $langs->trans('DateInvoice'); + print '</td>'; + print '<td>'; + print $form->selectDate('', '', '', '', '', '', 1, 1); + print '</td>'; + print '</tr>'; + if ($conf->service->enabled) + { + print '<tr>'; + print '<td>'; + print $langs->trans('Service'); + print '</td>'; + print '<td>'; + print $form->select_produits('', 'productid', '1', 0, 0, 1, 2, '', 0, array(), 0, 'None', 0, 'maxwidth500'); + print '</td>'; + print '</tr>'; + } + /*print '<tr>'; + print '<td>'; + print $langs->trans('ValidateInvoices'); + print '</td>'; + print '<td>'; + print $form->selectyesno('valdate_invoices', 0, 1); + print '</td>'; + print '</tr>';*/ + print '</table>'; + + print '<br>'; + print '<div class="center">'; + print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('CreateInvoice').'"> '; + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; + print '</div>'; + print '<br>'; + } + /* * List of time spent */ From c1f3f4c2b5f29ee1a9413540374f6ac79180d616 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 20:01:55 +0100 Subject: [PATCH 172/183] Fix: text for empty line not visible in select --- htdocs/core/class/html.form.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 4c4e51c4b13..ee0c35ac3a9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1982,7 +1982,7 @@ class Form } else { - print $this->select_produits_list($selected,$htmlname,$filtertype,$limit,$price_level,'',$status,$finished,0,$socid,$showempty,$forcecombo,$morecss,$hidepriceinlabel, $warehouseStatus); + print $this->select_produits_list($selected, $htmlname, $filtertype, $limit, $price_level, '', $status, $finished, 0, $socid, $showempty, $forcecombo, $morecss, $hidepriceinlabel, $warehouseStatus); } } @@ -2175,6 +2175,10 @@ class Form if ($showempty && ! is_numeric($showempty)) $textifempty=$langs->trans($showempty); else $textifempty.=$langs->trans("All"); } + else + { + if ($showempty && ! is_numeric($showempty)) $textifempty=$langs->trans($showempty); + } if ($showempty) $out.='<option value="0" selected>'.$textifempty.'</option>'; $i = 0; From 15bd99acf498e9ee20c53293f00ad2352fef103b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 20:06:05 +0100 Subject: [PATCH 173/183] Fix phpcs --- .../sociales/class/chargesociales.class.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 3c06198b4f2..0623553d90e 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -303,13 +303,13 @@ class ChargeSociales extends CommonObject /** - * Met a jour une charge sociale + * Update social or fiscal contribution * - * @param User $user Utilisateur qui modifie + * @param User $user User that modify * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int <0 si erreur, >0 si ok + * @return int <0 if KO, >0 if OK */ - function update($user,$notrigger=0) + function update($user, $notrigger=0) { $error=0; $this->db->begin(); @@ -325,11 +325,11 @@ class ChargeSociales extends CommonObject dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql=$this->db->query($sql); - + if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } - + if (! $error) { if (! $notrigger) @@ -340,7 +340,7 @@ class ChargeSociales extends CommonObject // End call triggers } } - + // Commit or rollback if ($error) { @@ -357,8 +357,6 @@ class ChargeSociales extends CommonObject $this->db->commit(); return 1; } - - } /** From 01f1f6162f35dbaffc9dda096a6aec2b3b3af323 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 20:06:05 +0100 Subject: [PATCH 174/183] Fix phpcs --- .../sociales/class/chargesociales.class.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 2912c75b201..c898a512911 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -303,13 +303,13 @@ class ChargeSociales extends CommonObject /** - * Met a jour une charge sociale + * Update social or fiscal contribution * - * @param User $user Utilisateur qui modifie + * @param User $user User that modify * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int <0 si erreur, >0 si ok + * @return int <0 if KO, >0 if OK */ - function update($user,$notrigger=0) + function update($user, $notrigger=0) { $error=0; $this->db->begin(); @@ -325,11 +325,11 @@ class ChargeSociales extends CommonObject dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql=$this->db->query($sql); - + if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } - + if (! $error) { if (! $notrigger) @@ -340,7 +340,7 @@ class ChargeSociales extends CommonObject // End call triggers } } - + // Commit or rollback if ($error) { @@ -357,8 +357,6 @@ class ChargeSociales extends CommonObject $this->db->commit(); return 1; } - - } /** From a23fd6f09058987a2b0414108cd914215b7c5240 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 20:55:55 +0100 Subject: [PATCH 175/183] Fix phpcs --- htdocs/compta/sociales/class/chargesociales.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 0623553d90e..fe6a3be96ee 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -309,7 +309,7 @@ class ChargeSociales extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - function update($user, $notrigger=0) + function update($user, $notrigger = 0) { $error=0; $this->db->begin(); From 045b8b13ed68721d5b6c961b16c2708a8f1ca7a5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 30 Jan 2019 23:20:57 +0100 Subject: [PATCH 176/183] css --- htdocs/expedition/card.php | 2 +- htdocs/livraison/card.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index f92660a0110..6d5d8b17ffa 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1752,7 +1752,7 @@ else if ($id || $ref) print '<div class="fichehalfleft">'; print '<div class="underbanner clearboth"></div>'; - print '<table class="border" width="100%">'; + print '<table class="border tableforfield" width="100%">'; // Linked documents if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled)) diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 260c333f362..36847d9c670 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -346,7 +346,7 @@ else print '<input type="hidden" name="id" value="'.$object->id.'">'; print '<input type="hidden" name="ref" value="'.$object->ref.'">'; - dol_fiche_head($head, 'delivery', $langs->trans("Shipment"), 0, 'sending'); + dol_fiche_head($head, 'delivery', $langs->trans("Shipment"), -1, 'sending'); /* * Confirmation de la suppression @@ -434,7 +434,7 @@ else print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; - print '<table class="border" width="100%">'; + print '<table class="border tableforfield" width="100%">'; // Shipment /* From 6121771c5fa26ecde705c091424f20aae44cb2b8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 31 Jan 2019 10:16:49 +0100 Subject: [PATCH 177/183] FIX XSS --- htdocs/document.php | 2 +- htdocs/viewimage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/document.php b/htdocs/document.php index ff6c6f6e635..1df59c07a16 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -74,7 +74,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $encoding = ''; $action=GETPOST('action','alpha'); -$original_file=GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP). +$original_file=GETPOST('file','alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). $hashp=GETPOST('hashp','aZ09'); $modulepart=GETPOST('modulepart','alpha'); $urlsource=GETPOST('urlsource','alpha'); diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index ea29fe0d8bd..2385a558307 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -84,7 +84,7 @@ require 'main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $action=GETPOST('action','alpha'); -$original_file=GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP). +$original_file=GETPOST('file','alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). $hashp=GETPOST('hashp','aZ09'); $modulepart=GETPOST('modulepart','alpha'); $urlsource=GETPOST('urlsource','alpha'); From 21c089fee93126419d716091fdd1c71037a01954 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 31 Jan 2019 10:16:49 +0100 Subject: [PATCH 178/183] FIX XSS --- htdocs/document.php | 2 +- htdocs/viewimage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/document.php b/htdocs/document.php index ff6c6f6e635..1df59c07a16 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -74,7 +74,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $encoding = ''; $action=GETPOST('action','alpha'); -$original_file=GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP). +$original_file=GETPOST('file','alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). $hashp=GETPOST('hashp','aZ09'); $modulepart=GETPOST('modulepart','alpha'); $urlsource=GETPOST('urlsource','alpha'); diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index ea29fe0d8bd..2385a558307 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -84,7 +84,7 @@ require 'main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $action=GETPOST('action','alpha'); -$original_file=GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP). +$original_file=GETPOST('file','alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). $hashp=GETPOST('hashp','aZ09'); $modulepart=GETPOST('modulepart','alpha'); $urlsource=GETPOST('urlsource','alpha'); From 5e46a359e073a4eca38753579f3fd924723ede35 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 31 Jan 2019 10:16:49 +0100 Subject: [PATCH 179/183] FIX XSS --- htdocs/document.php | 2 +- htdocs/viewimage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/document.php b/htdocs/document.php index 725d079a9f6..d912c9a2d55 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -77,7 +77,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $encoding = ''; $action=GETPOST('action','alpha'); -$original_file=GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP). +$original_file=GETPOST('file','alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). $hashp=GETPOST('hashp','aZ09'); $modulepart=GETPOST('modulepart','alpha'); $urlsource=GETPOST('urlsource','alpha'); diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index ae2a538ca04..17d5026c0bf 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -79,7 +79,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $action=GETPOST('action','alpha'); -$original_file=GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP). +$original_file=GETPOST('file','alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). $hashp=GETPOST('hashp','aZ09'); $modulepart=GETPOST('modulepart','alpha'); $urlsource=GETPOST('urlsource','alpha'); From 484b4371c137bb57303451a44de2aa61a6a50cfe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 31 Jan 2019 10:16:49 +0100 Subject: [PATCH 180/183] FIX XSS Conflicts: htdocs/viewimage.php --- htdocs/document.php | 2 +- htdocs/viewimage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/document.php b/htdocs/document.php index 1c722e4cb55..ee8b9e9c096 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -81,7 +81,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $encoding = ''; $action=GETPOST('action','alpha'); -$original_file=GETPOST('file','alpha'); // Do not use urldecode here ($_GET are already decoded by PHP). +$original_file=GETPOST('file','alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). $hashp=GETPOST('hashp','aZ09'); $modulepart=GETPOST('modulepart','alpha'); $urlsource=GETPOST('urlsource','alpha'); diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 7493ef6bee9..1053cc530c9 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -62,7 +62,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $action=GETPOST('action','alpha'); -$original_file=GETPOST("file",'alpha'); +$original_file=GETPOST('file','alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). $modulepart=GETPOST('modulepart','alpha'); $urlsource=GETPOST("urlsource",'alpha'); $entity=GETPOST('entity','int')?GETPOST('entity','int'):$conf->entity; From 4c31749f4b384ded577d96ed09ad124f7a141ec9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 31 Jan 2019 11:11:56 +0100 Subject: [PATCH 181/183] Add tooltip on setup --- htdocs/admin/agenda_other.php | 5 +++-- htdocs/langs/en_US/admin.lang | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index f16226c812b..639671b4647 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -35,7 +35,7 @@ if (!$user->admin) accessforbidden(); // Load translation files required by the page -$langs->loadLangs(array('admin', 'other', 'agenda')); +$langs->loadLangs(array('admin', 'other', 'agenda', 'users')); $action = GETPOST('action','alpha'); $value = GETPOST('value','alpha'); @@ -353,7 +353,8 @@ print '</td></tr>'."\n"; // AGENDA_DEFAULT_VIEW print '<tr class="oddeven">'."\n"; -print '<td>'.$langs->trans("AGENDA_DEFAULT_VIEW").'</td>'."\n"; +$htmltext=$langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup")); +print '<td>'.$form->textwithpicto($langs->trans("AGENDA_DEFAULT_VIEW"), $htmltext).'</td>'."\n"; print '<td align="center"> </td>'."\n"; print '<td class="right">'."\n"; $tmplist=array(''=>' ', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser")); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 77b5894b709..d92a0b47bcc 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1853,4 +1853,5 @@ ConfirmUnactivation=Confirm module reset OnMobileOnly=On small screen (smartphone) only DisableProspectCustomerType=Disable the "Prospect + Customer" third party type (so third party must be Prospect or Customer but can't be both) MAIN_OPTIMIZEFORTEXTBROWSER=Simplify interface for blind person -MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or Links. \ No newline at end of file +MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or Links. +ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s' \ No newline at end of file From a0c0b377b2e51c39f025cb59087ae47b2b64d6b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 31 Jan 2019 20:53:47 +0100 Subject: [PATCH 182/183] css --- htdocs/adherents/admin/website.php | 2 +- htdocs/core/tpl/admin_extrafields_view.tpl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index cad250a60d0..02364a3a1d8 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -136,7 +136,7 @@ if ($conf->use_javascript_ajax) } -print $langs->trans("BlankSubscriptionFormDesc").'<br><br>'; +print '<span class="opacitymedium">'.$langs->trans("BlankSubscriptionFormDesc").'</span><br><br>'; $enabledisablehtml = $langs->trans("EnablePublicSubscriptionForm").' '; diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index 79f5a0bad5c..d056f03cd75 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -39,7 +39,7 @@ $langs->load("modulebuilder"); <!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php --> <?php -print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n"; +print '<span class="opacitymedium">'.$langs->trans("DefineHereComplementaryAttributes",$textobject).'</span><br>'."\n"; print '<br>'; // Load attribute_label From 3e6aef472dd7626a0f2572587d94b9ec35ea0c16 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 31 Jan 2019 20:53:59 +0100 Subject: [PATCH 183/183] css --- htdocs/core/lib/admin.lib.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 77a21100f48..a3f2772c6c1 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1358,18 +1358,23 @@ function complete_elementList_with_modules(&$elementList) * * @param array $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label) * where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ... - * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (no form into table), 2=No form nor button at all + * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (no form into table), 2=No form nor button at all (form is output by caller, recommanded) * @param string $helptext Help * @return void */ function form_constantes($tableau, $strictw3c = 0, $helptext = '') { - global $db,$bc,$langs,$conf,$user; + global $db,$langs,$conf,$user; global $_Avery_Labels; $form = new Form($db); - if (! empty($strictw3c) && $strictw3c == 1) print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; + if (! empty($strictw3c) && $strictw3c == 1) + { + print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; + print '<input type="hidden" name="action" value="updateall">'; + } print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; @@ -1382,7 +1387,6 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') print "</tr>\n"; $label=''; - $listofparam=array(); foreach($tableau as $key => $const) // Loop on each param { $label=''; @@ -1550,6 +1554,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') print "</td>"; } print "</tr>\n"; + if (empty($strictw3c)) print "</form>\n"; } }
'.$langs->trans("Year").''.$langs->trans("NbOfOrders").'%'.$langs->trans("AmountTotal").'%'.$langs->trans("AmountAverage").'%'.$langs->trans("NbOfOrders").'%'.$langs->trans("AmountTotal").'%'.$langs->trans("AmountAverage").'%
0?'&userid='.$userid:'').'">'.$oldyear.'000000
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).''.price(price2num($val['total'],'MT'),1).''.round($val['total_diff']).''.price(price2num($val['avg'],'MT'),1).''.round($val['avg_diff']).''.$val['nb'].''.round($val['nb_diff']).''.price(price2num($val['total'],'MT'),1).''.round($val['total_diff']).''.price(price2num($val['avg'],'MT'),1).''.round($val['avg_diff']).'
'.$langs->trans("Total")."'.price($totsorties[$annee]).''.price($totentrees[$annee]).''.price($totsorties[$annee]).''.price($totentrees[$annee]).'
'; @@ -896,32 +896,32 @@ if ($resql) } if (! empty($arrayfields['ba.ref']['checked'])) { - print ''; + print ''; $form->select_comptes($search_account,'search_account',0,'',1, ($id > 0 || ! empty($ref)?' disabled="disabled"':'')); print ''; + print ''; print ''; print ''; + print ''; print ''; print ''; + print ''; $htmltext=$langs->trans("BalanceVisibilityDependsOnSortAndFilters", $langs->transnoentitiesnoconv("DateValue")); print $form->textwithpicto('', $htmltext, 1); print ''; + print ''; $htmltext=$langs->trans("BalanceVisibilityDependsOnSortAndFilters", $langs->transnoentitiesnoconv("DateValue")); print $form->textwithpicto('', $htmltext, 1); print ''; + print ''; print price(price2num($balance, 'MT'), 1, $langs); print ''; + print ''; print price(price2num($balance, 'MT'), 1, $langs); print ''; + print ''; print "rowid.'&save_lastsearch_values=1">'.img_object($langs->trans("ShowPayment").': '.$objp->rowid, 'account', 'class="classfortooltip"').' '.$objp->rowid."   "; print ''; + print ''; print $bankaccount->getNomUrl(1); print "'; + print ''; if ($objp->amount > 0) { print price($objp->amount); @@ -1387,11 +1387,11 @@ if ($resql) { if ($balancebefore >= 0) { - print ' '.price($balancebefore).' '.price($balancebefore).' '.price($balancebefore).' '.price($balancebefore).' '.price($balance).' '.price($balance).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price(-1 * $totalarray['totaldeb']).''.price($totalarray['totalcred']).''.price(-1 * $totalarray['totaldeb']).''.price($totalarray['totalcred']).''; From 5b3559418fe67fc205675cc49283c5b4731c90ee Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 23 Jan 2019 20:59:34 +0100 Subject: [PATCH 058/183] Bills and coins pad, or Num pad in TakePOS --- htdocs/langs/en_US/cashdesk.lang | 5 +++- htdocs/takepos/admin/setup.php | 9 +++++++ htdocs/takepos/pay.php | 43 +++++++++++++++++++------------- htdocs/takepos/takepos.php | 9 +++++++ 4 files changed, 48 insertions(+), 18 deletions(-) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index ce9940bccde..e948f15f2b0 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -49,4 +49,7 @@ AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount CashFenceDone=Cash fence done for the period -NbOfInvoices=Nb of invoices \ No newline at end of file +NbOfInvoices=Nb of invoices +Paymentnumpad=Payment Num Pad +Numberspad=Numbers Pad +BillsCoinsPad=Bills and Coins Pad \ No newline at end of file diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 7c9e6e81c2b..2216d0b7659 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -62,6 +62,7 @@ if (GETPOST('action','alpha') == 'set') $res = dolibarr_set_const($db,"TAKEPOS_ORDER_PRINTERS", GETPOST('TAKEPOS_ORDER_PRINTERS','alpha'),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db,"TAKEPOS_HEADER", GETPOST('TAKEPOS_HEADER','alpha'),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db,"TAKEPOS_FOOTER", GETPOST('TAKEPOS_FOOTER','alpha'),'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db,"TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD','alpha'),'chaine',0,'',$conf->entity); dol_syslog("admin/cashdesk: level ".GETPOST('level','alpha')); @@ -143,6 +144,14 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOSCONNECTOR){ print '
'; +print $langs->trans("Paymentnumpad"); +print ''; +$array=array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad")); +print $form->selectarray('TAKEPOS_NUMPAD', $array, (empty($conf->global->TAKEPOS_NUMPAD)?'0':$conf->global->TAKEPOS_NUMPAD), 0); +print "
'; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) + elseif (! empty($tabhelp[$id][$value])) { if (in_array($value, array('topic'))) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, $value); // Tooltip on click else print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover @@ -552,7 +552,7 @@ foreach ($fieldsforcontent as $tmpfieldlist) if ($tmpfieldlist == 'topic') { print ''; } - else if ($tmpfieldlist == 'joinfiles') { + elseif ($tmpfieldlist == 'joinfiles') { print ''; } else diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 6e5f0d77b4b..d85218dbd5a 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -42,7 +42,7 @@ if ($action == 'activate_hidemenu') header("Location: ".$_SERVER["PHP_SELF"]); exit; } -else if ($action == 'disable_hidemenu') +elseif ($action == 'disable_hidemenu') { dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED",$conf->entity); header("Location: ".$_SERVER["PHP_SELF"]); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 4694021c233..4f24862e34c 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -244,7 +244,7 @@ if ($action == 'set' && $user->admin) header("Location: ".$_SERVER["PHP_SELF"]."?mode=".$mode.$param.($page_y?'&page_y='.$page_y:'')); exit; } -else if ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') +elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') { $result=unActivateModule($value); if ($result) setEventMessages($result, null, 'errors'); @@ -698,7 +698,7 @@ if ($mode == 'common') { print $langs->trans("Disabled"); } - else if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1))) + elseif (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1))) { if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) print $langs->trans("Used"); else { @@ -761,7 +761,7 @@ if ($mode == 'common') } print "'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'"; if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey}); - else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT'); + elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT'); else print ${$newkey}; if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')'; print ""; if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey}); - else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT'); - else if ($newkey == 'dolibarr_main_document_root_alt') + elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT'); + elseif ($newkey == 'dolibarr_main_document_root_alt') { $tmparray=explode(',',${$newkey}); $i=0; diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 55be556afb9..d74afcc90bc 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -166,7 +166,7 @@ print '
';
diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index 90220f1bb23..e1357a39fb5 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -106,7 +106,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'

';
@@ -164,7 +164,7 @@ if (in_array($type, array('mysql', 'mysqli')))
diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php index 0dc6b16b8e7..353cd6b6b98 100644 --- a/htdocs/admin/tools/eaccelerator.php +++ b/htdocs/admin/tools/eaccelerator.php @@ -48,17 +48,17 @@ if (isset($_POST['caching'])) { } else { eaccelerator_caching(true); } -} else if (isset($_POST['optimizer']) && function_exists('eaccelerator_optimizer')) { +} elseif (isset($_POST['optimizer']) && function_exists('eaccelerator_optimizer')) { if ($info['optimizer']) { eaccelerator_optimizer(false); } else { eaccelerator_optimizer(true); } -} else if (isset($_POST['clear'])) { +} elseif (isset($_POST['clear'])) { eaccelerator_clear(); -} else if (isset($_POST['clean'])) { +} elseif (isset($_POST['clean'])) { eaccelerator_clean(); -} else if (isset($_POST['purge'])) { +} elseif (isset($_POST['purge'])) { eaccelerator_purge(); } $info = eaccelerator_info(); @@ -81,7 +81,7 @@ function compare($x, $y) if ( $x[$sortby] == $y[$sortby] ) { return 0; - } else if ($x[$sortby] < $y[$sortby]) { + } elseif ($x[$sortby] < $y[$sortby]) { return -1; } else { return 1; @@ -101,7 +101,7 @@ function revcompare($x, $y) if ($x[$sortby] == $y[$sortby]) { return 0; - } else if ($x[$sortby] < $y[$sortby]) { + } elseif ($x[$sortby] < $y[$sortby]) { return 1; } else { return -1; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 7cbb82fbe6e..759bf1dfc48 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -115,7 +115,7 @@ if ($action == 'purge') $formquestion=array(); print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); } -else if ($action == 'lock') +elseif ($action == 'lock') { $formquestion=array(); print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 37b6bb5cc52..f857ab7ed11 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -543,7 +543,7 @@ if ($mode == 'searchkey') $htmltext = $langs->trans("OriginalValueWas", $newlangfileonly->tab_translate[$key]); print $form->textwithpicto('', $htmltext, 1, 'info'); } - else if (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) + elseif (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) { //print $key.'-'.$val; print '' . img_edit_add($langs->trans("Overwrite")) . ''; diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 6d6ef4578cd..816992a80e9 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -230,7 +230,7 @@ class DolibarrApi if (preg_match('/&/', $resource)) { $featuresarray = explode("&", $resource); } - else if (preg_match('/\|/', $resource)) { + elseif (preg_match('/\|/', $resource)) { $featuresarray = explode("|", $resource); } diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 498abb61a7b..e9d69728979 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -202,7 +202,7 @@ class Setup extends DolibarrApi if ($country->fetch($id) < 0) { throw new RestException(503, 'Error when retrieving country : '.$country->error); } - else if ($country->fetch($id) == 0) { + elseif ($country->fetch($id) == 0) { throw new RestException(404, 'country not found'); } diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 7ce4ef04303..c899e9d78c2 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -105,7 +105,7 @@ if ($action === 'downloadblockchain') { exit; } -else if (GETPOST('downloadcsv','alpha')) +elseif (GETPOST('downloadcsv','alpha')) { $error = 0; diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index 0d0fc183b6c..e08daf0b9b2 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -161,7 +161,7 @@ class BlockedLogAuthority $sql.= " FROM ".MAIN_DB_PREFIX."blockedlog_authority as b"; if ($id) $sql.= " WHERE b.rowid = ". $id; - else if($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ; + elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ; $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index bc65c72260d..17931e14457 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -208,7 +208,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'payment') { + elseif($this->element === 'payment') { require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; $object = new Paiement($this->db); @@ -219,7 +219,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'payment_supplier') { + elseif($this->element === 'payment_supplier') { require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; $object = new PaiementFourn($this->db); @@ -230,7 +230,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'payment_donation') { + elseif($this->element === 'payment_donation') { require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php'; $object = new PaymentDonation($this->db); @@ -241,7 +241,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'payment_various') { + elseif($this->element === 'payment_various') { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; $object = new PaymentVarious($this->db); @@ -252,7 +252,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'don' || $this->element === 'donation') { + elseif($this->element === 'don' || $this->element === 'donation') { require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; $object = new Don($this->db); @@ -263,7 +263,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'subscription') { + elseif($this->element === 'subscription') { require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $object = new Subscription($this->db); @@ -274,7 +274,7 @@ class BlockedLog $this->error++; } } - else if($this->element === 'cashcontrol') { + elseif($this->element === 'cashcontrol') { require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; $object = new CashControl($this->db); @@ -285,11 +285,11 @@ class BlockedLog $this->error++; } } - else if ($this->action == 'MODULE_SET') + elseif ($this->action == 'MODULE_SET') { return 'System to track events into unalterable logs were enabled'; } - else if ($this->action == 'MODULE_RESET') + elseif ($this->action == 'MODULE_RESET') { if ($this->signature == '0000000000') { @@ -469,7 +469,7 @@ class BlockedLog } } } - else if (!is_object($value)) $this->object_data->{$key} = $value; + elseif (!is_object($value)) $this->object_data->{$key} = $value; } if (! empty($object->newref)) $this->object_data->ref = $object->newref; @@ -984,11 +984,11 @@ class BlockedLog $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity; } - else if ($element=='not_certified') { + elseif ($element=='not_certified') { $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity." AND certified = 0"; } - else if ($element=='just_certified') { + elseif ($element=='just_certified') { $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity." AND certified = 1"; } diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index ea6ac7a47bd..436f8135efc 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -290,7 +290,7 @@ class Facturation { return $this->id; } - else if ( $aId == 'RESET' ) + elseif ( $aId == 'RESET' ) { $this->id = null; @@ -315,7 +315,7 @@ class Facturation { return $this->ref; } - else if ( $aRef == 'RESET' ) + elseif ( $aRef == 'RESET' ) { $this->ref = null; } @@ -337,7 +337,7 @@ class Facturation { return $this->qte; } - else if ( $aQte == 'RESET' ) + elseif ( $aQte == 'RESET' ) { $this->qte = null; @@ -361,7 +361,7 @@ class Facturation { return $this->stock; } - else if ( $aStock == 'RESET' ) + elseif ( $aStock == 'RESET' ) { $this->stock = null; } @@ -384,7 +384,7 @@ class Facturation { return $this->remise_percent; } - else if ($aRemisePercent == 'RESET') + elseif ($aRemisePercent == 'RESET') { $this->remise_percent = null; } @@ -406,7 +406,7 @@ class Facturation if (is_null($aMontantRemise)) { return $this->montant_remise; - } else if ( $aMontantRemise == 'RESET' ) { + } elseif ( $aMontantRemise == 'RESET' ) { $this->montant_remise = null; } else { @@ -427,7 +427,7 @@ class Facturation if (is_null($aPrix)) { return $this->prix; - } else if ( $aPrix == 'RESET' ) { + } elseif ( $aPrix == 'RESET' ) { $this->prix = null; } else { @@ -447,7 +447,7 @@ class Facturation if (is_null($aTva)) { return $this->tva; - } else if ( $aTva == 'RESET' ) { + } elseif ( $aTva == 'RESET' ) { $this->tva = null; } else { @@ -467,7 +467,7 @@ class Facturation if (is_null($aNumFacture)) { return $this->num_facture; - } else if ( $aNumFacture == 'RESET' ) { + } elseif ( $aNumFacture == 'RESET' ) { $this->num_facture = null; } else { @@ -488,7 +488,7 @@ class Facturation if (is_null($aModeReglement)) { return $this->mode_reglement; - } else if ( $aModeReglement == 'RESET' ) { + } elseif ( $aModeReglement == 'RESET' ) { $this->mode_reglement = null; } else { @@ -509,7 +509,7 @@ class Facturation if (is_null($aMontantEncaisse)) { return $this->montant_encaisse; - } else if ( $aMontantEncaisse == 'RESET' ) { + } elseif ( $aMontantEncaisse == 'RESET' ) { $this->montant_encaisse = null; } else { @@ -530,7 +530,7 @@ class Facturation if (is_null($aMontantRendu)) { return $this->montant_rendu; - } else if ( $aMontantRendu == 'RESET' ) { + } elseif ( $aMontantRendu == 'RESET' ) { $this->montant_rendu = null; } else { @@ -550,7 +550,7 @@ class Facturation if (is_null($aPaiementLe)) { return $this->paiement_le; - } else if ( $aPaiementLe == 'RESET' ) { + } elseif ( $aPaiementLe == 'RESET' ) { $this->paiement_le = null; } else { @@ -570,7 +570,7 @@ class Facturation if (is_null($aTotalHt)) { return $this->prix_total_ht; - } else if ( $aTotalHt == 'RESET' ) { + } elseif ( $aTotalHt == 'RESET' ) { $this->prix_total_ht = null; } else { @@ -590,7 +590,7 @@ class Facturation if (is_null($aMontantTva)) { return $this->montant_tva; - } else if ( $aMontantTva == 'RESET' ) { + } elseif ( $aMontantTva == 'RESET' ) { $this->montant_tva = null; } else { diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index 4ca8a562659..ac78883bc4f 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -138,7 +138,7 @@ if ( $nbr_enreg > 1 ) $top_liste_produits = '----- '.$nbr_enreg.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----'; } } -else if ( $nbr_enreg == 1 ) +elseif ( $nbr_enreg == 1 ) { $top_liste_produits = '----- 1 '.$langs->transnoentitiesnoconv("ProductFound"). ' -----'; } diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 6aa81d991df..960ddddb18a 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -51,7 +51,7 @@ switch($action) { $sql.= " AND p.rowid = ".$_POST['selProduit']; } - else if ( $_POST['hdnSource'] == 'REF' ) + elseif ( $_POST['hdnSource'] == 'REF' ) { $sql.= " AND p.ref = '".$_POST['txtRef']."'"; } @@ -163,7 +163,7 @@ switch($action) { $filtre = $ret['ref']; } - else if ( $_POST['hdnSource'] == 'REF' ) + elseif ( $_POST['hdnSource'] == 'REF' ) { $filtre = $_POST['txtRef']; } diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index e69ec4a852d..1cc510ee27f 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -89,32 +89,32 @@ if ($action == 'add' && $user->rights->categorie->creer) header("Location: ".$urlfrom); exit; } - else if ($idProdOrigin) + elseif ($idProdOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProdOrigin.'&type='.$type); exit; } - else if ($idCompanyOrigin) + elseif ($idCompanyOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idCompanyOrigin.'&type='.$type); exit; } - else if ($idSupplierOrigin) + elseif ($idSupplierOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idSupplierOrigin.'&type='.$type); exit; } - else if ($idMemberOrigin) + elseif ($idMemberOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idMemberOrigin.'&type='.$type); exit; } - else if ($idContactOrigin) + elseif ($idContactOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idContactOrigin.'&type='.$type); exit; } - else if ($idProjectOrigin) + elseif ($idProjectOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProjectOrigin.'&type='.$type); exit; @@ -179,32 +179,32 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr header("Location: ".$backtopage); exit; } - else if ($idProdOrigin) + elseif ($idProdOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProdOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idCompanyOrigin) + elseif ($idCompanyOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idCompanyOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idSupplierOrigin) + elseif ($idSupplierOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idSupplierOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idMemberOrigin) + elseif ($idMemberOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idMemberOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idContactOrigin) + elseif ($idContactOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idContactOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; } - else if ($idProjectOrigin) + elseif ($idProjectOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProjectOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index e4d95d490ed..da6c7c20a5c 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1397,7 +1397,7 @@ class Categorie extends CommonObject { if ($mode == 'id') { $cats[] = $obj->rowid; - } else if ($mode == 'label') { + } elseif ($mode == 'label') { $cats[] = $obj->label; } else { $cat = new Categorie($this->db); @@ -1427,7 +1427,7 @@ class Categorie extends CommonObject { if ($mode == 'id') { $cats[] = $obj->rowid; - } else if ($mode == 'label') { + } elseif ($mode == 'label') { $cats[] = $obj->label; } else { $cat = new Categorie($this->db); @@ -1747,7 +1747,7 @@ class Categorie extends CommonObject return -1; } } - else if (isset($this->multilangs["$key"])) + elseif (isset($this->multilangs["$key"])) { if ($this->db->num_rows($result)) // si aucune ligne dans la base { diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 6783b565b99..f683a791e72 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -270,7 +270,7 @@ if ($action == 'edit') print ''; } -else if ($action != 'add') +elseif ($action != 'add') { if ($cnt_trans) print '
'; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 37bf6ed60a3..c2b94fcc473 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -86,40 +86,40 @@ if ($id > 0 && $removeelem > 0) $result = $tmpobject->fetch($removeelem); $elementtype = 'product'; } - else if ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) + elseif ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) { $tmpobject = new Societe($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'supplier'; } - else if ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer) + elseif ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer) { $tmpobject = new Societe($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'customer'; } - else if ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer) + elseif ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $tmpobject = new Adherent($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'member'; } - else if ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) { + elseif ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $tmpobject = new Contact($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'contact'; } - else if ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer) + elseif ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $tmpobject = new Account($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'account'; } - else if ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer) + elseif ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $tmpobject = new Project($db); diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index d087655a9bd..0c2bbb2e10f 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -791,11 +791,11 @@ if ($action == 'create') print '
'; $percent=-1; if (isset($_GET['status']) || isset($_POST['status'])) $percent=GETPOST('status'); - else if (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent=GETPOST('percentage'); + elseif (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent=GETPOST('percentage'); else { if (GETPOST('complete') == '0' || GETPOST("afaire") == 1) $percent='0'; - else if (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent=100; + elseif (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent=100; } $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); print '
'; if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastCustomersOrProspects",$max); - else if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max); + elseif (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max); else print $langs->trans("BoxTitleLastModifiedCustomers",$max); print ''.$langs->trans("FullList").'
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("BankAccountCountry").''; $conciliate=$object->canBeConciliated(); if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')'; - else if ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; + elseif ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; else print ($object->rappro==1 ? $langs->trans("Yes") : ($langs->trans("No").' ('.$langs->trans("ConciliationDisabled").')')); print '
'.$langs->trans("Country").''; $conciliate=$object->canBeConciliated(); if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')'; - else if ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; + elseif ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; else print ' 0)?'':' checked="checked"').'"> '.$langs->trans("DisableConciliation"); print '
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("Error").'
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("Error").'
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
' . $langs->trans("FeatureNotYetAvailable") . '
' . $langs->trans("Error") . '
'; } - else if ($nbbyrow < 0) $return .= '
'; + elseif ($nbbyrow < 0) $return .= '
'; $return.= "\n"; @@ -6821,7 +6821,7 @@ abstract class CommonObject $return.= '
'; if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); - else if ($disabledtask) + elseif ($disabledtask) { $titleassigntask = $langs->trans("AssignTaskToMe"); if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); @@ -1383,7 +1383,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ // Warning print ''; if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); - else if ($disabledtask) + elseif ($disabledtask) { $titleassigntask = $langs->trans("AssignTaskToMe"); if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index c7d59db13da..a54ed1af8c1 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -125,12 +125,12 @@ function dol_hash($chain, $type='0') if (! empty($conf->global->MAIN_SECURITY_SALT)) $chain=$conf->global->MAIN_SECURITY_SALT.$chain; if ($type == '1' || $type == 'sha1') return sha1($chain); - else if ($type == '2' || $type == 'sha1md5') return sha1(md5($chain)); - else if ($type == '3' || $type == 'md5') return md5($chain); - else if ($type == '4' || $type == 'md5openldap') return '{md5}'.base64_encode(mhash(MHASH_MD5,$chain)); // For OpenLdap with md5 (based on an unencrypted password in base) - else if ($type == '5') return hash('sha256',$chain); - else if (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1') return sha1($chain); - else if (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1md5') return sha1(md5($chain)); + elseif ($type == '2' || $type == 'sha1md5') return sha1(md5($chain)); + elseif ($type == '3' || $type == 'md5') return md5($chain); + elseif ($type == '4' || $type == 'md5openldap') return '{md5}'.base64_encode(mhash(MHASH_MD5,$chain)); // For OpenLdap with md5 (based on an unencrypted password in base) + elseif ($type == '5') return hash('sha256',$chain); + elseif (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1') return sha1($chain); + elseif (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1md5') return sha1(md5($chain)); // No particular encoding defined, use default return md5($chain); @@ -153,8 +153,8 @@ function dol_verifyHash($chain, $hash, $type='0') if ($type == '0' && ! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_verify')) { if ($hash[0] == '$') return password_verify($chain, $hash); - else if(strlen($hash) == 32) return dol_verifyHash($chain, $hash, '3'); // md5 - else if(strlen($hash) == 40) return dol_verifyHash($chain, $hash, '2'); // sha1md5 + elseif(strlen($hash) == 32) return dol_verifyHash($chain, $hash, '3'); // md5 + elseif(strlen($hash) == 40) return dol_verifyHash($chain, $hash, '2'); // sha1md5 return false; } @@ -199,7 +199,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu // Features/modules to check $featuresarray = array($features); if (preg_match('/&/', $features)) $featuresarray = explode("&", $features); - else if (preg_match('/\|/', $features)) $featuresarray = explode("|", $features); + elseif (preg_match('/\|/', $features)) $featuresarray = explode("|", $features); // More subfeatures to check if (! empty($feature2)) $feature2 = explode("|", $feature2); @@ -227,34 +227,34 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu { if (! $user->rights->societe->lire && ! $user->rights->fournisseur->lire) { $readok=0; $nbko++; } } - else if ($feature == 'contact') + elseif ($feature == 'contact') { if (! $user->rights->societe->contact->lire) { $readok=0; $nbko++; } } - else if ($feature == 'produit|service') + elseif ($feature == 'produit|service') { if (! $user->rights->produit->lire && ! $user->rights->service->lire) { $readok=0; $nbko++; } } - else if ($feature == 'prelevement') + elseif ($feature == 'prelevement') { if (! $user->rights->prelevement->bons->lire) { $readok=0; $nbko++; } } - else if ($feature == 'cheque') + elseif ($feature == 'cheque') { if (! $user->rights->banque->cheque) { $readok=0; $nbko++; } } - else if ($feature == 'projet') + elseif ($feature == 'projet') { if (! $user->rights->projet->lire && ! $user->rights->projet->all->lire) { $readok=0; $nbko++; } } - else if (! empty($feature2)) // This should be used for future changes + elseif (! empty($feature2)) // This should be used for future changes { $tmpreadok=1; foreach($feature2 as $subfeature) { if ($subfeature == 'user' && $user->id == $objectid) continue; // A user can always read its own card if (! empty($subfeature) && empty($user->rights->$feature->$subfeature->lire) && empty($user->rights->$feature->$subfeature->read)) { $tmpreadok=0; } - else if (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $tmpreadok=0; } + elseif (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $tmpreadok=0; } else { $tmpreadok=1; break; } // Break is to bypass second test if the first is ok } if (! $tmpreadok) // We found a test on feature that is ko @@ -263,7 +263,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu $nbko++; } } - else if (! empty($feature) && ($feature!='user' && $feature!='usergroup')) // This is for old permissions + elseif (! empty($feature) && ($feature!='user' && $feature!='usergroup')) // This is for old permissions { if (empty($user->rights->$feature->lire) && empty($user->rights->$feature->read) @@ -287,27 +287,27 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu { if (! $user->rights->societe->contact->creer) { $createok=0; $nbko++; } } - else if ($feature == 'produit|service') + elseif ($feature == 'produit|service') { if (! $user->rights->produit->creer && ! $user->rights->service->creer) { $createok=0; $nbko++; } } - else if ($feature == 'prelevement') + elseif ($feature == 'prelevement') { if (! $user->rights->prelevement->bons->creer) { $createok=0; $nbko++; } } - else if ($feature == 'commande_fournisseur') + elseif ($feature == 'commande_fournisseur') { if (! $user->rights->fournisseur->commande->creer) { $createok=0; $nbko++; } } - else if ($feature == 'banque') + elseif ($feature == 'banque') { if (! $user->rights->banque->modifier) { $createok=0; $nbko++; } } - else if ($feature == 'cheque') + elseif ($feature == 'cheque') { if (! $user->rights->banque->cheque) { $createok=0; $nbko++; } } - else if (! empty($feature2)) // This should be used + elseif (! empty($feature2)) // This should be used { foreach($feature2 as $subfeature) { @@ -317,7 +317,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu else { $createok=1; break; } // Break to bypass second test if the first is ok } } - else if (! empty($feature)) // This is for old permissions ('creer' or 'write') + elseif (! empty($feature)) // This is for old permissions ('creer' or 'write') { //print '
feature='.$feature.' creer='.$user->rights->$feature->creer.' write='.$user->rights->$feature->write; if (empty($user->rights->$feature->creer) @@ -353,38 +353,38 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu { if (! $user->rights->societe->contact->supprimer) $deleteok=0; } - else if ($feature == 'produit|service') + elseif ($feature == 'produit|service') { if (! $user->rights->produit->supprimer && ! $user->rights->service->supprimer) $deleteok=0; } - else if ($feature == 'commande_fournisseur') + elseif ($feature == 'commande_fournisseur') { if (! $user->rights->fournisseur->commande->supprimer) $deleteok=0; } - else if ($feature == 'banque') + elseif ($feature == 'banque') { if (! $user->rights->banque->modifier) $deleteok=0; } - else if ($feature == 'cheque') + elseif ($feature == 'cheque') { if (! $user->rights->banque->cheque) $deleteok=0; } - else if ($feature == 'ecm') + elseif ($feature == 'ecm') { if (! $user->rights->ecm->upload) $deleteok=0; } - else if ($feature == 'ftp') + elseif ($feature == 'ftp') { if (! $user->rights->ftp->write) $deleteok=0; - }else if ($feature == 'salaries') + }elseif ($feature == 'salaries') { if (! $user->rights->salaries->delete) $deleteok=0; } - else if ($feature == 'salaries') + elseif ($feature == 'salaries') { if (! $user->rights->salaries->delete) $deleteok=0; } - else if (! empty($feature2)) // This should be used for permissions on 2 levels + elseif (! empty($feature2)) // This should be used for permissions on 2 levels { foreach($feature2 as $subfeature) { @@ -392,7 +392,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu else { $deleteok=1; break; } // For bypass the second test if the first is ok } } - else if (! empty($feature)) // This is used for permissions on 1 level + elseif (! empty($feature)) // This is used for permissions on 1 level { //print '
feature='.$feature.' creer='.$user->rights->$feature->supprimer.' write='.$user->rights->$feature->delete; if (empty($user->rights->$feature->supprimer) @@ -500,7 +500,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checksoc)) // We check feature = checksoc + elseif (in_array($feature,$checksoc)) // We check feature = checksoc { // If external user: Check permission for external users if ($user->socid > 0) @@ -508,7 +508,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh if ($user->socid <> $objectid) return false; } // If internal user: Check permission for internal users that are restricted on their objects - else if (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) + elseif (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) { $sql = "SELECT COUNT(sc.fk_soc) as nb"; $sql.= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -519,7 +519,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND s.entity IN (".getEntity($sharedelement, 1).")"; } // If multicompany and internal users with all permissions, check user is in correct entity - else if (! empty($conf->multicompany->enabled)) + elseif (! empty($conf->multicompany->enabled)) { $sql = "SELECT COUNT(s.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -527,7 +527,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND s.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checkother)) // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...). + elseif (in_array($feature,$checkother)) // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...). { // If external user: Check permission for external users if ($user->socid > 0) @@ -538,7 +538,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.fk_soc = ".$user->socid; } // If internal user: Check permission for internal users that are restricted on their objects - else if (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) + elseif (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -548,7 +548,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } // If multicompany and internal users with all permissions, check user is in correct entity - else if (! empty($conf->multicompany->enabled)) + elseif (! empty($conf->multicompany->enabled)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -556,7 +556,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checkproject)) + elseif (in_array($feature,$checkproject)) { if (! empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) { @@ -574,7 +574,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checktask)) + elseif (in_array($feature,$checktask)) { if (! empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) { @@ -595,7 +595,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (! in_array($feature,$nocheck)) // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield + elseif (! in_array($feature,$nocheck)) // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield { // If external user: Check permission for external users if ($user->socid > 0) @@ -607,7 +607,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND dbt.".$dbt_keyfield." = ".$user->socid; } // If internal user: Check permission for internal users that are restricted on their objects - else if (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) + elseif (! empty($conf->societe->enabled) && ($user->rights->societe->lire && ! $user->rights->societe->client->voir)) { if (empty($dbt_keyfield)) dol_print_error('','Param dbt_keyfield is required but not defined'); $sql = "SELECT COUNT(sc.fk_soc) as nb"; @@ -621,7 +621,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh $sql.= " AND sc.fk_user = ".$user->id; } // If multicompany and internal users with all permissions, check user is in correct entity - else if (! empty($conf->multicompany->enabled)) + elseif (! empty($conf->multicompany->enabled)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; @@ -672,7 +672,7 @@ function accessforbidden($message='',$printheader=1,$printfooter=1,$showonlymess if ($printheader) { if (function_exists("llxHeader")) llxHeader(''); - else if (function_exists("llxHeaderVierge")) llxHeaderVierge(''); + elseif (function_exists("llxHeaderVierge")) llxHeaderVierge(''); } print '
'; if (! $message) print $langs->trans("ErrorForbidden"); diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index c09cd7f78d3..1f47b4df94b 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -498,7 +498,7 @@ function getRandomPassword($generic=false, $replaceambiguouschars=null) $generated_password=str_shuffle($randomCode); } } - else if (! empty($conf->global->USER_PASSWORD_GENERATED)) + elseif (! empty($conf->global->USER_PASSWORD_GENERATED)) { $nomclass="modGeneratePass".ucfirst($conf->global->USER_PASSWORD_GENERATED); $nomfichier=$nomclass.".class.php"; diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 7927bec0268..40646e07df9 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -163,7 +163,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -204,7 +204,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -311,7 +311,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -352,7 +352,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -456,7 +456,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql.= " AND p.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND p.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND p.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND p.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -632,7 +632,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -673,7 +673,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -780,7 +780,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND f.datef >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND f.datef <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -821,7 +821,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND pa.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND pa.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; @@ -925,7 +925,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql.= " AND p.datep >= '".$db->idate(dol_get_first_day($y,$m,false))."'"; $sql.= " AND p.datep <= '".$db->idate(dol_get_last_day($y,$m,false))."'"; } - else if ($y) + elseif ($y) { $sql.= " AND p.datep >= '".$db->idate(dol_get_first_day($y,1,false))."'"; $sql.= " AND p.datep <= '".$db->idate(dol_get_last_day($y,12,false))."'"; diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index 533a13e1fb6..9758fbe1b8e 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -59,7 +59,7 @@ function check_authentication($authentication,&$error,&$errorcode,&$errorlabel) $error++; $errorcode='ERROR_FETCH_USER'; $errorlabel='A technical error occurred during fetch of user'; } - else if ($result == 0) + elseif ($result == 0) { $error++; $errorcode='BAD_CREDENTIALS'; $errorlabel='Bad value for login or password'; diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php index bc8d7f45122..e87a07276bb 100644 --- a/htdocs/core/login/functions_openid.php +++ b/htdocs/core/login/functions_openid.php @@ -90,7 +90,7 @@ function check_user_password_openid($usertotest,$passwordtotest,$entitytotest) } } } - else if($openid->IsError() === true) + elseif($openid->IsError() === true) { // ON THE WAY, WE GOT SOME ERROR $error = $openid->GetError(); @@ -103,7 +103,7 @@ function check_user_password_openid($usertotest,$passwordtotest,$entitytotest) return false; } } - else if ($_GET['openid_mode'] == 'cancel') + elseif ($_GET['openid_mode'] == 'cancel') { // User Canceled your Request //echo "USER CANCELED REQUEST"; diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 1ca94b38106..e925798e36e 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -112,10 +112,10 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m // Define the class (top menu selected or not) if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; - else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; + elseif (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; else $classname='class="tmenu"'; } - else if ($showmode == 2) $classname='class="tmenu"'; + elseif ($showmode == 2) $classname='class="tmenu"'; $menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget), ($newTabMenu[$i]['mainmenu']?$newTabMenu[$i]['mainmenu']:$newTabMenu[$i]['rowid']), ($newTabMenu[$i]['leftmenu']?$newTabMenu[$i]['leftmenu']:''), $newTabMenu[$i]['position'], $id, $idsel, $classname); } @@ -550,7 +550,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM print '
'."\n"; $lastlevel0='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { print ''."\n"; $lastlevel0='greyed'; @@ -583,7 +583,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM if (! strstr($menu_array[$i]['titre'],''; print ''."\n"; } - else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. + elseif ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. { print ''."\n"; } diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index f4cb98d9c4b..93f779bf5a5 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -210,7 +210,7 @@ class MenuManager { $lastlevel[0]='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { $lastlevel[0]='greyed'; } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 223cacaf26a..6226be4a145 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -341,10 +341,10 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode // Define the class (top menu selected or not) if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; - else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; + elseif (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; else $classname='class="tmenu"'; } - else if ($showmode == 2) $classname='class="tmenu"'; + elseif ($showmode == 2) $classname='class="tmenu"'; $menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget), ($newTabMenu[$i]['mainmenu']?$newTabMenu[$i]['mainmenu']:$newTabMenu[$i]['rowid']), ($newTabMenu[$i]['leftmenu']?$newTabMenu[$i]['leftmenu']:''), $newTabMenu[$i]['position'], $id, $idsel, $classname); } @@ -1837,7 +1837,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu print ''."\n"; $lastlevel0='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { print ''."\n"; $lastlevel0='greyed'; @@ -1870,7 +1870,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! strstr($menu_array[$i]['titre'],''; print ''."\n"; } - else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. + elseif ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. { print ''."\n"; } diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 4992fc6d11c..afac9a6a84b 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -225,7 +225,7 @@ class MenuManager { $lastlevel[0]='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { $lastlevel[0]='greyed'; } diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 038167ae512..357bccd5d46 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -225,7 +225,7 @@ class MenuManager { $lastlevel[0]='enabled'; } - else if ($showmenu) // Not enabled but visible (so greyed) + elseif ($showmenu) // Not enabled but visible (so greyed) { $lastlevel[0]='greyed'; } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 9e8d5565f67..3a37d89d136 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2109,7 +2109,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if (isset($value['entity'])) { $entity = $value['entity']; } } - else if (isset($value['data']) && !is_array($value['data'])) { + elseif (isset($value['data']) && !is_array($value['data'])) { $newvalue = $value['data']; if (isset($value['entity'])) { $entity = $value['entity']; } diff --git a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php index ed6a7635164..bcfb6686cad 100644 --- a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php @@ -255,7 +255,7 @@ class modTcpdfbarcode extends ModeleBarCode if (array_key_exists($dolEncodingType, $tcpdf1dEncodingTypes)) { $this->is2d = false; return $tcpdf1dEncodingTypes[$dolEncodingType]; - } else if (array_key_exists($dolEncodingType, $tcpdf2dEncodingTypes)) { + } elseif (array_key_exists($dolEncodingType, $tcpdf2dEncodingTypes)) { $this->is2d = true; return $tcpdf2dEncodingTypes[$dolEncodingType]; } else { diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 97121eebcfd..af1bb03c3c3 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -199,7 +199,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK)) ) { $result=-2; } diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index 993f4bf9bfb..cc629b3ff34 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -112,7 +112,7 @@ class mod_contract_olive extends ModelNumRefContracts { $result=0; } - else if (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED)) ) + elseif (empty($code) && (! $this->code_null || ! empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED)) ) { $result=-2; } diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index cac7329cf5b..92c775bf4e5 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -136,10 +136,10 @@ class html_cerfafr extends ModeleDon if ($don->modepaymentcode=='CHQ'){ $ModePaiement = '
Remise d\'espèces Chèque Virement, prélèvement, carte bancaire Remise d\'espèces Chèque Virement, prélèvement, carte bancaire Remise d\'espèces Chèque Virement, prélèvement, carte bancaire
'; if ($origin == 'commande') print $langs->trans('RefCustomerOrder'); - else if ($origin == 'propal') print $langs->trans('RefCustomerOrder'); + elseif ($origin == 'propal') print $langs->trans('RefCustomerOrder'); else print $langs->trans('RefCustomer'); print ''; print ''; @@ -1604,7 +1604,7 @@ if ($action == 'create') } } } -else if ($id || $ref) +elseif ($id || $ref) /* *************************************************************************** */ /* */ /* Edit and view mode */ @@ -2253,7 +2253,7 @@ else if ($id || $ref) print '' . $formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product). '
- ' . $langs->trans("NA") . '
'; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 48e84cf1cc4..3f6cf98bf06 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2747,7 +2747,7 @@ class ExpeditionLigne extends CommonObjectLine $qty = price2num($this->detail_batch[0]->qty); } } - else if (! empty($this->detail_batch)) + elseif (! empty($this->detail_batch)) { $batch = $this->detail_batch->batch; $batch_id = $this->detail_batch->fk_origin_stock; diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index f9ea697e50d..e3d1cc42e68 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -103,13 +103,13 @@ if ($action == 'addcontact' && $user->rights->expedition->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->expedition->creer) +elseif ($action == 'swapstatut' && $user->rights->expedition->creer) { $result=$objectsrc->swapContactStatus(GETPOST('ligne')); } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->expedition->creer) +elseif ($action == 'deletecontact' && $user->rights->expedition->creer) { $result = $objectsrc->delete_contact(GETPOST("lineid")); diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 48bfd1f4ce2..584f420a8dd 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -91,7 +91,7 @@ if (empty($reshook)) } // Positionne ref commande client - else if ($action == 'setref_client' && $user->rights->commande->creer) { + elseif ($action == 'setref_client' && $user->rights->commande->creer) { $result = $object->set_ref_client($user, GETPOST('ref_client')); if ($result < 0) { diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 4646c8779ca..a2713bd836f 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2417,7 +2417,7 @@ if ($action != 'create' && $action != 'edit') // Delete print ''; } - else if($user->rights->expensereport->supprimer && $object->fk_statut != 6) + elseif($user->rights->expensereport->supprimer && $object->fk_statut != 6) { // Delete print ''; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 52ad0486597..71b0df6a8cd 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -186,7 +186,7 @@ if ($action=='selectfield') // Selection of field at step 2 if (is_array($tmp)) $listofdependencies=$tmp; else $listofdependencies=array($tmp); } - else if (! empty($field) && ! empty($fieldsdependenciesarray[$field])) + elseif (! empty($field) && ! empty($fieldsdependenciesarray[$field])) { // We found a dependency on a dedicated field $tmp=$fieldsdependenciesarray[$field]; // $fieldsdependenciesarray=array('fd.fieldx'=>'fd.rowid') or array('fd.fieldx'=>array('fd.rowid','ab.rowid')) diff --git a/htdocs/externalsite/frames.php b/htdocs/externalsite/frames.php index c7f92142381..eb8e06919d3 100644 --- a/htdocs/externalsite/frames.php +++ b/htdocs/externalsite/frames.php @@ -63,7 +63,7 @@ if (! empty($keyforcontent)) $langs->load("errors"); print $langs->trans("ErrorBadSyntaxForParamKeyForContent", 'EXTERNAL_SITE_CONTENT_', 'EXTERNAL_SITE_URL_'); } - else if (empty($conf->global->$keyforcontent)) + elseif (empty($conf->global->$keyforcontent)) { $langs->load("errors"); print $langs->trans("ErrorVariableKeyForContentMustBeSet", 'EXTERNAL_SITE_CONTENT_'.$keyforcontent, 'EXTERNAL_SITE_URL_'.$keyforcontent); diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index e896c9682e4..837b77eb3aa 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -370,7 +370,7 @@ if ($action == 'create') { $title = $langs->trans("ProductsAndServices"); if (empty($conf->service->enabled)) $title = $langs->trans("Products"); - else if (empty($conf->product->enabled)) + elseif (empty($conf->product->enabled)) $title = $langs->trans("Services"); print load_fiche_titre($title, '', ''); @@ -712,7 +712,7 @@ if ($action == 'create') { $title = $langs->trans("ProductsAndServices"); if (empty($conf->service->enabled)) $title = $langs->trans("Products"); - else if (empty($conf->product->enabled)) + elseif (empty($conf->product->enabled)) $title = $langs->trans("Services"); print load_fiche_titre($title); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index a8ddb343a94..507ce8d01f3 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -180,7 +180,7 @@ if (empty($reshook)) } } - else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer) + elseif ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $result = $object->setDraft($user); if ($result >= 0) @@ -209,7 +209,7 @@ if (empty($reshook)) } } - else if ($action == 'add' && $user->rights->ficheinter->creer) + elseif ($action == 'add' && $user->rights->ficheinter->creer) { $object->socid = $socid; $object->duration = GETPOST('duration','int'); @@ -432,7 +432,7 @@ if (empty($reshook)) } } - else if ($action == 'update' && $user->rights->ficheinter->creer) + elseif ($action == 'update' && $user->rights->ficheinter->creer) { $object->socid = $socid; $object->fk_project = GETPOST('projectid','int'); @@ -448,20 +448,20 @@ if (empty($reshook)) } // Set into a project - else if ($action == 'classin' && $user->rights->ficheinter->creer) + elseif ($action == 'classin' && $user->rights->ficheinter->creer) { $result=$object->setProject(GETPOST('projectid','int')); if ($result < 0) dol_print_error($db,$object->error); } // Set into a contract - else if ($action == 'setcontract' && $user->rights->contrat->creer) + elseif ($action == 'setcontract' && $user->rights->contrat->creer) { $result=$object->set_contrat($user,GETPOST('contratid','int')); if ($result < 0) dol_print_error($db,$object->error); } - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer) + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer) { $result=$object->delete($user); if ($result<0) { @@ -472,14 +472,14 @@ if (empty($reshook)) exit; } - else if ($action == 'setdescription' && $user->rights->ficheinter->creer) + elseif ($action == 'setdescription' && $user->rights->ficheinter->creer) { $result=$object->set_description($user,GETPOST('description')); if ($result < 0) dol_print_error($db,$object->error); } // Add line - else if ($action == "addline" && $user->rights->ficheinter->creer) + elseif ($action == "addline" && $user->rights->ficheinter->creer) { if (!GETPOST('np_desc','none') && empty($conf->global->FICHINTER_EMPTY_LINE_DESC) ) { @@ -547,7 +547,7 @@ if (empty($reshook)) } // Classify Billed - else if ($action == 'classifybilled' && $user->rights->ficheinter->creer) + elseif ($action == 'classifybilled' && $user->rights->ficheinter->creer) { $result=$object->setStatut(2); if ($result > 0) @@ -562,7 +562,7 @@ if (empty($reshook)) } // Classify unbilled - else if ($action == 'classifyunbilled' && $user->rights->ficheinter->creer) + elseif ($action == 'classifyunbilled' && $user->rights->ficheinter->creer) { $result=$object->setStatut(1); if ($result > 0) @@ -577,7 +577,7 @@ if (empty($reshook)) } // Classify Done - else if ($action == 'classifydone' && $user->rights->ficheinter->creer) + elseif ($action == 'classifydone' && $user->rights->ficheinter->creer) { $result=$object->setStatut(3); if ($result > 0) @@ -594,7 +594,7 @@ if (empty($reshook)) /* * Mise a jour d'une ligne d'intervention */ - else if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save','alpha') == $langs->trans("Save")) + elseif ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save','alpha') == $langs->trans("Save")) { $objectline = new FichinterLigne($db); if ($objectline->fetch($lineid) <= 0) @@ -650,7 +650,7 @@ if (empty($reshook)) /* * Supprime une ligne d'intervention AVEC confirmation */ - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->ficheinter->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $objectline = new FichinterLigne($db); if ($objectline->fetch($lineid) <= 0) @@ -683,7 +683,7 @@ if (empty($reshook)) * Ordonnancement des lignes */ - else if ($action == 'up' && $user->rights->ficheinter->creer) + elseif ($action == 'up' && $user->rights->ficheinter->creer) { $object->line_up($lineid); @@ -703,7 +703,7 @@ if (empty($reshook)) exit; } - else if ($action == 'down' && $user->rights->ficheinter->creer) + elseif ($action == 'down' && $user->rights->ficheinter->creer) { $object->line_down($lineid); @@ -789,13 +789,13 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut') + elseif ($action == 'swapstatut') { $result=$object->swapContactStatus(GETPOST('ligne','int')); } // Efface un contact - else if ($action == 'deletecontact') + elseif ($action == 'deletecontact') { $result = $object->delete_contact(GETPOST('lineid','int')); @@ -1099,7 +1099,7 @@ if ($action == 'create') print ''; } } -else if ($id > 0 || ! empty($ref)) +elseif ($id > 0 || ! empty($ref)) { /* * Affichage en mode visu diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index 54ad6733e69..7da8a8aba44 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -81,13 +81,13 @@ if ($action == 'addcontact' && $user->rights->ficheinter->creer) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->ficheinter->creer) +elseif ($action == 'swapstatut' && $user->rights->ficheinter->creer) { $result=$object->swapContactStatus(GETPOST('ligne','int')); } // Deletes a contact -else if ($action == 'deletecontact' && $user->rights->ficheinter->creer) +elseif ($action == 'deletecontact' && $user->rights->ficheinter->creer) { $result = $object->delete_contact(GETPOST('lineid','int')); diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 4edfa3d0623..472af9f14d9 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -80,7 +80,7 @@ if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not do $path=$_SERVER["CONTEXT_PREFIX"]; // example '/dolibarr/' when using an apache alias. if (! preg_match('/\/$/', $path)) $path.='/'; } - else if (preg_match('/index\.php/', $_SERVER['PHP_SELF'])) + elseif (preg_match('/index\.php/', $_SERVER['PHP_SELF'])) { // When we ask index.php, we MUST BE SURE that $path is '' at the end. This is required to make install process // when using apache alias like '/dolibarr/' that point to htdocs. diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 1dab0e9f82e..efa701712b8 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1335,7 +1335,7 @@ class FactureFournisseur extends CommonInvoice { $num = $force_number; } - else if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life + elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($this->thirdparty); } diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index ee92374149b..d939260a01f 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -95,9 +95,9 @@ class PaiementFourn extends Paiement $sql.= ' WHERE p.entity IN ('.getEntity('facture_fourn').')'; if ($id > 0) $sql.= ' AND p.rowid = '.$id; - else if ($ref) + elseif ($ref) $sql.= ' AND p.rowid = '.$ref; - else if ($fk_bank) + elseif ($fk_bank) $sql.= ' AND p.fk_bank = '.$fk_bank; //print $sql; @@ -636,8 +636,8 @@ class PaiementFourn extends Paiement // Clean parameters (if not defined or using deprecated value) if (empty($conf->global->SUPPLIER_PAYMENT_ADDON)) $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_bronan'; - else if ($conf->global->SUPPLIER_PAYMENT_ADDON=='brodator') $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_brodator'; - else if ($conf->global->SUPPLIER_PAYMENT_ADDON=='bronan') $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_bronan'; + elseif ($conf->global->SUPPLIER_PAYMENT_ADDON=='brodator') $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_brodator'; + elseif ($conf->global->SUPPLIER_PAYMENT_ADDON=='bronan') $conf->global->SUPPLIER_PAYMENT_ADDON='mod_supplier_payment_bronan'; if (! empty($conf->global->SUPPLIER_PAYMENT_ADDON)) { diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index d8a1c2fa51c..04835089809 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -101,7 +101,7 @@ if ($id > 0 || ! empty($ref)) $ret = $object->fetch_thirdparty(); if ($ret < 0) dol_print_error($db,$object->error); } -else if (! empty($socid) && $socid > 0) +elseif (! empty($socid) && $socid > 0) { $fourn = new Fournisseur($db); $ret=$fourn->fetch($socid); @@ -170,12 +170,12 @@ if (empty($reshook)) } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $user->rights->fournisseur->commande->creer) { + elseif ($action == 'setmulticurrencycode' && $user->rights->fournisseur->commande->creer) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->commande->creer) { + elseif ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->commande->creer) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); } @@ -211,10 +211,10 @@ if (empty($reshook)) if (in_array($object->statut, array(1, 2, 3, 4, 5, 6, 7, 9))) { if ($object->statut == 1) $newstatus=0; // Validated->Draft - else if ($object->statut == 2) $newstatus=0; // Approved->Draft - else if ($object->statut == 3) $newstatus=2; // Ordered->Approved - else if ($object->statut == 4) $newstatus=3; - else if ($object->statut == 5) + elseif ($object->statut == 2) $newstatus=0; // Approved->Draft + elseif ($object->statut == 3) $newstatus=2; // Ordered->Approved + elseif ($object->statut == 4) $newstatus=3; + elseif ($object->statut == 5) { //$newstatus=2; // Ordered // TODO Can we set it to submited ? @@ -222,9 +222,9 @@ if (empty($reshook)) // TODO If there is at least one reception, we can set to Received->Received partially $newstatus=4; // Received partially } - else if ($object->statut == 6) $newstatus=2; // Canceled->Approved - else if ($object->statut == 7) $newstatus=3; // Canceled->Process running - else if ($object->statut == 9) $newstatus=1; // Refused->Validated + elseif ($object->statut == 6) $newstatus=2; // Canceled->Approved + elseif ($object->statut == 7) $newstatus=3; // Canceled->Process running + elseif ($object->statut == 9) $newstatus=1; // Refused->Validated else $newstatus = 2; //print "old status = ".$object->statut.' new status = '.$newstatus; @@ -458,7 +458,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'errors'); } } - else if (empty($error)) // $price_ht is already set + elseif (empty($error)) // $price_ht is already set { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); @@ -921,7 +921,7 @@ if (empty($reshook)) setEventMessages($langs->trans("DeliveryStateSaved"), null); $action = ''; } - else if($result == -3) + elseif($result == -3) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -1235,9 +1235,9 @@ if (empty($reshook)) //Is sync supplier web services module activated? and everything filled? if (empty($conf->syncsupplierwebservices->enabled)) { setEventMessages($langs->trans("WarningModuleNotActive",$langs->transnoentities("Module2650Name")), null, 'mesgs'); - } else if (empty($ws_url) || empty($ws_key)) { + } elseif (empty($ws_url) || empty($ws_key)) { setEventMessages($langs->trans("ErrorWebServicesFieldsRequired"), null, 'errors'); - } else if (empty($ws_user) || empty($ws_password) || empty($ws_thirdparty)) { + } elseif (empty($ws_user) || empty($ws_password) || empty($ws_thirdparty)) { setEventMessages($langs->trans("ErrorFieldsRequired"),null, 'errors'); } else @@ -1295,7 +1295,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("SOAPError")." '".$soapclient_order->error_str."'", null, 'errors'); } - else if ($result_order["result"]["result_code"] != "OK") //Something went wrong + elseif ($result_order["result"]["result_code"] != "OK") //Something went wrong { setEventMessages($langs->trans("SOAPError")." '".$result_order["result"]["result_code"]."' - '".$result_order["result"]["result_label"]."'", null, 'errors'); } @@ -1336,13 +1336,13 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut' && $object->id > 0) + elseif ($action == 'swapstatut' && $object->id > 0) { $result=$object->swapContactStatus(GETPOST('ligne')); } // Efface un contact - else if ($action == 'deletecontact' && $object->id > 0) + elseif ($action == 'deletecontact' && $object->id > 0) { $result = $object->delete_contact($_GET["lineid"]); @@ -2407,7 +2407,7 @@ elseif (! empty($object->id)) { print ''.$langs->trans("ClassifyBilled").''; } - else if (!empty($object->linkedObjectsIds['invoice_supplier'])) + elseif (!empty($object->linkedObjectsIds['invoice_supplier'])) { if ($user->rights->fournisseur->facture->creer) { @@ -2575,7 +2575,7 @@ elseif (! empty($object->id)) setEventMessages($langs->trans("ErrorWebServicesFieldsRequired"), null, 'errors'); $mode = "init"; $error_occurred = true; //Don't allow to set the user/pass if thirdparty fields are not filled - } else if ($mode != "init" && (empty($ws_user) || empty($ws_password))) { + } elseif ($mode != "init" && (empty($ws_user) || empty($ws_password))) { setEventMessages($langs->trans("ErrorFieldsRequired"), null, 'errors'); $mode = "init"; } @@ -2674,7 +2674,7 @@ elseif (! empty($object->id)) { setEventMessages($langs->trans("SOAPError")." '".$soapclient_order->error_str."'", null, 'errors'); } - else if ($status_code != "OK") //Something went wrong + elseif ($status_code != "OK") //Something went wrong { if ($status_code == "NOT_FOUND") { diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 08e30d04b7f..2ee0890c813 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -81,7 +81,7 @@ if ($action == 'addcontact' && $user->rights->fournisseur->commande->creer) } // Toggle the status of a contact -else if ($action == 'swapstatut' && $user->rights->fournisseur->commande->creer) +elseif ($action == 'swapstatut' && $user->rights->fournisseur->commande->creer) { if ($object->fetch($id)) { @@ -94,7 +94,7 @@ else if ($action == 'swapstatut' && $user->rights->fournisseur->commande->creer) } // Deleting a contact -else if ($action == 'deletecontact' && $user->rights->fournisseur->commande->creer) +elseif ($action == 'deletecontact' && $user->rights->fournisseur->commande->creer) { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 931942debb7..a268619c84f 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -886,7 +886,7 @@ if ($id > 0 || ! empty($ref)) { } } print ''; if(!empty($reception->id)){ print $reception->getLibStatut(5); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 7129821ab56..5c616a70b0e 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -245,7 +245,7 @@ if (empty($reshook)) } // Remove a product line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) { $result = $object->deleteline($lineid); if ($result > 0) @@ -278,7 +278,7 @@ if (empty($reshook)) } // Delete link of credit note to invoice - else if ($action == 'unlinkdiscount' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'unlinkdiscount' && $user->rights->fournisseur->facture->creer) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("discountid")); @@ -336,23 +336,23 @@ if (empty($reshook)) } // payment mode - else if ($action == 'setmode' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'setmode' && $user->rights->fournisseur->facture->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int')); } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $user->rights->fournisseur->facture->creer) { + elseif ($action == 'setmulticurrencycode' && $user->rights->fournisseur->facture->creer) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->facture->creer) { + elseif ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->facture->creer) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx', 'alpha'))); } // bank account - else if ($action == 'setbankaccount' && $user->rights->fournisseur->facture->creer) { + elseif ($action == 'setbankaccount' && $user->rights->fournisseur->facture->creer) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); } @@ -459,7 +459,7 @@ if (empty($reshook)) } } // Convertir en reduc - else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $object->fetch_thirdparty(); @@ -972,7 +972,7 @@ if (empty($reshook)) $error++; } } - else if (! $error) + elseif (! $error) { $id = $object->create($user); if ($id < 0) @@ -1301,7 +1301,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'errors'); } } - else if (empty($error)) // $price_ht is already set + elseif (empty($error)) // $price_ht is already set { $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); $tva_tx = str_replace('*', '', $tva_tx); @@ -1576,7 +1576,7 @@ if (empty($reshook)) } // bascule du statut d'un contact - else if ($action == 'swapstatut') + elseif ($action == 'swapstatut') { if ($object->fetch($id)) { @@ -1589,7 +1589,7 @@ if (empty($reshook)) } // Efface un contact - else if ($action == 'deletecontact') + elseif ($action == 'deletecontact') { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index ffd3cb00d7b..e9ec9bf95e1 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -81,7 +81,7 @@ if ($action == 'addcontact' && $user->rights->fournisseur->facture->creer) } // bascule du statut d'un contact -else if ($action == 'swapstatut' && $user->rights->fournisseur->facture->creer) +elseif ($action == 'swapstatut' && $user->rights->fournisseur->facture->creer) { if ($object->fetch($id)) { @@ -94,7 +94,7 @@ else if ($action == 'swapstatut' && $user->rights->fournisseur->facture->creer) } // Efface un contact -else if ($action == 'deletecontact' && $user->rights->fournisseur->facture->creer) +elseif ($action == 'deletecontact' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $result = $object->delete_contact($_GET["lineid"]); diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 4a1b004fed7..c5194aa7344 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -774,12 +774,12 @@ if (empty($action)) { if ($year > 0 && empty($day)) $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; - else if ($year > 0 && ! empty($day)) + elseif ($year > 0 && ! empty($day)) $sql.= " AND p.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; else $sql.= " AND date_format(p.datep, '%m') = '".$month."'"; } - else if ($year > 0) + elseif ($year > 0) { $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index fd2e5e80772..99ee657f650 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -107,7 +107,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) { setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); } - else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus + elseif (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus { setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); } @@ -529,7 +529,7 @@ else // Is it a directory ? $is_directory=0; if ($file == '..') $is_directory=1; - else if (! $rawlisthasfailed) + elseif (! $rawlisthasfailed) { if (preg_match('/^d/',$vals[0])) $is_directory=1; if (preg_match('/^l/',$vals[0])) $is_link=1; @@ -586,7 +586,7 @@ else if ($file != '..') print ''.img_delete().''; else print ' '; } - else if ($is_link) + elseif ($is_link) { $newfile=$file; $newfile=preg_replace('/ ->.*/','',$newfile); @@ -671,7 +671,7 @@ if ($conn_id) { } - else if (! empty($conf->global->FTP_CONNECT_WITH_SSL)) + elseif (! empty($conf->global->FTP_CONNECT_WITH_SSL)) { ftp_close($conn_id); } @@ -719,7 +719,7 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect dol_syslog('Try to connect with ssh2_ftp'); $tmp_conn_id = ssh2_connect($ftp_server, $ftp_port); } - else if (! empty($conf->global->FTP_CONNECT_WITH_SSL)) + elseif (! empty($conf->global->FTP_CONNECT_WITH_SSL)) { dol_syslog('Try to connect with ftp_ssl_connect'); $conn_id = ftp_ssl_connect($ftp_server, $ftp_port, $connecttimeout); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 0f22e07245b..f6b6586a9ec 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -95,8 +95,8 @@ if ($action == 'create') $type=GETPOST('type'); $halfday=0; if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2; - else if ($starthalfday == 'afternoon') $halfday=-1; - else if ($endhalfday == 'morning') $halfday=1; + elseif ($starthalfday == 'afternoon') $halfday=-1; + elseif ($endhalfday == 'morning') $halfday=1; $valideur = GETPOST('valideur'); $description = trim(GETPOST('description')); @@ -201,8 +201,8 @@ if ($action == 'update') $endhalfday=GETPOST('endhalfday'); $halfday=0; if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2; - else if ($starthalfday == 'afternoon') $halfday=-1; - else if ($endhalfday == 'morning') $halfday=1; + elseif ($starthalfday == 'afternoon') $halfday=-1; + elseif ($endhalfday == 'morning') $halfday=1; // If no right to modify a request if (! $user->rights->holiday->write) diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 77126100068..4343e3a2c50 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -70,7 +70,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") } } -else if ($action == 'add') +elseif ($action == 'add') { if (! $cancel) { @@ -120,7 +120,7 @@ else if ($action == 'add') } // Update record -else if ($action == 'update') +elseif ($action == 'update') { $error = 0; diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 7eb0bce2dde..145992c0902 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -83,7 +83,7 @@ if (versioncompare(versionphparray(),$arrayphpminversionerror) < 0) // Mi print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); $checksok=0; // 0=error, 1=warning } -else if (versioncompare(versionphparray(),$arrayphpminversionwarning) < 0) // Minimum supported (warning if lower) +elseif (versioncompare(versionphparray(),$arrayphpminversionwarning) < 0) // Minimum supported (warning if lower) { print 'Error '.$langs->trans("ErrorPHPVersionTooLow",versiontostring($arrayphpminversionwarning)); $checksok=0; // 0=error, 1=warning diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 54b34b89e8c..eed1cc9a48f 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -225,10 +225,10 @@ if (! defined('SYSLOG_HANDLERS')) define('SYSLOG_HANDLERS','["mod_syslog_file"]' if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined { if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log'); - else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log'); - else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log'); - else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp - else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others + elseif (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log'); + elseif (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log'); + elseif (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp + elseif (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others //print 'SYSLOG_FILE='.SYSLOG_FILE;exit; } if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE'); @@ -331,10 +331,10 @@ function conf($dolibarr_main_document_root) if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined { if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log'); - else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log'); - else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log'); - else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp - else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others + elseif (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log'); + elseif (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log'); + elseif (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp + elseif (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others //print 'SYSLOG_FILE='.SYSLOG_FILE;exit; } if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE=constant('SYSLOG_FILE'); diff --git a/htdocs/install/lib/repair.lib.php b/htdocs/install/lib/repair.lib.php index 43a6d2bce27..eb4a87ee8c2 100644 --- a/htdocs/install/lib/repair.lib.php +++ b/htdocs/install/lib/repair.lib.php @@ -62,13 +62,13 @@ function checkLinkedElements($sourcetype, $targettype) $targettable=$targettype; if ($sourcetype == 'shipping') $sourcetable = 'expedition'; - else if ($targettype == 'shipping') $targettable = 'expedition'; + elseif ($targettype == 'shipping') $targettable = 'expedition'; if ($sourcetype == 'delivery') $sourcetable = 'livraison'; - else if ($targettype == 'delivery') $targettable = 'livraison'; + elseif ($targettype == 'delivery') $targettable = 'livraison'; if ($sourcetype == 'order_supplier') $sourcetable = 'commande_fournisseur'; - else if ($targettype == 'order_supplier') $targettable = 'commande_fournisseur'; + elseif ($targettype == 'order_supplier') $targettable = 'commande_fournisseur'; if ($sourcetype == 'invoice_supplier') $sourcetable = 'facture_fourn'; - else if ($targettype == 'invoice_supplier') $targettable = 'facture_fourn'; + elseif ($targettype == 'invoice_supplier') $targettable = 'facture_fourn'; $out = $langs->trans('SourceType').': '.$sourcetype.' => '.$langs->trans('TargetType').': '.$targettype.' '; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 888daa4abe2..0994fcedd2f 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -617,32 +617,32 @@ if ($ok && GETPOST('clean_orphelin_dir','alpha')) include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object_instance=new Facture($db); } - else if ($modulepart == 'invoice_supplier') + elseif ($modulepart == 'invoice_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $object_instance=new FactureFournisseur($db); } - else if ($modulepart == 'propal') + elseif ($modulepart == 'propal') { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $object_instance=new Propal($db); } - else if ($modulepart == 'order') + elseif ($modulepart == 'order') { include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $object_instance=new Commande($db); } - else if ($modulepart == 'order_supplier') + elseif ($modulepart == 'order_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $object_instance=new CommandeFournisseur($db); } - else if ($modulepart == 'contract') + elseif ($modulepart == 'contract') { include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $object_instance=new Contrat($db); } - else if ($modulepart == 'tax') + elseif ($modulepart == 'tax') { include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; $object_instance=new ChargeSociales($db); @@ -702,7 +702,7 @@ if ($ok && GETPOST('clean_orphelin_dir','alpha')) } print "