29 print
"Error, template page can't be called as URL";
33if (!is_object($form)) {
34 $form =
new Form($db);
37global $formaccounting;
38if (isModEnabled(
'accounting') && !is_object($formaccounting)) {
39 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formaccounting.class.php';
45<!-- BEGIN PHP TEMPLATE accountancy_code_edit.tpl.php -->
48if (!is_array($parameters)) {
49 $parameters = array();
51$parameters[
'assetaccountancycodes'] = &$assetaccountancycodes;
52$reshook = $hookmanager->executeHooks(
'formAssetAccountancyCodes', $parameters,
$object, $action);
53print $hookmanager->resPrint;
59 foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) {
61 $width = ($mode_key ==
"economic")?
"width50p pull-left" :
"width50p";
62 print
'<table class="border '. $width .
'" id="block_' . $mode_key .
'">';
63 print
'<tr><td class="info-box-title">'.$langs->trans($mode_info[
'label']).
'</td></tr>';
64 foreach ($mode_info[
'fields'] as $field_key => $field_info) {
65 $html_name = $mode_key .
'_' . $field_key;
66 print
'<tr><td class="width40p">' . $langs->trans($field_info[
'label']) .
'</td><td>';
67 $accountancy_code = GETPOSTISSET($html_name) ?
GETPOST($html_name,
'aZ09') : (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key]) ? $assetaccountancycodes->accountancy_codes[$mode_key][$field_key] :
'');
68 if (isModEnabled(
'accounting')) {
69 print $formaccounting->select_account($accountancy_code, $html_name, 1,
null, 1, 1,
'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
71 print
'<input name="' . $html_name .
'" class="maxwidth200 " value="' .
dol_escape_htmltag($accountancy_code) .
'">';
78 print
'<div class="clearboth"></div>';
81<!-- END PHP TEMPLATE accountancy_code_edit.tpl.php -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...