Skip to content

Commit

Permalink
FIX: Add missing list value hook for appended column
Browse files Browse the repository at this point in the history
In the warehouse stock list, there is a 'printFieldPreListTitle' hook to prepend a new column in the table list and a 'printFieldListTitle' hook to append a new column in the table list. However, the 'printFieldListValue' hook shall be renamed as 'printFieldPreListValue' to populate any pre-pended columns whereas the hook named 'printFieldListValue' shall be moved at the end of the table to be consistent and be able to populate the appended column.
  • Loading branch information
omogenot authored Sep 21, 2024
1 parent 6ce09ce commit e284548
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion htdocs/product/stock/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
print '<tr class="oddeven">';

$parameters = array('obj' => $objp, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
$reshook = $hookmanager->executeHooks('printFieldPreListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

$productstatic->id = $objp->rowid;
Expand Down Expand Up @@ -843,6 +843,10 @@
print "</a></td>";
}

$parameters = array('obj' => $objp, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

print "</tr>";

$i++;
Expand Down

0 comments on commit e284548

Please sign in to comment.