diff --git a/ChangeLog b/ChangeLog
index 0bb51e86c75..28b663e99b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@ make a Dolibarr upgrade.
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
FIX [ bug #2855 ] Wrong translation key in localtax report page
FIX [ bug #1852 ] JS error when editing a customer order line
+FIX [ bug #2900 ] Courtesy title is not stored in create thirdparty form
***** ChangeLog for 3.7.1 compared to 3.7.* *****
FIX Bug in the new photo system
@@ -265,6 +266,7 @@ Dolibarr better:
- Fix: [ bug #2545 ] Missing object_margin.png in Amarok theme
- Fix: [ bug #2542 ] Contracts store localtax preferences
- Fix: Bad permission assignments for stock movements actions
+- Fix: [ bug #2891 ] Category hooks do not work
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
@@ -439,6 +441,11 @@ Fix: [ bug #2577 ] Incorrect invoice status in "Linked objects" page of a projec
Fix: [ bug #2576 ] Unable to edit a dictionary entry that has # in its ref
Fix: [ bug #2758 ] Product::update sets product note to "null" when $prod->note is null
Fix: [ bug #2757 ] Deleting product category photo gives "Forbidden access" error
+Fix: [ bug #2976 ] "Report" tab is the current tab but it is not marked as selected by the UI
+Fix: [ bug #2861 ] Undefined variable $res when migrating
+Fix: [ bug #2837 ] Product list table column header does not match column body
+Fix: [ bug #2835 ] Customer prices of a product shows incorrect history order
+Fix: [ bug #2814 ] JPEG photos are not displayed in Product photos page
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
Fix: Avoid missing class error for fetch_thirdparty method #1973
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index f5d556eb2c5..8feecdd774e 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -456,10 +456,10 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
# Removed known external modules to avoir any error when packaging on test env
+ $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
- $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php
index 2d7d170f22e..76055fb635e 100644
--- a/htdocs/cashdesk/tpl/facturation1.tpl.php
+++ b/htdocs/cashdesk/tpl/facturation1.tpl.php
@@ -44,8 +44,8 @@ $langs->load("cashdesk");
diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php
index 8a587d7de32..4b18eed7a22 100644
--- a/htdocs/categories/card.php
+++ b/htdocs/categories/card.php
@@ -64,6 +64,10 @@ $object = new Categorie($db);
$extrafields = new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
+// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
+$hookmanager->initHooks(array('categorycard'));
+
+
/*
* Actions
*/
diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php
index a105d104036..6b6ed88350d 100644
--- a/htdocs/categories/edit.php
+++ b/htdocs/categories/edit.php
@@ -56,6 +56,9 @@ $object = new Categorie($db);
$extrafields = new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
+// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
+$hookmanager->initHooks(array('categorycard'));
+
/*
* Actions
*/
diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index c55f324ab06..0460ecde5ed 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -63,6 +63,9 @@ $type=$object->type;
$extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
+// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
+$hookmanager->initHooks(array('categorycard'));
+
/*
* Actions
*/
diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php
index 97256c840b1..bc9a13832c2 100644
--- a/htdocs/comm/propal/class/propalestats.class.php
+++ b/htdocs/comm/propal/class/propalestats.class.php
@@ -66,7 +66,7 @@ class PropaleStats extends Stats
$this->field='total_ht';
$this->field_line='total_ht';
-
+
$this->where.= " p.fk_statut > 0";
//$this->where.= " AND p.fk_soc = s.rowid AND p.entity = ".$conf->entity;
$this->where.= " AND p.entity = ".$conf->entity;
@@ -183,7 +183,7 @@ class PropaleStats extends Stats
return $this->_getAllByYear($sql);
}
-
+
/**
* Return nb, amount of predefined product for year
@@ -193,9 +193,11 @@ class PropaleStats extends Stats
*/
function getAllByProduct($year)
{
+ global $user;
+
$sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg";
$sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product";
- //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
+ if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " AND p.rowid = tl.fk_propal AND tl.fk_product = product.rowid";
$sql.= " AND p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year,1,false))."' AND '".$this->db->idate(dol_get_last_day($year,12,false))."'";
@@ -204,5 +206,5 @@ class PropaleStats extends Stats
//$sql.= $this->db->plimit(20);
return $this->_getAllByProduct($sql);
- }
+ }
}
diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php
index 1ec98ad9bd0..d98851e619d 100644
--- a/htdocs/compta/bank/virement.php
+++ b/htdocs/compta/bank/virement.php
@@ -176,7 +176,7 @@ $form->select_comptes($account_to,'account_to',0,'',1);
print "
';
diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php
index c15bc9831ce..fec676d8265 100644
--- a/htdocs/core/boxes/box_task.php
+++ b/htdocs/core/boxes/box_task.php
@@ -1,5 +1,6 @@
+ *
* 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
* the Free Software Foundation; either version 3 of the License, or
@@ -18,7 +19,6 @@
* \file htdocs/core/boxes/box_task.php
* \ingroup Projet
* \brief Module to Task activity of the current year
- * \version $Id: box_task.php,v 1.1 2012/09/11 Charles-François BENKE
*/
include_once(DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php");
@@ -39,11 +39,11 @@ class box_task extends ModeleBoxes
var $info_box_head = array();
var $info_box_contents = array();
- /**
- * \brief Constructeur de la classe
- *
- * @return void
- */
+ /**
+ * Constructor
+ *
+ * @return void
+ */
function box_task()
{
global $langs;
@@ -120,8 +120,7 @@ class box_task extends ModeleBoxes
// Add the sum à the bottom of the boxes
- $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left" ', 'text' => $langs->trans("Total")." ".$textHead);
- $this->info_box_contents[$i][1] = array('td' => '', 'text' => "");
+ $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left" colspan="2" ', 'text' => $langs->trans("Total")." ".$textHead);
$this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks"));
$this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5));
$this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot,'all',25200,5));
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 0f7ad41de14..06648b42ea2 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -81,7 +81,7 @@ abstract class CommonObject
$sql = "SELECT rowid, ref, ref_ext";
$sql.= " FROM ".MAIN_DB_PREFIX.$element;
- $sql.= " WHERE entity IN (".getEntity($element).")" ;
+ $sql.= " WHERE entity IN (".getEntity($element,1).")" ;
if ($id > 0) $sql.= " AND rowid = ".$db->escape($id);
else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'";
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index eeac381cff8..c65a164a303 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -394,9 +394,9 @@ class Form
$htmltext=str_replace("\n","",$htmltext);
$htmltext=str_replace('"',""",$htmltext);
- if ($tooltipon == 2 || $tooltipon == 3) $paramfortooltipimg=' class="classfortooltip'.($extracss?' '.$extracss:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td img tag to store tooltip
+ if ($tooltipon == 2 || $tooltipon == 3) $paramfortooltipimg=' class="classfortooltip'.($extracss?' '.$extracss:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'" '; // Attribut to put on td img tag to store tooltip
else $paramfortooltipimg =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
- if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip'.($extracss?' '.$extracss:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip
+ if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip'.($extracss?' '.$extracss:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'" '; // Attribut to put on td tag to store tooltip
else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
$s="";
if (empty($notabs)) $s.='
';
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 4cdd31d3b4c..bc5cfa2872c 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -124,7 +124,7 @@ class FormProjets
}
else if ($obj->fk_statut == 2)
{
- if ($discard_close == 2) $disabled=1;
+ if ($discard_closed == 2) $disabled=1;
$labeltoshow.=' - '.$langs->trans("Closed");
}
else if ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid))
diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php
index 349b32d5104..56e338b7eb8 100644
--- a/htdocs/core/class/rssparser.class.php
+++ b/htdocs/core/class/rssparser.class.php
@@ -400,7 +400,7 @@ class RssParser
{
if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
{
- $itemLink = (string) $item['link']['href'];
+ $itemLink = (isset($item['link']['href']) ? (string) $item['link']['href'] : '');
$itemTitle = (string) $item['title'];
$itemDescription = (string) $item['summary'];
$itemPubDate = (string) $item['created'];
@@ -409,7 +409,7 @@ class RssParser
}
else
{
- $itemLink = (string) $item['link']['href'];
+ $itemLink = (isset($item['link']['href']) ? (string) $item['link']['href'] : '');
$itemTitle = (string) $item['title'];
$itemDescription = (string) $item['summary'];
$itemPubDate = (string) $item['created'];
diff --git a/htdocs/core/js/lib_batch.js b/htdocs/core/js/lib_batch.js
index 65c138b73aa..b434083edd0 100644
--- a/htdocs/core/js/lib_batch.js
+++ b/htdocs/core/js/lib_batch.js
@@ -19,7 +19,7 @@
// \brief File that include javascript functions used when dispatching batch-enabled product
//
-function AddLineBatch(index) {
+function addLineBatch(index) {
var nme = 'dluo_0_'+index;
$row=$("tr[name='"+nme+"']").clone(true);
$row.find("input[name^='qty']").val('');
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index ae4a65ada7e..f3f4fa838ee 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -181,7 +181,7 @@ function dol_shutdown()
global $conf,$user,$langs,$db;
$disconnectdone=false; $depth=0;
if (is_object($db) && ! empty($db->connected)) { $depth=$db->transaction_opened; $disconnectdone=$db->close(); }
- dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth)?' (Warn: db disconnection forced, transaction depth was '.$depth.')':''), (($disconnectdone && $depth)?LOG_WARNING:LOG_DEBUG));
+ dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth)?' (Warn: db disconnection forced, transaction depth was '.$depth.')':''), (($disconnectdone && $depth)?LOG_WARNING:LOG_INFO));
}
diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php
index e6fbd7e59bc..dc509384335 100644
--- a/htdocs/core/lib/report.lib.php
+++ b/htdocs/core/lib/report.lib.php
@@ -39,7 +39,7 @@
*/
function report_header($nom,$variante,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='')
{
- global $langs, $hselected;
+ global $langs;
print "\n\n\n";
@@ -48,7 +48,7 @@ function report_header($nom,$variante,$period,$periodlink,$description,$builddat
$head[$h][1] = $langs->trans("Report");
$head[$h][2] = 'report';
- dol_fiche_head($head, $hselected);
+ dol_fiche_head($head, 'report');
print '