Fix delay and useless code
This commit is contained in:
parent
ed6d4ae824
commit
2dee5e6bf1
@ -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);
|
||||
}
|
||||
|
||||
@ -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') : ' ';
|
||||
if ($object->hasDelay() && !empty($object->date_livraison)) {
|
||||
if ($object->hasDelay()) {
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user