本文整理匯總了PHP中task::getCustomerSummary方法的典型用法代碼示例。如果您正苦於以下問題:PHP task::getCustomerSummary方法的具體用法?PHP task::getCustomerSummary怎麽用?PHP task::getCustomerSummary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類task
的用法示例。
在下文中一共展示了task::getCustomerSummary方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: while
$customerSum = 0;
$customerCosts = 0;
while ($element = current($list)) {
$taskInst->activate($element);
echo "<tr class=\"light\"><td class=list><nobr><a href=\"" . $toolInst->encodeUrl("index.php?content=taskdetails.php&view=details&taskid=" . $taskInst->id) . "\" title=\"" . $lang['common_showTaskdetails'] . "\">" . substr($taskInst->subject, 0, 15) . "</a></nobr></td>\n";
echo "<td class=list><nobr>" . $toolInst->getTime("d.m.Y, H:i", $taskInst->time) . "</nobr></td>\n";
echo "<td><nobr class=" . $taskInst->getPriorityStyle() . ">" . $taskInst->getPriorityName() . "</nobr></td>\n";
echo "<td><nobr class=" . $taskInst->getTypeStyle() . ">" . $taskInst->getTypeName() . "</nobr></td>\n";
echo "<td><nobr class=" . $taskInst->getStatusStyle() . ">" . $taskInst->getStatusName() . "</nobr></td>\n";
echo "<td class=list align=right><nobr>" . $toolInst->formatTime($taskInst->getSummary()) . "</nobr></td></tr>\n";
$sum += $taskInst->getSummary();
$sum_private += $taskInst->getSummary(true);
$costs += $taskInst->getCosts();
$costs_private += $taskInst->getCosts(true);
$customerCosts += $taskInst->getCustomerCosts();
$customerSum += $taskInst->getCustomerSummary();
next($list);
}
echo "<tr><td class=list colspan=6> </td></tr>\n";
echo "<tr>\n";
echo "<td class=list colspan=4 align=right><b>" . $lang['common_summaryTime'] . " : </b></td>\n";
echo "<td class=list colspan=2 align=right><nobr><b>" . $toolInst->formatTime($sum) . "</b></nobr></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class=list_private colspan=4 align=right><b>" . $lang['common_private_jobs'] . " - " . $lang['common_summaryTime'] . " : </b></td>\n";
echo "<td class=list_private colspan=2 align=right><b>" . $toolInst->formatTime($sum_private) . "</b></td>\n";
echo "</tr>\n";
if ($loginInst->hasAccess("task.getSummary")) {
echo "<tr>\n";
echo "<td class=list colspan=4 align=right><b>" . $lang['common_roundedSummaryTime'] . " : </b></td>\n";
echo "<td class=list colspan=2 align=right><b>" . $toolInst->formatTime($toolInst->deductibleSeconds($sum)) . "</b></td>\n";
示例2:
$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;
$summary += $taskSum;
$summaryRounded += $toolInst->deductibleSeconds($taskSum);
$customerCosts += $customerTaskCosts;
$customerSummary += $customerTaskSummary;
$customerSummaryRounded += $customerTaskSummaryRounded;
$completeCosts += $taskInst->getCosts();
$completeSummary += $completeTaskSummary;
$completeSummaryRounded += $toolInst->deductibleSeconds($completeTaskSummary);
$completeCustomerCosts += $taskInst->getCustomerCosts();
$completeCustomerSummary += $completeTaskCustomerSummary;
$completeCustomerSummaryRounded += $toolInst->deductibleSeconds($completeTaskCustomerSummary);
if ($loginInst->hasAccess("task.getRate") && !$taskInst->isFixedPrice()) {
// rate for current task