Пример #1
0
        <th width="10px" align="center"><?php 
echo $AppUI->_('Difference');
?>
</th>
    </tr>
    <?php 
//TODO: rotate the headers by 90 degrees?
$activeOnly = $active_projects ? true : false;
$projectList = CCompany::getProjects($AppUI, $company_id, $activeOnly);
$bcode = new CSystem_Bcode();
$project = new CProject();
if (count($projectList)) {
    foreach ($projectList as $projectItem) {
        $project->loadFull(null, $projectItem['project_id']);
        $criticalTasks = $project->getCriticalTasks($projectItem['project_id']);
        $costs = $bcode->calculateProjectCost($projectItem['project_id'], $start_date->format(FMT_DATETIME_MYSQL), $end_date->format(FMT_DATETIME_MYSQL));
        $pstart = new w2p_Utilities_Date($project->project_start_date);
        $pend = intval($criticalTasks[0]['task_end_date']) ? new w2p_Utilities_Date($criticalTasks[0]['task_end_date']) : new w2p_Utilities_Date();
        $filterStart = $start_date;
        $filterEnd = $end_date;
        $workingDaysInSpans = $filterStart->findDaysInRangeOverlap($pstart, $pend, $filterStart, $filterEnd);
        $workingDaysForProj = $pstart->workingDaysInSpan($pend);
        $factor = $workingDaysInSpans / $workingDaysForProj;
        $factor = $factor > 1 ? 1 : $factor;
        ?>
<tr>
                <td width="10" align="right" style="border: outset #eeeeee 1px;background-color:#<?php 
        echo $project->project_color_identifier;
        ?>
">
                    <font color="<?php 
Пример #2
0
                                                <?php 
    echo $w2Pconfig['currency_symbol'];
    ?>
&nbsp;
                                                <?php 
    echo formatCurrency($totalBudget, $AppUI->getPref('CURRENCYFORM'));
    ?>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    <table cellspacing="1" cellpadding="2" border="0" width="100%">
                                        <?php 
    $bcode = new CSystem_Bcode();
    $results = $bcode->calculateProjectCost($project_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'];
        ?>
&nbsp;
                                                    <?php 
        $amount = 0;