FIX #3240
This commit is contained in:
parent
74be7bf334
commit
df4f09e72f
@ -2291,7 +2291,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$clause = " WHERE";
|
||||
|
||||
$sql = "SELECT c.rowid, c.date_creation as datec, c.fk_statut,c.date_livraison as delivery_date";
|
||||
$sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.fk_statut, c.date_livraison as delivery_date";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id)
|
||||
{
|
||||
@ -2311,15 +2311,15 @@ class CommandeFournisseur extends CommonOrder
|
||||
$response = new WorkboardResponse();
|
||||
$response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("SuppliersOrdersToProcess");
|
||||
$response->url=DOL_URL_ROOT.'/fourn/commande/index.php';
|
||||
$response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3';
|
||||
$response->img=img_object($langs->trans("Orders"),"order");
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$response->nbtodo++;
|
||||
|
||||
$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->fournisseur->warning_delay)) {
|
||||
$date_to_test = empty($obj->delivery_date) ? $obj->date_commande : $obj->delivery_date;
|
||||
if ($obj->fk_statut != 3 && $date_to_test && $this->db->jdate($date_to_test) < ($now - $conf->commande->fournisseur->warning_delay)) {
|
||||
$response->nbtodolate++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,8 +88,14 @@ if ($socid > 0)
|
||||
{
|
||||
$fourn = new Fournisseur($db);
|
||||
$fourn->fetch($socid);
|
||||
$title .= ' ('.$fourn->name.')';
|
||||
$title .= ' - '.$fourn->name;
|
||||
}
|
||||
if (GETPOST('statut','alpha'))
|
||||
{
|
||||
if (GETPOST('statut','alpha') == '1,2,3') $title.=' - '.$langs->trans("StatusOrderToProcessShort");
|
||||
else $title.=' - '.$langs->trans($commandestatic->statuts[GETPOST('statut','alpha')]);
|
||||
}
|
||||
|
||||
|
||||
llxHeader('',$title);
|
||||
|
||||
@ -145,9 +151,9 @@ if ($sall)
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
|
||||
//Required triple check because statut=0 means draft filter
|
||||
if (GETPOST('statut', 'int') !== '')
|
||||
if (GETPOST('statut', 'alpha') !== '')
|
||||
{
|
||||
$sql .= " AND cf.fk_statut IN (".GETPOST('statut').")";
|
||||
$sql .= " AND cf.fk_statut IN (".GETPOST('statut', 'alpha').")";
|
||||
}
|
||||
if ($search_refsupp)
|
||||
{
|
||||
@ -219,7 +225,7 @@ if ($resql)
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$formorder->selectSupplierOrderStatus($search_status,1,'search_status');
|
||||
$formorder->selectSupplierOrderStatus((strstr($search_status, ',')?-1:$search_status),1,'search_status');
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user