Merge pull request #16790 from AlexisLaurier/addGetNomUrlToInvoice

add invoice getNomUrl hook
This commit is contained in:
Laurent Destailleur 2021-03-18 22:57:37 +01:00 committed by GitHub
commit 43494df56c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1543,6 +1543,13 @@ class Facture extends CommonInvoice
}
}
global $action, $hookmanager;
$hookmanager->initHooks(array('invoicedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result, 'notooltip' => $notooltip, 'addlinktonotes' => $addlinktonotes, 'save_lastsearch_value'=> $save_lastsearch_value, 'target' => $target);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) $result = $hookmanager->resPrint;
else $result .= $hookmanager->resPrint;
return $result;
}