Merge branch 'master' into feature/timeline
This commit is contained in:
@@ -12,6 +12,7 @@ use App\Htmx\HxRedirectResponse;
|
||||
use App\Model\DocumentCheckDto;
|
||||
use App\Service\Pdf\InvoiceApprover;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Flagception\Manager\FeatureManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Target;
|
||||
@@ -32,7 +33,8 @@ class CheckController extends AbstractController
|
||||
private readonly WorkflowInterface $workflow,
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
private readonly InvoiceApprover $invoiceApprover,
|
||||
private readonly LoggerInterface $logger
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly FeatureManagerInterface $featureManager,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -125,11 +127,13 @@ class CheckController extends AbstractController
|
||||
->setStatus($status)
|
||||
;
|
||||
|
||||
if (Upload::TYPE_INVOICE === $document->getType()) {
|
||||
try {
|
||||
$this->invoiceApprover->render($document->getDisposition());
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
$this->addFlash('error', 'Die Honorarnote ist nicht als PDF hochgeladen worden');
|
||||
if (true === $this->featureManager->isActive('stamp_invoices')) {
|
||||
if (Upload::TYPE_INVOICE === $document->getType()) {
|
||||
try {
|
||||
$this->invoiceApprover->render($document->getDisposition());
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
$this->addFlash('error', 'Die Honorarnote ist nicht als PDF hochgeladen worden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ use App\Form\TeamerDispositionType;
|
||||
use App\Model\UploadSessionDto;
|
||||
use App\Service\Upload\UploadHandler;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Flagception\Manager\FeatureManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Target;
|
||||
@@ -31,7 +32,8 @@ class DetailController extends AbstractController
|
||||
#[Target('disposition')]
|
||||
private readonly WorkflowInterface $workflow,
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
private readonly LoggerInterface $logger
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly FeatureManagerInterface $featureManager,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -88,7 +90,10 @@ class DetailController extends AbstractController
|
||||
|
||||
$this->uploadHandler->moveUploadSessionFilesFromOrphanage(Upload::TYPE_CONTRACT, $uploadSession);
|
||||
$this->uploadHandler->destroyUploadSession();
|
||||
$this->uploadHandler->ensurePdf($upload);
|
||||
|
||||
if (true === $this->featureManager->isActive('sanitize_uploads')) {
|
||||
$this->uploadHandler->ensurePdf($upload);
|
||||
}
|
||||
|
||||
$this->entityManager->flush();
|
||||
|
||||
@@ -118,7 +123,10 @@ class DetailController extends AbstractController
|
||||
|
||||
$this->uploadHandler->moveUploadSessionFilesFromOrphanage(Upload::TYPE_INVOICE, $uploadSession);
|
||||
$this->uploadHandler->destroyUploadSession();
|
||||
$this->uploadHandler->ensurePdf($upload);
|
||||
|
||||
if (true === $this->featureManager->isActive('sanitize_uploads')) {
|
||||
$this->uploadHandler->ensurePdf($upload);
|
||||
}
|
||||
|
||||
$this->entityManager->flush();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user