From 7f5377d219271b1e5a2309392df02b01467a45c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 Apr 2015 19:25:20 +0200 Subject: [PATCH 01/10] Fix #2695 --- htdocs/core/modules/cheque/pdf/pdf_blochet.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php index aa61f5eb7aa..9ae3f08a87e 100644 --- a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php @@ -188,7 +188,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $hookmanager->initHooks(array('pdfgeneration')); $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); global $action; - $reshook=$hookmanager->executeHooks('adterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (! empty($conf->global->MAIN_UMASK)) @chmod($_file, octdec($conf->global->MAIN_UMASK)); From 47ecb91a3ef03044d76b37303ce933b97dd27caf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 Apr 2015 21:17:49 +0200 Subject: [PATCH 02/10] Avoid DOS attack when high number of tasks --- htdocs/projet/tasks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index eafe92c5aa4..6d1fb4d8462 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -350,7 +350,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; } -else +else if ($id > 0 || ! empty($ref)) { /* * Fiche projet en mode visu From 93d93210889ae683c505cd91fb65d6e72d468663 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 22 Apr 2015 23:27:09 +0200 Subject: [PATCH 03/10] FIX: can show print page after product save Add product id to form action to be able show print page from product card after save. --- htdocs/product/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index b5f34e20a8d..2525e5c3d7b 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1080,7 +1080,7 @@ else print_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), ""); // Main official, simple, and not duplicated code - print '
'."\n"; + print ''."\n"; print ''; print ''; print ''; From 1ed573f98bcc66b2b299192baa4958e70ad6fd90 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 22 Apr 2015 23:31:24 +0200 Subject: [PATCH 04/10] Fix: #2694 Bug: Warning: Invalid argument supplied for foreach() in commande.class.php on line 852 --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 46d280f8763..d36e71fb6a4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2010-2014 Juanjo Menent + * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2011-2014 Philippe Grand * Copyright (C) 2012-2014 Marcos GarcĂ­a @@ -36,7 +36,7 @@ abstract class CommonObject { public $db; public $error; - public $errors; + public $errors=array(); // Array use for errors public $canvas; // Contains canvas name if it is public $context=array(); // Use to pass context information From c97c5e0cfd4e635bbaeea0db0fae006731486fc3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2015 13:54:49 +0200 Subject: [PATCH 05/10] Fix selection of user was lost --- htdocs/projet/tasks/time.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 9951902ec5b..43f7f9f19ab 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -375,10 +375,13 @@ if ($id > 0 || ! empty($ref)) print ''; print img_object('','user','class="hideonsmartphone"'); $contactsoftask=$object->getListContactId('internal'); - if (count($contactsoftask)>0) { + if (count($contactsoftask)>0) + { $userid=$contactsoftask[0]; - print $form->select_dolusers($userid,'userid',0,'',0,'',$contactsoftask); - }else { + print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid),'userid',0,'',0,'',$contactsoftask); + } + else + { print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); } print ''; From 58008cef94e2a3b1513cb5e588a268423fe3f597 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Thu, 23 Apr 2015 15:54:49 +0200 Subject: [PATCH 06/10] NEW : display linked object in edit mode when we create an event from an order, propal... --- htdocs/comm/action/card.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index c15b1fe4f32..447d2264f41 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -746,6 +746,9 @@ if ($action == 'create') } if(!empty($origin) && !empty($originid)) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + print ''.$langs->trans("LinkedObject").''; + print ''.dolGetElementUrl($originid,$origin,1).''; print ''; print ''; } From d47b9a759ab9d1accdd779bce07023eebebcf382 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2015 00:33:02 +0200 Subject: [PATCH 07/10] FIX migration error --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 0c055fc5aea..6102997c3ad 100755 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -207,8 +207,9 @@ UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type NOT IN (SELE -- fk_user_author ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_user_author (fk_user_author); UPDATE llx_product_price set fk_user_author = null where fk_user_author = 0; +UPDATE llx_product_price set fk_user_author = null where fk_user_author not in (select rowid from llx_user); ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); --- fk_user_author +-- fk_product ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_product (fk_product); DELETE from llx_product_price where fk_product NOT IN (SELECT rowid from llx_product); ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); From 7d3482036d6a15bca758bbe926f5241a67750397 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Fri, 24 Apr 2015 17:40:53 +0200 Subject: [PATCH 08/10] FIX event not linked to contact on creation --- htdocs/comm/action/class/actioncomm.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 6ff654aadd1..999b8e24868 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -280,7 +280,7 @@ class ActionComm extends CommonObject $sql.= (isset($this->socid) && $this->socid > 0?" '".$this->socid."'":"null").","; $sql.= (isset($this->fk_project) && $this->fk_project > 0?" '".$this->fk_project."'":"null").","; $sql.= " '".$this->db->escape($this->note)."',"; - $sql.= (isset($this->contactid) && $this->contactid > 0?"'".$this->contactid."'":"null").","; + $sql.= (isset($this->contact->id) && $this->contact->id > 0?"'".$this->contact->id."'":"null").","; $sql.= (isset($user->id) && $user->id > 0 ? "'".$user->id."'":"null").","; $sql.= ($userownerid>0?"'".$userownerid."'":"null").","; $sql.= ($userdoneid>0?"'".$userdoneid."'":"null").","; From 13b4d860647d56f1fb0f735c459ff67f4ad69746 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2015 21:29:02 +0200 Subject: [PATCH 09/10] Better fix for #2709 --- htdocs/comm/action/class/actioncomm.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 999b8e24868..bda4362bed9 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -210,6 +210,8 @@ class ActionComm extends CommonObject if ($this->elementtype=='commande') $this->elementtype='order'; if ($this->elementtype=='contrat') $this->elementtype='contract'; + if (is_object($this->contact) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated + $userownerid=$this->userownerid; $userdoneid=$this->userdoneid; @@ -274,13 +276,13 @@ class ActionComm extends CommonObject $sql.= "'".$this->db->idate($now)."',"; $sql.= (strval($this->datep)!=''?"'".$this->db->idate($this->datep)."'":"null").","; $sql.= (strval($this->datef)!=''?"'".$this->db->idate($this->datef)."'":"null").","; - $sql.= (isset($this->durationp) && $this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null").","; // deprecated + $sql.= ((isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '')?"'".$this->durationp."'":"null").","; // deprecated $sql.= (isset($this->type_id)?$this->type_id:"null").","; $sql.= (isset($this->type_code)?" '".$this->type_code."'":"null").","; - $sql.= (isset($this->socid) && $this->socid > 0?" '".$this->socid."'":"null").","; - $sql.= (isset($this->fk_project) && $this->fk_project > 0?" '".$this->fk_project."'":"null").","; + $sql.= ((isset($this->socid) && $this->socid > 0)?" '".$this->socid."'":"null").","; + $sql.= ((isset($this->fk_project) && $this->fk_project > 0)?" '".$this->fk_project."'":"null").","; $sql.= " '".$this->db->escape($this->note)."',"; - $sql.= (isset($this->contact->id) && $this->contact->id > 0?"'".$this->contact->id."'":"null").","; + $sql.= ((isset($this->contactid) && $this->contactid > 0)?"'".$this->contactid."'":"null").","; $sql.= (isset($user->id) && $user->id > 0 ? "'".$user->id."'":"null").","; $sql.= ($userownerid>0?"'".$userownerid."'":"null").","; $sql.= ($userdoneid>0?"'".$userdoneid."'":"null").","; From 7b9d9c4d0a13bc21c2a236f74b5daf7374631fba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Apr 2015 16:25:02 +0200 Subject: [PATCH 10/10] Fix lang --- 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 be2e2795a03..a529bdaec94 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -386,7 +386,7 @@ ExtrafieldParamHelpradio=Parameters list have to be like key,value

for e ExtrafieldParamHelpsellist=Parameters list comes from a table
Syntax : table_name:label_field:id_field::filter
Example : c_typent:libelle:id::filter

filter can be a simple test (eg active=1) to display only active value
if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

In order to have the list depending on another :
c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' -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 (vat 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=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) SMS=SMS LinkToTestClickToDial=Enter a phone number to call to show a link to test the ClickToDial url for user %s RefreshPhoneLink=Refresh link