From 49315de03a5539f9eea7c3708d817c4279755103 Mon Sep 17 00:00:00 2001 From: Christian Humpel Date: Wed, 17 Aug 2022 00:04:22 +0200 Subject: [PATCH 1/4] Fix #21768 The Contact is now showing in the card, if no company is selected. --- htdocs/user/card.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 597390e9f49..dc365aad149 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2293,6 +2293,12 @@ if ($action == 'create' || $action == 'adduserldap') { print ' ('.$langs->trans("DomainUser").')'; } } elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact + print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' '); // We keep thirdparty empty, contact is already set + print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1); + if ($object->ldap_sid) { + print ' ('.$langs->trans("DomainUser").')'; + } + } elseif (!($object->socid > 0) && $object->contact_id > 0) { // internal user with a link to a contact print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1); if ($object->ldap_sid) { From 5ddd0c20ae6f01ba9572b30c0c7148cf9dfbbeb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?This=20Charl=C3=A8ne?= <1179011+defrance@users.noreply.github.com> Date: Mon, 22 Aug 2022 13:57:23 +0200 Subject: [PATCH 2/4] php V8 warning --- htdocs/fourn/commande/card.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 2d0fc3382df..01b15b5d3a9 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2079,6 +2079,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 ''.$langs->trans("Date").''; print $object->date_commande ? dol_print_date($object->date_commande, $usehourmin ? 'dayhour' : 'day') : ''; if ($object->hasDelay() && !empty($object->date_delivery) && !empty($object->date_commande)) { From 45c0b74649844b7d7fac641a5162b0bfc3a3ddc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?This=20Charl=C3=A8ne?= <1179011+defrance@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:02:40 +0200 Subject: [PATCH 3/4] Update functions2.lib.php --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index ac051fd92e0..f9944164178 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -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)) { if ($object->user_approve->id) { print $object->user_approve->getNomUrl(-1, '', 0, 0, 0); } else { From 6f77df331c7f73477388bb6a024db54156923f0e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Aug 2022 15:09:38 +0200 Subject: [PATCH 4/4] Update functions2.lib.php --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index f9944164178..cad97108733 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -416,7 +416,7 @@ function dol_print_object_info($object, $usetable = 0) } else { print ': '; } - if (!empty($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 {