<?php echo $w2Pconfig['currency_symbol']; ?> <?php echo formatCurrency($totalBudget, $AppUI->getPref('CURRENCYFORM')); ?> </td> </tr> </table> </td> <td class="hilite"> <table cellspacing="1" cellpadding="2" border="0" width="100%"> <?php $bcode = new CSystem_Bcode(); $results = $bcode->calculateTaskCost($task_id); foreach ($billingCategory as $id => $category) { ?> <tr> <td align="right" nowrap="nowrap"> <?php echo $AppUI->_($category); ?> </td> <td nowrap="nowrap" style="text-align: right; padding-left: 40px;"> <?php echo $w2Pconfig['currency_symbol']; ?> <?php $amount = 0;
?> </th> <th width="10px" align="center"><?php echo $AppUI->_('Difference'); ?> </th> </tr> <?php //TODO: rotate the headers by 90 degrees? $task = new CTask(); $taskList = $task->getAllowedTaskList(null, $project_id); $bcode = new CSystem_Bcode(); if (count($taskList)) { foreach ($taskList as $taskItem) { $task->loadFull(null, $taskItem['task_id']); $costs = $bcode->calculateTaskCost($taskItem['task_id'], $start_date->format(FMT_DATETIME_MYSQL), $end_date->format(FMT_DATETIME_MYSQL)); $tstart = new w2p_Utilities_Date($task->task_start_date); $tend = new w2p_Utilities_Date($task->task_end_date); $filterStart = $start_date; $filterEnd = $end_date; $workingDaysInSpans = $filterStart->findDaysInRangeOverlap($tstart, $tend, $filterStart, $filterEnd); $workingDaysForTask = $tstart->workingDaysInSpan($tend); $factor = $workingDaysInSpans / $workingDaysForTask; $factor = $factor > 1 ? 1 : $factor; ?> <tr> <td align="center"><?php echo sprintf('%.0f%%', $task->task_percent_complete); ?> </td> <td>