Skip to content

Commit

Permalink
Merge pull request #4367 from benlo06/fr_4366
Browse files Browse the repository at this point in the history
CLOSE #4366 Add hook for use custom ticket template
  • Loading branch information
eldy committed Jan 10, 2016
2 parents 8653e7f + ca3b588 commit 2739fdc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion htdocs/cashdesk/validation_ticket.php
Expand Up @@ -24,12 +24,19 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');

$obj_facturation = unserialize($_SESSION['serObjFacturation']);
unset($_SESSION['serObjFacturation']);

$hookmanager->initHooks(array('cashdeskTplTicket'));

require ('tpl/ticket.tpl.php');
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters,$obj_facturation);
if (empty($reshook))
{
require ('tpl/ticket.tpl.php');
}


$_SESSION['serObjFacturation'] = serialize($obj_facturation);
Expand Down

0 comments on commit 2739fdc

Please sign in to comment.