forked from Wavyzz/dolibarr
The warning for late orders is visible on order card
This commit is contained in:
@@ -3436,6 +3436,22 @@ class Commande extends CommonOrder
|
||||
|
||||
return max($this->date_commande, $this->date_livraison) < ($now - $conf->commande->client->warning_delay);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the customer delayed info
|
||||
*
|
||||
* @return string Show delayed information
|
||||
*/
|
||||
public function showDelay()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
if (empty($this->date_livraison)) $text=$langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day');
|
||||
else $text=$text=$langs->trans("DeliveryDate").' '.dol_print_date($this->date_livraison, 'day');
|
||||
$text.=' '.($conf->commande->client->warning_delay>0?'+':'-').' '.round(abs($conf->commande->client->warning_delay)/3600/24,1).' '.$langs->trans("days").' < '.$langs->trans("Today");
|
||||
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user