NEW: Add hook on margin list page
This commit is contained in:
parent
12b4909c45
commit
354b784279
@ -74,6 +74,9 @@ if ($user->rights->margins->read->all) {
|
|||||||
}
|
}
|
||||||
$result = restrictedArea($user, 'margins');
|
$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
|
* Actions
|
||||||
@ -205,8 +208,11 @@ if ($result)
|
|||||||
else // value is 'costprice' or 'pmp'
|
else // value is 'costprice' or 'pmp'
|
||||||
$labelcostprice = 'CostPrice';
|
$labelcostprice = 'CostPrice';
|
||||||
|
|
||||||
|
$moreforfilter = '';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print '<div class="div-table-responsive">';
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if ($agentid > 0)
|
if ($agentid > 0)
|
||||||
@ -299,7 +305,8 @@ if ($result)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -62,6 +62,9 @@ if (!empty($_POST['startdatemonth']))
|
|||||||
if (!empty($_POST['enddatemonth']))
|
if (!empty($_POST['enddatemonth']))
|
||||||
$enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
$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
|
* View
|
||||||
@ -255,8 +258,11 @@ if ($result)
|
|||||||
else // value is 'costprice' or 'pmp'
|
else // value is 'costprice' or 'pmp'
|
||||||
$labelcostprice = 'CostPrice';
|
$labelcostprice = 'CostPrice';
|
||||||
|
|
||||||
|
$moreforfilter = '';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print '<div class="div-table-responsive">';
|
||||||
|
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if (!empty($client)) {
|
if (!empty($client)) {
|
||||||
@ -359,7 +365,8 @@ if ($result)
|
|||||||
print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price($markRate, null, null, null, null, $rounding)."%")."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -76,6 +76,9 @@ if (!empty($_POST['startdatemonth']))
|
|||||||
if (!empty($_POST['enddatemonth']))
|
if (!empty($_POST['enddatemonth']))
|
||||||
$enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
$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
|
* View
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user