diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php
index 0cc8ab4e8d9..0b2a060d7a2 100644
--- a/htdocs/accountancy/class/bookkeeping.class.php
+++ b/htdocs/accountancy/class/bookkeeping.class.php
@@ -1123,14 +1123,13 @@ class BookKeeping extends CommonObject
/**
* Load object in memory from the database
*
- * @param string $sortorder Sort Order
- * @param string $sortfield Sort field
- * @param int $limit offset limit
- * @param int $offset offset limit
- * @param array $filter filter array
- * @param string $filtermode filter mode (AND or OR)
- *
- * @return int <0 if KO, >0 if OK
+ * @param string $sortorder Sort Order
+ * @param string $sortfield Sort field
+ * @param int $limit offset limit
+ * @param int $offset offset limit
+ * @param array $filter filter array
+ * @param string $filtermode filter mode (AND or OR)
+ * @return int <0 if KO, >0 if OK
*/
public function fetchAllBalance($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
{
@@ -1151,7 +1150,7 @@ class BookKeeping extends CommonObject
foreach ($filter as $key => $value) {
if ($key == 't.doc_date') {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
- } elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
+ } elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=' || $key == 't.doc_date>' || $key == 't.doc_date<') {
$sqlwhere[] = $key."'".$this->db->idate($value)."'";
} elseif ($key == 't.numero_compte>=' || $key == 't.numero_compte<=' || $key == 't.subledger_account>=' || $key == 't.subledger_account<=') {
$sqlwhere[] = $key."'".$this->db->escape($value)."'";
diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php
index d24cd602ec2..b8986a449ce 100644
--- a/htdocs/compta/recap-compta.php
+++ b/htdocs/compta/recap-compta.php
@@ -267,12 +267,12 @@ if ($id > 0) {
print '
';
- print "| ";
+ $datedetail = dol_print_date($data['date'], 'dayhour');
if (!empty($data['fk_facture'])) {
- print dol_print_date($data['date'], 'day');
- } elseif (!empty($data['fk_paiement'])) {
- print dol_print_date($data['date'], 'dayhour');
+ $datedetail = dol_print_date($data['date'], 'day');
}
+ print ' | ';
+ print dol_print_date($data['date'], 'day');
print " | \n";
print ''.$data['link']." | \n";
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 04e32a80c5d..beca13fb00d 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -854,11 +854,24 @@ class Project extends CommonObject
$listoftables = array(
'propal'=>'fk_projet', 'commande'=>'fk_projet', 'facture'=>'fk_projet',
'supplier_proposal'=>'fk_projet', 'commande_fournisseur'=>'fk_projet', 'facture_fourn'=>'fk_projet',
- 'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet', 'fichinter'=>'fk_projet', 'don'=>'fk_projet',
- 'actioncomm'=>'fk_project', 'mrp_mo'=>'fk_project', 'entrepot'=>'fk_project'
+ 'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet',
+ 'fichinter'=>'fk_projet',
+ 'don'=>array('field'=>'fk_projet', 'module'=>'don'),
+ 'actioncomm'=>'fk_project',
+ 'mrp_mo'=>'fk_project',
+ 'entrepot'=>'fk_project'
);
foreach ($listoftables as $key => $value) {
- $sql = "UPDATE ".MAIN_DB_PREFIX.$key." SET ".$value." = NULL where ".$value." = ".((int) $this->id);
+ if (is_array($value)) {
+ if (!isModEnabled($value['module'])) {
+ continue;
+ }
+ $fieldname = $value['field'];
+ } else {
+ $fieldname = $value;
+ }
+ $sql = "UPDATE ".MAIN_DB_PREFIX.$key." SET ".$fieldname." = NULL where ".$fieldname." = ".((int) $this->id);
+
$resql = $this->db->query($sql);
if (!$resql) {
$this->errors[] = $this->db->lasterror();
diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php
index 4575d9d5b67..ab49800a8e4 100644
--- a/htdocs/user/group/list.php
+++ b/htdocs/user/group/list.php
@@ -215,14 +215,14 @@ if ($resql) {
print '
';
print '| ';
print $grouptemp->getNomUrl(1);
- if (!$obj->entity) {
+ if (isModEnabled('multicompany') && !$obj->entity) {
print img_picto($langs->trans("GlobalGroup"), 'redstar');
}
print " | ";
//multicompany
if (isModEnabled('multicompany') && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1) {
$mc->getInfo($obj->entity);
- print ''.$mc->label.' | ';
+ print ''.dol_escape_htmltag($mc->label).' | ';
}
print ''.$obj->nb.' | ';
print '';
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index ac92d6166e7..2809c1ff6e4 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -3819,7 +3819,17 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties
$pagestatus = $objectpage->status;
} else {
$type_container = 'page';
+ $pageurl = '';
+ $pagealiasalt = '';
+ $pagetitle = '';
+ $pagedescription = '';
+ $pageimage = '';
+ $pagekeywords = '';
+ $pagelang = '';
+ $pageallowedinframes = 0;
+ $pagehtmlheader = '';
$pagedatecreation = dol_now();
+ $pagedatemodification = '';
$pageauthorid = $user->id;
$pageusermodifid = 0;
$pageauthoralias = '';
|