Add hooks to add column in list of payment modes

This commit is contained in:
Laurent Destailleur 2019-01-28 01:46:59 +01:00
parent 46bc078481
commit 4398649af6
2 changed files with 11 additions and 0 deletions

View File

@ -446,6 +446,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n";
print '</tr>'."\n";

View File

@ -832,6 +832,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
print '<td align="center">'.$langs->trans('Default').'</td>';
print '<td>'.$langs->trans('Note').'</td>';
print '<td>'.$langs->trans('DateModification').'</td>';
// Hook fields
$parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>'');
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
print "<td></td>";
print "</tr>\n";
@ -917,6 +922,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
print '<td>';
print dol_print_date($companypaymentmodetemp->tms, 'dayhour');
print '</td>';
// Fields from hook
$parameters=array('arrayfields'=>array(), 'obj'=>$obj);
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
print '<td align="right" class="nowraponall">';
if ($user->rights->societe->creer)
{