mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Hide custom values that are empty
This commit is contained in:
parent
6faa3a0ccb
commit
356d7aeba4
@ -332,7 +332,10 @@ class Design extends BaseDesign
|
|||||||
$_variable = explode('.', $variable)[1];
|
$_variable = explode('.', $variable)[1];
|
||||||
$_customs = ['custom1', 'custom2', 'custom3', 'custom4'];
|
$_customs = ['custom1', 'custom2', 'custom3', 'custom4'];
|
||||||
|
|
||||||
if (in_array($_variable, $_customs)) {
|
/* 2/7/2022 don't show custom values if they are empty */
|
||||||
|
$var = str_replace("custom", "custom_value", $_variable);
|
||||||
|
|
||||||
|
if (in_array($_variable, $_customs) && !empty($this->entity->{$var})) {
|
||||||
$elements[] = ['element' => 'tr', 'elements' => [
|
$elements[] = ['element' => 'tr', 'elements' => [
|
||||||
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['data-ref' => 'entity_details-' . substr($variable, 1) . '_label']],
|
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['data-ref' => 'entity_details-' . substr($variable, 1) . '_label']],
|
||||||
['element' => 'th', 'content' => $variable, 'properties' => ['data-ref' => 'entity_details-' . substr($variable, 1)]],
|
['element' => 'th', 'content' => $variable, 'properties' => ['data-ref' => 'entity_details-' . substr($variable, 1)]],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user