From eb550f65df0cfc8d5b32cca899e01106de8e120b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 30 Jan 2023 14:58:30 +1100 Subject: [PATCH] Tweaking clean to handle shipping address --- app/Services/PdfMaker/Design.php | 4 ++-- resources/views/pdf-designs/clean.html | 18 ++++-------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index 98aed7531808..972ea57103a7 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -364,12 +364,12 @@ 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;', 'data-ref' => 'entity_details-' . substr($variable, 1) . '_label']], + ['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)]], ]]; } else { $elements[] = ['element' => 'div', 'properties' => ['style' => "display: table-row; visibility: {$this->entityVariableCheck($variable)};"], 'elements' => [ - ['element' => 'span', 'content' => $variable . '_label', 'properties' => ['style' => 'display: table-cell;','data-ref' => 'entity_details-' . substr($variable, 1) . '_label']], + ['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)]], ]]; } diff --git a/resources/views/pdf-designs/clean.html b/resources/views/pdf-designs/clean.html index a26b77b55672..b75ad95df896 100644 --- a/resources/views/pdf-designs/clean.html +++ b/resources/views/pdf-designs/clean.html @@ -35,8 +35,8 @@ } span { - margin-left:2px; - margin-right:2px; + + border-right:10px; } #qr-bill { @@ -95,34 +95,24 @@ #entity-details { display: flex; + padding-right: 30px; flex-direction: column; line-height: var(--line-height); - padding-right: 5px; white-space: nowrap; - margin-right: auto; } - #entity-details > tr, - #entity-details th { - font-weight: normal; - padding-right: 15px; - padding-top: 2.5px; - padding-bottom: 2.5px; - } #client-details { display: flex; flex-direction: column; line-height: var(--line-height); - margin-right: auto; + padding-right: 30px; } #shipping-details { display: flex; - float:right; flex-direction: column; line-height: var(--line-height); - margin-right: auto; } #client-details > :first-child {