30 print
"Error, template page can't be called as URL";
34if (!is_object($form)) {
35 $form =
new Form($db);
40<!-- BEGIN PHP TEMPLATE accountancy_code_view.tpl.php -->
43if (!is_array($parameters)) {
44 $parameters = array();
46$parameters[
'assetaccountancycodes'] = &$assetaccountancycodes;
47$reshook = $hookmanager->executeHooks(
'formAssetAccountancyCodes', $parameters,
$object, $action);
48print $hookmanager->resPrint;
54 if (isModEnabled(
'accounting')) {
55 require_once DOL_DOCUMENT_ROOT .
'/accountancy/class/accountingaccount.class.php';
58 foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) {
59 if (empty($assetdepreciationoptions->deprecation_options[$mode_key]) && $mode_key ==
"accelerated_depreciation") {
63 print
'<table class="liste centpercent '. $width .
'" id="block_' . $mode_key .
'">' .
"\n";
64 print
'<tr class="liste_titre"><td colspan="5">'.$langs->trans($mode_info[
'label']).
'</td></tr>';
65 foreach ($mode_info[
'fields'] as $field_key => $field_info) {
66 $key = $mode_key .
'_' . $field_key;
67 print
'<tr class="field_' . $key .
'" id="block_' . $mode_key .
'"><td class="titlefieldmiddle">' . $langs->trans($field_info[
'label']) .
'</td><td colspan="3">';
68 if (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key])) {
69 $accountancy_code = $assetaccountancycodes->accountancy_codes[$mode_key][$field_key];
70 if (isModEnabled(
'accounting')) {
72 $accountingaccount->fetch(0, $accountancy_code, 1);
74 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
76 print $accountancy_code;
82 print
'<div class="clearboth"></div>';
85 print
'<div class="clearboth"></div>';
88<!-- END PHP TEMPLATE accountancy_code_view.tpl.php -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage accounting accounts.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.