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);
39<!-- BEGIN PHP TEMPLATE accountancy_code_view.tpl.php -->
42if (!is_array($parameters)) {
43 $parameters = array();
45$parameters[
'assetaccountancycodes'] = &$assetaccountancycodes;
46$reshook = $hookmanager->executeHooks(
'formAssetAccountancyCodes', $parameters, $object, $action);
47print $hookmanager->resPrint;
53 if (isModEnabled(
'accounting')) {
54 require_once DOL_DOCUMENT_ROOT .
'/accountancy/class/accountingaccount.class.php';
57 foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) {
61 print
'<div class="fichecenter">';
62 print
'<div class="underbanner clearboth"></div>';
63 print
'<table class="border centpercent tableforfield">';
64 foreach ($mode_info[
'fields'] as $field_key => $field_info) {
65 print
'<tr><td class="titlefieldcreate">' . $langs->trans($field_info[
'label']) .
'</td><td colspan="3">';
66 if (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key])) {
67 $accountancy_code = $assetaccountancycodes->accountancy_codes[$mode_key][$field_key];
68 if (isModEnabled(
'accounting')) {
70 $accountingaccount->fetch(
'', $accountancy_code, 1);
72 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
74 print $accountancy_code;
84<!-- END PHP TEMPLATE accountancy_code_view.tpl.php -->
Class to manage accounting accounts.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.