diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index b07058ccd5a..875c191d482 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1967,6 +1967,7 @@ if ($id > 0 || ! empty($ref)) if($conf->$object->enabled) { $propal->showLinkedObjectBlock($object,$objectid,$somethingshown); + $somethingshown = 1; } } diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index a63cac1f291..9a34bf4d3a1 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -22,7 +22,7 @@ '; $somethingshown=1; } +if ($somethingshown) { echo '
'; } print_titre($langs->trans('RelatedOrders')); ?> diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index 447bb83f6b2..9255038b494 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -22,7 +22,7 @@ '; $somethingshown=1; } +if ($somethingshown) { echo '
'; } if ($num > 1) print_titre($langs->trans("RelatedBills")); else print_titre($langs->trans("RelatedBill")); ?> diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index 2deb6372f27..fbb03d4bd3e 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -512,8 +512,7 @@ if ($id > 0 || ! empty($ref)) { if($conf->$object->enabled) { - $propal->showLinkedObjectBlock($object,$objectid,$somethingshown); - $somethingshown = 1; + $somethingshown=$propal->showLinkedObjectBlock($object,$objectid,$somethingshown); } } diff --git a/htdocs/core/commonobject.class.php b/htdocs/core/commonobject.class.php index 8121647dcc2..9f2da3f7e45 100644 --- a/htdocs/core/commonobject.class.php +++ b/htdocs/core/commonobject.class.php @@ -1032,6 +1032,7 @@ class CommonObject $linkedObjectBlock = new $class($this->db); if ($object == 'facture') $object = 'compta/'.$object; include(DOL_DOCUMENT_ROOT.'/'.$object.'/tpl/linkedobjectblock.tpl.php'); + return $num; } }