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:
@@ -52,6 +52,11 @@ final class InvoiceModel
|
||||
private array $itemHydrator = [];
|
||||
private ?string $invoiceNumber = null;
|
||||
private bool $hideZeroTax = false;
|
||||
private bool $isPreview = false;
|
||||
/**
|
||||
* @var array<string, string|array<string|int, mixed>|null|bool|int|float>
|
||||
*/
|
||||
private array $options = [];
|
||||
|
||||
/**
|
||||
* @internal use InvoiceModelFactory
|
||||
@@ -68,6 +73,22 @@ final class InvoiceModel
|
||||
$this->addItemHydrator(new InvoiceItemDefaultHydrator());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|array<string|int, mixed>|null|bool|int|float $value
|
||||
*/
|
||||
public function setOption(string $key, string|array|null|bool|int|float $value): void
|
||||
{
|
||||
$this->options[$key] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string|array<string|int, mixed>|null|bool|int|float>
|
||||
*/
|
||||
public function getOptions(): array
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function getQuery(): ?InvoiceQuery
|
||||
{
|
||||
return $this->query;
|
||||
@@ -265,4 +286,14 @@ final class InvoiceModel
|
||||
{
|
||||
$this->hideZeroTax = $hideZeroTax;
|
||||
}
|
||||
|
||||
public function isPreview(): bool
|
||||
{
|
||||
return $this->isPreview;
|
||||
}
|
||||
|
||||
public function setPreview(bool $preview): void
|
||||
{
|
||||
$this->isPreview = $preview;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user