2015-12-01 05:06:34 +00:00
|
|
|
<?php
|
|
|
|
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
|
|
|
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
|
|
|
/-------------------------------------------------------------------------------------------------------/
|
|
|
|
|
2016-06-27 10:46:34 +00:00
|
|
|
@version 3.4.2
|
2016-08-14 17:10:01 +00:00
|
|
|
@build 11th August, 2016
|
2015-12-01 05:06:34 +00:00
|
|
|
@created 15th June, 2012
|
|
|
|
@package Cost Benefit Projection
|
|
|
|
@subpackage default_table_intervention_net_benefit.php
|
|
|
|
@author Llewellyn van der Merwe <http://www.vdm.io>
|
|
|
|
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
|
|
|
@copyright Copyright (C) 2015. All Rights Reserved
|
|
|
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
|
|
|
|
/-------------------------------------------------------------------------------------------------------/
|
|
|
|
Cost Benefit Projection Tool.
|
|
|
|
/------------------------------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
// No direct access to this file
|
|
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
|
|
|
|
$scaled = array('unscaled','scaled');
|
|
|
|
|
|
|
|
?>
|
|
|
|
<div id="view_inb">
|
|
|
|
<h1><?php echo JText::_('COM_COSTBENEFITPROJECTION_INTERVENTION_NET_BENEFIT'); ?></h1>
|
|
|
|
<?php if(isset($this->results->interventions) && CostbenefitprojectionHelper::checkArray($this->results->interventions)): ?>
|
|
|
|
<?php foreach ($this->results->interventions as $intervention) :?>
|
|
|
|
<?php if (isset($intervention->items)): ?>
|
|
|
|
<?php echo JText::sprintf("COM_COSTBENEFITPROJECTION_INTERVENTIONS_NAME_S", $intervention->name); ?> |
|
|
|
|
<?php
|
|
|
|
if($intervention->duration > 1){
|
|
|
|
echo JText::sprintf("COM_COSTBENEFITPROJECTION_DURATION_S_YEARS", $intervention->duration);
|
|
|
|
} else {
|
|
|
|
echo JText::sprintf('COM_COSTBENEFITPROJECTION_DURATION_S_YEAR', $intervention->duration);
|
|
|
|
}
|
|
|
|
?> |
|
|
|
|
<?php echo JText::sprintf('COM_COSTBENEFITPROJECTION_COVERAGE_S', round($intervention->coverage)); ?>%
|
|
|
|
|
|
|
|
<?php foreach ($scaled as $scale): ?>
|
|
|
|
<table id="tableINT_<?php echo $intervention->id ?>_<?php echo $scale; ?>"
|
2016-02-14 22:39:12 +00:00
|
|
|
class="footable table data metro-blue <?php echo $scale; ?>"
|
2015-12-01 05:06:34 +00:00
|
|
|
style="display: <?php echo ($scale == 'unscaled') ? 'table' : 'none'; ?>;"
|
|
|
|
data-page-size="50" >
|
|
|
|
<thead>
|
|
|
|
<tr >
|
2016-02-14 22:39:12 +00:00
|
|
|
<th data-toggle="true"><?php echo JText::_('COM_COSTBENEFITPROJECTION_CAUSERISK_FACTOR'); ?></th>
|
|
|
|
<th width="8%" data-hide="phone,tablet"><?php echo JText::_('COM_COSTBENEFITPROJECTION_CONTRIBUTION_TO_COSTS'); ?></th>
|
2016-05-10 16:36:09 +00:00
|
|
|
<th width="8%" data-hide="phone,tablet"><?php echo JText::_('COM_COSTBENEFITPROJECTION_COST_PER_EMPLOYEE'); ?></th>
|
2016-02-14 22:39:12 +00:00
|
|
|
<th width="5%" data-hide="phone,tablet"><?php echo JText::_('COM_COSTBENEFITPROJECTION_REDUCTION_IN_MORBIDITY_COSTS'); ?></th>
|
|
|
|
<th width="5%" data-hide="phone,tablet"><?php echo JText::_('COM_COSTBENEFITPROJECTION_REDUCTION_IN_MORTALITY_COST'); ?></th>
|
|
|
|
<th width="11%" data-hide="phone,tablet"><?php echo JText::_('COM_COSTBENEFITPROJECTION_COST_OF_PROBLEM'); ?></th>
|
2016-05-10 16:36:09 +00:00
|
|
|
<th width="11%" data-hide="phone,tablet"><?php echo JText::_('COM_COSTBENEFITPROJECTION_COST_OF_INTERVENTION'); ?></th>
|
|
|
|
<th width="11%" data-hide="phone"><?php echo JText::_('COM_COSTBENEFITPROJECTION_BENEFIT'); ?></th>
|
2016-02-14 22:39:12 +00:00
|
|
|
<th width="5%" data-hide="phone,tablet"><?php echo JText::_('COM_COSTBENEFITPROJECTION_COST_BENEFIT_RATIO'); ?></th>
|
2015-12-01 05:06:34 +00:00
|
|
|
<th width="11%"><?php echo JText::_('COM_COSTBENEFITPROJECTION_NET_BENEFIT'); ?></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php if(isset($intervention->items) && is_object($intervention->items) || is_array($intervention->items)):?>
|
|
|
|
<?php foreach ($intervention->items as $key => &$item): ?>
|
|
|
|
<tr>
|
|
|
|
<th data-value='<?php echo $item->name; ?>' scope="row"><?php echo $item->name; ?></th>
|
|
|
|
<td data-value='<?php echo $item->{'contribution_to_cost_'.$scale}; ?>' ><?php echo round($item->{'contribution_to_cost_'.$scale}, 3); ?>%</td>
|
2016-05-10 16:36:09 +00:00
|
|
|
<td data-value='<?php echo $item->cpe; ?>' ><?php echo $item->costmoney_per_employee; ?></td>
|
2015-12-01 05:06:34 +00:00
|
|
|
<td data-value='<?php echo $item->mbr; ?>' ><?php echo $item->mbr; ?>%</td>
|
|
|
|
<td data-value='<?php echo $item->mtr; ?>' ><?php echo $item->mtr; ?>%</td>
|
|
|
|
<td data-value='<?php echo $item->{'cost_of_problem_'.$scale}; ?>' ><?php echo $item->{'costmoney_of_problem_'.$scale}; ?></td>
|
2016-05-10 16:36:09 +00:00
|
|
|
<td data-value='<?php echo $item->cost; ?>' ><?php echo $item->costmoney; ?></td>
|
|
|
|
<td data-value='<?php echo $item->{'benefit_'.$scale}; ?>' ><?php echo $item->{'benefitmoney_'.$scale}; ?></td>
|
2015-12-01 05:06:34 +00:00
|
|
|
<td data-value='<?php echo $item->{'benefit_ratio_'.$scale}; ?>' >1:<?php echo round($item->{'benefit_ratio_'.$scale},3); ?></td>
|
2016-05-10 16:36:09 +00:00
|
|
|
<td data-value='<?php echo $item->{'net_benefit_'.$scale}; ?>' ><?php echo $item->{'net_benefitmoney_'.$scale}; ?></td>
|
2015-12-01 05:06:34 +00:00
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<th scope="row"><?php echo JText::_('TOTALS'); ?></th>
|
|
|
|
<td><?php echo $intervention->totals->{'contribution_to_cost_'.$scale}; ?>%</td>
|
2016-05-10 16:36:09 +00:00
|
|
|
<td><?php echo $intervention->totals->costmoney_per_employee; ?></td>
|
2015-12-01 05:06:34 +00:00
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td><?php echo $intervention->totals->{'costmoney_of_problem_'.$scale}; ?></td>
|
2016-05-10 16:36:09 +00:00
|
|
|
<td><?php echo $intervention->totals->costmoney; ?></td>
|
|
|
|
<td><?php echo $intervention->totals->{'benefitmoney_'.$scale}; ?></td>
|
2015-12-01 05:06:34 +00:00
|
|
|
<td></td>
|
2016-05-10 16:36:09 +00:00
|
|
|
<td><?php echo $intervention->totals->{'net_benefitmoney_'.$scale}; ?></td>
|
2015-12-01 05:06:34 +00:00
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<div class="uk-alert uk-alert-warning alert alert-warning"><?php echo JText::_('COM_COSTBENEFITPROJECTION_NO_INTERVENTION_SELECTED'); ?></div>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|