Release 2.60 (#5971)
This commit is contained in:
@@ -238,10 +238,10 @@ final class InvoiceCreateCommand extends Command
|
||||
$projects[] = $tmp;
|
||||
}
|
||||
$invoices = $this->createInvoicesForProjects($projects, $defaultQuery, $input, $output);
|
||||
} elseif ($byActiveCustomer) {
|
||||
} elseif ($byActiveCustomer) { // @phpstan-ignore elseif.alwaysFalse
|
||||
$customers = $this->getActiveCustomers($defaultQuery);
|
||||
$invoices = $this->createInvoicesForCustomer($customers, $defaultQuery, $input, $output);
|
||||
} elseif ($byActiveProject) {
|
||||
} elseif ($byActiveProject) { // @phpstan-ignore elseif.alwaysTrue
|
||||
$projects = $this->getActiveProjects($defaultQuery);
|
||||
$invoices = $this->createInvoicesForProjects($projects, $defaultQuery, $input, $output);
|
||||
} else {
|
||||
|
||||
@@ -17,11 +17,11 @@ final class Constants
|
||||
/**
|
||||
* The current release version
|
||||
*/
|
||||
public const VERSION = '2.59.0';
|
||||
public const VERSION = '2.60.0';
|
||||
/**
|
||||
* The current release: major * 10000 + minor * 100 + patch
|
||||
*/
|
||||
public const VERSION_ID = 25900;
|
||||
public const VERSION_ID = 26000;
|
||||
/**
|
||||
* The software name
|
||||
*/
|
||||
|
||||
@@ -58,9 +58,11 @@ abstract class AbstractMigration extends BaseAbstractMigration
|
||||
}
|
||||
}
|
||||
|
||||
protected function preventEmptyMigrationWarning(): void
|
||||
protected function preventEmptyMigrationWarning(bool $always = true): void
|
||||
{
|
||||
$this->addSql('#prevent empty warning - no SQL to execute');
|
||||
if ($always || \count($this->getSql()) === 0) {
|
||||
$this->addSql('#prevent empty warning - no SQL to execute');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,13 +37,18 @@ final class InvoiceModelActivityHydrator implements InvoiceModelHydrator
|
||||
}
|
||||
}
|
||||
|
||||
if (\count($activities) === 0) {
|
||||
return [];
|
||||
$counter = \count($activities);
|
||||
|
||||
$values = [
|
||||
'activity.counter' => $counter,
|
||||
];
|
||||
|
||||
if ($counter === 0) {
|
||||
return $values;
|
||||
}
|
||||
|
||||
$activities = array_values($activities);
|
||||
|
||||
$values = [];
|
||||
$i = 0;
|
||||
|
||||
foreach ($activities as $activity) {
|
||||
|
||||
@@ -40,7 +40,7 @@ final class InvoiceModelProjectHydrator implements InvoiceModelHydrator
|
||||
$counter = \count($projects);
|
||||
|
||||
$values = [
|
||||
'project._counter' => $counter,
|
||||
'project.counter' => $counter,
|
||||
];
|
||||
|
||||
if ($counter === 0) {
|
||||
|
||||
@@ -26,6 +26,9 @@ final class PdfContext
|
||||
'filename', 'mode', 'format', 'orientation', 'default_font', 'default_font_size', 'fonts',
|
||||
'margin_left', 'margin_right', 'margin_top', 'margin_bottom', 'margin_header', 'margin_footer',
|
||||
'setAutoTopMargin', 'setAutoBottomMargin', 'PDFA', 'PDFAauto', 'useActiveForms',
|
||||
// Adding watermarks to PDFs
|
||||
'watermarkImgBehind', 'showWatermarkText', 'showWatermarkImage', 'watermarkText', 'watermarkAngle',
|
||||
'watermarkImage', 'watermark_font', 'watermarkTextAlpha', 'watermarkImageAlpha',
|
||||
];
|
||||
|
||||
private array $options = [];
|
||||
|
||||
@@ -45,6 +45,7 @@ class InvoiceArchiveQuery extends BaseQuery implements DateRangeInterface
|
||||
'dateRange' => new DateRange(),
|
||||
'customers' => [],
|
||||
'status' => [],
|
||||
'users' => [],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ final class SearchHelper
|
||||
$i = 0;
|
||||
$c = 0;
|
||||
$j = 0;
|
||||
$k = 0;
|
||||
foreach ($searchTerm->getParts() as $part) {
|
||||
// we do NOT search for unspecific/global terms as of now, because it is not clear if the user wants that
|
||||
if (($metaName = $part->getField()) === null) {
|
||||
@@ -61,7 +62,7 @@ final class SearchHelper
|
||||
$metaValue = $part->getTerm();
|
||||
$paramName = 'metaName' . $i++;
|
||||
$paramValue = 'metaValue' . $c++;
|
||||
$subqueryName = 'metaNotExists' . $metaName;
|
||||
$subqueryName = 'metaNotExists' . $k++;
|
||||
$field = $alias . '.value';
|
||||
|
||||
$and = $qb->expr()->andX();
|
||||
|
||||
@@ -21,7 +21,10 @@ final class SearchTerm
|
||||
public function __construct(string $searchTerm)
|
||||
{
|
||||
$this->originalTerm = $searchTerm;
|
||||
$terms = explode(' ', $searchTerm);
|
||||
$terms = preg_split('/\s+/', trim($searchTerm), -1, PREG_SPLIT_NO_EMPTY);
|
||||
if (!\is_array($terms)) {
|
||||
$terms = [];
|
||||
}
|
||||
$finalTerm = [];
|
||||
|
||||
foreach ($terms as $term) {
|
||||
|
||||
Reference in New Issue
Block a user