Merge pull request 'Improve check for non-existent variables' (#2) from custom-field-check-with-isset into main

Reviewed-on: momo/invoiceplane-template#2
Reviewed-by: teutat3s <teutat3s@noreply.git.pub.solar>
Reviewed-by: b12f <b12f@noreply.git.pub.solar>
This commit is contained in:
b12f 2024-08-15 14:17:20 +00:00
commit d59893ebcb
Signed by: pub.solar gitea
GPG key ID: F0332B04B7054873

View file

@ -229,7 +229,7 @@ footer .notes {
<p class="invoice-meta">
Rechnungsnummer: <?php echo $invoice->invoice_number; ?><br />
<?php if ($custom_fields['invoice']['Leistungszeitraum-Anfang'] && $custom_fields['invoice']['Leistungszeitraum-Ende']): ?>
<?php if (isset($custom_fields['invoice']['Leistungszeitraum-Anfang']) && isset($custom_fields['invoice']['Leistungszeitraum-Ende'])): ?>
Leistungszeitraum:
<?php echo date_from_mysql($custom_fields['invoice']['Leistungszeitraum-Anfang'], true); ?>
-
@ -237,7 +237,7 @@ footer .notes {
<?php endif; ?>
</p>
<?php if ($custom_fields['invoice']['Beschreibung']): ?>
<?php if (isset($custom_fields['invoice']['Beschreibung'])): ?>
<p>
<?php echo $custom_fields['invoice']['Beschreibung']; ?>
</p>