NEW add total weighted amount in project list
This commit is contained in:
parent
4ea042213e
commit
7246b63542
@ -702,6 +702,7 @@ print "</tr>\n";
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
|
$totalarray['val'] = array();
|
||||||
while ($i < min($num, $limit))
|
while ($i < min($num, $limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -858,12 +859,15 @@ while ($i < min($num, $limit))
|
|||||||
// Opp weighted amount
|
// Opp weighted amount
|
||||||
if (!empty($arrayfields['opp_weighted_amount']['checked']))
|
if (!empty($arrayfields['opp_weighted_amount']['checked']))
|
||||||
{
|
{
|
||||||
|
if (!isset($totalarray['val']['opp_weighted_amount'])) $totalarray['val']['opp_weighted_amount'] = 0;
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if ($obj->opp_weighted_amount) {
|
if ($obj->opp_weighted_amount) {
|
||||||
print price($obj->opp_weighted_amount, 1, $langs, 1, -1, -1, '');
|
print price($obj->opp_weighted_amount, 1, $langs, 1, -1, -1, '');
|
||||||
|
$totalarray['val']['opp_weighted_amount'] += $obj->opp_weighted_amount;
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
if (! $i) $totalarray['pos'][$totalarray['nbfield']] = 'opp_weighted_amount';
|
||||||
}
|
}
|
||||||
// Budget
|
// Budget
|
||||||
if (! empty($arrayfields['p.budget_amount']['checked']))
|
if (! empty($arrayfields['p.budget_amount']['checked']))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user