Merge pull request #18485 from fappels/14_fix_supplier_order_card

Fix warning on supplier order card when reception enabled.
This commit is contained in:
Laurent Destailleur 2021-08-24 15:31:05 +02:00 committed by GitHub
commit 1c665c34cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2466,7 +2466,7 @@ if ($action == 'create') {
$labelofbutton = $langs->trans('ReceiveProducts');
if ($conf->reception->enabled) {
$labelofbutton = $langs->trans("CreateReception");
if (!empty($object->linkedObjects)) {
if (!empty($object->linkedObjects['reception'])) {
foreach ($object->linkedObjects['reception'] as $element) {
if ($element->statut >= 0) {
$hasreception = 1;