Menu

#17 serious summary error

open
nobody
None
5
2004-01-13
2004-01-13
Arne Kepp
No

While doing the end-of-year stuff we discovered the
following:

If you create a report for a period of time that is a
subset of the time a task spans, only jobs within the
specified period will be listed, but the summaries,
after each task, are time and price for the entire task.

This is due to the use of
$taskCosts = $taskInst->getCosts();
in reports.php (approximately line 563)

I have change this in my copy:
collecting taskSum in the jobList loop (approximately
line 544)
while ($jobElement = current($jobList)) {
// list all jobs in xml file
$jobInst->activate($jobElement);
$taskSum += $jobInst->getSummary();
...

And replacing the $taskCosts line above with:
if ($taskInst->fixedPrice == "" || $tasInst->fixedPrice
== "0") {
$taskCosts =
($toolInst->deductibleSeconds($taskSum) / 3600) *
$taskInst->getRate();
} else {
$taskCosts = $taskInst->fixedPrice;
}

(I have also implemented some changes that allow
negative fixed prices, thus I check for zero and ""
instead of <= 0.)

I think this is a pretty serious error, as it may lead
people to unintentionally overcharge their customers,
if they send out bills for uncompleted tasks.

Discussion

  • allen morales

    allen morales - 2004-02-14

    Logged In: YES
    user_id=946867

    You hit the spot !, I noticed this problem just yesterday and
    applied your patch, still missing in the total the roundings, I'll
    check out the script and post my findings.

    allen

     
  • Arne Kepp

    Arne Kepp - 2004-02-15

    Logged In: YES
    user_id=822860

    I think I fixed that too after I submitted this bug report.
    I'll try to update the CVS later this week, just wanted
    someone to confirm this... it seemed rather big to have gone
    by unnoticed.

     
  • Olaf Willuhn

    Olaf Willuhn - 2004-02-17

    Logged In: YES
    user_id=246309

    please make a "cvs update reports.php" and "cvs update
    inc/report.inc.php" before you commit your fix. I did some small
    additions (added update() in report.inc.php and added some lines at
    the end of reports.php

     
  • Arne Kepp

    Arne Kepp - 2004-02-21

    Logged In: YES
    user_id=822860

    Updated CVS, somebody test please? Not sure about allen506s
    comment "in the total the roundings", maybe there is
    something I missed

     

Log in to post a comment.

MongoDB Logo MongoDB