From cc4c2d8a0bbd100eaf636c629d0970f9193d2a4b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2020 20:39:45 +0100 Subject: [PATCH 1/8] Prepare 10.0.6 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index c0697df392b..b3e743aa1a6 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE', 'Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION', '10.0.5'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (! defined('DOL_VERSION')) define('DOL_VERSION', '10.0.6'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (! defined('EURO')) define('EURO', chr(128)); From 7350331865ec03ae4404d91f6d296f61aa70ae54 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2020 20:41:12 +0100 Subject: [PATCH 2/8] Prepare 10.0.6 --- ChangeLog | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index b1b64681abb..914d5129f7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,25 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 10.0.6 compared to 10.0.5 ***** +FIX Regression of 10.0.5 to create/edit proposals and orders. +FIX: #12760 #12763 #12755 #12765 #12751 +FIX: add product qty in shipment already sent (fix for option STOCK_CALCULATE_ON_SHIPMENT_NEW) +FIX: an issue that shows all entities stock +FIX: class Facture undefined in displaying margin information +FIX: error 500 when getting margin info for objects other than invoices +FIX: Loan card - Wrong language key used +FIX: Missing language key for MAIN_MAXTABS_IN_CARD +FIX: product with empty stock were not visible +FIX: remove backward compatibility projectid and uses object id instead +FIX: Some issues on salary payment +FIX: Some problems on conciliation with others modules +FIX: typo on language key +FIX: url new for task time spent in project element tab +FIX: uses GETPOSTISSET instead of GETPOST for projectfield +FIX: var transkey not defined in input hidden +FIX: wrong var name and avoid warning + ***** ChangeLog for 10.0.5 compared to 10.0.4 ***** FIX: 10.0: add URL param "restore_last_search_values=1" to all backlinks pointing to lists FIX: 10.0: do not display single-letter values (indicating duration unit without value) in product list From e820af4aa08e8fc188785a23892da60af9b7ee3f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 7 Jan 2020 13:07:36 +0100 Subject: [PATCH 3/8] FIX: multicompany for discount --- htdocs/comm/remise.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index a2d373f339a..940b2eecba4 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -222,7 +222,7 @@ if ($socid > 0) $sql.= " u.login, u.rowid as user_id"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE rc.fk_soc = " . $object->id; - $sql.= " AND rc.entity = " . $conf->entity; + $sql.= " AND rc.entity IN (".getEntity('discount').")"; $sql.= " AND u.rowid = rc.fk_user_author"; $sql.= " ORDER BY rc.datec DESC"; @@ -281,7 +281,7 @@ if ($socid > 0) $sql.= " u.login, u.rowid as user_id"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_supplier as rc, ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE rc.fk_soc = " . $object->id; - $sql.= " AND rc.entity = " . $conf->entity; + $sql.= " AND rc.entity IN (".getEntity('discount').")"; $sql.= " AND u.rowid = rc.fk_user_author"; $sql.= " ORDER BY rc.datec DESC"; From 5a1f1239942e1d0b09725c9396511f551e483d02 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 7 Jan 2020 13:10:10 +0100 Subject: [PATCH 4/8] Update societe.class.php --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 1ef4de8ae64..f1d489751ac 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1287,7 +1287,7 @@ class Societe extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as te ON s.fk_typent = te.id'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON s.fk_incoterms = i.rowid'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_remise as sr ON sr.rowid = (SELECT MAX(rowid) FROM '.MAIN_DB_PREFIX.'societe_remise WHERE fk_soc = s.rowid AND entity = '.$conf->entity.')'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_remise as sr ON sr.rowid = (SELECT MAX(rowid) FROM '.MAIN_DB_PREFIX.'societe_remise WHERE fk_soc = s.rowid AND entity IN ('.getEntity('discount').'))'; $sql .= ' WHERE s.entity IN ('.getEntity($this->element).')'; if ($rowid) $sql .= ' AND s.rowid = '.$rowid; From 36ccb8b08e69135568938a01fbd081fc84b400d7 Mon Sep 17 00:00:00 2001 From: John Botella Date: Tue, 7 Jan 2020 14:49:25 +0100 Subject: [PATCH 5/8] Fix folder rename behavior --- htdocs/variants/combinations.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 6dc66a32a8e..e53305c2015 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -168,12 +168,15 @@ if ($_POST) { $bulkaction = $massaction; $error = 0; - $prodstatic = new Product($db); + $db->begin(); foreach ($toselect as $prodid) { + // need create new of Product to prevent rename dir behavior + $prodstatic = new Product($db); + if ($prodstatic->fetch($prodid) < 0) { continue; } From 2d67c2365fdf383a518de99d3dd916efd2fac4dc Mon Sep 17 00:00:00 2001 From: Dev2a Date: Tue, 7 Jan 2020 18:59:58 +0100 Subject: [PATCH 6/8] Fix Check right for service for arrayofmassaction if product module disable, threre is no action for service --- htdocs/product/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index dcf43945ccb..55681eef583 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -424,13 +424,13 @@ if ($resql) //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); - if ($user->rights->produit->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); + $rightskey='produit'; + if($type == Product::TYPE_SERVICE) $rightskey='service'; + if ($user->rights->{$rightskey}->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; - $rightskey='produit'; - if($type == Product::TYPE_SERVICE) $rightskey='service'; if($user->rights->{$rightskey}->creer) { $label='NewProduct'; From 57c954f2e862e49ea449f9b13825119cb4191b3a Mon Sep 17 00:00:00 2001 From: Dev2a Date: Tue, 7 Jan 2020 21:41:36 +0100 Subject: [PATCH 7/8] Fix Check array of action after kooks --- htdocs/core/class/html.form.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 06fd6cc02e8..e6a324a79a3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -573,15 +573,14 @@ class Form * Generate select HTML to choose massaction * * @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default. - * @param int $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. + * @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. * @param int $alwaysvisible 1=select button always visible - * @return string Select list + * @return string|void Select list */ function selectMassAction($selected, $arrayofaction, $alwaysvisible=0) { global $conf,$langs,$hookmanager; - if (count($arrayofaction) == 0) return; $disabled=0; $ret='
'; @@ -590,6 +589,8 @@ class Form // Complete list with data from external modules. THe module can use $_SERVER['PHP_SELF'] to know on which page we are, or use the $parameters['currentcontext'] completed by executeHooks. $parameters=array(); $reshook=$hookmanager->executeHooks('addMoreMassActions',$parameters); // Note that $action and $object may have been modified by hook + // check if there is a mass action + if (count($arrayofaction) == 0 && empty($hookmanager->resPrint)) return; if (empty($reshook)) { $ret.=''; From ae4554af65c497a8798111482fb651f94bf9fb05 Mon Sep 17 00:00:00 2001 From: atm-arnaud Date: Wed, 8 Jan 2020 11:27:52 +0100 Subject: [PATCH 8/8] FIX drafts are now implemented for stats --- htdocs/compta/facture/class/facturestats.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 91d3e4476ff..f16e53b966d 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -79,7 +79,7 @@ class FactureStats extends Stats $this->field_line='total_ht'; } - $this->where = " f.fk_statut > 0"; + $this->where = " f.fk_statut >= 0"; $this->where.= " AND f.entity IN (".getEntity('invoice').")"; if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; if ($mode == 'customer') $this->where.=" AND (f.fk_statut <> 3 OR f.close_code <> 'replaced')"; // Exclude replaced invoices as they are duplicated (we count closed invoices for other reasons)