Release 2.32 (#5411)

* bump packages
* dynamic invoice options
* make sure that invoice previews can be detected
* support for mpdf associated files
* do not include any future times in work contract calculation
* re-add username column in Excel spreadsheet
* deactivate internal rate editing
* show if plugin update exists
* shorten name to Kimai only, without Time-Tracking
* remove check for existing id in work contract
* fix metafield already defined in search
* helper methods to unlock months
* new translation
* send event on unlock month
This commit is contained in:
Kevin Papst
2025-04-06 09:53:48 +02:00
committed by GitHub
parent 2a75cd6230
commit 2e6b700b43
58 changed files with 749 additions and 437 deletions

View File

@@ -32,6 +32,8 @@ class InvoiceModelTest extends TestCase
self::assertNotNull($sut->getCustomer());
self::assertNotNull($sut->getTemplate());
self::assertFalse($sut->isPreview());
self::assertFalse($sut->isHideZeroTax());
self::assertNull($sut->getCalculator());
self::assertEmpty($sut->getEntries());
self::assertIsArray($sut->getEntries());
@@ -43,6 +45,12 @@ class InvoiceModelTest extends TestCase
$sut->setFormatter($newFormatter);
self::assertNotSame($formatter, $sut->getFormatter());
self::assertSame($newFormatter, $sut->getFormatter());
self::assertEquals([], $sut->getOptions());
$sut->setPreview(true);
$sut->setHideZeroTax(true);
self::assertTrue($sut->isPreview());
self::assertTrue($sut->isHideZeroTax());
}
public function testEmptyObjectThrowsExceptionOnNumberGenerator(): void
@@ -75,6 +83,23 @@ class InvoiceModelTest extends TestCase
self::assertSame($template, $sut->getTemplate());
self::assertInstanceOf(\DateTimeInterface::class, $sut->getDueDate());
$sut->setOption('foo-int', 123);
$sut->setOption('foo-float', 123.45);
$sut->setOption('foo-string', '12345');
$sut->setOption('foo-null', null);
$sut->setOption('foo-bool', true);
$sut->setOption('foo-array', ['foo' => 'bar']);
$sut->setOption('foo-array2', ['foo', 'bar']);
self::assertEquals([
'foo-int' => 123,
'foo-float' => 123.45,
'foo-string' => '12345',
'foo-null' => null,
'foo-bool' => true,
'foo-array' => ['foo' => 'bar'],
'foo-array2' => ['foo', 'bar']
], $sut->getOptions());
}
public function testDueDate(): void