mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
wip
This commit is contained in:
parent
0e9e5eb744
commit
001b6902f2
@ -128,14 +128,17 @@ class CreateEntityPdf implements ShouldQueue
|
|||||||
$template = new PdfMakerDesign(strtolower($design->name));
|
$template = new PdfMakerDesign(strtolower($design->name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$variables = $html->generateLabelsAndValues();
|
||||||
|
|
||||||
$state = [
|
$state = [
|
||||||
'template' => $template->elements([
|
'template' => $template->elements([
|
||||||
'client' => $this->entity->client,
|
'client' => $this->entity->client,
|
||||||
'entity' => $this->entity,
|
'entity' => $this->entity,
|
||||||
'pdf_variables' => (array) $this->entity->company->settings->pdf_variables,
|
'pdf_variables' => (array) $this->entity->company->settings->pdf_variables,
|
||||||
'$product' => $design->design->product,
|
'$product' => $design->design->product,
|
||||||
|
'variables' => $variables,
|
||||||
]),
|
]),
|
||||||
'variables' => $html->generateLabelsAndValues(),
|
'variables' => $variables,
|
||||||
'options' => [
|
'options' => [
|
||||||
'all_pages_header' => $this->entity->client->getSetting('all_pages_header'),
|
'all_pages_header' => $this->entity->client->getSetting('all_pages_header'),
|
||||||
'all_pages_footer' => $this->entity->client->getSetting('all_pages_footer'),
|
'all_pages_footer' => $this->entity->client->getSetting('all_pages_footer'),
|
||||||
|
@ -421,6 +421,10 @@ class Design extends BaseDesign
|
|||||||
|
|
||||||
public function tableTotals(): array
|
public function tableTotals(): array
|
||||||
{
|
{
|
||||||
|
$_variables = array_key_exists('variables', $this->context)
|
||||||
|
? $this->context['variables']
|
||||||
|
: [];
|
||||||
|
|
||||||
if ($this->type == 'delivery_note') {
|
if ($this->type == 'delivery_note') {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@ -429,10 +433,11 @@ class Design extends BaseDesign
|
|||||||
|
|
||||||
$elements = [
|
$elements = [
|
||||||
['element' => 'div', 'properties' => ['style' => 'display: flex; flex-direction: column;'], 'elements' => [
|
['element' => 'div', 'properties' => ['style' => 'display: flex; flex-direction: column;'], 'elements' => [
|
||||||
['element' => 'p', 'content' => '$entity.public_notes', 'properties' => ['data-ref' => 'total_table-public_notes', 'style' => 'text-align: left;']],
|
['element' => 'p', 'content' => strtr($_variables['values']['$entity.public_notes'], $_variables), 'properties' => ['data-ref' => 'total_table-public_notes', 'style' => 'text-align: left;']],
|
||||||
['element' => 'p', 'content' => '', 'properties' => ['style' => 'text-align: left; display: flex; flex-direction: column;'], 'elements' => [
|
['element' => 'p', 'content' => '', 'properties' => ['style' => 'text-align: left; display: flex; flex-direction: column;'], 'elements' => [
|
||||||
['element' => 'span', 'content' => '$entity.terms_label: ', 'properties' => ['hidden' => $this->entityVariableCheck('$entity.terms'), 'data-ref' => 'total_table-terms-label', 'style' => 'font-weight: bold; text-align: left;']],
|
['element' => 'span', 'content' => '$entity.terms_label: ', 'properties' => ['hidden' => $this->entityVariableCheck('$entity.terms'), 'data-ref' => 'total_table-terms-label', 'style' => 'font-weight: bold; text-align: left;']],
|
||||||
['element' => 'span', 'content' => '$entity.terms', 'properties' => ['data-ref' => 'total_table-terms', 'style' => 'text-align: left;']],
|
['element' => 'span', 'content' => strtr($_variables['values']['$entity.terms'], $_variables), 'properties' => ['data-ref' => 'total_table-terms', 'style' => 'text-align: left;']],
|
||||||
|
['element' => 'span', 'content' => strtr($_variables['values']['$entity_footer'], $_variables), 'properties' => ['data-ref' => 'total_table-footer', 'style' => 'text-align: left;']],
|
||||||
]],
|
]],
|
||||||
['element' => 'img', 'properties' => ['hidden' => $this->client->getSetting('signature_on_pdf'), 'style' => 'max-width: 50%; height: auto;', 'src' => '$contact.signature']],
|
['element' => 'img', 'properties' => ['hidden' => $this->client->getSetting('signature_on_pdf'), 'style' => 'max-width: 50%; height: auto;', 'src' => '$contact.signature']],
|
||||||
['element' => 'div', 'properties' => ['style' => 'margin-top: 1.5rem; display: flex; align-items: flex-start;'], 'elements' => [
|
['element' => 'div', 'properties' => ['style' => 'margin-top: 1.5rem; display: flex; align-items: flex-start;'], 'elements' => [
|
||||||
|
@ -259,4 +259,4 @@
|
|||||||
<table id="delivery-note-table" cellspacing="0"></table>
|
<table id="delivery-note-table" cellspacing="0"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">$entity_footer</div>
|
<div id="footer"></div>
|
||||||
|
@ -217,4 +217,4 @@
|
|||||||
<table id="delivery-note-table" cellspacing="0"></table>
|
<table id="delivery-note-table" cellspacing="0"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">$entity_footer</div>
|
<div id="footer"></div>
|
||||||
|
@ -215,4 +215,4 @@
|
|||||||
<table id="delivery-note-table" cellspacing="0"></table>
|
<table id="delivery-note-table" cellspacing="0"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">$entity_footer</div>
|
<div id="footer"></div>
|
||||||
|
@ -215,5 +215,5 @@
|
|||||||
<table id="delivery-note-table" cellspacing="0"></table>
|
<table id="delivery-note-table" cellspacing="0"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">$entity_footer</div>
|
<div id="footer"></div>
|
||||||
|
|
||||||
|
@ -249,4 +249,4 @@
|
|||||||
<table id="delivery-note-table" cellspacing="0"></table>
|
<table id="delivery-note-table" cellspacing="0"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">$entity_footer</div>
|
<div id="footer"></div>
|
||||||
|
@ -235,7 +235,7 @@
|
|||||||
<div style="margin-top: 195px"></div>
|
<div style="margin-top: 195px"></div>
|
||||||
<div class="footer-wrapper" id="footer">
|
<div class="footer-wrapper" id="footer">
|
||||||
<div class="footer-content">
|
<div class="footer-content">
|
||||||
<div>$entity_footer</div>
|
<div></div>
|
||||||
<div id="company-details"></div>
|
<div id="company-details"></div>
|
||||||
<div id="company-address"></div>
|
<div id="company-address"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -180,4 +180,4 @@
|
|||||||
<table id="delivery-note-table" cellspacing="0"></table>
|
<table id="delivery-note-table" cellspacing="0"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">$entity_footer</div>
|
<div id="footer"></div>
|
||||||
|
@ -285,7 +285,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
$entity_footer
|
|
||||||
|
|
||||||
<div style="background-color: #00968B"><!-- 1 --></div>
|
<div style="background-color: #00968B"><!-- 1 --></div>
|
||||||
<div style="background-color: #1D756E"><!-- 2 --></div>
|
<div style="background-color: #1D756E"><!-- 2 --></div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user