assign('f_obj', $facture); $identite = (string) Config::getInstance()->get('champ_identite'); $tpl->register_function('money_fac', function (array $params) { static $params_list = ['value', 'name', 'user']; // Extract params and keep attributes separated $attributes = array_diff_key($params, array_flip($params_list)); $params = array_intersect_key($params, array_flip($params_list)); extract($params, \EXTR_SKIP); $current_value = null; if (isset($value)) { $current_value = $value; } if (!isset($user)) { $user = false; } if (!isset($name)) { $name = 'prix[]'; } if (null !== $current_value && !$user) { $current_value = Utils::money_format($current_value, ',', ''); } $current_value = htmlspecialchars($current_value, ENT_QUOTES, 'UTF-8'); $currency = Config::getInstance()->get('monnaie'); return sprintf('