diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index 85295f7d358d..46d232e29b45 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -332,7 +332,10 @@ class Design extends BaseDesign $_variable = explode('.', $variable)[1]; $_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' => [ ['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)]],