RML Invoice Layout Tweaks

This commit is contained in:
Frank Schubert
2025-03-22 17:31:37 +01:00
parent 5c04e35d90
commit 5ff67da367
4 changed files with 16 additions and 8 deletions
@@ -75,13 +75,15 @@ class PreorderBillingInvoice extends mfBaseModel {
// Replace placeholders in header
$footerHtml = file_get_contents(BASEDIR . "/Layout/default/PreorderBillingInvoice/PDF_FOOTER.html");
$footerHtml = str_replace("{{ bank_iban }}", "AT85 1200 0100 3986 5885", $footerHtml);
$footerHtml = str_replace("{{ bank_bic }}", "", $footerHtml);
$footerFile = BASEDIR . "/var/temp/preorderbillinginvoice_footer-" . date("U") . "-" . rand(1000, 9999) . ".html";
file_put_contents($footerFile, $footerHtml);
$pdf = new PdfForm("PreorderBillingInvoice/PDF_MAIN", $pdf_vars);
$wkhtmltopdfArgs = "--header-html $headerFile --footer-html $footerFile";
$wkhtmltopdfArgs = "--margin-top 10mm --header-spacing 96 --header-html '$headerFile' --footer-html '$footerFile'";
$filename = $pdf->render($wkhtmltopdfArgs);