diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index 972ea57103a7..608f9e28c54a 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -364,13 +364,13 @@ class Design extends BaseDesign if (in_array($_variable, $_customs) && !empty($this->entity->{$var})) { $elements[] = ['element' => 'div', 'properties' => ['style' => "display: table-row; visibility: {$this->entityVariableCheck($_variable)};"],'elements' => [ - ['element' => 'div', 'content' => $variable . '_label', 'properties' => ['style' => 'display: table-cell; border-right:10px solid transparent; ', 'data-ref' => 'entity_details-' . substr($variable, 1) . '_label']], - ['element' => 'div', 'content' => $variable, 'properties' => ['style' => 'display: table-cell;', 'data-ref' => 'entity_details-' . substr($variable, 1)]], + ['element' => 'div', 'content' => $variable . '_label', 'properties' => ['class' => 'entity-details-cell', 'data-ref' => 'entity_details-' . substr($variable, 1) . '_label']], + ['element' => 'div', 'content' => $variable, 'properties' => ['class' => 'entity-details-cell', 'data-ref' => 'entity_details-' . substr($variable, 1)]], ]]; } else { $elements[] = ['element' => 'div', 'properties' => ['style' => "display: table-row; visibility: {$this->entityVariableCheck($variable)};"], 'elements' => [ - ['element' => 'span', 'content' => $variable . '_label', 'properties' => ['style' => 'display: table-cell; border-right:10px solid transparent;','data-ref' => 'entity_details-' . substr($variable, 1) . '_label']], - ['element' => 'span', 'content' => $variable, 'properties' => ['style' => 'display: table-cell;','data-ref' => 'entity_details-' . substr($variable, 1)]], + ['element' => 'div', 'content' => $variable . '_label', 'properties' => ['class' => 'entity-details-cell','data-ref' => 'entity_details-' . substr($variable, 1) . '_label']], + ['element' => 'div', 'content' => $variable, 'properties' => ['class' => 'entity-details-cell','data-ref' => 'entity_details-' . substr($variable, 1)]], ]]; } } diff --git a/app/Services/PdfMaker/Designs/Utilities/DesignHelpers.php b/app/Services/PdfMaker/Designs/Utilities/DesignHelpers.php index 7f8c5f57adda..868425679f2e 100644 --- a/app/Services/PdfMaker/Designs/Utilities/DesignHelpers.php +++ b/app/Services/PdfMaker/Designs/Utilities/DesignHelpers.php @@ -264,7 +264,8 @@ trait DesignHelpers try { $_variable = explode('.', $variable)[1]; } catch (Exception $e) { - throw new Exception('Company settings seems to be broken. Missing $entity.variable type.'); + nlog("Company settings seems to be broken. Could not resolve {$variable} type."); + return 'collapse'; } if (\in_array($variable, \array_keys($aliases))) { diff --git a/resources/views/pdf-designs/clean.html b/resources/views/pdf-designs/clean.html index b75ad95df896..7d0c8914fa4d 100644 --- a/resources/views/pdf-designs/clean.html +++ b/resources/views/pdf-designs/clean.html @@ -57,8 +57,8 @@ } .company-logo { - max-width: 65%; - /* max-width: $company_logo_size;*/ +/* max-width: 65%;*/ + max-width: $company_logo_size; } #company-details { @@ -94,19 +94,29 @@ } #entity-details { - display: flex; + display: table; padding-right: 30px; + flex-direction: column; - line-height: var(--line-height); + + overflow: hidden; + height: 12px; white-space: nowrap; + line-height: var(--line-height); + } + .entity-details-cell { + display: table-cell; + border-right: 10px solid transparent; + } #client-details { display: flex; flex-direction: column; - line-height: var(--line-height); padding-right: 30px; + line-height: var(--line-height); + } #shipping-details { @@ -362,7 +372,7 @@
$entity_label