';
print '
';
diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php
index 8150bae3e78..2a7bee7335f 100644
--- a/htdocs/blockedlog/admin/blockedlog_list.php
+++ b/htdocs/blockedlog/admin/blockedlog_list.php
@@ -495,7 +495,7 @@ if (is_array($blocks))
print '
'.$object_link.' | ';
// Amount
- print '
'.price($block->amounts).' | ';
+ print '
'.price($block->amounts).' | ';
// Details link
print '
'.img_info($langs->trans('ShowDetails')).' | ';
diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index 8a578eec735..6e46aee2435 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -526,6 +526,7 @@ if ($resql)
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
$caction=new CActionComm($db);
$arraylist=$caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0), '', 1);
+ $contactListCache = array();
while ($i < min($num, $limit))
{
@@ -645,7 +646,34 @@ if ($resql)
// Contact
if (! empty($arrayfields['a.fk_contact']['checked'])) {
print '
';
- if ($obj->fk_contact > 0)
+
+
+ $actionstatic->fetchResources();
+ if(!empty($actionstatic->socpeopleassigned))
+ {
+ $contactList = array();
+ foreach ($actionstatic->socpeopleassigned as $socpeopleId => $socpeopleassigned)
+ {
+ if(!isset($contactListCache[$socpeopleassigned['id']]))
+ {
+ // if no cache found we fetch it
+ $contact = new Contact($db);
+ if($contact->fetch($socpeopleassigned['id'])>0)
+ {
+ $contactListCache[$socpeopleassigned['id']] = $contact->getNomUrl(1,'',28);
+ $contactList[] = $contact->getNomUrl(1,'',28);
+ }
+ }
+ else{
+ // use cache
+ $contactList[] = $contactListCache[$socpeopleassigned['id']];
+ }
+ }
+ if(!empty($contactList)){
+ print implode(', ', $contactList);
+ }
+ }
+ elseif ($obj->fk_contact > 0) //keep for retrocompatibility with faraway event
{
$contactstatic->id=$obj->fk_contact;
$contactstatic->email=$obj->email;
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 753d92131cb..0c1cd1f1830 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -1330,9 +1330,9 @@ class Propal extends CommonObject
// Hook of thirdparty module
if (is_object($hookmanager))
{
- $parameters=array('objFrom'=>$this,'clonedObj'=>$clonedObj);
+ $parameters=array('objFrom'=>$this,'clonedObj'=>$object);
$action='';
- $reshook=$hookmanager->executeHooks('createFrom', $parameters, $clonedObj, $action); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
}
}
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 7362f30e5a8..488f512db56 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -1519,11 +1519,11 @@ if ($action == 'create' && $user->rights->commande->creer)
if ($element == 'order' || $element == 'commande') {
$element = $subelement = 'commande';
}
- if ($element == 'propal') {
+ elseif ($element == 'propal') {
$element = 'comm/propal';
$subelement = 'propal';
}
- if ($element == 'contract') {
+ elseif ($element == 'contract') {
$element = $subelement = 'contrat';
}
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index ccc3b305447..db022259e35 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -62,42 +62,52 @@ if ($id > 0 || ! empty($ref))
}
}
+$hookmanager->initHooks(array('directdebitcard','globalcard'));
+
+
/*
* Actions
*/
-if ($action == "new")
+$parameters = array('socid' => $socid);
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
+if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+
+if (empty($reshook))
{
- if ($object->id > 0)
+ if ($action == "new")
{
- $db->begin();
-
- $result = $object->demande_prelevement($user, GETPOST('withdraw_request_amount'));
- if ($result > 0)
+ if ($object->id > 0)
{
- $db->commit();
+ $db->begin();
- setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
- }
- else
- {
- $db->rollback();
- setEventMessages($object->error, $object->errors, 'errors');
+ $result = $object->demande_prelevement($user, GETPOST('withdraw_request_amount'));
+ if ($result > 0)
+ {
+ $db->commit();
+
+ setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
+ }
+ else
+ {
+ $db->rollback();
+ setEventMessages($object->error, $object->errors, 'errors');
+ }
}
+ $action='';
}
- $action='';
-}
-if ($action == "delete")
-{
- if ($object->id > 0)
+ if ($action == "delete")
{
- $result = $object->demande_prelevement_delete($user, GETPOST('did'));
- if ($result == 0)
+ if ($object->id > 0)
{
- header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
- exit;
+ $result = $object->demande_prelevement_delete($user, GETPOST('did'));
+ if ($result == 0)
+ {
+ header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
+ exit;
+ }
}
}
}
diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php
index 747bbdf828d..2dfbb5adf9d 100644
--- a/htdocs/compta/prelevement/create.php
+++ b/htdocs/compta/prelevement/create.php
@@ -52,42 +52,52 @@ $page = GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
+$hookmanager->initHooks(array('directdebitcreatecard','globalcard'));
+
+
/*
* Actions
*/
-// Change customer bank information to withdraw
-if ($action == 'modify')
-{
- for ($i = 1 ; $i < 9 ; $i++)
- {
- dolibarr_set_const($db, GETPOST("nom$i"), GETPOST("value$i"), 'chaine', 0, '', $conf->entity);
- }
-}
-if ($action == 'create')
-{
- // $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty
- $bprev = new BonPrelevement($db);
- $executiondate = dol_mktime(0, 0, 0, GETPOST('remonth'), (GETPOST('reday')+$conf->global->PRELEVEMENT_ADDDAYS), GETPOST('reyear'));
+$parameters = array('mode' => $mode, 'format' => $format, 'limit' => $limit, 'page' => $page, 'offset' => $offset);
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
+if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
- $result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format, $executiondate);
- if ($result < 0)
+if (empty($reshook))
+{
+ // Change customer bank information to withdraw
+ if ($action == 'modify')
{
- setEventMessages($bprev->error, $bprev->errors, 'errors');
- }
- elseif ($result == 0)
- {
- $mesg=$langs->trans("NoInvoiceCouldBeWithdrawed", $format);
- setEventMessages($mesg, null, 'errors');
- $mesg.=' '."\n";
- foreach($bprev->invoice_in_error as $key => $val)
+ for ($i = 1 ; $i < 9 ; $i++)
{
- $mesg.=''.$val." \n";
+ dolibarr_set_const($db, GETPOST("nom$i"), GETPOST("value$i"), 'chaine', 0, '', $conf->entity);
}
}
- else
+ if ($action == 'create')
{
- setEventMessages($langs->trans("DirectDebitOrderCreated", $bprev->getNomUrl(1)), null);
+ // $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty
+ $bprev = new BonPrelevement($db);
+ $executiondate = dol_mktime(0, 0, 0, GETPOST('remonth'), (GETPOST('reday')+$conf->global->PRELEVEMENT_ADDDAYS), GETPOST('reyear'));
+
+ $result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format, $executiondate);
+ if ($result < 0)
+ {
+ setEventMessages($bprev->error, $bprev->errors, 'errors');
+ }
+ elseif ($result == 0)
+ {
+ $mesg=$langs->trans("NoInvoiceCouldBeWithdrawed", $format);
+ setEventMessages($mesg, null, 'errors');
+ $mesg.=' '."\n";
+ foreach($bprev->invoice_in_error as $key => $val)
+ {
+ $mesg.=''.$val." \n";
+ }
+ }
+ else
+ {
+ setEventMessages($langs->trans("DirectDebitOrderCreated", $bprev->getNomUrl(1)), null);
+ }
}
}
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 0e08bfada90..a3ca781cd94 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -11,7 +11,7 @@
* Copyright (C) 2016 Bahfir abbes
* Copyright (C) 2017 ATM Consulting
* Copyright (C) 2017-2019 Nicolas ZABOURI
- * Copyright (C) 2017 Rui Strecht
+ * Copyright (C) 2017 Rui Strecht
* Copyright (C) 2018 Frédéric France
* Copyright (C) 2018 Josep Lluís Amador
*
@@ -53,6 +53,7 @@ abstract class CommonObject
/**
* @var string Error string
+ * @see $errors
*/
public $error;
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 31fc85e3c6a..45bc4525431 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2594,7 +2594,7 @@ class Form
}
$opt.= "\n";
- $optJson = array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'label2'=>$outlabel, 'desc'=>$outdesc, 'type'=>$outtype, 'price_ht'=>$outprice_ht, 'price_ttc'=>$outprice_ttc, 'pricebasetype'=>$outpricebasetype, 'tva_tx'=>$outtva_tx, 'qty'=>$outqty, 'discount'=>$outdiscount, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit);
+ $optJson = array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'label2'=>$outlabel, 'desc'=>$outdesc, 'type'=>$outtype, 'price_ht'=>price2num($outprice_ht), 'price_ttc'=>price2num($outprice_ttc), 'pricebasetype'=>$outpricebasetype, 'tva_tx'=>$outtva_tx, 'qty'=>$outqty, 'discount'=>$outdiscount, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
diff --git a/htdocs/core/tpl/object_discounts.tpl.php b/htdocs/core/tpl/object_discounts.tpl.php
index 4b0c8489a04..221ac012ec4 100644
--- a/htdocs/core/tpl/object_discounts.tpl.php
+++ b/htdocs/core/tpl/object_discounts.tpl.php
@@ -24,7 +24,7 @@
* $backtopage URL to come back to from discount modification pages
*/
-$classname = get_class($object);
+$objclassname = get_class($object);
$isInvoice = in_array($object->element, array('facture', 'invoice', 'facture_fourn', 'invoice_supplier'));
$isNewObject = empty($object->id) && empty($object->rowid);
@@ -53,11 +53,11 @@ if($isNewObject) print ' ('.$addrelativediscount.')';
// Is there is commercial discount or down payment available ?
if ($absolute_discount > 0) {
- if ($cannotApplyDiscount || ! $isInvoice || $isNewObject || $object->statut > $classname::STATUS_DRAFT || $object->type == $classname::TYPE_CREDIT_NOTE || $object->type == $classname::TYPE_DEPOSIT) {
+ if ($cannotApplyDiscount || ! $isInvoice || $isNewObject || $object->statut > $objclassname::STATUS_DRAFT || $object->type == $objclassname::TYPE_CREDIT_NOTE || $object->type == $objclassname::TYPE_DEPOSIT) {
$translationKey = ! empty($discount_type) ? 'HasAbsoluteDiscountFromSupplier' : 'CompanyHasAbsoluteDiscount';
$text = $langs->trans($translationKey, price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)).'.';
- if ($isInvoice && ! $isNewObject && $object->statut > $classname::STATUS_DRAFT && $object->type != $classname::TYPE_CREDIT_NOTE && $object->type != $classname::TYPE_DEPOSIT) {
+ if ($isInvoice && ! $isNewObject && $object->statut > $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) {
$text = $form->textwithpicto($text, $langs->trans('AbsoluteDiscountUse'));
}
@@ -77,11 +77,11 @@ if ($absolute_discount > 0) {
if ($absolute_creditnote > 0) {
// If validated, we show link "add credit note to payment"
- if ($cannotApplyDiscount || ! $isInvoice || $isNewObject || $object->statut != $classname::STATUS_VALIDATED || $object->type == $classname::TYPE_CREDIT_NOTE) {
+ if ($cannotApplyDiscount || ! $isInvoice || $isNewObject || $object->statut != $objclassname::STATUS_VALIDATED || $object->type == $objclassname::TYPE_CREDIT_NOTE) {
$translationKey = ! empty($discount_type) ? 'HasCreditNoteFromSupplier' : 'CompanyHasCreditNote';
$text = $langs->trans($translationKey, price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)) . '.';
- if ($isInvoice && ! $isNewObject && $object->statut == $classname::STATUS_DRAFT && $object->type != $classname::TYPE_DEPOSIT) {
+ if ($isInvoice && ! $isNewObject && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_DEPOSIT) {
$text = $form->textwithpicto($text, $langs->trans('CreditNoteDepositUse'));
}
@@ -101,7 +101,7 @@ if($absolute_discount <= 0 && $absolute_creditnote <= 0) {
$translationKey = ! empty($discount_type) ? 'HasNoAbsoluteDiscountFromSupplier' : 'CompanyHasNoAbsoluteDiscount';
print ' '.$langs->trans($translationKey).'.';
- if ($isInvoice && $object->statut == $classname::STATUS_DRAFT && $object->type != $classname::TYPE_CREDIT_NOTE && $object->type != $classname::TYPE_DEPOSIT) {
+ if ($isInvoice && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) {
print ' (' . $addabsolutediscount . ')';
}
}
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index f337a007a1a..bdbed6b2027 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -467,7 +467,8 @@ if (empty($reshook))
elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer)
{
- $result = $object->delete();
+ $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0);
+ $result = $object->delete(0, $also_update_stock);
if ($result > 0)
{
header("Location: ".DOL_URL_ROOT.'/expedition/index.php');
@@ -1642,7 +1643,26 @@ elseif ($id || $ref)
// Confirm deleteion
if ($action == 'delete')
{
- $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteSending'), $langs->trans("ConfirmDeleteSending", $object->ref), 'confirm_delete', '', 0, 1);
+ $formquestion = array();
+ if ($object->statut == Expedition::STATUS_CLOSED && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) {
+ $formquestion = array(
+ array(
+ 'label' => $langs->trans('ShipmentIncrementStockOnDelete'),
+ 'name' => 'alsoUpdateStock',
+ 'type' => 'checkbox',
+ 'value' => 0
+ ),
+ );
+ }
+ $formconfirm=$form->formconfirm(
+ $_SERVER['PHP_SELF'].'?id='.$object->id,
+ $langs->trans('DeleteSending'),
+ $langs->trans("ConfirmDeleteSending", $object->ref),
+ 'confirm_delete',
+ $formquestion,
+ 0,
+ 1
+ );
}
// Confirmation validation
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index c83a1172a03..b0bb148c1e2 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -1149,10 +1149,11 @@ class Expedition extends CommonObject
* Delete shipment.
* Warning, do not delete a shipment if a delivery is linked to (with table llx_element_element)
*
- * @param int $notrigger Disable triggers
- * @return int >0 if OK, 0 if deletion done but failed to delete files, <0 if KO
+ * @param int $notrigger Disable triggers
+ * @param bool $also_update_stock true if the stock should be increased back (false by default)
+ * @return int >0 if OK, 0 if deletion done but failed to delete files, <0 if KO
*/
- public function delete($notrigger = 0)
+ public function delete($notrigger = 0, $also_update_stock = false)
{
global $conf, $langs, $user;
@@ -1184,7 +1185,9 @@ class Expedition extends CommonObject
}
// Stock control
- if (! $error && $conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT)
+ if (! $error && $conf->stock->enabled &&
+ (($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) ||
+ ($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock)))
{
require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index 96a43c91f3a..bbaa5279373 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -1538,7 +1538,7 @@ class CommandeFournisseur extends CommonOrder
$desc=trim($desc);
// Check parameters
- if ($qty < 1 && ! $fk_product)
+ if ($qty < 0 && ! $fk_product)
{
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product"));
return -1;
diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php
index fc74890f150..6847af5edf1 100644
--- a/htdocs/fourn/class/fournisseur.product.class.php
+++ b/htdocs/fourn/class/fournisseur.product.class.php
@@ -430,8 +430,8 @@ class ProductFournisseur extends Product
$sql .= " " . $newnpr . ",";
$sql .= $conf->entity . ",";
$sql .= $delivery_time_days . ",";
- $sql .= (empty($supplier_reputation) ? 'NULL' : "'" . $this->db->escape($supplier_reputation) . "'");
- $sql .= (empty($barcode) ? 'NULL' : "'" . $this->db->escape($barcode) . "'");
+ $sql .= (empty($supplier_reputation) ? 'NULL' : "'" . $this->db->escape($supplier_reputation) . "'") . ",";
+ $sql .= (empty($barcode) ? 'NULL' : "'" . $this->db->escape($barcode) . "'") . ",";
$sql .= (empty($fk_barcode_type) ? 'NULL' : "'" . $this->db->escape($fk_barcode_type) . "'");
$sql .= ")";
@@ -462,7 +462,8 @@ class ProductFournisseur extends Product
if (empty($error)) {
$this->db->commit();
- return $idinserted;
+ $this->product_fourn_price_id = $idinserted;
+ return $this->product_fourn_price_id;
} else {
$this->db->rollback();
return -1;
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index dae11084fe1..48599a5bbf2 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -494,11 +494,35 @@ if ($id > 0 || ! empty($ref)) {
$sql = "SELECT l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref AS sref, SUM(l.qty) as qty,";
$sql .= " p.ref, p.label, p.tobatch, p.fk_default_warehouse";
+
+ // Enable hooks to alter the SQL query (SELECT)
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks(
+ 'printFieldListSelect',
+ $parameters,
+ $object,
+ $action
+ );
+ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+ $sql .= $hookmanager->resPrint;
+
$sql .= " FROM " . MAIN_DB_PREFIX . "commande_fournisseurdet as l";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON l.fk_product=p.rowid";
$sql .= " WHERE l.fk_commande = " . $object->id;
if (empty($conf->global->STOCK_SUPPORTS_SERVICES))
$sql .= " AND l.product_type = 0";
+
+ // Enable hooks to alter the SQL query (WHERE)
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks(
+ 'printFieldListWhere',
+ $parameters,
+ $object,
+ $action
+ );
+ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+ $sql .= $hookmanager->resPrint;
+
$sql .= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent, p.fk_default_warehouse"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product
$sql .= " ORDER BY p.ref, p.label";
@@ -528,7 +552,19 @@ if ($id > 0 || ! empty($ref)) {
print '' . $langs->trans("QtyDispatchedShort") . ' | ';
print '' . $langs->trans("QtyToDispatchShort") . ' | ';
print ' | ';
- print '' . $langs->trans("Warehouse") . ' | ';
+ print '' . $langs->trans("Warehouse") . ' | ';
+
+ // Enable hooks to append additional columns
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks(
+ 'printFieldListTitle',
+ $parameters,
+ $object,
+ $action
+ );
+ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+ print $hookmanager->resPrint;
+
print " |