feat: command to stamp invoice pdfs

This commit is contained in:
Björn Fromme
2025-03-19 11:41:04 +01:00
parent aae385d165
commit 4abc5e6754
3 changed files with 59 additions and 1 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ class InvoiceApprover extends AbstractPdfRenderer
}
// Load template
$filepath = sprintf('%s/uploads/invoice/%s', $this->config['project_dir'], $originalFilename);
$folder = substr($originalFilename, 0, 1);
$filepath = sprintf('%s/uploads/invoice/%s/%s', $this->config['project_dir'], $folder, $originalFilename);
if (false === file_exists($filepath)) {
throw new \InvalidArgumentException('Uploaded document not found at '.$filepath);
}