summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Rehnelt <noreply@maennchen1.de>2026-09-27 18:45:12 +0200
committerRoger Rehnelt <noreply@maennchen1.de>2026-09-27 18:45:12 +0200
commit8516b9fc2d42a99c362ffe5eac87043548158941 (patch)
tree696738c840615d2d70311ec7e80603f551187fe6
parentf573877228a48873f7443805acd656648171b96a (diff)
Gutschein-PDF: Deckkraft 0 wirkt (P12)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--views/mods/mod_voucherproduct/voucher_pdf.phtml4
1 files changed, 2 insertions, 2 deletions
diff --git a/views/mods/mod_voucherproduct/voucher_pdf.phtml b/views/mods/mod_voucherproduct/voucher_pdf.phtml
index 35e54f4..c66a960 100644
--- a/views/mods/mod_voucherproduct/voucher_pdf.phtml
+++ b/views/mods/mod_voucherproduct/voucher_pdf.phtml
@@ -30,7 +30,7 @@
$t['text'] = $this->replaceUniversalPlatzhalter($t['text'], $this->view['order_id'], false, false, $this->view['product_id'], $this->view['customReplace'], $this->view['product_index']);
- if ($t['alpha'] > 0) $pdf->setAlpha($t['alpha']);
+ $pdf->setAlpha((($t['alpha'] ?? '') === '') ? 1 : min(1, max(0, floatval(str_replace(',', '.', $t['alpha'])))));
$pdf->wpsg_SetTextColor($t['color']);
@@ -70,7 +70,7 @@
$t['text'] = $this->replaceUniversalPlatzhalter($t['text'], $this->view['order_id'], false, false, $this->view['product_id'], $this->view['customReplace'], $this->view['product_index']);
- if ($t['alpha'] > 0) $pdf->setAlpha($t['alpha']);
+ $pdf->setAlpha((($t['alpha'] ?? '') === '') ? 1 : min(1, max(0, floatval(str_replace(',', '.', $t['alpha'])))));
$pdf->SetFont('Arial', '', $t['fontsize']);
$pdf->wpsg_SetTextColor($t["color"]);