Merge pull request #21833 from defrance/patch-235

php V8 warning (supplier order)
This commit is contained in:
Laurent Destailleur 2022-08-22 15:10:13 +02:00 committed by GitHub
commit 456c0f8dff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -416,7 +416,7 @@ function dol_print_object_info($object, $usetable = 0)
} else {
print ': ';
}
if (is_object($object->user_approve)) {
if (!empty($object->user_approve) && is_object($object->user_approve)) {
if ($object->user_approve->id) {
print $object->user_approve->getNomUrl(-1, '', 0, 0, 0);
} else {

View File

@ -2084,6 +2084,10 @@ if ($action == 'create') {
// Date
if ($object->methode_commande_id > 0) {
$usehourmin = 0;
if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) {
$usehourmin = 1;
}
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>';
print $object->date_commande ? dol_print_date($object->date_commande, $usehourmin ? 'dayhour' : 'day') : '';
if ($object->hasDelay() && !empty($object->date_delivery) && !empty($object->date_commande)) {