GetGroupRight("sale"); if ($saleModulePermissions < "W") $APPLICATION->AuthForm(Loc::getMessage("SALE_ACCESS_DENIED")); Loc::loadMessages(__FILE__); $result = ''; // variable $cashbox must be defined in file, where this file is included if (isset($cashbox)) { /** @var Cashbox\Ofd $handler */ $handler = $cashbox['OFD'] ?? ''; $cashboxSettings = $cashbox['OFD_SETTINGS'] ?? []; if (class_exists($handler)) { $settings = $handler::getSettings(); if ($settings) { foreach ($settings as $group => $block) { $result .= ''.$block['LABEL'].''; foreach ($block['ITEMS'] as $code => $item) { $value = null; if (isset($cashboxSettings[$group][$code])) $value = $cashboxSettings[$group][$code]; $className = 'adm-detail-content-cell-l'; if (isset($item['REQUIRED']) && $item['REQUIRED'] === 'Y') { $className .= ' adm-required-field'; } $result .= ''.$item['LABEL'].':'.Input\Manager::getEditHtml('OFD_SETTINGS['.$group.']['.$code.']', $item, $value).''; } } } } } if ($result === '') $result = ''.Loc::getMessage('SALE_CASHBOX_NO_OFD').''; echo $result; }