39 print
"Error, template page can't be called as URL";
43if (!is_object($form)) {
44 $form =
new Form($db);
49<!-- BEGIN PHP TEMPLATE accountancy_code_view.tpl.php -->
52if (!is_array($parameters)) {
53 $parameters = array();
55$parameters[
'assetaccountancycodes'] = &$assetaccountancycodes;
56$reshook = $hookmanager->executeHooks(
'formAssetAccountancyCodes', $parameters,
$object, $action);
57print $hookmanager->resPrint;
63 if (isModEnabled(
'accounting')) {
64 require_once DOL_DOCUMENT_ROOT .
'/accountancy/class/accountingaccount.class.php';
67 foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) {
68 if (empty($assetdepreciationoptions->deprecation_options[$mode_key]) && $mode_key ==
"accelerated_depreciation") {
72 print
'<table class="liste centpercent '. $width .
'" id="block_' . $mode_key .
'">' .
"\n";
73 print
'<tr class="liste_titre"><td colspan="5">'.$langs->trans($mode_info[
'label']).
'</td></tr>';
74 foreach ($mode_info[
'fields'] as $field_key => $field_info) {
75 $key = $mode_key .
'_' . $field_key;
76 print
'<tr class="field_' . $key .
'" id="block_' . $mode_key .
'"><td class="titlefieldmiddle">' . $langs->trans($field_info[
'label']) .
'</td><td colspan="3">';
77 if (!empty($assetaccountancycodes->accountancy_codes[$mode_key][$field_key])) {
78 $accountancy_code = $assetaccountancycodes->accountancy_codes[$mode_key][$field_key];
79 if (isModEnabled(
'accounting')) {
81 $accountingaccount->fetch(0, $accountancy_code, 1);
83 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
85 print $accountancy_code;
91 print
'<div class="clearboth"></div>';
94 print
'<div class="clearboth"></div>';
97<!-- 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.