Fix delay and useless code

This commit is contained in:
Laurent Destailleur 2019-12-21 14:35:39 +01:00
parent ed6d4ae824
commit 2dee5e6bf1
3 changed files with 4 additions and 3 deletions

View File

@ -829,6 +829,7 @@ class BOM extends CommonObject
$statusType = 'status'.$status;
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
if ($status == self::STATUS_CANCELED) $statusType = 'status6';
return dolGetStatus($this->labelStatus[$status], $this->labelStatus[$status], '', $statusType, $mode);
}

View File

@ -1666,6 +1666,7 @@ if ($action == 'create' && $usercancreate)
print '</td></tr>';
}
// Date
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
print $form->selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date
@ -2183,7 +2184,7 @@ if ($action == 'create' && $usercancreate)
print '</form>';
} else {
print $object->date ? dol_print_date($object->date, 'day') : '&nbsp;';
if ($object->hasDelay() && !empty($object->date_livraison)) {
if ($object->hasDelay()) {
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
}
}

View File

@ -816,8 +816,7 @@ if ($resql)
{
print '<td class="nowrap">';
$generic_commande->lines = array();
$generic_commande->getLinesArray();
$generic_commande->getLinesArray(); // This set ->lines
print $generic_commande->getNomUrl(1, ($viewstatut != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1);