diff --git a/ChangeLog b/ChangeLog index e4bee4c4739..020367a5453 100644 --- a/ChangeLog +++ b/ChangeLog @@ -213,6 +213,25 @@ Following changes may create regressions for some external modules, but were nec * The jquery plugin/dependency multiselect has been removed. It was not used by Dolibarr core. +***** 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 diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index b552423ffa0..dc41845516a 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"; diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 16758ef02a5..f24f31bbc9a 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) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 887a8fc8ec6..9bd402a1485 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -591,15 +591,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 */ public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0) { global $conf, $langs, $hookmanager; - if (count($arrayofaction) == 0) return; $disabled = 0; $ret = '
'; @@ -608,6 +607,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 .= ''; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 69e89483c4f..6bf3beb6dde 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -476,9 +476,11 @@ if ($resql) //'builddoc'=>$langs->trans("PDFMerge"), //'presend'=>$langs->trans("SendByMail"), ); - if ($user->rights->produit->supprimer) $arrayofmassactions['predelete'] = "".$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); - $massactionbutton = $form->selectMassAction('', $arrayofmassactions); + $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 = ''; if ($type === "") $perm = ($user->rights->produit->creer || $user->rights->service->creer); diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index cb595ce8410..c4a0ab64afa 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1431,7 +1431,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; diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 0525e8007df..306586ec504 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -166,11 +166,14 @@ 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; }