1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fix for invoice custom fields

This commit is contained in:
Benjamin Beganović 2020-10-20 12:46:08 +02:00
parent bc382cc4b4
commit 9bcea0cf58

View File

@ -168,10 +168,19 @@ class Design extends BaseDesign
$elements = [];
foreach ($variables as $variable) {
$elements[] = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'elements' => [
['element' => 'th', 'content' => $variable . '_label'],
['element' => 'th', 'content' => $variable],
]];
$_variable = explode('.', $variable)[1];
if ($_variable == 'custom1' || $_variable == 'custom2') {
$elements[] = ['element' => 'tr', 'elements' => [
['element' => 'th', 'content' => $variable . '_label'],
['element' => 'th', 'content' => $variable],
]];
} else {
$elements[] = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'elements' => [
['element' => 'th', 'content' => $variable . '_label'],
['element' => 'th', 'content' => $variable],
]];
}
}
return $elements;