From 59220c05e4070efc304a03bde1d61277eab66b49 Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Thu, 5 Jul 2018 11:18:28 +0200 Subject: [PATCH 01/14] FIX : Select first mail model by default --- htdocs/core/class/html.formmail.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 2fd38d097c0..0e2f9176492 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -299,7 +299,7 @@ class FormMail extends Form { $model_id=$this->param["models_id"]; } - $arraydefaultmessage=$this->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, ($model_id ? $model_id : -1)); // we set -1 if model_id empty + $arraydefaultmessage=$this->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id); // If $model_id is empty, preselect the first one } //var_dump($this->param["models"]); //var_dump($model_id); From c13cc5d697cdc6d44033092555292d4b6131ae21 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Wed, 28 Nov 2018 15:46:27 +0100 Subject: [PATCH 02/14] FIX: form actions: select_type_actions could be too small + bad init --- htdocs/core/class/html.formactions.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index bd22470d952..9f4b9e0da89 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -321,7 +321,7 @@ class FormActions { global $langs,$user,$form,$conf; - if (! is_object($form)) $form=new Form($db); + if (! is_object($form)) $form=new Form($this->db); require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; @@ -346,7 +346,7 @@ class FormActions } else { - $out.=$form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', '', 1); + $out.=$form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200', 1); } if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) From 5dcb3d2a1fe103515c7ad7ccc5ef045a653b0199 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 30 Nov 2018 19:23:05 +0100 Subject: [PATCH 03/14] Fix extrafields in import tool --- htdocs/core/modules/modAdherent.class.php | 2 +- htdocs/core/modules/modProduct.class.php | 2 +- htdocs/core/modules/modProjet.class.php | 2 +- htdocs/core/modules/modResource.class.php | 2 +- htdocs/core/modules/modService.class.php | 2 +- htdocs/core/modules/modSociete.class.php | 4 ++-- htdocs/core/modules/modUser.class.php | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 5a529520bb2..bc01990d659 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -310,7 +310,7 @@ class modAdherent extends DolibarrModules $this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id $this->import_fields_array[$r]=array('a.civility'=>"UserTitle",'a.lastname'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.state_id'=>'StateId','a.country'=>"CountryId",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note_public'=>"NotePublic",'a.note_private'=>"NotePrivate",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'); // Add extra fields - $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity = ".$conf->entity; + $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity IN (0,".$conf->entity.")"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 5cd66208ec9..dad0fa693fc 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -271,7 +271,7 @@ class modProduct extends DolibarrModules if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit'; // Add extra fields $import_extrafield_sample=array(); - $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0, ".$conf->entity.')'; + $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0, ".$conf->entity.")"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index edf5a1ab050..dcfef83f8e3 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -278,7 +278,7 @@ class modProjet extends DolibarrModules $this->import_tables_array[$r]=array('t'=>MAIN_DB_PREFIX.'projet_task','extra'=>MAIN_DB_PREFIX.'projet_task_extrafields'); // List of tables to insert into (insert done in same order) $this->import_fields_array[$r]=array('t.fk_projet'=>'ProjectRef*','t.ref'=>'RefTask*','t.label'=>'LabelTask*','t.dateo'=>"DateStart",'t.datee'=>"DateEnd",'t.planned_workload'=>"PlannedWorkload",'t.progress'=>"Progress",'t.note_private'=>"NotePrivate",'t.note_public'=>"NotePublic",'t.datec'=>"DateCreation"); // Add extra fields - $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet_task' AND entity = ".$conf->entity; + $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet_task' AND entity IN (0,".$conf->entity.")"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php index 5c41344f320..aa3e2341758 100644 --- a/htdocs/core/modules/modResource.class.php +++ b/htdocs/core/modules/modResource.class.php @@ -287,7 +287,7 @@ class modResource extends DolibarrModules $this->import_tables_array[$r]=array('r'=>MAIN_DB_PREFIX.'resource','extra'=>MAIN_DB_PREFIX.'resource_extrafields'); // List of tables to insert into (insert done in same order) $this->import_fields_array[$r]=array('r.ref'=>"ResourceFormLabel_ref*",'r.fk_code_type_resource'=>'ResourceTypeCode','r.description'=>'ResourceFormLabel_description','r.note_private'=>"NotePrivate",'r.note_public'=>"NotePublic",'r.asset_number'=>'AssetNumber','r.datec'=>'DateCreation'); // Add extra fields - $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'resource' AND entity = ".$conf->entity; + $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'resource' AND entity IN (0,".$conf->entity.")"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 7302ebc673b..8b58bdae8c3 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -243,7 +243,7 @@ class modService extends DolibarrModules if (! empty($conf->barcode->enabled)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.barcode'=>'BarCode')); if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit'; // Add extra fields - $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity = ".$conf->entity; + $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0,".$conf->entity.")"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 2aef12c6a1d..517a24addf6 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -347,7 +347,7 @@ class modSociete extends DolibarrModules $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.name_alias'=>"Alias",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields - $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity; + $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0,".$conf->entity.")"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { @@ -385,7 +385,7 @@ class modSociete extends DolibarrModules $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople','extra'=>MAIN_DB_PREFIX.'socpeople_extrafields'); // List of tables to insert into (insert done in same order) $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName','s.civility'=>'UserTitle','s.lastname'=>"Lastname*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation"); // Add extra fields - $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity = ".$conf->entity; + $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity IN (0,".$conf->entity.")"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 95474ac8921..913004e478b 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -244,7 +244,7 @@ class modUser extends DolibarrModules $this->import_tables_array[$r]=array('u'=>MAIN_DB_PREFIX.'user','extra'=>MAIN_DB_PREFIX.'user_extrafields'); // List of tables to insert into (insert done in same order) $this->import_fields_array[$r]=array('u.lastname'=>"Name*",'u.firstname'=>"Firstname",'u.employee'=>"Employee*",'u.job'=>"Job",'u.gender'=>"Gender",'u.login'=>"Login*",'u.pass_crypted'=>"Password",'u.admin'=>"Administrator",'u.fk_soc'=>"Company*",'u.address'=>"Address",'u.zip'=>"Zip",'u.town'=>"Town",'u.fk_state'=>"StateId",'u.fk_country'=>"CountryCode",'u.office_phone'=>"Phone",'u.user_mobile'=>"Mobile",'u.office_fax'=>"Fax",'u.email'=>"Email",'u.note'=>"Note",'u.signature'=>'Signature','u.fk_user'=>'Supervisor','u.thm'=>'THM','u.tjm'=>'TJM','u.dateemployment'=>'DateEmployment','u.salary'=>'Salary','u.color'=>'Color','u.api_key'=>'ApiKey','u.datec'=>"DateCreation"); // Add extra fields - $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'user' AND entity = ".$conf->entity; + $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'user' AND entity IN (0,".$conf->entity.")"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { From 758546148624ddca7ba8e3d294bc4e1122f752d2 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 30 Nov 2018 22:16:17 +0100 Subject: [PATCH 04/14] Fix #9070 --- htdocs/install/step1.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index a8eed4e26e4..49d8b5393c0 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -491,7 +491,6 @@ if (! $error && $db->connected && $action == "set") 'thirdparties' => 'thirdparty', 'usergroups' => 'usergroups', 'users' => 'user', - 'usergroups' => 'usergroups', ); foreach($docs as $cursordir => $cursorfile) { From e8a02a971d4a33b4fa0d8c7a694c175834c8c6ad Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 30 Nov 2018 23:05:12 +0100 Subject: [PATCH 05/14] Fix #9074 --- htdocs/fourn/class/paiementfourn.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index ea979cd607d..a3dcfa5fdf5 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -601,6 +601,7 @@ class PaiementFourn extends Paiement $this->ref = 'SPECIMEN'; $this->specimen=1; $this->facid = 1; + $this->socid = 1; $this->datepaye = $nownotime; } From 335327827d8001278a32bf441fed7ac9c46b14cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 1 Dec 2018 00:34:17 +0100 Subject: [PATCH 06/14] Update 6.0.0-7.0.0.sql --- htdocs/install/mysql/migration/6.0.0-7.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index b8b1b15051c..9b5243b181b 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -719,3 +719,5 @@ UPDATE llx_cronjob set entity = 0 where entity = 1 and label in ('PurgeDeleteTem -- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode MODIFY COLUMN tracking varchar(255) NULL; -- VPGSQL8.2 ALTER TABLE llx_c_shipment_mode ALTER COLUMN tracking DROP NOT NULL; + +ALTER TABLE llx_paiementfourn ADD COLUMN fk_user_modif integer AFTER fk_user_author; From 2b5bf0e2dd86da02064bb9780b9e47b537415e9d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 1 Dec 2018 01:07:15 +0100 Subject: [PATCH 07/14] Fix pdf strato for contract with multipage --- .../contract/doc/pdf_strato.modules.php | 76 ++++++++++++++----- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 2cea64a72a6..da247094e9b 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -313,10 +313,43 @@ class pdf_strato extends ModelePDFContract $txt.=$outputlangs->transnoentities("DateStartRealShort")." : ".$daters.''; if ($objectligne->date_cloture) $txt.=" - ".$outputlangs->transnoentities("DateEndRealShort")." : ''".$datere.''; + $pdf->startTransaction(); $pdf->writeHTMLCell(0, 0, $curX, $curY, dol_concatdesc($txtpredefinedservice, dol_concatdesc($txt, $desc)), 0, 1, 0); + $pageposafter=$pdf->getPage(); + if ($pageposafter > $pageposbefore) // There is a pagebreak + { + $pdf->rollbackTransaction(true); + $pageposafter=$pageposbefore; + //print $pageposafter.'-'.$pageposbefore;exit; + $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. + $pdf->writeHTMLCell(0, 0, $curX, $curY, dol_concatdesc($txtpredefinedservice, dol_concatdesc($txt, $desc)), 0, 1, 0); + $pageposafter=$pdf->getPage(); + $posyafter=$pdf->GetY(); + + if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text + { + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page + { + $pdf->AddPage('','',true); + if (! empty($tplidx)) $pdf->useTemplate($tplidx); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + $pdf->setPage($pageposafter+1); + } + } + else + { + // We found a page break + $showpricebeforepagebreak=0; + } + } + else // No pagebreak + { + $pdf->commitTransaction(); + } $nexY = $pdf->GetY() + 2; $pageposafter=$pdf->getPage(); + $pdf->setPage($pageposbefore); $pdf->setTopMargin($this->marge_haute); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. @@ -334,26 +367,27 @@ class pdf_strato extends ModelePDFContract $pdf->setPage($pagenb); if ($pagenb == 1) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); + $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext, 0, $outputlangs, 0, 1); } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter - $heightforfreetext, 0, $outputlangs, 1, 1); } $this->_pagefoot($pdf,$object,$outputlangs,1); $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. } + if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak) { if ($pagenb == 1) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); + $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext, 0, $outputlangs, 0, 1); } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter - $heightforfreetext, 0, $outputlangs, 1, 1); } $this->_pagefoot($pdf,$object,$outputlangs,1); // New page @@ -368,14 +402,16 @@ class pdf_strato extends ModelePDFContract if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); + $this->_tab_signature($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs); $bottomlasttab=$this->page_hauteur - $heightforfooter - $heightforfooter + 1; } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0); + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); + $this->_tab_signature($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs); $bottomlasttab=$this->page_hauteur - $heightforfooter - $heightforfooter + 1; } - + $this->_pagefoot($pdf,$object,$outputlangs); if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages(); @@ -462,25 +498,25 @@ class pdf_strato extends ModelePDFContract */ // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+3, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+3); // Rect prend une longueur en 3eme param et 4eme param + } - if (empty($hidebottom)) - { - $posmiddle = $this->marge_gauche + round(($this->page_largeur - $this->marge_gauche - $this->marge_droite)/2); - $posy = $tab_top + $tab_height + 3 + 3; + function _tab_signature(&$pdf, $tab_top, $tab_height, $outputlangs) { + $pdf->SetDrawColor(128,128,128); + $posmiddle = $this->marge_gauche + round(($this->page_largeur - $this->marge_gauche - $this->marge_droite)/2); + $posy = $tab_top + $tab_height + 3 + 3; - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name),0,'L',0); + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name),0,'L',0); - $pdf->SetXY($this->marge_gauche, $posy + 5); - $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 20, '', 1); + $pdf->SetXY($this->marge_gauche, $posy + 5); + $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 20, '', 1); - $pdf->SetXY($posmiddle + 5, $posy); - $pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name),0,'L',0); + $pdf->SetXY($posmiddle + 5, $posy); + $pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name),0,'L',0); - $pdf->SetXY($posmiddle + 5, $posy + 5); - $pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 20, '', 1); - } + $pdf->SetXY($posmiddle + 5, $posy + 5); + $pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 20, '', 1); } /** From 8964ec7ea179d2f9f5a109529220b26efac10b07 Mon Sep 17 00:00:00 2001 From: Inovea Conseil Date: Sat, 1 Dec 2018 15:58:37 +0100 Subject: [PATCH 08/14] Fix #9572 Fix #9572 --- htdocs/product/price.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index fc5c20c3d1a..faaef53691b 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -11,6 +11,7 @@ * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2018 Nicolas ZABOURI * * 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 @@ -1451,8 +1452,8 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_ // Log of previous customer prices $backbutton='' . $langs->trans("Back") . ''; - if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, $num, $num, 'title_accountancy.png'); - else print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', $num, $num, 'title_accountancy.png'); + //if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, $num, $num, 'title_accountancy.png'); + //else print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', $num, $num, 'title_accountancy.png'); //if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"),'','','','','',$backbutton, 0, 0, 'title_accountancy.png'); //else print_barre_liste($langs->trans("PriceByCustomerLog"),'','','','','','', 0, 0, 'title_accountancy.png'); From 0ba5fda3daa0ed480acc9b8ed26a9a6ac83ca48d Mon Sep 17 00:00:00 2001 From: Inovea Conseil Date: Sat, 1 Dec 2018 16:11:49 +0100 Subject: [PATCH 09/14] Update price.php --- htdocs/product/price.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index faaef53691b..259f7d24c0a 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1452,8 +1452,8 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_ // Log of previous customer prices $backbutton='' . $langs->trans("Back") . ''; - //if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, $num, $num, 'title_accountancy.png'); - //else print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', $num, $num, 'title_accountancy.png'); + if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, 0, $num, 'title_accountancy.png'); + else print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, $num, 'title_accountancy.png'); //if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"),'','','','','',$backbutton, 0, 0, 'title_accountancy.png'); //else print_barre_liste($langs->trans("PriceByCustomerLog"),'','','','','','', 0, 0, 'title_accountancy.png'); From 18281d9d439e5037ff7ebd7f39566cff147d21bd Mon Sep 17 00:00:00 2001 From: Inovea Conseil Date: Sat, 1 Dec 2018 16:48:50 +0100 Subject: [PATCH 10/14] FIX #6580 FIX #6580 --- htdocs/core/class/html.form.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3eb96cf7e6f..bc9aa55f6f6 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -16,6 +16,7 @@ * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2014 Alexandre Spangaro + * Copyright (C) 2018 Nicolas ZABOURI * * 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 @@ -3791,7 +3792,7 @@ class Form if ($("#" + inputname).attr("type") == "radio") { more = ":checked"; } var inputvalue = $("#" + inputname + more).val(); if (typeof inputvalue == "undefined") { inputvalue=""; } - options += "&" + inputname + "=" + inputvalue; + options += "&" + inputname + "=" + encodeURIComponent(inputvalue); }); } var urljump = pageyes + (pageyes.indexOf("?") < 0 ? "?" : "") + options; From 474228cbd63ed378f98b10e4174fcc2ec14e8f6c Mon Sep 17 00:00:00 2001 From: ATM John BOTELLA Date: Sat, 1 Dec 2018 17:01:11 +0100 Subject: [PATCH 11/14] FIX #8741 --- htdocs/contact/list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index c63467390b4..3e7fb384011 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -302,6 +302,8 @@ if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax); if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype); if (strlen($search_email)) $sql.= natural_search('p.email', $search_email); if (strlen($search_zip)) $sql.= natural_search("p.zip",$search_zip); +if (strlen($search_town)) $sql.= natural_search("p.town",$search_town); + if ($search_status != '' && $search_status >= 0) $sql.= " AND p.statut = ".$db->escape($search_status); if ($search_import_key) $sql.= natural_search("p.import_key",$search_import_key); if ($type == "o") // filtre sur type From 13806124b2946cbb4aca827afd01731aefc86f60 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 1 Dec 2018 17:11:04 +0100 Subject: [PATCH 12/14] Fix add missing fk_department and fk_pays in contact/bank imports --- htdocs/core/modules/modSociete.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 517a24addf6..a77d131ab7e 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -383,7 +383,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='contact'; $this->import_entities_array[$r]=array('s.fk_soc'=>'company'); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople','extra'=>MAIN_DB_PREFIX.'socpeople_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName','s.civility'=>'UserTitle','s.lastname'=>"Lastname*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName','s.civility'=>'UserTitle','s.lastname'=>"Lastname*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity IN (0,".$conf->entity.")"; $resql=$this->db->query($sql); @@ -401,7 +401,7 @@ class modSociete extends DolibarrModules $this->import_convertvalue_array[$r]=array( 's.fk_soc'=>array('rule'=>'fetchidfromref','file'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'), 's.fk_departement'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cstate.class.php','class'=>'Cstate','method'=>'fetch','dict'=>'DictionaryState'), - 's.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry'), + 's.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry'), ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r]=array('s.birthday'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$'); @@ -416,11 +416,14 @@ class modSociete extends DolibarrModules $this->import_tables_array[$r]=array('sr'=>MAIN_DB_PREFIX.'societe_rib'); $this->import_fields_array[$r]=array('sr.fk_soc'=>"ThirdPartyName*",'sr.bank'=>"Bank", 'sr.code_banque'=>"BankCode",'sr.code_guichet'=>"DeskCode",'sr.number'=>"BankAccountNumber*", - 'sr.cle_rib'=>"BankAccountNumberKey",'sr.bic'=>"BIC",'sr.iban_prefix'=>"IBAN", 'sr.domiciliation'=>"BankAccountDomiciliation",'sr.proprio' => "BankAccountOwner", 'sr.owner_address' => "BankAccountOwnerAddress", 'sr.default_rib' => 'Default' + 'sr.cle_rib'=>"BankAccountNumberKey",'sr.bic'=>"BIC",'sr.iban_prefix'=>"IBAN", 'sr.domiciliation'=>"BankAccountDomiciliation",'sr.proprio' => "BankAccountOwner", 'sr.owner_address' => "BankAccountOwnerAddress", 'sr.default_rib' => 'Default', + 'sr.fk_departement'=>"StateId",'sr.fk_pays'=>"CountryCode" ); $this->import_convertvalue_array[$r]=array( - 'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty') + 'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'), + 'sr.fk_departement'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cstate.class.php','class'=>'Cstate','method'=>'fetch','dict'=>'DictionaryState'), + 'sr.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry'), ); $this->import_examplevalues_array[$r]=array('sr.fk_soc'=>"MyBigCompany",'sr.bank'=>"ING", 'sr.code_banque'=>"0000", 'sr.code_guichet'=>"1111",'sr.number'=>"3333333333", From 5e2f3a53c9ab309d35f4a3179c30be7ef5abc374 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 1 Dec 2018 19:39:00 +0100 Subject: [PATCH 13/14] Fix expense report in ecm auto dir --- htdocs/core/ajax/ajaxdirpreview.php | 4 +++- htdocs/core/class/html.formfile.class.php | 8 +++++++- htdocs/ecm/index_auto.php | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 4d72b576429..04c16c75fe0 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -172,7 +172,7 @@ if ($type == 'directory') $sorting = (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC); // Right area. If module is defined here, we are in automatic ecm. - $automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'supplier_proposal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project', 'fichinter', 'user', 'expensereport'); + $automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'supplier_proposal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project', 'fichinter', 'user', 'expensereport', 'holiday'); // TODO change for multicompany sharing // Auto area for suppliers invoices @@ -203,6 +203,8 @@ if ($type == 'directory') else if ($module == 'user') $upload_dir = $conf->user->dir_output; // Auto area for expense report else if ($module == 'expensereport') $upload_dir = $conf->expensereport->dir_output; + // Auto area for holiday + else if ($module == 'holiday') $upload_dir = $conf->holiday->dir_output; // Automatic list if (in_array($module, $automodules)) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9219d242151..09e70d4201a 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1392,6 +1392,11 @@ class FormFile include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; $object_instance=new ExpenseReport($this->db); } + else if ($modulepart == 'holiday') + { + include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; + $object_instance=new Holiday($this->db); + } foreach($filearray as $key => $file) { @@ -1421,7 +1426,8 @@ class FormFile if ($modulepart == 'project') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');} if ($modulepart == 'fichinter') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');} if ($modulepart == 'user') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:'');} - if ($modulepart == 'expensereport') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:'');} + if ($modulepart == 'expensereport') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');} + if ($modulepart == 'holiday') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:'');} if (! $id && ! $ref) continue; $found=0; diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 19c607b1612..3ff4ce64887 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -331,6 +331,7 @@ if (! empty($conf->global->ECM_AUTO_TREE_ENABLED)) if (! empty($conf->projet->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsByProjects")); } if (! empty($conf->ficheinter->enabled)) { $langs->load("interventions"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsByInterventions")); } if (! empty($conf->expensereport->enabled)) { $langs->load("trips"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'expensereport', 'test'=>$conf->expensereport->enabled, 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsByExpenseReports")); } + if (! empty($conf->holiday->enabled)) { $langs->load("holiday"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'holiday', 'test'=>$conf->holiday->enabled, 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsByHolidays")); } $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'user', 'test'=>1, 'label'=>$langs->trans("Users"), 'desc'=>$langs->trans("ECMDocsByUsers")); } From 8ec2bac36a06421971bffb7baa45aa6ec082fdd0 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 2 Dec 2018 10:02:05 +0100 Subject: [PATCH 14/14] FIX #3234 --- htdocs/admin/barcode.php | 64 ++++++++++++++------ htdocs/core/class/html.formbarcode.class.php | 26 +++++--- 2 files changed, 64 insertions(+), 26 deletions(-) diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 313a852e384..75c82157ddf 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -70,18 +70,8 @@ else if ($action == 'update') $res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity); $coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha'); $res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity); -} -else if ($action == 'updateengine') -{ - // TODO Update engines. - -} - -if ($action && $action != 'setcoder' && $action != 'setModuleOptions') -{ - if (! $res > 0) $error++; - - if (! $error) + + if ($res > 0) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } @@ -90,6 +80,42 @@ if ($action && $action != 'setcoder' && $action != 'setModuleOptions') setEventMessages($langs->trans("Error"), null, 'errors'); } } +else if ($action == 'updateengine') +{ + $sql = "SELECT rowid, coder"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type"; + $sql.= " WHERE entity = ".$conf->entity; + $sql.= " ORDER BY code"; + + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + if (GETPOST('coder'.$obj->rowid, 'alpha')) + { + $coder = GETPOST('coder'.$obj->rowid,'alpha'); + $code_id = $obj->rowid; + + $sqlp = "UPDATE ".MAIN_DB_PREFIX."c_barcode_type"; + $sqlp.= " SET coder = '" . $coder."'"; + $sqlp.= " WHERE rowid = ". $code_id; + $sqlp.= " AND entity = ".$conf->entity; + + $upsql=$db->query($sqlp); + if (! $upsql) dol_print_error($db); + } + + $i++; + } + } + +} /* * View @@ -162,9 +188,12 @@ $var=true; print '
'; print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'',''); -//print "
"; -//print ''; -//print ""; +if (empty($conf->use_javascript_ajax)) +{ + print ''; + print ''; + print ''; +} print ''; print ''; @@ -260,10 +289,9 @@ print "
\n"; if (empty($conf->use_javascript_ajax)) { - // TODO Implement code behind action updateengine - //print '
'; + print '
'; + print '
'; } -//print ''; print "
"; diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index e1ee7ae04ff..d155c8a1a0c 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -59,7 +59,7 @@ class FormBarCode $disable = ''; - if ($conf->use_javascript_ajax) + if (!empty($conf->use_javascript_ajax)) { print "\n".'