feat: convert uploaded contracts and invoices to pdf

This commit is contained in:
Björn Fromme
2025-03-04 14:13:09 +01:00
parent ab6d350045
commit 917640183f
9 changed files with 164 additions and 8 deletions
@@ -86,10 +86,11 @@ class DetailController extends AbstractController
$disposition->addDocument($upload);
$this->workflow->apply($disposition, 'upload_contract');
$this->entityManager->flush();
$this->uploadHandler->moveUploadSessionFilesFromOrphanage(Upload::TYPE_CONTRACT, $uploadSession);
$this->uploadHandler->destroyUploadSession();
$this->uploadHandler->ensurePdf($upload);
$this->entityManager->flush();
$this->addFlash('success', 'Der Honorarvertrag wurde hochgeladen');
@@ -115,10 +116,11 @@ class DetailController extends AbstractController
$disposition->addDocument($upload);
$this->workflow->apply($disposition, 'upload_invoice');
$this->entityManager->flush();
$this->uploadHandler->moveUploadSessionFilesFromOrphanage(Upload::TYPE_INVOICE, $uploadSession);
$this->uploadHandler->destroyUploadSession();
$this->uploadHandler->ensurePdf($upload);
$this->entityManager->flush();
$this->addFlash('success', 'Die Honornote wurde hochgeladen');
@@ -128,4 +130,4 @@ class DetailController extends AbstractController
$this->eventDispatcher->dispatch(new DocumentUploadedEvent($upload), DocumentUploadedEvent::NAME);
}
}
}