fixed multiple budget validation checks (#3489)

* fix budget check for monthly budgets for records with a changed month
* fix API update of begin and end
* fix update of project and activity
This commit is contained in:
Kevin Papst
2022-08-29 01:03:44 +02:00
committed by GitHub
parent 7c3a08057d
commit 0eb5c0a08a
2 changed files with 31 additions and 12 deletions

View File

@@ -411,6 +411,7 @@ class TimesheetBudgetUsedValidatorTest extends ConstraintValidatorTestCase
$timesheet->method('getRate')->willReturn($rawData['rate']);
$timesheet->method('getBegin')->willReturn($begin);
$timesheet->method('getEnd')->willReturn($end);
$timesheet->method('getDuration')->willReturn($end->getTimestamp() - $begin->getTimestamp());
$timesheet->method('getUser')->willReturn(new User());
$timesheet->method('getProject')->willReturn($project);
$timesheet->method('getActivity')->willReturn($activity);