From 1624894346b33a52329840c17bed3b69eac2c518 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Jul 2016 19:35:45 +0200 Subject: [PATCH 01/18] Fix missing load --- htdocs/core/modules/expedition/doc/pdf_merou.modules.php | 3 ++- htdocs/core/modules/expedition/doc/pdf_rouget.modules.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 7d9b4428438..b02e8fbf614 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -100,7 +100,8 @@ class pdf_merou extends ModelePdfExpedition $outputlangs->load("propal"); $outputlangs->load("deliveries"); $outputlangs->load("sendings"); - + $outputlangs->load("productbatch"); + if ($conf->expedition->dir_output) { $object->fetch_thirdparty(); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 73f7ee1b4a9..dbc6ad67084 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -102,7 +102,8 @@ class pdf_rouget extends ModelePdfExpedition $outputlangs->load("propal"); $outputlangs->load("deliveries"); $outputlangs->load("sendings"); - + $outputlangs->load("productbatch"); + if ($conf->expedition->dir_output) { // Definition de $dir et $file From c0d8bce2df670beae7ff1a2553a7e77a11a68b5a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Jul 2016 19:44:25 +0200 Subject: [PATCH 02/18] Prepare 3.8.5 --- ChangeLog | 60 +++++++++++++++++++++++++++++++++++++++++ htdocs/filefunc.inc.php | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f551e341f1d..9f0dd4d3b51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,66 @@ You may also experience troubles with Mysql 5.5.41 with error "Lost connection" Upgrading to any other version or any other database system is abolutely required BEFORE trying make a Dolibarr upgrade. +***** ChangeLog for 3.8.5 compared to 3.8.4 ***** +FIX: #3815 Call to undefined function local_by_date(). +FIX: #4424 Missing email of user popup in supplier orders area +FIX: #4442 Missing translation in Banks menu +FIX: #4448 $filebonprev is not used, $this->filename now +FIX: #4455 +FIX: #4737 Bank transacion type selector translation is cropped +FIX: #4742 Able to delete a supplier invoice with a registered payment +FIX: #4743 UI glitch in project summary page +FIX: #4747 Missing UI background when registering a supplier invoice payment +FIX: #4748 Supplier invoice payment confirmation amount is not translated +FIX: #4749 +FIX: #4756 +FIX: #4766 VAT not shown in supplier invoice popup +FIX: #4809 - Duplicate functions with different content +FIX: #4851 Project selector in supplier invoices shows the project label twice +FIX: #4870 +FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists +FIX: #5048 Product supplier list display only one produc +FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option +FIX: #5203 +FIX: #5207 +FIX: #5338 use of not initialized var $aphour, $apmin, etc +FIX: #5380 +FIX: #5383 bad object id on don delete +FIX: #5474 Country_id of "Don" object is still empty +FIX: Accountancy - 3.8 - Chart of accounts are limited on only one country +FIX: Bad include and param for project numbering module call +FIX: Box disabled because bugged +FIX: bug on email template +FIX: Can correct stock of lot using eatby or sell by date +FIX: Can make a movement on "out of sell" products +FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries +FIX: can't fetch by siret or siren because of first "if" +FIX: Check stock of product by warehouse if $entrepot_id defined on shippings +FIX: correct display of minimum buying price +FIX: Creation of thumb image for size "small" was not done. +FIX: Direction of movement lost if an error occurs +FIX: dont retrieve new buying price on margin display +FIX: Duplicate records into export +FIX: Email templates not compatible with Multicompany +FIX: end of select when no fournprice +FIX: finished parameters not used +FIX: hook on group card called but not initialized +FIX: It doesn't check if there is enough stock to update the lines of orders/invoices +FIX: large expense note +FIX: missing column when module was installed before standard integration +FIX: Missing database escaping on supplier price insert/update +FIX: Not filtering correctly when come from dashboard +FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH +FIX: real min buying price +FIX: receiving link never works +FIX: same page added several times on mergepropal option +FIX: search on date into supplier invoice list dont work because of status -1 +FIX: Search supplier ref on contract +FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty +FIX: systematic rounding causes prices to be updated without reason +FIX: task ODT company object not correctly retrieved +FIX: Template email must take care of positino column +FIX: VAT rate can be negative. Example spain selling to morroco. ***** ChangeLog for 3.8.4 compared to 3.8.3 ***** FIX: #3694 diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 7bf8271606d..35494b81e0f 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -30,7 +30,7 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.4'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.5'); if (! defined('EURO')) define('EURO',chr(128)); // Define syslog constants From 3029fd0fe134887e38d28e970d8a8de614f5be7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 25 Jul 2016 13:18:41 +0200 Subject: [PATCH 03/18] FIX #5540 getFormMail is not registered as addReplace hook --- htdocs/core/class/hookmanager.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index e2de6e61c86..3f3fbb4f409 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -167,7 +167,8 @@ class HookManager 'printObjectLine', 'printObjectSubLine', 'createDictionaryFieldList', - 'editDictionaryFieldlist' + 'editDictionaryFieldlist', + 'getFormMail' ) )) $hooktype='addreplace'; // Deprecated hook types ('returnvalue') From d8f77abf31dd56f8d3f7a071115466bafd8aad5a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 25 Jul 2016 14:36:20 +0200 Subject: [PATCH 04/18] Fix: missing sourcetype can create fault positive --- htdocs/compta/facture.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e805d1ecac9..d19f3a7925b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -405,7 +405,7 @@ if (empty($reshook)) } } } - + $qualified_for_stock_change = 0; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); @@ -2389,7 +2389,7 @@ if ($action == 'create') print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1); //We check if Origin document has already an invoice attached to it - $objectsrc->fetchObjectLinked($originid,'','','facture'); + $objectsrc->fetchObjectLinked($originid,$origin,'','facture'); $cntinvoice=count($objectsrc->linkedObjects['facture']); if ($cntinvoice>=1) { From fc1c38420cb79adecc529bd191d97bcf8c9e210c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 25 Jul 2016 19:47:07 +0200 Subject: [PATCH 05/18] Revert "Fix Performance improvement with many extrafields" This reverts commit ae18178d5641abf01f10ae80334143e8dfdd920a. --- htdocs/societe/list.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 7c44d8a9e29..e9b98ad7164 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -5,7 +5,6 @@ * Copyright (C) 2012 Marcos García * Copyright (C) 2013-2015 Raphaël Doursenaud * Copyright (C) 2015 Florian Henry - * Copyright (C) 2016 Juanjo Menent * * 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 @@ -353,17 +352,16 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields as ef on (s.rowid = ef.fk_object)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays) "; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent) "; $sql.= " ,".MAIN_DB_PREFIX."c_stcomm as st"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " , ".MAIN_DB_PREFIX."societe_extrafields as ef "; // We'll need this table joined to the select in order to filter by sale if ($search_sale || (!$user->rights->societe->client->voir && !$socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We'll need this table joined to the select in order to filter by categ if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_".($type=='f'?"fournisseur":"societe")." as cs"; $sql.= " WHERE s.fk_stcomm = st.id"; $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " AND s.rowid = ef.fk_object"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND s.rowid = ".$socid; if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale From 0e79cae9d4dae156148e81d9ea5b7c9f7cc18eef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2016 18:49:34 +0200 Subject: [PATCH 06/18] FIX #5534 --- htdocs/core/js/lib_head.js.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index 4d02acc9925..0baea91412f 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1012,6 +1012,9 @@ function getParameterByName(name, valueifnotfound) } })(); +// Another solution, easier, to build a javascript rounding function +function dolroundjs(number, decimals) { return +(Math.round(number + "e+" + decimals) + "e-" + decimals); } + /** * Function similar to PHP price2num() @@ -1024,7 +1027,7 @@ function price2numjs(amount) { if (amount == '') return ''; transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") { $dec = $langs->transnoentitiesnoconv("SeparatorDecimal"); @@ -1032,6 +1035,7 @@ function price2numjs(amount) { if ($langs->transnoentitiesnoconv("SeparatorThousand") != "SeparatorThousand") { $thousand = $langs->transnoentitiesnoconv("SeparatorThousand"); } + if ($thousand == 'Space') $thousand=' '; print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript ?> @@ -1050,11 +1054,15 @@ function price2numjs(amount) { if (nbdec > rounding) rounding = nbdec; // If rounding higher than max shown if (rounding > main_max_dec_shown) rounding = main_max_dec_shown; - if (thousand != ',' && thousand != '.') amount = amount.replace(',', '.'); amount = amount.replace(' ', ''); // To avoid spaces amount = amount.replace(thousand, ''); // Replace of thousand before replace of dec to avoid pb if thousand is . amount = amount.replace(dec, '.'); - - return Math.round10(amount, rounding); + //console.log("amount before="+amount+" rouding="+rounding) + var res = Math.round10(amount, - rounding); + // Other solution is + // var res = dolroundjs(amount, rounding) + console.log("res="+res) + return res; } + From b47e6e452072244f1973904e49cdebaba84bbc1e Mon Sep 17 00:00:00 2001 From: Sergio Sanchis Climent Date: Thu, 28 Jul 2016 15:58:45 +0200 Subject: [PATCH 07/18] FIX #5544 Disabled Contact still appear in lists to send emails --- htdocs/societe/class/societe.class.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index e9b77836d3c..9f48f7c0541 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1936,12 +1936,24 @@ class Societe extends CommonObject { global $langs; - $contact_emails = $this->contact_property_array('email'); + $contact_emails = $this->contact_property_array('email',1); if ($this->email && $addthirdparty) { - if (empty($this->name)) $this->name=$this->nom; - // TODO: Tester si email non deja present dans tableau contact - $contact_emails['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">"; + $exist = 0; + foreach($contact_emails as $contacts){ + if($exist ===0){ + $contacts = str_replace('>','',$contacts); + $contacts = explode ('<',$contacts); + if($contacts[1]===$this->email){ + $exist = 1; + } + } + } + if($exist ===0){ + if (empty($this->name)) $this->name=$this->nom; + $contact_emails['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">"; + } + } return $contact_emails; } From c13c15188b7cfe96270762256921ef82453403c6 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 28 Jul 2016 16:44:08 +0200 Subject: [PATCH 08/18] FIX: incoterms do not output into crabe invoice PDF --- .../core/modules/facture/doc/pdf_crabe.modules.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index a2fa413b9e8..cc7fda3b06c 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -167,7 +167,7 @@ class pdf_crabe extends ModelePDFFactures function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) { global $user,$langs,$conf,$mysoc,$db,$hookmanager; - + if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; @@ -252,7 +252,7 @@ class pdf_crabe extends ModelePDFFactures // Set nblignes with the new facture lines content after hook $nblignes = count($object->lines); - + // Create pdf instance $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -337,6 +337,10 @@ class pdf_crabe extends ModelePDFFactures $height_incoterms = 0; if ($conf->incoterm->enabled) { + if (is_object($object->thirdparty)) + { + $object->fk_incoterms=$object->thirdparty->fk_incoterms; + } $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { @@ -550,7 +554,7 @@ class pdf_crabe extends ModelePDFFactures } else { $tvaligne = $sign * $object->lines[$i]->total_tva; } - + $localtax1ligne=$object->lines[$i]->total_localtax1; $localtax2ligne=$object->lines[$i]->total_localtax2; $localtax1_rate=$object->lines[$i]->localtax1_tx; @@ -1557,7 +1561,7 @@ class pdf_crabe extends ModelePDFFactures $posy=!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posx=$this->marge_gauche; if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80; - + $hautcadre=!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox=!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; From 7b72965315cf0f5e3fbd6f55ad20668e52f59ae2 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 28 Jul 2016 16:48:16 +0200 Subject: [PATCH 09/18] FIX incoterms --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index cc7fda3b06c..ff8a73c527d 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -340,6 +340,7 @@ class pdf_crabe extends ModelePDFFactures if (is_object($object->thirdparty)) { $object->fk_incoterms=$object->thirdparty->fk_incoterms; + $object->location_incoterms=$object->thirdparty->location_incoterms; } $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) From 5bc51a3439cc1ecdf865e8865943faa02dac8f4e Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Thu, 28 Jul 2016 16:56:23 +0200 Subject: [PATCH 10/18] FIX: Can't create withdrawal document --- htdocs/compta/prelevement/class/bonprelevement.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 131efda6e34..0a933c64275 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2010-2014 Laurent Destailleur - * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2014-2016 Ferran Marcet * * 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 @@ -919,7 +919,7 @@ class BonPrelevement extends CommonObject $dir=$conf->prelevement->dir_output.'/receipts'; if (! is_dir($dir)) dol_mkdir($dir); - $this->filename = $dir.'/receipts/'.$ref.'.xml'; + $this->filename = $dir.$ref.'.xml'; // Create withdraw receipt in database $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons ("; From 537a51b3676b30f1c5dbf3e908f440ec14ded484 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2016 11:19:16 +0200 Subject: [PATCH 11/18] Finally, better without the test --- htdocs/societe/class/societe.class.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 9f48f7c0541..3282d8a9eba 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1939,21 +1939,8 @@ class Societe extends CommonObject $contact_emails = $this->contact_property_array('email',1); if ($this->email && $addthirdparty) { - $exist = 0; - foreach($contact_emails as $contacts){ - if($exist ===0){ - $contacts = str_replace('>','',$contacts); - $contacts = explode ('<',$contacts); - if($contacts[1]===$this->email){ - $exist = 1; - } - } - } - if($exist ===0){ - if (empty($this->name)) $this->name=$this->nom; - $contact_emails['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">"; - } - + if (empty($this->name)) $this->name=$this->nom; + $contact_emails['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">"; } return $contact_emails; } From 27243069cb911df4021b1e0e99535274b77675a3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Jul 2016 20:07:53 +0200 Subject: [PATCH 12/18] FIX #5535 bad dependency. Conflicts: htdocs/fourn/facture/list.php --- htdocs/core/modules/modProductBatch.class.php | 2 +- htdocs/fourn/facture/list.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index 5557104c7f6..7eefc6ebd94 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -69,7 +69,7 @@ class modProductBatch extends DolibarrModules $this->config_page_url = array(); // Dependencies - $this->depends = array("modProduct","modStock","modExpedition","modSupplier"); // List of modules id that must be enabled if this module is enabled. modExpedition is required to manage batch exit (by manual stock decrease on shipment), modSupplier to manage batch entry (after supplier order). + $this->depends = array("modProduct","modStock","modExpedition","modFournisseur"); // List of modules id that must be enabled if this module is enabled. modExpedition is required to manage batch exit (by manual stock decrease on shipment), modSupplier to manage batch entry (after supplier order). $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->phpmin = array(5,0); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 05d3886ffd0..7c0e278398e 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -296,6 +296,7 @@ if ($resql) print ''; print ''; + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"fac.ref,fac.rowid","",$param,"",$sortfield,$sortorder); if (empty($conf->global->SUPPLIER_INVOICE_HIDE_REF_SUPPLIER)) print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"ref_supplier","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fac.datef,fac.rowid","",$param,'align="center"',$sortfield,$sortorder); From b3cdb1f163a7d7f9a3478e5c9610a516b5c157ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2016 16:21:28 +0200 Subject: [PATCH 13/18] FIX tag for date rfc in odt substitution --- htdocs/core/class/commondocgenerator.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 5804ab4cf9f..a38b4cf59d9 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -430,7 +430,7 @@ abstract class CommonDocGenerator 'line_fulldesc'=>doc_getlinedesc($line,$outputlangs), 'line_product_ref'=>$line->product_ref, 'line_product_label'=>$line->product_label, - 'line_product_type'=>$line->product_type, + 'line_product_type'=>$line->product_type, 'line_desc'=>$line->desc, 'line_vatrate'=>vatrate($line->tva_tx,true,$line->info_bits), 'line_up'=>price2num($line->subprice), @@ -444,9 +444,9 @@ abstract class CommonDocGenerator 'line_price_ttc_locale'=>price($line->total_ttc, 0, $outputlangs), 'line_price_vat_locale'=>price($line->total_tva, 0, $outputlangs), 'line_date_start'=>$line->date_start, - 'line_date_start_rfc'=>dol_print_date($line->date_start,'rfc'), + 'line_date_start_rfc'=>dol_print_date($line->date_start,'dayrfc'), 'line_date_end'=>$line->date_end, - 'line_date_end_rfc'=>dol_print_date($line->date_end,'rfc') + 'line_date_end_rfc'=>dol_print_date($line->date_end,'dayrfc') ); // Retrieve extrafields From 45e38efdfaee3baa1266067b6c3ac424ad8d58f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2016 17:20:14 +0200 Subject: [PATCH 14/18] FIX #5473 --- 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 cc27b1bcfd1..9e17e6f0849 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -713,7 +713,7 @@ if (! empty($id) && $action != 'edit') print ''; } - if (($object->statut == 0 || $object->statut == 1) && $remaintopay == 0 && $object->paye == 0) + if (($object->statut == 0 || $object->statut == 1) && $remaintopay == 0 && $object->paid == 0) { print '"; } From 69247afd06361d287fb2cedf51db44bf2b49b2a8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2016 17:26:24 +0200 Subject: [PATCH 15/18] FIX #4447 --- htdocs/compta/prelevement/fiche-stat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 0e9174ef034..9d70bc76a4e 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -141,7 +141,7 @@ if ($prev_id) print price($row[0]); print ''; print "\n"; From fb2444c7a35e4c495b4354a5c1e02a3357a3c0b0 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Mon, 1 Aug 2016 10:20:10 +0200 Subject: [PATCH 16/18] Fix: Can't set PRODUIT_LIMIT_SIZE to value 0 --- htdocs/product/admin/product.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index b8c07df87a5..c2069bea15f 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -7,6 +7,7 @@ * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012 Cedric Salvador + * Copyright (C) 2016 Ferran Marcet * * 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 @@ -108,7 +109,7 @@ if ($action == 'setModuleOptions') } } -if ($action == 'other' && GETPOST('value_PRODUIT_LIMIT_SIZE') > 0) +if ($action == 'other' && GETPOST('value_PRODUIT_LIMIT_SIZE') >= 0) { $res = dolibarr_set_const($db, "PRODUIT_LIMIT_SIZE", GETPOST('value_PRODUIT_LIMIT_SIZE'),'chaine',0,'',$conf->entity); } From 9a0494bd640407995ba010707a165a55593a8d08 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 27 Jul 2016 22:24:48 +0200 Subject: [PATCH 17/18] Update bonprelevement.class.php --- htdocs/compta/prelevement/class/bonprelevement.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 0a933c64275..9a569a46f7c 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -919,7 +919,7 @@ class BonPrelevement extends CommonObject $dir=$conf->prelevement->dir_output.'/receipts'; if (! is_dir($dir)) dol_mkdir($dir); - $this->filename = $dir.$ref.'.xml'; + $this->filename = $dir.'/'.$ref.'.xml'; // Create withdraw receipt in database $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons ("; From 58c18f438c1e7bd7d142836e4f686a1957709384 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 Aug 2016 15:02:23 +0200 Subject: [PATCH 18/18] Move changelog at correct place --- ChangeLog | 124 +++++++++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/ChangeLog b/ChangeLog index 80aed11ab63..d3274e1048d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,67 +11,6 @@ during migration. Upgrading to any other version or any other database system is abolutely required BEFORE trying make a Dolibarr upgrade. -***** ChangeLog for 3.8.5 compared to 3.8.4 ***** -FIX: #3815 Call to undefined function local_by_date(). -FIX: #4424 Missing email of user popup in supplier orders area -FIX: #4442 Missing translation in Banks menu -FIX: #4448 $filebonprev is not used, $this->filename now -FIX: #4455 -FIX: #4737 Bank transacion type selector translation is cropped -FIX: #4742 Able to delete a supplier invoice with a registered payment -FIX: #4743 UI glitch in project summary page -FIX: #4747 Missing UI background when registering a supplier invoice payment -FIX: #4748 Supplier invoice payment confirmation amount is not translated -FIX: #4749 -FIX: #4756 -FIX: #4766 VAT not shown in supplier invoice popup -FIX: #4809 - Duplicate functions with different content -FIX: #4851 Project selector in supplier invoices shows the project label twice -FIX: #4870 -FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists -FIX: #5048 Product supplier list display only one produc -FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option -FIX: #5203 -FIX: #5207 -FIX: #5338 use of not initialized var $aphour, $apmin, etc -FIX: #5380 -FIX: #5383 bad object id on don delete -FIX: #5474 Country_id of "Don" object is still empty -FIX: Accountancy - 3.8 - Chart of accounts are limited on only one country -FIX: Bad include and param for project numbering module call -FIX: Box disabled because bugged -FIX: bug on email template -FIX: Can correct stock of lot using eatby or sell by date -FIX: Can make a movement on "out of sell" products -FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries -FIX: can't fetch by siret or siren because of first "if" -FIX: Check stock of product by warehouse if $entrepot_id defined on shippings -FIX: correct display of minimum buying price -FIX: Creation of thumb image for size "small" was not done. -FIX: Direction of movement lost if an error occurs -FIX: dont retrieve new buying price on margin display -FIX: Duplicate records into export -FIX: Email templates not compatible with Multicompany -FIX: end of select when no fournprice -FIX: finished parameters not used -FIX: hook on group card called but not initialized -FIX: It doesn't check if there is enough stock to update the lines of orders/invoices -FIX: large expense note -FIX: missing column when module was installed before standard integration -FIX: Missing database escaping on supplier price insert/update -FIX: Not filtering correctly when come from dashboard -FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH -FIX: real min buying price -FIX: receiving link never works -FIX: same page added several times on mergepropal option -FIX: search on date into supplier invoice list dont work because of status -1 -FIX: Search supplier ref on contract -FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty -FIX: systematic rounding causes prices to be updated without reason -FIX: task ODT company object not correctly retrieved -FIX: Template email must take care of positino column -FIX: VAT rate can be negative. Example spain selling to morroco. - ***** ChangeLog for 3.9.3 compared to 3.9.2 ***** FIX: #4383 $userid not defined FIX: #4448 $filebonprev is not used, $this->filename now @@ -371,7 +310,68 @@ This is list of hooks modified: - Remove deprecated Product::hidden property - + +***** ChangeLog for 3.8.5 compared to 3.8.4 ***** +FIX: #3815 Call to undefined function local_by_date(). +FIX: #4424 Missing email of user popup in supplier orders area +FIX: #4442 Missing translation in Banks menu +FIX: #4448 $filebonprev is not used, $this->filename now +FIX: #4455 +FIX: #4737 Bank transacion type selector translation is cropped +FIX: #4742 Able to delete a supplier invoice with a registered payment +FIX: #4743 UI glitch in project summary page +FIX: #4747 Missing UI background when registering a supplier invoice payment +FIX: #4748 Supplier invoice payment confirmation amount is not translated +FIX: #4749 +FIX: #4756 +FIX: #4766 VAT not shown in supplier invoice popup +FIX: #4809 - Duplicate functions with different content +FIX: #4851 Project selector in supplier invoices shows the project label twice +FIX: #4870 +FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists +FIX: #5048 Product supplier list display only one produc +FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option +FIX: #5203 +FIX: #5207 +FIX: #5338 use of not initialized var $aphour, $apmin, etc +FIX: #5380 +FIX: #5383 bad object id on don delete +FIX: #5474 Country_id of "Don" object is still empty +FIX: Accountancy - 3.8 - Chart of accounts are limited on only one country +FIX: Bad include and param for project numbering module call +FIX: Box disabled because bugged +FIX: bug on email template +FIX: Can correct stock of lot using eatby or sell by date +FIX: Can make a movement on "out of sell" products +FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries +FIX: can't fetch by siret or siren because of first "if" +FIX: Check stock of product by warehouse if $entrepot_id defined on shippings +FIX: correct display of minimum buying price +FIX: Creation of thumb image for size "small" was not done. +FIX: Direction of movement lost if an error occurs +FIX: dont retrieve new buying price on margin display +FIX: Duplicate records into export +FIX: Email templates not compatible with Multicompany +FIX: end of select when no fournprice +FIX: finished parameters not used +FIX: hook on group card called but not initialized +FIX: It doesn't check if there is enough stock to update the lines of orders/invoices +FIX: large expense note +FIX: missing column when module was installed before standard integration +FIX: Missing database escaping on supplier price insert/update +FIX: Not filtering correctly when come from dashboard +FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH +FIX: real min buying price +FIX: receiving link never works +FIX: same page added several times on mergepropal option +FIX: search on date into supplier invoice list dont work because of status -1 +FIX: Search supplier ref on contract +FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty +FIX: systematic rounding causes prices to be updated without reason +FIX: task ODT company object not correctly retrieved +FIX: Template email must take care of positino column +FIX: VAT rate can be negative. Example spain selling to morroco. + ***** ChangeLog for 3.8.4 compared to 3.8.3 ***** FIX: #3694 FIX: #3798 #2519 Cron jobs would never be executed
'; - print round($row[0]/$bon->amount*100,2)." %"; + if ($bon->amount) print round($row[0]/$bon->amount*100,2)." %"; print '