Tweaking clean to handle shipping address

This commit is contained in:
David Bomba 2023-01-30 14:58:30 +11:00
parent 813fc7bd5e
commit eb550f65df
2 changed files with 6 additions and 16 deletions

View File

@ -364,12 +364,12 @@ class Design extends BaseDesign
if (in_array($_variable, $_customs) && !empty($this->entity->{$var})) { if (in_array($_variable, $_customs) && !empty($this->entity->{$var})) {
$elements[] = ['element' => 'div', 'properties' => ['style' => "display: table-row; visibility: {$this->entityVariableCheck($_variable)};"],'elements' => [ $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)]], ['element' => 'div', 'content' => $variable, 'properties' => ['style' => 'display: table-cell;', 'data-ref' => 'entity_details-' . substr($variable, 1)]],
]]; ]];
} else { } else {
$elements[] = ['element' => 'div', 'properties' => ['style' => "display: table-row; visibility: {$this->entityVariableCheck($variable)};"], 'elements' => [ $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)]], ['element' => 'span', 'content' => $variable, 'properties' => ['style' => 'display: table-cell;','data-ref' => 'entity_details-' . substr($variable, 1)]],
]]; ]];
} }

View File

@ -35,8 +35,8 @@
} }
span { span {
margin-left:2px;
margin-right:2px; border-right:10px;
} }
#qr-bill { #qr-bill {
@ -95,34 +95,24 @@
#entity-details { #entity-details {
display: flex; display: flex;
padding-right: 30px;
flex-direction: column; flex-direction: column;
line-height: var(--line-height); line-height: var(--line-height);
padding-right: 5px;
white-space: nowrap; 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 { #client-details {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
line-height: var(--line-height); line-height: var(--line-height);
margin-right: auto; padding-right: 30px;
} }
#shipping-details { #shipping-details {
display: flex; display: flex;
float:right;
flex-direction: column; flex-direction: column;
line-height: var(--line-height); line-height: var(--line-height);
margin-right: auto;
} }
#client-details > :first-child { #client-details > :first-child {