Merge branch 'support_for_custom_statement_designs' of https://github.com/turbo124/invoiceninja into support_for_custom_statement_designs

This commit is contained in:
David Bomba 2023-09-22 10:21:47 +10:00
commit a764101c83
4 changed files with 10 additions and 6 deletions

View File

@ -68,7 +68,7 @@ class Design extends BaseModel
'name',
'design',
'is_active',
'is_template',
// 'is_template',
];
public function company()

View File

@ -85,7 +85,11 @@ class PdfMaker
$loader = new \Twig\Loader\FilesystemLoader(storage_path());
$twig = new \Twig\Environment($loader);
$template = $twig->createTemplate($template);
$string_extension = new \Twig\Extension\StringLoaderExtension();
$twig->addExtension($string_extension);
$template = $twig->createTemplate(html_entity_decode($template));
$template = $template->render($this->options);
$f = $this->document->createDocumentFragment();
@ -110,14 +114,14 @@ class PdfMaker
/**
* Final method to get compiled HTML.
*
* @param bool $final @deprecated // is it? i still see it being called elsewhere
* @param bool $final
* @return mixed
*/
public function getCompiledHTML($final = false)
{
$html = $this->document->saveHTML();
nlog($html);
// nlog($html);
return str_replace('%24', '$', $html);
}
}

View File

@ -94,7 +94,7 @@
"symfony/mailgun-mailer": "^6.1",
"symfony/postmark-mailer": "^6.1",
"turbo124/beacon": "^1.5",
"twig/twig": "^3.0",
"twig/twig": "^3",
"twilio/sdk": "^6.40",
"webpatser/laravel-countries": "dev-master#75992ad",
"wepay/php-sdk": "^0.3",

2
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a3cef8412df6b0cc9371807991ab699a",
"content-hash": "08bc4729962b495b68162a069269f74f",
"packages": [
{
"name": "adrienrn/php-mimetyper",