fix custom1234

This commit is contained in:
Benjamin Beganović 2020-10-20 13:01:07 +02:00
parent 9bcea0cf58
commit 1de6f94f10
3 changed files with 6 additions and 3 deletions

View File

@ -196,7 +196,7 @@ class PreviewController extends BaseController
->design($design)
->build();
// info($maker->getCompiledHTML(true));
info($maker->getCompiledHTML(true));
$file_path = PreviewPdf::dispatchNow($maker->getCompiledHTML(true), auth()->user()->company());

View File

@ -109,6 +109,8 @@ class CreateInvoicePdf implements ShouldQueue
->design($template)
->build();
info($maker->getCompiledHTML());
//todo - move this to the client creation stage so we don't keep hitting this unnecessarily
Storage::makeDirectory($path, 0775);

View File

@ -169,8 +169,9 @@ class Design extends BaseDesign
foreach ($variables as $variable) {
$_variable = explode('.', $variable)[1];
$_customs = ['custom1', 'custom2', 'custom3', 'custom4'];
if ($_variable == 'custom1' || $_variable == 'custom2') {
if (in_array($_variable, $_customs)) {
$elements[] = ['element' => 'tr', 'elements' => [
['element' => 'th', 'content' => $variable . '_label'],
['element' => 'th', 'content' => $variable],