Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5

This commit is contained in:
Laurent Destailleur 2014-08-11 10:50:36 +02:00
commit 4d9c72f944
6 changed files with 12 additions and 12 deletions

View File

@ -334,7 +334,7 @@ if ($resql)
print '</td>';
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
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))
{

View File

@ -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))
{

View File

@ -399,7 +399,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);
}

View File

@ -446,7 +446,7 @@ if (! defined('NOLOGIN'))
$dol_authmode=$conf->authmode; // This properties is defined only when logged, to say what mode was successfully used
$dol_tz=$_POST["tz"];
$dol_tz_string=$_POST["tz_string"];
$dol_tz_string=preg_replace('/\s*\(.+\)/$','',$dol_tz_string);
$dol_tz_string=preg_replace('/\s*\(.+\)$/','',$dol_tz_string);
$dol_tz_string=preg_replace('/,/','/',$dol_tz_string);
$dol_tz_string=preg_replace('/\s/','_',$dol_tz_string);
$dol_dst=0;

View File

@ -204,9 +204,9 @@ class Project extends CommonObject
$sql.= ", fk_soc = " . ($this->socid > 0 ? $this->socid : "null");
$sql.= ", fk_statut = " . $this->statut;
$sql.= ", public = " . ($this->public ? 1 : 0);
$sql.= ", datec=" . ($this->date_c != '' ? $this->db->idate($this->date_c) : 'null');
$sql.= ", dateo=" . ($this->date_start != '' ? $this->db->idate($this->date_start) : 'null');
$sql.= ", datee=" . ($this->date_end != '' ? $this->db->idate($this->date_end) : 'null');
$sql.= ", datec=" . ($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null');
$sql.= ", dateo=" . ($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
$sql.= ", datee=" . ($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
$sql.= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this)."::Update sql=" . $sql, LOG_DEBUG);
@ -263,6 +263,7 @@ class Project extends CommonObject
else
{
$this->error = $this->db->lasterror();
$this->errors[] = $this->error;
dol_syslog(get_class($this)."::Update error -2 " . $this->error, LOG_ERR);
$result = -2;
}
@ -513,10 +514,9 @@ class Project extends CommonObject
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "projet_extrafields";
$sql.= " WHERE fk_object=" . $this->id;
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql)
if (! $resql)
{
$this->errors[] = $this->db->lasterror();
$error++;

View File

@ -209,13 +209,13 @@ foreach ($listofreferent as $key => $value)
$classname=$value['class'];
$tablename=$value['table'];
$qualified=$value['test'];
if ($qualified)
{
print '<br>';
print_titre($langs->trans($title));
$selectList=$formproject->select_element($tablename,$project->societe->id);
if (!$selectList || ($selectList<0)) {