bugfixes (#3078)
* fix phpdoc * fix invoice export field order * prevent empty migration warning * do not trigger export validation on new timesheets * update license year * remove trailing comma in function call for php compatibility * add new composer plugin config * bump phpunit schema version
This commit is contained in:
@@ -286,7 +286,7 @@ class TranslationCommand extends Command
|
||||
$id,
|
||||
$values['resname'],
|
||||
$values['source'],
|
||||
$values['target'],
|
||||
$values['target']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ class Activity implements EntityWithMetaFields, EntityWithBudget
|
||||
|
||||
$currentMeta = $this->meta;
|
||||
$this->meta = new ArrayCollection();
|
||||
/** @var ProjectMeta $meta */
|
||||
/** @var ActivityMeta $meta */
|
||||
foreach ($currentMeta as $meta) {
|
||||
$newMeta = clone $meta;
|
||||
$newMeta->setEntity($this);
|
||||
|
||||
@@ -595,7 +595,7 @@ class Customer implements EntityWithMetaFields, EntityWithBudget
|
||||
|
||||
$currentMeta = $this->meta;
|
||||
$this->meta = new ArrayCollection();
|
||||
/** @var ProjectMeta $meta */
|
||||
/** @var CustomerMeta $meta */
|
||||
foreach ($currentMeta as $meta) {
|
||||
$newMeta = clone $meta;
|
||||
$newMeta->setEntity($this);
|
||||
|
||||
@@ -29,7 +29,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
* @UniqueEntity("invoiceNumber")
|
||||
* @UniqueEntity("invoiceFilename")
|
||||
*
|
||||
* @Exporter\Order({"id", "createdAt", "invoiceNumber", "status", "customer", "subtotal", "total", "tax", "currency", "vat", "dueDays", "dueDate", "paymentDate", "user", "invoiceFilename", "comment"})
|
||||
* @Exporter\Order({"id", "createdAt", "invoiceNumber", "status", "customer", "subtotal", "total", "tax", "currency", "vat", "dueDays", "dueDate", "paymentDate", "user", "invoiceFilename", "customerNumber", "comment"})
|
||||
* @Exporter\Expose("customer", label="label.customer", exp="object.getCustomer() === null ? null : object.getCustomer().getName()")
|
||||
* @Exporter\Expose("customerNumber", label="label.number", exp="object.getCustomer() === null ? null : object.getCustomer().getNumber()")
|
||||
* @Exporter\Expose("dueDate", label="invoice.due_days", type="datetime", exp="object.getDueDate() === null ? null : object.getDueDate()")
|
||||
|
||||
@@ -38,5 +38,7 @@ final class Version20211008092010 extends AbstractMigration
|
||||
$projects = $schema->getTable('kimai2_projects');
|
||||
$column = $projects->getColumn('order_number');
|
||||
$column->setOptions(['length' => 20]);
|
||||
|
||||
$this->preventEmptyMigrationWarning();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,10 @@ final class TimesheetExportedValidator extends ConstraintValidator
|
||||
throw new UnexpectedTypeException($timesheet, TimesheetEntity::class);
|
||||
}
|
||||
|
||||
if ($timesheet->getId() === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$timesheet->isExported()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user