diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php
index 4080822b9ef..852bf4934d5 100644
--- a/htdocs/margin/agentMargins.php
+++ b/htdocs/margin/agentMargins.php
@@ -74,6 +74,9 @@ if ($user->rights->margins->read->all) {
}
$result = restrictedArea($user, 'margins');
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$object = new User($db);
+$hookmanager->initHooks(array('marginagentlist'));
/*
* Actions
@@ -205,8 +208,11 @@ if ($result)
else // value is 'costprice' or 'pmp'
$labelcostprice = 'CostPrice';
+ $moreforfilter = '';
+
$i = 0;
- print "
";
+ print '';
+ print '
'."\n";
print '';
if ($agentid > 0)
@@ -299,7 +305,8 @@ if ($result)
print "
\n";
}
}
- print "
";
+ print "
";
+ print '';
}
else
{
diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php
index 35dde9a2e62..ed0a2a01b34 100644
--- a/htdocs/margin/customerMargins.php
+++ b/htdocs/margin/customerMargins.php
@@ -62,6 +62,9 @@ if (!empty($_POST['startdatemonth']))
if (!empty($_POST['enddatemonth']))
$enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$object = new Societe($db);
+$hookmanager->initHooks(array('margincustomerlist'));
/*
* View
@@ -255,8 +258,11 @@ if ($result)
else // value is 'costprice' or 'pmp'
$labelcostprice = 'CostPrice';
+ $moreforfilter = '';
+
$i = 0;
- print "";
+ print '';
+ print '
'."\n";
print '';
if (!empty($client)) {
@@ -359,7 +365,8 @@ if ($result)
print "| ".(($markRate === '') ? 'n/a' : price($markRate, null, null, null, null, $rounding)."%")." | \n";
print "
\n";
- print "
";
+ print "
";
+ print '';
}
else
{
diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php
index 4b9c271cc5c..27354556910 100644
--- a/htdocs/margin/productMargins.php
+++ b/htdocs/margin/productMargins.php
@@ -76,6 +76,9 @@ if (!empty($_POST['startdatemonth']))
if (!empty($_POST['enddatemonth']))
$enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$object = new Product($db);
+$hookmanager->initHooks(array('marginproductlist'));
/*
* View