feat: convert uploaded contracts and invoices to pdf
This commit is contained in:
@@ -126,7 +126,11 @@ class CheckController extends AbstractController
|
||||
;
|
||||
|
||||
if (Upload::TYPE_INVOICE === $document->getType()) {
|
||||
$this->invoiceApprover->render($document->getDisposition());
|
||||
try {
|
||||
$this->invoiceApprover->render($document->getDisposition());
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
$this->addFlash('error', 'Die Honorarnote ist nicht als PDF hochgeladen worden');
|
||||
}
|
||||
}
|
||||
|
||||
$this->addFlash('success', 'Das Dokument wurde bestätigt');
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user