mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for surcharge display on invoice PDF
This commit is contained in:
parent
e95825b9f3
commit
65f70e8d79
@ -932,7 +932,9 @@ class Design extends BaseDesign
|
||||
} elseif (Str::startsWith($variable, '$custom_surcharge')) {
|
||||
$_variable = ltrim($variable, '$'); // $custom_surcharge1 -> custom_surcharge1
|
||||
|
||||
$visible = intval($this->entity->{$_variable}) != 0;
|
||||
//07/09/2023 don't show custom values if they are empty
|
||||
// $visible = intval($this->entity->{$_variable}) != 0;
|
||||
$visible = intval(str_replace(['0','.'],'', $this->entity->{$_variable})) != 0;
|
||||
|
||||
$elements[1]['elements'][] = ['element' => 'div', 'elements' => [
|
||||
['element' => 'span', 'content' => $variable . '_label', 'properties' => ['hidden' => !$visible, 'data-ref' => 'totals_table-' . substr($variable, 1) . '-label']],
|
||||
|
Loading…
x
Reference in New Issue
Block a user