From 607ab6ce94cc357528586b45f5ad7ca11c3c78fa Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Sat, 12 Nov 2022 09:29:13 -0800 Subject: [PATCH] Add invoice custom text to PDF --- src/bb-modules/Invoice/Service.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/bb-modules/Invoice/Service.php b/src/bb-modules/Invoice/Service.php index e2dc9a05e..f677af9f6 100644 --- a/src/bb-modules/Invoice/Service.php +++ b/src/bb-modules/Invoice/Service.php @@ -1274,7 +1274,7 @@ class Service implements InjectionAwareInterface div.Breakdown{ position: absolute; width: 100%; - top: 400px; + top: 405px; } table { border-collapse: collapse; @@ -1337,8 +1337,13 @@ class Service implements InjectionAwareInterface $html .= '

Phone: ' . $invoice['buyer']['phone'] . '

'; $html .= ''; - $html .= '
- + $html .= + '
'; + if (!empty($invoice['text_1'])){ + $html .= '

' . $invoice['text_1'] . '

'; + } + $html .= + '
@@ -1377,8 +1382,12 @@ class Service implements InjectionAwareInterface $html .= ''; $html .= ''; $html .= ''; - $html .= '
# ProductTotal:' . $invoice['total'] . $currencyCode . '
'; + + if (!empty($invoice['text_2'])){ + $html .= '

' . $invoice['text_2'] . '

'; + } + $html .= '
'; $html .= ' ';