mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add Shipping address to clean design
This commit is contained in:
parent
e750f45750
commit
a4467149f9
@ -124,6 +124,10 @@ class Design extends BaseDesign
|
|||||||
'id' => 'client-details',
|
'id' => 'client-details',
|
||||||
'elements' => $this->clientDetails(),
|
'elements' => $this->clientDetails(),
|
||||||
],
|
],
|
||||||
|
'shipping-details' => [
|
||||||
|
'id' => 'shipping-details',
|
||||||
|
'elements' => $this->shippingDetails(),
|
||||||
|
],
|
||||||
'vendor-details' => [
|
'vendor-details' => [
|
||||||
'id' => 'vendor-details',
|
'id' => 'vendor-details',
|
||||||
'elements' => $this->vendorDetails(),
|
'elements' => $this->vendorDetails(),
|
||||||
@ -237,6 +241,34 @@ class Design extends BaseDesign
|
|||||||
return $elements;
|
return $elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function shippingDetails(): array
|
||||||
|
{
|
||||||
|
$elements = [];
|
||||||
|
|
||||||
|
if(!$this->client)
|
||||||
|
return $elements;
|
||||||
|
|
||||||
|
$elements = [
|
||||||
|
['element' => 'p', 'content' => ctrans('texts.shipping_address'), 'properties' => ['data-ref' => 'shipping_address-label', 'style' => 'font-weight: bold; text-transform: uppercase']],
|
||||||
|
['element' => 'p', 'content' => $this->client->name, 'show_empty' => false, 'properties' => ['data-ref' => 'shipping_address-client.name']],
|
||||||
|
['element' => 'p', 'content' => $this->client->shipping_address1, 'show_empty' => false, 'properties' => ['data-ref' => 'shipping_address-client.shipping_address1']],
|
||||||
|
['element' => 'p', 'content' => $this->client->shipping_address2, 'show_empty' => false, 'properties' => ['data-ref' => 'shipping_address-client.shipping_address2']],
|
||||||
|
['element' => 'p', 'show_empty' => false, 'elements' => [
|
||||||
|
['element' => 'span', 'content' => "{$this->client->shipping_city} ", 'properties' => ['ref' => 'shipping_address-client.shipping_city']],
|
||||||
|
['element' => 'span', 'content' => "{$this->client->shipping_state} ", 'properties' => ['ref' => 'shipping_address-client.shipping_state']],
|
||||||
|
['element' => 'span', 'content' => "{$this->client->shipping_postal_code} ", 'properties' => ['ref' => 'shipping_address-client.shipping_postal_code']],
|
||||||
|
]],
|
||||||
|
['element' => 'p', 'content' => optional($this->client->shipping_country)->name, 'show_empty' => false],
|
||||||
|
];
|
||||||
|
|
||||||
|
// if (!is_null($this->context['contact'])) {
|
||||||
|
// $elements[] = ['element' => 'p', 'content' => $this->context['contact']->email, 'show_empty' => false, 'properties' => ['data-ref' => 'delivery_note-contact.email']];
|
||||||
|
// }
|
||||||
|
|
||||||
|
return $elements;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function clientDetails(): array
|
public function clientDetails(): array
|
||||||
{
|
{
|
||||||
$elements = [];
|
$elements = [];
|
||||||
|
@ -107,6 +107,12 @@
|
|||||||
line-height: var(--line-height);
|
line-height: var(--line-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#shipping-details {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
line-height: var(--line-height);
|
||||||
|
}
|
||||||
|
|
||||||
#client-details > :first-child {
|
#client-details > :first-child {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -358,6 +364,7 @@
|
|||||||
<table id="entity-details" cellspacing="0" dir="$dir"></table>
|
<table id="entity-details" cellspacing="0" dir="$dir"></table>
|
||||||
</div>
|
</div>
|
||||||
<div id="client-details"></div>
|
<div id="client-details"></div>
|
||||||
|
<div id="shipping-details"></div>
|
||||||
<div id="vendor-details"></div>
|
<div id="vendor-details"></div>
|
||||||
</div>
|
</div>
|
||||||
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
<table id="product-table" cellspacing="0" data-ref="table"></table>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user