diff --git a/Layout/default/WarehouseOffer/PDF_MAIN.php b/Layout/default/WarehouseOffer/PDF_MAIN.php
index 859d58e78..365cd1dfc 100644
--- a/Layout/default/WarehouseOffer/PDF_MAIN.php
+++ b/Layout/default/WarehouseOffer/PDF_MAIN.php
@@ -23,6 +23,7 @@ $texts = [
'amount' => 'Menge',
'unit' => 'Einheit',
'unitPrice' => 'Einzelpreis',
+ 'discount' => 'Rabatt',
'totalPrice' => 'Gesamtpreis'
],
'summary' => [
@@ -83,6 +84,7 @@ $formattedValidUntil = date("d.m.Y", strtotime("+14 days", $offerDate));
#positionsTable th.amount, #positionsTable td.amount { text-align: right; width: 50px;}
#positionsTable th.unit, #positionsTable td.unit { text-align: center; width: 40px;}
#positionsTable th.price, #positionsTable td.price { text-align: right; width: 80px;}
+ #positionsTable th.discount, #positionsTable td.discount { text-align: right; width: 50px;}
#positionsTable th.total, #positionsTable td.total { text-align: right; width: 90px;}
.position-group-header td { background-color: #e8f0f8; font-weight: bold; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; padding: 4px; }
@@ -141,6 +143,7 @@ $formattedValidUntil = date("d.m.Y", strtotime("+14 days", $offerDate));
= $text['table']['amount'] ?> |
= $text['table']['unit'] ?> |
= $text['table']['unitPrice'] ?> |
+ = $text['table']['discount'] ?> |
= $text['table']['totalPrice'] ?> |
@@ -151,7 +154,7 @@ $formattedValidUntil = date("d.m.Y", strtotime("+14 days", $offerDate));
$isAlternativeGroup = ($groupName === 'Alternativpositionen');
if (!empty($groupName)): ?>
= number_format($p['amount'], 2, ',', '.') ?>
= htmlspecialchars($p['articleUnit']) ?> |
= formatPrice($p['price'], '€') ?> |
+ = htmlspecialchars($p['discount'] . '%') ?> |
= formatPrice($p['totalPrice'], '€') ?> |
diff --git a/application/WarehouseOffer/WarehouseOfferController.php b/application/WarehouseOffer/WarehouseOfferController.php
index 4d19c3405..39211f47d 100644
--- a/application/WarehouseOffer/WarehouseOfferController.php
+++ b/application/WarehouseOffer/WarehouseOfferController.php
@@ -343,6 +343,7 @@ class WarehouseOfferController extends TTCrud
$p['articleDescription'] = ($article->description !== $article->title) ? ($article->description ?? '') : '';
$p['articleUnit'] = $p['unit'] ?? $article->unit ?? 'Stk.';
$p['price'] = (float)($p['unitPrice'] ?? 0);
+ $p['discount'] = isset($p['discount']) ? (float)$p['discount'] : 0;
$p['amount'] = (float)($p['amount'] ?? 0);
$discount = isset($p['discount']) ? (float)$p['discount'] : 0;
$p['totalPrice'] = ($p['price'] * $p['amount']) * (1 - $discount / 100);