Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

This commit is contained in:
Laurent Destailleur 2022-12-21 19:33:02 +01:00
parent bee9244747
commit 45fdebcda2
3 changed files with 4 additions and 4 deletions

View File

@ -85,7 +85,7 @@ $hookmanager->initHooks(array('takeposfrontend'), $facid);
$reshook = $hookmanager->executeHooks('TakeposReceipt', $parameters, $object); $reshook = $hookmanager->executeHooks('TakeposReceipt', $parameters, $object);
if (!empty($hookmanager->resPrint)) { if (!empty($hookmanager->resPrint)) {
print $hookmanager->resPrint; print $hookmanager->resPrint;
exit; return; // Receipt page can be called by the takepos/send.php page that use ob_start/end so we must use return and not exit to stop page
} }
// IMPORTANT: This file is sended to 'Takepos Printing' application. Keep basic file. No external files as css, js... If you need images use absolute path. // IMPORTANT: This file is sended to 'Takepos Printing' application. Keep basic file. No external files as css, js... If you need images use absolute path.

View File

@ -69,12 +69,12 @@ if ($action == "send") {
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db); $formmail = new FormMail($db);
$outputlangs = new Translate('', $conf); $outputlangs = new Translate('', $conf);
$model_id = $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE; $model_id = getDolGlobalString('TAKEPOS_EMAIL_TEMPLATE_INVOICE');
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'facture_send', $user, $outputlangs, $model_id); $arraydefaultmessage = $formmail->getEMailTemplate($db, 'facture_send', $user, $outputlangs, $model_id);
$subject = $arraydefaultmessage->topic; $subject = $arraydefaultmessage->topic;
ob_start(); // turn on output receipt ob_start(); // turn on output receipt
include 'receipt.php'; include DOL_DOCUMENT_ROOT.'/takepos/receipt.php';
$receipt = ob_get_contents(); // get the contents of the output buffer $receipt = ob_get_contents(); // get the contents of the output buffer
ob_end_clean(); ob_end_clean();