Release 1.20.1 (#3317)
- improved timesheet calculator with changesets and priority - calculate and include exported stats (e.g. available in export templates) - added hourly rate column to timesheet listing
This commit is contained in:
@@ -50,4 +50,9 @@ class BillableCalculator implements CalculatorInterface
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function getPriority(): int
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,9 @@ final class DurationCalculator implements CalculatorInterface
|
||||
|
||||
$this->roundings->applyRoundings($record);
|
||||
}
|
||||
|
||||
public function getPriority(): int
|
||||
{
|
||||
return 200;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,4 +44,9 @@ class RateCalculator implements CalculatorInterface
|
||||
$record->setFixedRate($rate->getFixedRate());
|
||||
}
|
||||
}
|
||||
|
||||
public function getPriority(): int
|
||||
{
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,18 @@ interface CalculatorInterface
|
||||
* The methods return value will not be evaluated.
|
||||
*
|
||||
* @param Timesheet $record
|
||||
* @ param array<string, array<mixed, mixed>> $changeset
|
||||
* @return void
|
||||
*/
|
||||
public function calculate(Timesheet $record);
|
||||
public function calculate(Timesheet $record/*, array $changeset*/);
|
||||
|
||||
/*
|
||||
* FIXME use with Kimai 2.0
|
||||
*
|
||||
* Default priority is 1000 (after all system Calculator were executed).
|
||||
* The higher the priority the later it will be executed.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
//public function getPriority(): int;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user