mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:44:28 -04:00
Fixes for signature & surcharge fields
This commit is contained in:
parent
46dc98265b
commit
71fff59e8e
@ -443,7 +443,7 @@ class Design extends BaseDesign
|
|||||||
['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; margin-top: 1rem;']],
|
['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; margin-top: 1rem;']],
|
||||||
['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.terms'], $_variables), 'properties' => ['data-ref' => 'total_table-terms', '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' => ['style' => 'max-width: 50%; height: auto;', 'src' => '$contact.signature', 'id' => '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' => [
|
||||||
['element' => 'img', 'properties' => ['src' => '$invoiceninja.whitelabel', 'style' => 'height: 2.5rem;', 'hidden' => $this->entity->user->account->isPaid() ? 'true' : 'false', 'id' => 'invoiceninja-whitelabel-logo']],
|
['element' => 'img', 'properties' => ['src' => '$invoiceninja.whitelabel', 'style' => 'height: 2.5rem;', 'hidden' => $this->entity->user->account->isPaid() ? 'true' : 'false', 'id' => 'invoiceninja-whitelabel-logo']],
|
||||||
]],
|
]],
|
||||||
@ -501,11 +501,11 @@ class Design extends BaseDesign
|
|||||||
} elseif (Str::startsWith($variable, '$custom_surcharge')) {
|
} elseif (Str::startsWith($variable, '$custom_surcharge')) {
|
||||||
$_variable = ltrim($variable, '$'); // $custom_surcharge1 -> custom_surcharge1
|
$_variable = ltrim($variable, '$'); // $custom_surcharge1 -> custom_surcharge1
|
||||||
|
|
||||||
$visible = $this->entity->{$_variable} == '0';
|
$visible = $this->entity->{$_variable} > 0 || $this->entity->{$_variable} > '0';
|
||||||
|
|
||||||
$elements[1]['elements'][] = ['element' => 'div', 'elements' => [
|
$elements[1]['elements'][] = ['element' => 'div', 'elements' => [
|
||||||
['element' => 'span', 'content' => $variable . '_label', 'properties' => ['hidden' => $visible, 'data-ref' => 'totals_table-' . substr($variable, 1) . '-label']],
|
['element' => 'span', 'content' => $variable . '_label', 'properties' => ['hidden' => !$visible, 'data-ref' => 'totals_table-' . substr($variable, 1) . '-label']],
|
||||||
['element' => 'span', 'content' => $variable, 'properties' => ['hidden' => $visible, 'data-ref' => 'totals_table-' . substr($variable, 1)]],
|
['element' => 'span', 'content' => $variable, 'properties' => ['hidden' => !$visible, 'data-ref' => 'totals_table-' . substr($variable, 1)]],
|
||||||
]];
|
]];
|
||||||
} elseif (Str::startsWith($variable, '$custom')) {
|
} elseif (Str::startsWith($variable, '$custom')) {
|
||||||
$field = explode('_', $variable);
|
$field = explode('_', $variable);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user