diff --git a/src/Generator/InvoiceGenerator.php b/src/Generator/InvoiceGenerator.php index 1d7a059..289def6 100644 --- a/src/Generator/InvoiceGenerator.php +++ b/src/Generator/InvoiceGenerator.php @@ -37,7 +37,7 @@ class InvoiceGenerator $new = []; foreach ($paths as $key => $path) { - $new[$key] = file_get_contents(Kernel::getProjectRoot().'/'.$path); + $new[$key] = file_exists($path) ? file_get_contents(Kernel::getProjectRoot().'/'.$path) : null; } return $new; diff --git a/templates/invoice_side.html.twig b/templates/invoice_side.html.twig index 5c780f5..183afad 100644 --- a/templates/invoice_side.html.twig +++ b/templates/invoice_side.html.twig @@ -111,10 +111,12 @@ {{ 'label_signature'|trans(locale) }} + {% if images.signature is defined and images.signature is not empty %} Signature + {% endif %} - {% if images.stamp is defined %} + {% if images.stamp is defined and images.stamp is not empty %} Stamp