28if (empty($object) || !is_object($object)) {
 
   29  print 
"Error, template page can't be called as URL";
 
   33if (!is_object($form)) {
 
   34  $form = 
new Form($db);
 
   37if (isModEnabled(
'accounting') && !is_object($formaccounting)) {
 
   38  require_once DOL_DOCUMENT_ROOT . 
'/core/class/html.formaccounting.class.php';
 
   44<!-- BEGIN PHP TEMPLATE accountancy_code_edit.tpl.php -->
 
   47if (!is_array($parameters)) {
 
   48  $parameters = array();
 
   50$parameters[
'assetaccountancycodes'] = &$assetaccountancycodes;
 
   51$reshook = $hookmanager->executeHooks(
'formAssetAccountancyCodes', $parameters, $object, $action);
 
   52print $hookmanager->resPrint;
 
   58  foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) {
 
   62    print 
'<div class="fichecenter">';
 
   63    print 
'<div class="underbanner clearboth"></div>';
 
   64    print 
'<table class="border centpercent tableforfield">';
 
   65    foreach ($mode_info[
'fields'] as $field_key => $field_info) {
 
   66      $html_name = $mode_key . 
'_' . $field_key;
 
   67      print 
'<tr><td class="titlefieldcreate">' . $langs->trans($field_info[
'label']) . 
'</td><td colspan="3">';
 
   68      $accountancy_code = GETPOSTISSET($html_name) ? 
GETPOST($html_name, 
'aZ09') : (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key]) ? $assetaccountancycodes->accountancy_codes[$mode_key][$field_key] : 
'');
 
   69      if (isModEnabled(
'accounting')) {
 
   70        print $formaccounting->select_account($accountancy_code, $html_name, 1, 
null, 1, 1, 
'minwidth150 maxwidth300', 1);
 
   72        print 
'<input name="' . $html_name . 
'" class="maxwidth200" value="' . 
dol_escape_htmltag($accountancy_code) . 
'">';
 
   81<!-- END PHP TEMPLATE accountancy_code_edit.tpl.php -->
 
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
 
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...