action to duplicate timesheet record (#1478)

This commit is contained in:
Kevin Papst
2020-02-18 15:32:33 +01:00
committed by GitHub
parent 7b218c33f9
commit 886fc8d74e
5 changed files with 97 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ class Timesheet implements EntityWithMetaFields, ExportItemInterface
public const CATEGORY_WORK = 'work';
/**
* @var int
* @var int|null
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
@@ -537,4 +537,12 @@ class Timesheet implements EntityWithMetaFields, ExportItemInterface
return $this;
}
public function __clone()
{
if ($this->id) {
$this->id = null;
$this->exported = false;
}
}
}