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:
parent
bc382cc4b4
commit
9bcea0cf58
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user