diff --git a/src/QUI/ERP/Accounting/ArticleList.Mail.html b/src/QUI/ERP/Accounting/ArticleList.Mail.html index a082cc5068066f4449a5334ed52877e962e3f0c6..6606f1292b18fbbcb122993141cf21c711afee1c 100644 --- a/src/QUI/ERP/Accounting/ArticleList.Mail.html +++ b/src/QUI/ERP/Accounting/ArticleList.Mail.html @@ -27,7 +27,11 @@ {foreach $Article->getCustomFields() as $field} <li class="articles-body-article-data-fields-field"> <span>{$field.title}:</span> + {if isset($field.custom_calc)} <span>{$field.custom_calc.valueText}</span> + {else} + <span>{$field.valueText}</span> + {/if} </li> {/foreach} </ul> diff --git a/src/QUI/ERP/Accounting/ArticleView.html b/src/QUI/ERP/Accounting/ArticleView.html index b4ce1dd2eff2c5d0889541d1e72e0cffdd4ed3a8..e098a21e50339cb3cdb267bacb2d9b6e9d172e22 100644 --- a/src/QUI/ERP/Accounting/ArticleView.html +++ b/src/QUI/ERP/Accounting/ArticleView.html @@ -25,6 +25,8 @@ <span>{$field.title}:</span> {if isset($field.custom_calc) && isset($field.custom_calc.valueText)} <span>{$field.custom_calc.valueText}</span> + {elseif isset($field['userInput'])} + <span>{$field['userInput']}</span> {/if} </li> {/foreach} diff --git a/src/QUI/ERP/Accounting/ArticleView.php b/src/QUI/ERP/Accounting/ArticleView.php index 3e563c313b091b237d047ab5973903394a045a70..e2f23444786d0a4663ac041c623253e24d803137 100644 --- a/src/QUI/ERP/Accounting/ArticleView.php +++ b/src/QUI/ERP/Accounting/ArticleView.php @@ -94,20 +94,14 @@ public function getCustomFields(): array continue; } - if (!isset($field['custom_calc']['valueText'])) { - continue; - } - - if (!isset($field['custom_calc']['value'])) { - continue; - } - - if (\is_string($field['custom_calc']['valueText'])) { - // nothing - } elseif (isset($field['custom_calc']['valueText'][$current])) { - $field['custom_calc']['valueText'] = $field['custom_calc']['valueText'][$current]; - } else { - $field['custom_calc']['valueText'] = ''; + if (isset($field['custom_calc']['valueText'])) { + if (!\is_string($field['custom_calc']['valueText'])) { + if (isset($field['custom_calc']['valueText'][$current])) { + $field['custom_calc']['valueText'] = $field['custom_calc']['valueText'][$current]; + } else { + $field['custom_calc']['valueText'] = ''; + } + } } $customFields[] = $field; diff --git a/src/QUI/ERP/Accounting/ArticleViewText.html b/src/QUI/ERP/Accounting/ArticleViewText.html index d07e2a07ada0c508e5d441146bea942a639859f7..4aa2a98d6fa21aa51627095a78d9801f036259c4 100644 --- a/src/QUI/ERP/Accounting/ArticleViewText.html +++ b/src/QUI/ERP/Accounting/ArticleViewText.html @@ -21,6 +21,8 @@ <span>{$field.title}:</span> {if isset($field.custom_calc) && isset($field.custom_calc.valueText)} <span>{$field.custom_calc.valueText}</span> + {else} + <span>{$field.valueText}</span> {/if} </li> {/foreach}