From ee3f92a1686868b38eb52bcba518eeea842e3869 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Aug 2014 18:22:01 +0200 Subject: [PATCH 1/4] Fix: When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. --- htdocs/societe/soc.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index b88642cd83d..0e4d7932856 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1069,12 +1069,11 @@ else $res=$object->fetch_optionals($object->id,$extralabels); //if ($res < 0) { dol_print_error($db); exit; } - $head = societe_prepare_head($object); dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); - + // Load object modCodeTiers $module=(! empty($conf->global->SOCIETE_CODECLIENT_ADDON)?$conf->global->SOCIETE_CODECLIENT_ADDON:'mod_codeclient_leopard'); if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') @@ -1110,7 +1109,9 @@ else { $prefixSupplierIsUsed = $modCodeFournisseur->verif_prefixIsUsed(); } - + + $object->oldcopy=dol_clone($object); + if (GETPOST('nom')) { // We overwrite with values if posted @@ -1142,7 +1143,7 @@ else $object->barcode = GETPOST('barcode'); $object->forme_juridique_code = GETPOST('forme_juridique_code'); $object->default_lang = GETPOST('default_lang'); - + $object->tva_assuj = GETPOST('assujtva_value'); $object->tva_intra = GETPOST('tva_intra'); $object->status = GETPOST('status'); @@ -1179,7 +1180,7 @@ else print ''; print ''; if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) print ''; - + print ''; // Name @@ -1247,6 +1248,7 @@ else if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { $tmpcode=$object->code_fournisseur; + if (empty($tmpcode) && ! empty($object->oldcopy->code_fournisseur)) $tmpcode=$object->oldcopy->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); print ''; } From 5027222c339a13bb802685fd4f7c834ea408de7e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Aug 2014 18:28:06 +0200 Subject: [PATCH 2/4] Fix: When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. --- htdocs/societe/soc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 0e4d7932856..3c916fd2b29 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1216,6 +1216,7 @@ else if ((!$object->code_client || $object->code_client == -1) && $modCodeClient->code_auto) { $tmpcode=$object->code_client; + if (empty($tmpcode) && ! empty($object->oldcopy->code_client)) $tmpcode=$object->oldcopy->code_client; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); print ''; } @@ -1248,7 +1249,7 @@ else if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { $tmpcode=$object->code_fournisseur; - if (empty($tmpcode) && ! empty($object->oldcopy->code_fournisseur)) $tmpcode=$object->oldcopy->code_fournisseur; + if (empty($tmpcode) && ! empty($object->oldcopy->code_fournisseur)) $tmpcode=$object->oldcopy->code_fournisseur; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); print ''; } From f33df3419c158cc24541ebb739e7b304a69df539 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Aug 2014 21:18:36 +0200 Subject: [PATCH 3/4] Fix: mb_strtolower function does not exists on all PHP versions. --- htdocs/core/lib/pdf.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index a9eb6c0d6e6..f2add422714 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -838,7 +838,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass } // Show page nb only on iso languages (so default Helvetica font) - if (mb_strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') + if (strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') { $pdf->SetXY(-20,-$posy); //print 'xxx'.$pdf->PageNo().'-'.$pdf->getAliasNbPages().'-'.$pdf->getAliasNumPage();exit; From b182b2ff44e9d5957034ef06067df2f2b978330d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Aug 2014 00:11:42 +0200 Subject: [PATCH 4/4] Update changelog --- ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0f260470db4..58bfffebd2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,15 @@ English Dolibarr ChangeLog Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas. Fix: Fusion PDF button on unpaid invoice is no more displayed Fix: Unpaid invoice launch fusion PDF action even if it is only search (with enter keyboard input instead of lens click) +Fix: Pb when showing log list of holiday module with some mysql versions. +Fix: Error with bad timezone pushed by some browsers. +Fix: shipping list SQL request was not filtering on shipping element +Fix: debian package provided by dolibarr team must use embedded libraries. +Fix: [ bug #1528 ] Leopard Services numeration module description is not translated. +Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas +Fix: [ bug #1534 ] Unknown error when deleting a product photo under special circumstances +Fix: Update impayees.php +Fix: Fix Link product, In list view and label product ***** ChangeLog for 3.5.4 compared to 3.5.3 ***** Fix: Hide title of event when agenda module disabled.