diff --git a/ChangeLog b/ChangeLog index c6cd7463316..279fc01cfa8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,69 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 11.0.2 compared to 11.0.1 ***** +FIX: #10309 +FIX: #13110 +FIX: #13118 +FIX: #13124 +FIX: #13131 +FIX: #13135 +FIX: #13146 #13198 +FIX: #13175 +FIX: #13182 +FIX: #13183 +FIX: #13184 +FIX: #13263 +FIX: #13267 +FIX: an external user can not approve +FIX: API Get list of documents for supplier_invoice +FIX: API to push an expense report +FIX: API upload/download doc for expensereport +FIX: Avoid to download the export if we just press enter to refresh form +FIX: Bad link to template invoices +FIX: Bad sort link in accounting report +FIX: Bad translation for productlot EatBy and SellBy +FIX: better method to check user rights AND usergroup rights ! +FIX: CA by product list filter +FIX: CSS +FIX: Disable js if no javascript +FIX: duplicate class name into some log lines +FIX: etrafield with visibilty=5 were not in read only. +FIX: excess paid from situation invoices not counted when calculating remain to pay. +FIX: Force FEC export to txt format. +FIX: Free input for email no more visible. +FIX: Keep assigned users in session when loading projects and tasks +FIX: List of viewed projects too large in task widget. +FIX: Menu truncated. Add tooltip to have all content. +FIX: Missing field "billed" in export. +FIX: missing "statut" for getNomUrl() function +FIX: modFournisseur is required by modSupplierProposal +FIX: Multicompany compatibility +FIX: must be == and not = +FIX: option for topbar search and bookmarks +FIX: option MAIN_OPTIMIZEFORTEXTBROWSER +FIX: some responsive troubles +FIX: round MT in accountancy books +FIX: search with '0' +FIX: sort link +FIX: SQL Overload in default contact trigger. +FIX: SQl syntax error. +FIX: Submit of documents for supplier invoices. +FIX: timezone must be tzserver and not tzuser as on contract card +FIX: token in barcode tools page missing +FIX: Bad name of trigger PROPAL_SUPPLIER_TRIGGER, should be PROPOSAL_SUPPLIER_TRIGGER +FIX: Type of contact for event does not exists and not supported +FIX: Type of contact not saved when creating a contact +FIX: typo on ckeck method +FIX: undefined function measuringUnitString in product list +FIX: Usage of project not available in export. +FIX: wrong test +FIX: z-index for moretabsList with constant MAIN_MAXTABS_IN_CARD +FIX: Use GETPOST instead of POST +FIX: HTML Injection +FIX: Visualization rights correction on last modified contacts box. +FIX: Vulnerability in module from modulebuilder. +FIX: Vulnerability reported by code16 ***** ChangeLog for 12.0.0 compared to 11.0.0 ***** For Users: diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 6de540c43c9..a14cdec8fff 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1356,7 +1356,7 @@ class Adherent extends CommonObject require_once DOL_DOCUMENT_ROOT . '/adherents/class/subscription.class.php'; - $sql = "SELECT c.rowid, c.fk_adherent, c.subscription, c.note, c.fk_bank,"; + $sql = "SELECT c.rowid, c.fk_adherent, c.fk_type, c.subscription, c.note, c.fk_bank,"; $sql .= " c.tms as datem,"; $sql .= " c.datec as datec,"; $sql .= " c.dateadh as dateh,"; @@ -1386,6 +1386,7 @@ class Adherent extends CommonObject $subscription = new Subscription($this->db); $subscription->id = $obj->rowid; $subscription->fk_adherent = $obj->fk_adherent; + $subscription->fk_type = $obj->fk_type; $subscription->amount = $obj->subscription; $subscription->note = $obj->note; $subscription->fk_bank = $obj->fk_bank; diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 4a00412f800..c3f046431b0 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -691,11 +691,11 @@ if ($massaction == 'confirm_createbills') // Create bills from orders for ($i = 0; $i < $num; $i++) { - $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); + $desc = ($lines[$i]->desc ? $lines[$i]->desc : ''); // If we build one invoice for several order, we must put the invoice of order on the line if (!empty($createbills_onebythird)) { - $desc = dol_concatdesc($desc, $langs->trans("Order").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day', $langs)); + $desc = dol_concatdesc($desc, $langs->trans("Order").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day')); } if ($lines[$i]->subprice < 0) diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php index 766e063e80c..5ad3e7d8e02 100644 --- a/htdocs/core/customreports.php +++ b/htdocs/core/customreports.php @@ -46,6 +46,7 @@ if (!defined('USE_CUSTOME_REPORT_AS_INCLUDE')) $search_filters = GETPOST('search_filters', 'array'); $search_measures = GETPOST('search_measures', 'array'); $search_xaxis = GETPOST('search_xaxis', 'array'); + $search_groupby = GETPOST('search_groupby', 'array'); $search_yaxis = GETPOST('search_yaxis', 'array'); $search_graph = GETPOST('search_graph', 'none'); @@ -173,6 +174,10 @@ if ($action == 'viewgraph') { setEventMessages($langs->trans("OnlyOneFieldForXAxisIsPossible"), null, 'warnings'); $search_xaxis = array(0 => $search_xaxis[0]); } + if (count($search_groupby) >= 2) { + setEventMessages($langs->trans("OnlyOneFieldForGroupByIsPossible"), null, 'warnings'); + $search_groupby = array(0 => $search_groupb[0]); + } if (!count($search_xaxis)) { setEventMessages($langs->trans("AtLeastOneXAxisIsRequired"), null, 'warnings'); } elseif ($mode == 'graph' && $search_graph == 'bars' && count($search_measures) > 3) { @@ -191,7 +196,9 @@ $param = ''; $arrayofmesures = array('t.count'=>'Count'); $arrayofxaxis = array(); +$arrayofgroupby = array(); $arrayofyaxis = array(); +$arrayofvaluesforgroupby = array(); print '
'; +// Get all possible values of fields when a group by is set +if (is_array($search_groupby) && count($search_groupby)) { + $sql = 'SELECT DISTINCT '.$search_groupby[0].' as val FROM '.MAIN_DB_PREFIX.$object->table_element.' as t'; + $resql = $db->query($sql); + if (!$resql) { + dol_print_error($db); + } + + while ($obj = $db->fetch_object($resql)) { + $arrayofvaluesforgroupby[$obj->val] = $obj->val; + } +} + // Generate the SQL request $sql = ''; if (!empty($search_measures) && !empty($search_xaxis)) @@ -362,6 +423,19 @@ if (!empty($search_measures) && !empty($search_xaxis)) } else $sql .= $val.' as x_'.$key.', '; } + foreach ($search_groupby as $key => $val) { + if (preg_match('/\-year$/', $val)) { + $tmpval = preg_replace('/\-year$/', '', $val); + $sql .= 'DATE_FORMAT('.$tmpval.", '%Y'), "; + } elseif (preg_match('/\-month$/', $val)) { + $tmpval = preg_replace('/\-month$/', '', $val); + $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m'), "; + } elseif (preg_match('/\-day$/', $val)) { + $tmpval = preg_replace('/\-day$/', '', $val); + $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m-%d'), "; + } + else $sql .= $val.', '; + } foreach ($search_measures as $key => $val) { if ($val == 't.count') $sql .= 'COUNT(t.'.$fieldid.') as y_'.$key.', '; elseif (preg_match('/\-sum$/', $val)) { @@ -417,6 +491,19 @@ if (!empty($search_measures) && !empty($search_xaxis)) } else $sql .= $val.', '; } + foreach ($search_groupby as $key => $val) { + if (preg_match('/\-year$/', $val)) { + $tmpval = preg_replace('/\-year$/', '', $val); + $sql .= 'DATE_FORMAT('.$tmpval.", '%Y'), "; + } elseif (preg_match('/\-month$/', $val)) { + $tmpval = preg_replace('/\-month$/', '', $val); + $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m'), "; + } elseif (preg_match('/\-day$/', $val)) { + $tmpval = preg_replace('/\-day$/', '', $val); + $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m-%d'), "; + } + else $sql .= $val.', '; + } $sql = preg_replace('/,\s*$/', '', $sql); $sql .= ' ORDER BY '; foreach ($search_xaxis as $key => $val) { @@ -482,7 +569,7 @@ if ($mode == 'grid') { if ($mode == 'graph') { $WIDTH = '80%'; $HEIGHT = 200; - + var_dump($data); // Show graph $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 5e0ff117146..b3c720458bc 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1883,6 +1883,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang $format = str_replace('%A', '__A__', $format); } + // Analyze date $reg = array(); if (preg_match('/^([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])$/i', $time, $reg)) // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000 diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 88238506125..d78ac9e6261 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1015,7 +1015,9 @@ class ExpenseReport extends CommonObject public function fetch_lines() { // phpcs:enable - $this->lines = array(); + global $conf; + + $this->lines = array(); $sql = ' SELECT de.rowid, de.comments, de.qty, de.value_unit, de.date, de.rang,'; $sql .= ' de.'.$this->fk_element.', de.fk_c_type_fees, de.fk_c_exp_tax_cat, de.fk_projet as fk_project, de.tva_tx, de.fk_ecm_files,'; diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index d8f7dad8ac0..9b46c44f74f 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', '12.0.0-alpha'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (! defined('DOL_VERSION')) define('DOL_VERSION', '11.0.2'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (! defined('EURO')) define('EURO', chr(128)); diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 23031d09d90..8051b9684f9 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -809,16 +809,6 @@ if ($object->id > 0) } } - if ($user->rights->fournisseur->facture->creer) - { - $langs->load("bills"); - if ($object->status == 1) { - print ''.$langs->trans("AddBill").''; - } else { - print ''.$langs->trans("AddBill").''; - } - } - if ($user->rights->fournisseur->facture->creer) { if (!empty($orders2invoice) && $orders2invoice > 0) @@ -836,6 +826,16 @@ if ($object->id > 0) else print ''; } + if ($user->rights->fournisseur->facture->creer) + { + $langs->load("bills"); + if ($object->status == 1) { + print ''.$langs->trans("AddBill").''; + } else { + print ''.$langs->trans("AddBill").''; + } + } + // Add action if (!empty($conf->agenda->enabled) && !empty($conf->global->MAIN_REPEATTASKONEACHTAB) && $object->status == 1) { diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 42226f93208..6e4f19b2818 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -19,7 +19,7 @@ /** * \file htdocs/projet/contact.php * \ingroup project - * \brief Onglet de gestion des contacts du projet + * \brief List of all contacts of a project */ require '../main.inc.php'; @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +if ($conf->categorie->enabled) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } // Load translation files required by the page $langs->loadLangs(array('projects', 'companies'));