2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'origin/3.5' into develop

Conflicts:
	htdocs/compta/facture.php
	htdocs/core/modules/modAgenda.class.php
	htdocs/core/modules/modProduct.class.php
	htdocs/fourn/commande/liste.php
This commit is contained in:
Laurent Destailleur
2014-05-18 11:52:52 +02:00
22 changed files with 169 additions and 81 deletions

View File

@@ -2541,7 +2541,7 @@ class Commande extends CommonOrder
$this->nbtodo=$this->nbtodolate=0;
$clause = " WHERE";
$sql = "SELECT c.rowid, c.date_creation as datec, c.fk_statut";
$sql = "SELECT c.rowid, c.date_creation as datec, c.date_livraison as delivery_date, c.fk_statut";
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
if (!$user->rights->societe->client->voir && !$user->societe_id)
{
@@ -2560,7 +2560,9 @@ class Commande extends CommonOrder
while ($obj=$this->db->fetch_object($resql))
{
$this->nbtodo++;
if ($obj->fk_statut != 3 && $this->db->jdate($obj->datec) < ($now - $conf->commande->client->warning_delay)) $this->nbtodolate++;
$date_to_test = empty($obj->delivery_date) ? $obj->datec : $obj->delivery_date;
if ($obj->fk_statut != 3 && $this->db->jdate($date_to_test) < ($now - $conf->commande->client->warning_delay)) $this->nbtodolate++;
}
return 1;
}