diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php
index 4c0d2d756da..55323b697f9 100644
--- a/htdocs/commande/liste.php
+++ b/htdocs/commande/liste.php
@@ -340,7 +340,7 @@ if ($resql)
print '';
print '
';
- if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_valid),$db->jdate($objp->date_livraison)) < ($now - $conf->commande->client->warning_delay))
+ if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_commande),$db->jdate($objp->date_livraison)) < ($now - $conf->commande->client->warning_delay))
print img_picto($langs->trans("Late"),"warning");
if(!empty($objp->note_private))
{
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 8e1d54944c0..fadabea88c1 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -172,11 +172,11 @@ if (strlen($search_phone))
}
if (strlen($search_phoneper))
{
- $sql .= " AND p.phone LIKE '%".$db->escape($search_phoneper)."%'";
+ $sql .= " AND p.phone_perso LIKE '%".$db->escape($search_phoneper)."%'";
}
if (strlen($search_phonepro))
{
- $sql .= " AND p.phone_perso LIKE '%".$db->escape($search_phonepro)."%'";
+ $sql .= " AND p.phone LIKE '%".$db->escape($search_phonepro)."%'";
}
if (strlen($search_phonemob))
{
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index f2add422714..bcb1008b622 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -430,7 +430,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height)
global $conf;
// Add a background image on document
- if (! empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF))
+ if (! empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF)) // Warning, this option make TCPDF generation beeing crazy and some content disappeared behin the image
{
$pdf->SetAutoPageBreak(0,0); // Disable auto pagebreak before adding image
$pdf->Image($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_USE_BACKGROUND_ON_PDF, (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_X)?$conf->global->MAIN_USE_BACKGROUND_ON_PDF_X:0), (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y)?$conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y:0), 0, $page_height);
@@ -798,7 +798,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
if ($line) // Free text
{
$pdf->SetXY($dims['lm'],-$posy);
- $pdf->MultiCell($width, 3, $line, 0, $align, 0);
+ $pdf->MultiCell(0, 3, $line, 0, $align, 0);
$posy-=$freetextheight;
}
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index f02e48a9be5..7b443bf15c0 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -468,7 +468,7 @@ if (empty($action))
{
$sql .= ' AND p.rowid='.$db->escape($search_ref);
}
- if (! empty($search_account))
+ if (! empty($search_account) && $search_account > 0)
{
$sql .= ' AND b.fk_account='.$db->escape($search_account);
}
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 3c916fd2b29..0392b073dd4 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -1452,7 +1452,7 @@ else
print ' | ';
print '| '.$langs->trans("Logo").' | ';
print '';
- if ($object->logo) print $form->showphoto('societe',$object,50);
+ if ($object->logo) print $form->showphoto('societe',$object);
$caneditfield=1;
if ($caneditfield)
{
@@ -1527,7 +1527,7 @@ else
print ' |
';
// Logo+barcode
- $rowspan=4;
+ $rowspan=6;
if (! empty($conf->global->SOCIETE_USEPREFIX)) $rowspan++;
if (! empty($object->client)) $rowspan++;
if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) $rowspan++;
@@ -1537,9 +1537,9 @@ else
if ($showlogo || $showbarcode)
{
$htmllogobar.='';
- if ($showlogo) $htmllogobar.=$form->showphoto('societe',$object,50);
+ if ($showlogo) $htmllogobar.=$form->showphoto('societe',$object);
if ($showlogo && $showbarcode) $htmllogobar.='
';
- if ($showbarcode) $htmllogobar.=$form->showbarcode($object,50);
+ if ($showbarcode) $htmllogobar.=$form->showbarcode($object);
$htmllogobar.=' | ';
}
@@ -1618,12 +1618,12 @@ else
if (empty($conf->global->SOCIETE_DISABLE_STATE)) print '| '.$langs->trans('State').' | '.$object->state.' | ';
// EMail
- print '
| '.$langs->trans('EMail').' | ';
+ print ' |
| '.$langs->trans('EMail').' | ';
print dol_print_email($object->email,0,$object->id,'AC_EMAIL');
print ' |
';
// Web
- print '| '.$langs->trans('Web').' | ';
+ print ' |
| '.$langs->trans('Web').' | ';
print dol_print_url($object->url);
print ' |
';
@@ -1972,7 +1972,6 @@ else
if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC))
{
print '';
- //print '
| ';
print ''; // ancre
/*
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 042803e7e7c..7eeadd6ae1f 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -682,7 +682,7 @@ div.mainmenu.click2dial {
}
div.mainmenu.companies {
- background-image: url();
+ background-image: url();
}
div.mainmenu.commercial {
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 8c607b0a347..df36812cce8 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -2226,10 +2226,10 @@ class User extends CommonObject
* fullname = nom avec chemin complet du user
* fullpath = chemin complet compose des id
*
- * @param int $markafterid Removed all users including the leaf $markafterid in user tree.
- * @return array Array of users. this->users and this->parentof are set.
+ * @param int $deleteafterid Removed all users including the leaf $deleteafterid (and all its child) in user tree.
+ * @return array Array of users. this->users and this->parentof are set.
*/
- function get_full_tree($markafterid=0)
+ function get_full_tree($deleteafterid=0)
{
global $conf,$user;
@@ -2280,14 +2280,14 @@ class User extends CommonObject
$this->build_path_from_id_user($key,0); // Process a branch from the root user key (this user has no parent)
}
- // Exclude leaf including $markafterid from tree
- if ($markafterid)
+ // Exclude leaf including $deleteafterid from tree
+ if ($deleteafterid)
{
- //print "Look to discard user ".$markafterid."\n";
- $keyfilter1='^'.$markafterid.'$';
- $keyfilter2='_'.$markafterid.'$';
- $keyfilter3='^'.$markafterid.'_';
- $keyfilter4='_'.$markafterid.'_';
+ //print "Look to discard user ".$deleteafterid."\n";
+ $keyfilter1='^'.$deleteafterid.'$';
+ $keyfilter2='_'.$deleteafterid.'$';
+ $keyfilter3='^'.$deleteafterid.'_';
+ $keyfilter4='_'.$deleteafterid.'_';
foreach($this->users as $key => $val)
{
if (preg_match('/'.$keyfilter1.'/',$val['fullpath']) || preg_match('/'.$keyfilter2.'/',$val['fullpath'])
@@ -2329,7 +2329,7 @@ class User extends CommonObject
$this->users[$id_user]['fullname'] = $this->users[$id_user]['lastname'];
$i=0; $cursor_user=$id_user;
- while ((empty($protection) || $i < $protection) && ! empty($this->parentof[$cursor_user])) // Loop on each parent, one after one
+ while ((empty($protection) || $i < $protection) && ! empty($this->parentof[$cursor_user]))
{
$this->users[$id_user]['fullpath'] = '_'.$this->parentof[$cursor_user].$this->users[$id_user]['fullpath'];
$this->users[$id_user]['fullname'] = $this->users[$this->parentof[$cursor_user]]['lastname'].' >> '.$this->users[$id_user]['fullname'];
|