diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php
index 071c2520a74..543b668a7df 100644
--- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php
@@ -32,8 +32,10 @@ global $noMoreLinkedObjectBlockAfter;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
-
-global $linkedObjectBlock;
+/**
+ * @var CommonObject $object
+ */
+$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
$langs->load("bills");
@@ -76,12 +78,12 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
}
print '';
print '
'.$objectlink->getNomUrl(1).' | ';
- print ''.dol_escape_htmltag($objectlink->ref_client).' | ';
+ print ''.dol_escape_htmltag($objectlink->ref_customer).' | ';
print ''.dol_print_date($objectlink->date, 'day').' | ';
print '';
if (!empty($objectlink) && $objectlink->element == 'facture' && $user->hasRight('facture', 'lire')) {
'@phan-var-force Facture $objectlink';
- if ($objectlink->statut != 3) {
+ if ($objectlink->status != 3) {
// If not abandoned
$total += $objectlink->total_ht;
echo price($objectlink->total_ht);
diff --git a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php
index 24b6a639992..839435d8c7e 100644
--- a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php
+++ b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php
@@ -3,6 +3,7 @@
* Copyright (C) 2013 Juanjo Menent
* Copyright (C) 2014 Marcos García
* Copyright (C) 2024 MDW
+ * Copyright (C) 2025 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -33,8 +34,13 @@ global $noMoreLinkedObjectBlockAfter;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
+/**
+ * @var CommonObject $object
+ * @var Translate $langs
+ */
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
-'@phan-var-force CommonObject[] $linkedObjectBlock';
+'@phan-var-force FactureRec[] $linkedObjectBlock';
+/** @var FactureRec[] $linkedObjectBlock */
$langs->load("bills");
|