Ejemplo n.º 1
0
 echo "<td class=list_private colspan=" . $colspan . " align=right><b>" . $lang['common_private_jobs'] . " - " . $lang['common_summaryTime'] . " : </b></td>\n";
 echo "<td class=list_private align=right><b>" . $toolInst->formatTime($taskInst->getSummary(true)) . "</b></td>\n";
 echo "</tr>\n";
 if ($projectInst->rate || $userInst->rate) {
     if ($loginInst->hasAccess("task.getSummary")) {
         echo "<tr>\n";
         echo "<td class=list colspan=" . $colspan . " align=right><b>" . $lang['common_roundedSummaryTime'] . " : </b></td>\n";
         echo "<td class=list align=right><b>" . $toolInst->formatTime($toolInst->deductibleSeconds($taskInst->getSummary())) . "</b></td>\n";
         echo "</tr>\n";
     }
     if ($loginInst->hasAccess("task.getCosts")) {
         echo "<tr>\n";
         if ($taskInst->fixedPrice > "0") {
             echo "<td class=list colspan=" . $colspan . " align=right><b>" . $lang['common_summaryCosts'] . " </b> (" . $lang['tasks_fixedPrice'] . ") <b>:</b></td>\n";
         } else {
             echo "<td class=list colspan=" . $colspan . " align=right><b>summary costs </b> (" . $taskInst->getRate() . " " . $config['currency'] . "/" . $lang['common_hour'] . ") <b>:</b></td>\n";
         }
         echo "<td class=list align=right><b>" . $toolInst->formatCurrency($taskInst->getCosts(true)) . "</b></td>\n";
         echo "</tr>\n";
     }
     if ($loginInst->hasAccess("task.getCustomerCosts")) {
         echo "<tr>\n";
         if ($taskInst->fixedPrice > "0") {
             echo "<td class=list colspan=" . $colspan . " align=right><b>" . $lang['common_customerCosts'] . "</b> (" . $lang['tasks_fixedPrice'] . ") <b>:</b></td>\n";
         } else {
             echo "<td class=list colspan=" . $colspan . " align=right><b>" . $lang['common_customerCosts'] . "</b> (" . $lang['common_withoutBugsAndTodos'] . ") <b>:</b></td>\n";
         }
         echo "<td class=list align=right><b>" . $toolInst->formatCurrency($taskInst->getCustomerCosts()) . "</b></td>\n";
         echo "</tr>\n";
     }
 }
Ejemplo n.º 2
0
         $reportInst->append("    </job>");
         $stylePrivate = $jobInst->isFlag(JOB_FLAG_PRIVATE) ? "_private" : "";
         echo "<tr>";
         echo "<td class=list{$stylePrivate}>" . $jobInst->comment . "</td>";
         echo "<td class=list{$stylePrivate}><nobr>" . $toolInst->getTime("", $jobInst->start) . "</nobr></td>";
         echo "<td class=list{$stylePrivate}><nobr>" . $toolInst->getTime("", $jobInst->stop) . "</nobr></td>";
         echo "<td class=list{$stylePrivate} align=right>" . $toolInst->formatTime($jobInst->getSummary()) . "</td>";
         echo "</tr>";
         next($jobList);
     }
 }
 // calculate task summary
 if ($taskInst->isfixedPrice()) {
     $taskCosts = $taskInst->fixedPrice;
 } else {
     $taskCosts = $toolInst->deductibleSeconds($taskSum) / 3600 * $taskInst->getRate();
 }
 // calculate customer part
 $customerTaskCosts = 0;
 $customerTaskSummary = 0;
 $customerTaskSummaryRounded = 0;
 if ($taskInst->hasToPay()) {
     $customerTaskCosts = $taskCosts;
     $customerTaskSummary = $taskSum;
     $customerTaskSummaryRounded = $toolInst->deductibleSeconds($taskSum);
 }
 // determine summaries for completed jobs (not only the shown jobs)
 $completeTaskSummary = $taskInst->getSummary();
 $completeTaskCustomerSummary = $taskInst->getCustomerSummary();
 // add summaries to overall summaries
 $costs += $taskCosts;