28 if (empty($object) || !is_object($object)) {
29 print
"Error, template page can't be called as URL";
33 if (!is_object(
$form)) {
37 if (!empty($conf->accounting->enabled) && !is_object($formaccounting)) {
38 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formaccounting.class.php';
44 <!-- BEGIN PHP TEMPLATE accountancy_code_edit.tpl.php -->
47 if (!is_array($parameters)) {
48 $parameters = array();
50 $parameters[
'assetaccountancycodes'] = &$assetaccountancycodes;
51 $reshook = $hookmanager->executeHooks(
'formAssetAccountancyCodes', $parameters, $object, $action);
52 print $hookmanager->resPrint;
57 if (empty($reshook)) {
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 (!empty($conf->accounting->enabled)) {
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 -->
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form...
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.