Commit 63a877ecdb25c18c9c59bd6aa6d5123707067301

Authored by aspangaro
1 parent 0ed5e013
Exists in 3.5 and in 2 other branches 3.4, 3.6

Présentation et standard Dolibarr

admin/chartofaccounts.php
... ... @@ -177,7 +177,7 @@ $var = True;
177 177  
178 178 print "<tr $bc[$var]>";
179 179  
180   - print '<td>' . $obj2->account_number . '</td>';
  180 + print '<td><a href="./fiche.php?id='. $obj2->rowid . '">' . $obj2->account_number . '</td>';
181 181 print '<td>' . $obj2->label . '</td>';
182 182 print '<td>' . $obj2->account_parent . '</td>';
183 183 print '<td>' . $obj2->pcg_type . '</td>';
... ...
admin/fiche.php
... ... @@ -32,6 +32,7 @@ if (! $res &amp;&amp; file_exists(&quot;../../../main.inc.php&quot;)) $res=@include(&quot;../../../main
32 32 if (! $res) die("Include of main fails");
33 33  
34 34 // Class
  35 +dol_include_once ( "/ventilation/core/lib/account.lib.php");
35 36 dol_include_once ( "/ventilation/class/accountingaccount.class.php");
36 37 dol_include_once ( "/ventilation/class/html.formventilation.class.php");
37 38  
... ... @@ -45,7 +46,7 @@ $action = GETPOST(&#39;action&#39;);
45 46 $id = GETPOST('id','int');
46 47 $rowid = GETPOST('rowid','int');
47 48  
48   -// Securite acces client
  49 +// Security check
49 50 if ($user->societe_id > 0) accessforbidden();
50 51 if (!$user->rights->accountingex->admin) accessforbidden();
51 52  
... ... @@ -76,7 +77,7 @@ if (GETPOST ( &quot;action&quot; ) == &#39;add&#39;) {
76 77 $action = "create";
77 78 }
78 79 }
79   - Header ( "Location: " . DOL_DOCUMENT_ROOT . "/ventilation/accountingaccount/liste.php" );
  80 + Header ( "Location: chartofaccounts.php" );
80 81 }
81 82 // Update record
82 83 else if ($action == 'edit')
... ... @@ -123,36 +124,39 @@ $htmlacc = new FormVentilation ( $db );
123 124  
124 125 if ($action == 'create') {
125 126  
  127 + print_fiche_titre($langs->trans("NewAccount"));
  128 +
126 129 print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
127 130 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
128 131 print '<input type="hidden" name="action" value="add">';
129 132  
130 133 print '<table class="border" width="100%">';
131 134  
132   - print '<tr><td width="20%">' . $langs->trans ( "AccountNumber" ) . '</td>';
  135 + print '<tr><td width="25%">' . $langs->trans ( "AccountNumber" ) . '</td>';
133 136 print '<td><input name="AccountNumber" size="30" value="' .$accounting->account_number. '"</td></tr>';
134   - print '<tr><td width="20%">' . $langs->trans ( "Label" ) . '</td>';
135   - print '<td><input name="Label" size="70" value="' .$accounting->Label. '"</td></tr>';
136   - print '<tr><td width="20%">' . $langs->trans ( "Accountparent" ) . '</td>';
  137 + print '<tr><td>' . $langs->trans ( "Label" ) . '</td>';
  138 + print '<td><input name="Label" size="70" value="' .$accounting->label. '"</td></tr>';
  139 + print '<tr><td>' . $langs->trans ( "Accountparent" ) . '</td>';
137 140 print '<td>';
138 141 print $htmlacc->select_account_parent($accounting->account_parent, 'AccountParent');
139 142 print '</td></tr>';
140   - print '<tr><td width="20%">' . $langs->trans ( "Pcgtype" ) . '</td>';
  143 + print '<tr><td>' . $langs->trans ( "Pcgtype" ) . '</td>';
141 144 print '<td>';
142 145 print $htmlacc->select_pcgtype($accounting->pcg_type, 'pcgType');
143 146 print '</td></tr>';
144   - print '<tr><td width="20%">' . $langs->trans ( "Pcgsubtype" ) . '</td>';
  147 + print '<tr><td>' . $langs->trans ( "Pcgsubtype" ) . '</td>';
145 148 print '<td>';
146 149 print $htmlacc->select_pcgsubtype($accounting->pcg_subtype, 'pcgSubType');
147 150 print '</td></tr>';
148   - print '<tr><td width="20%">' . $langs->trans ( "Active" ) . '</td>';
149   - print '<td><input name="Active" size="30" value="' .$accounting->Active. '"</td></tr>';
  151 + print '<tr><td>' . $langs->trans ( "Active" ) . '</td>';
  152 + print '<td><input name="Active" size="30" value="' .$accounting->active. '"</td></tr>';
150 153  
151   -
152   - print '<tr><td>&nbsp;</td><td><input type="submit" class="button" value="' . $langs->trans ( "Sauvegarder" ) . '"><input type="cancel" class="button" value="' . $langs->trans ( "Cancel" ) . '"></td></tr>';
153   -
154 154 print '</table>';
155   - print '</form>';
  155 +
  156 + print '<br><center><input class="button" type="submit" value="'.$langs->trans("Save").'"> &nbsp; &nbsp; ';
  157 + print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></center';
  158 +
  159 + print '</form>';
156 160 }
157 161 else if ($id)
158 162 {
... ... @@ -163,6 +167,10 @@ else if ($id)
163 167 {
164 168 dol_htmloutput_mesg($mesg);
165 169  
  170 + $head = account_prepare_head($accounting);
  171 +
  172 + dol_fiche_head($head, 'card', $langs->trans("AccountCard"), 0, 'accounting@ventilation');
  173 +
166 174 if ($action == 'update')
167 175 {
168 176 //WYSIWYG Editor
... ... @@ -185,23 +193,23 @@ else if ($id)
185 193  
186 194 print '<table class="border" width="100%">';
187 195  
188   - print '<tr><td width="20%">' . $langs->trans ( "AccountNumber" ) . '</td>';
  196 + print '<tr><td width="25%">' . $langs->trans ( "AccountNumber" ) . '</td>';
189 197 print '<td><input name="AccountNumber" size="30" value="' .$accounting->account_number. '"</td></tr>';
190   - print '<tr><td width="20%">' . $langs->trans ( "Label" ) . '</td>';
  198 + print '<tr><td>' . $langs->trans ( "Label" ) . '</td>';
191 199 print '<td><input name="Label" size="70" value="' .$accounting->label. '"</td></tr>';
192   - print '<tr><td width="20%">' . $langs->trans ( "Accountparent" ) . '</td>';
  200 + print '<tr><td>' . $langs->trans ( "Accountparent" ) . '</td>';
193 201 print '<td>';
194 202 print $htmlacc->select_account_parent($accounting->account_parent, 'AccountParent');
195 203 print '</td></tr>';
196   - print '<tr><td width="20%">' . $langs->trans ( "Pcgtype" ) . '</td>';
  204 + print '<tr><td>' . $langs->trans ( "Pcgtype" ) . '</td>';
197 205 print '<td>';
198 206 print $htmlacc->select_pcgtype($accounting->pcg_type, 'pcgType');
199 207 print '</td></tr>';
200   - print '<tr><td width="20%">' . $langs->trans ( "Pcgsubtype" ) . '</td>';
  208 + print '<tr><td>' . $langs->trans ( "Pcgsubtype" ) . '</td>';
201 209 print '<td>';
202 210 print $htmlacc->select_pcgsubtype($accounting->pcg_subtype, 'pcgSubType');
203 211 print '</td></tr>';
204   - print '<tr><td width="20%">' . $langs->trans ( "Active" ) . '</td>';
  212 + print '<tr><td>' . $langs->trans ( "Active" ) . '</td>';
205 213 print '<td><input name="Active" size="30" value="' .$accounting->active. '"</td></tr>';
206 214  
207 215 print '</table>';
... ... @@ -216,26 +224,51 @@ else if ($id)
216 224 }
217 225 else
218 226 {
219   - print_fiche_titre($langs->trans("Account"));
220   -
221 227 print '<table class="border" width="100%">';
222   -
223   - print '<tr><td width="20%">'.$langs->trans("AccountNumber").'</td>';
  228 +
  229 + $linkback = '<a href="'.DOL_URL_ROOT.'/compta/deplacement/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
  230 +
  231 + print '<tr><td width="25%">'.$langs->trans("AccountNumber").'</td>';
224 232 print '<td>'.$accounting->account_number.'</td></tr>';
225   - print '<tr><td width="20%">'.$langs->trans("Label").'</td>';
  233 + print '<tr><td>'.$langs->trans("Label").'</td>';
226 234 print '<td>'.$accounting->label.'</td></tr>';
227   - print '<tr><td width="20%">'.$langs->trans("Accountparent").'</td>';
  235 + print '<tr><td>'.$langs->trans("Accountparent").'</td>';
228 236 print '<td>'.$accounting->account_parent.'</td></tr>';
229   - print '<tr><td width="20%">'.$langs->trans("Pcgtype").'</td>';
  237 + print '<tr><td>'.$langs->trans("Pcgtype").'</td>';
230 238 print '<td>'.$accounting->pcg_type.'</td></tr>';
231   - print '<tr><td width="20%">'.$langs->trans("Pcgsubtype").'</td>';
  239 + print '<tr><td>'.$langs->trans("Pcgsubtype").'</td>';
232 240 print '<td>'.$accounting->pcg_subtype.'</td></tr>';
233   - print '<tr><td width="20%">'.$langs->trans("Active").'</td>';
  241 + print '<tr><td>'.$langs->trans("Active").'</td>';
234 242 print '<td>'.$accounting->active.'</td></tr>';
235 243  
236 244 print '</table>';
237 245  
238 246 print '</div>';
  247 +
  248 + /*
  249 + * Barre d'actions
  250 + */
  251 +
  252 + print '<div class="tabsAction">';
  253 +
  254 + if ($user->rights->accountingex->admin)
  255 + {
  256 + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=update&id='.$id.'">'.$langs->trans('Modify').'</a>';
  257 + }
  258 + else
  259 + {
  260 + print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Modify').'</a>';
  261 + }
  262 + if ($user->rights->accountingex->supprimer) // Mauvaise permission en attendant d'écrire la fonction
  263 + {
  264 + print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
  265 + }
  266 + else
  267 + {
  268 + print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Delete').'</a>';
  269 + }
  270 +
  271 + print '</div>';
239 272 }
240 273 }
241 274 else
... ...
admin/info.php 0 → 100644
... ... @@ -0,0 +1,71 @@
  1 +<?php
  2 +/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3 + * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
  4 + * Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
  5 + * Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
  6 + *
  7 + * This program is free software; you can redistribute it and/or modify
  8 + * it under the terms of the GNU General Public License as published by
  9 + * the Free Software Foundation; either version 3 of the License, or
  10 + * (at your option) any later version.
  11 + *
  12 + * This program is distributed in the hope that it will be useful,
  13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15 + * GNU General Public License for more details.
  16 + *
  17 + * You should have received a copy of the GNU General Public License
  18 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19 + */
  20 +
  21 +/**
  22 + * \file htdocs/ventilation/admin/info.php
  23 + * \ingroup accountingex
  24 + * \brief Page to show an account information
  25 + */
  26 +
  27 + $res=@include("../main.inc.php");
  28 +if (! $res && file_exists("../main.inc.php")) $res=@include("../main.inc.php");
  29 +if (! $res && file_exists("../../main.inc.php")) $res=@include("../../main.inc.php");
  30 +if (! $res && file_exists("../../../main.inc.php")) $res=@include("../../../main.inc.php");
  31 +if (! $res) die("Include of main fails");
  32 +
  33 +// Class
  34 +dol_include_once ( "/ventilation/core/lib/account.lib.php");
  35 +dol_include_once ( "/ventilation/class/accountingaccount.class.php");
  36 +dol_include_once ( "/core/lib/functions2.lib.php");
  37 +
  38 +$langs->load("ventilation@ventilation");
  39 +
  40 +// Security check
  41 +if ($user->societe_id > 0) accessforbidden();
  42 +if (!$user->rights->accountingex->admin) accessforbidden();
  43 +
  44 +
  45 +/*
  46 + * View
  47 + */
  48 +
  49 +llxHeader();
  50 +
  51 +if ($id)
  52 +{
  53 + $object = new AccountingAccount($db);
  54 + $object->fetch($id);
  55 + $object->info($id);
  56 +
  57 + $head = account_prepare_head($object);
  58 +
  59 + dol_fiche_head($head, 'info', $langs->trans("AccountCard"), 0, 'accounting@ventilation');
  60 +
  61 + print '<table width="100%"><tr><td>';
  62 + dol_print_object_info($object);
  63 + print '</td></tr></table>';
  64 +
  65 + print '</div>';
  66 +}
  67 +
  68 +$db->close();
  69 +
  70 +llxFooter();
  71 +?>
... ...
class/accountingaccount.class.php
... ... @@ -23,21 +23,24 @@
23 23 */
24 24  
25 25 /**
26   - * \class BookKeeping
  26 + * \class AccountingAccount
27 27 * \brief Classe permettant la gestion des comptes generaux de compta
28 28 */
29 29 class AccountingAccount {
30 30 var $db;
31 31 var $id;
32 32 var $rowid;
  33 + var $datec; // Creation date
33 34 var $fk_pcg_version;
34 35 var $pcg_type;
35 36 var $pcg_subtype;
36 37 var $account_number;
37 38 var $account_parent;
38 39 var $label;
  40 + var $fk_user_author;
  41 + var $fk_user_modif;
39 42 var $active;
40   - var $fk_user_author;
  43 +
41 44  
42 45  
43 46 /**
... ... @@ -80,14 +83,17 @@ if ($rowid || $account_number) {
80 83  
81 84 $this->id = $obj->rowid;
82 85 $this->rowid = $obj->rowid;
  86 + $this->datec = $obj->datec;
  87 + $this->tms = $obj->tms;
83 88 $this->fk_pcg_version = $obj->fk_pcg_version;
84 89 $this->pcg_type = $obj->pcg_type;
85 90 $this->pcg_subtype = $obj->pcg_subtype;
86 91 $this->account_number = $obj->account_number;
87 92 $this->account_parent = $obj->account_parent;
88 93 $this->label = $obj->label;
  94 + $this->fk_user_author = $obj->fk_user_author;
  95 + $this->fk_user_modif = $obj->fk_user_modif;
89 96 $this->active = $obj->active;
90   - $this->fk_user_author = $obj->fk_user_author;
91 97  
92 98 return $obj->rowid;
93 99 }
... ... @@ -105,15 +111,14 @@ if ($rowid || $account_number) {
105 111 $error=0;
106 112  
107 113 // Clean parameters
108   -
109   - if (isset($this->fk_pcg_version)) $this->fk_pcg_version=trim($this->fk_pcg_version);
  114 + if (isset($this->fk_pcg_version)) $this->fk_pcg_version=trim($this->fk_pcg_version);
110 115 if (isset($this->pcg_type)) $this->pcg_type=trim($this->pcg_type);
111 116 if (isset($this->pcg_subtype)) $this->pcg_subtype=trim($this->pcg_subtype);
112 117 if (isset($this->account_number)) $this->account_number=trim($this->account_number);
113 118 if (isset($this->account_parent)) $this->account_parent=trim($this->account_parent);
114 119 if (isset($this->label)) $this->account_parent=trim($this->label);
115   - if (isset($this->active)) $this->active=trim($this->active);
116 120 if (isset($this->fk_user_author)) $this->fk_user_author=trim($this->fk_user_author);
  121 + if (isset($this->active)) $this->active=trim($this->active);
117 122  
118 123  
119 124  
... ... @@ -122,28 +127,31 @@ if ($rowid || $account_number) {
122 127  
123 128 // Insert request
124 129 $sql = "INSERT INTO ".MAIN_DB_PREFIX."accountingaccount(";
125   -
126   - $sql.= "fk_pcg_version,";
127   - $sql.= "pcg_type,";
128   - $sql.= "pcg_subtype,";
129   - $sql.= "account_number,";
130   - $sql.= "account_parent,";
131   - $sql.= "label,";
132   - $sql.= "active,";
133   - $sql .= " fk_user_author";
  130 +
  131 + $sql.= "datec";
  132 + $sql.= ", entity";
  133 + $sql.= ", fk_pcg_version";
  134 + $sql.= ", pcg_type";
  135 + $sql.= ", pcg_subtype";
  136 + $sql.= ", account_number";
  137 + $sql.= ", account_parent";
  138 + $sql.= ", label";
  139 + $sql.= ", fk_user_author";
  140 + $sql.= ", active";
134 141  
135   -
136 142 $sql.= ") VALUES (";
137 143  
138   - $sql.= " ".(! isset($this->fk_pcg_version)?'NULL':"'".$this->db->escape($this->fk_pcg_version)."'").",";
139   - $sql.= " ".(! isset($this->pcg_type)?'NULL':"'".$this->db->escape($this->pcg_type)."'").",";
140   - $sql.= " ".(! isset($this->pcg_subtype)?'NULL':"'".$this->pcg_subtype."'").",";
141   - $sql.= " ".(! isset($this->account_number)?'NULL':"'".$this->account_number."'").",";
142   - $sql.= " ".(! isset($this->account_parent)?'NULL':"'".$this->db->escape($this->account_parent)."'").",";
143   - $sql.= " ".(! isset($this->label)?'NULL':"'".$this->db->escape($this->label)."'").",";
144   - $sql.= " ".(! isset($this->active)?'NULL':"'".$this->db->escape($this->active)."'").",";
145   - $sql .= "'" . $user->id . "'";
146   -
  144 + $sql.= " '".$this->db->idate($now)."'";
  145 + $sql.= ", ".$conf->entity;
  146 + $sql.= ", ".(! isset($this->fk_pcg_version)?'NULL':"'".$this->db->escape($this->fk_pcg_version)."'");
  147 + $sql.= ", ".(! isset($this->pcg_type)?'NULL':"'".$this->db->escape($this->pcg_type)."'");
  148 + $sql.= ", ".(! isset($this->pcg_subtype)?'NULL':"'".$this->pcg_subtype."'");
  149 + $sql.= ", ".(! isset($this->account_number)?'NULL':"'".$this->account_number."'");
  150 + $sql.= ", ".(! isset($this->account_parent)?'NULL':"'".$this->db->escape($this->account_parent)."'");
  151 + $sql.= ", ".(! isset($this->label)?'NULL':"'".$this->db->escape($this->label)."'");
  152 + $sql.= ", ".$user->id;
  153 + $sql.= ", ".(! isset($this->active)?'NULL':"'".$this->db->escape($this->active)."'");
  154 +
147 155 $sql.= ")";
148 156  
149 157 $this->db->begin();
... ... @@ -207,8 +215,9 @@ if ($rowid || $account_number) {
207 215 $sql .= " , account_number = '".$this->account_number."'";
208 216 $sql .= " , account_parent = '".$this->account_parent."'";
209 217 $sql .= " , label = ".($this->label?"'".$this->db->escape($this->label)."'":"null");
210   - $sql .= " , active = '".$this->active."'";
211   - $sql .= " , fk_user_author = ".$user->id;
  218 + $sql .= " , fk_user_modif = ".$user->id;
  219 + $sql .= " , active = '".$this->active."'";
  220 +
212 221 $sql .= " WHERE rowid = ".$this->id;
213 222  
214 223 dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
... ... @@ -285,11 +294,49 @@ if ($rowid || $account_number) {
285 294 }
286 295 }
287 296  
288   -
289   -
290   -
291   - }
292   -
  297 + /**
  298 + * Information on record
  299 + *
  300 + * @param int $id Id of record
  301 + * @return void
  302 + */
  303 + function info($id)
  304 + {
  305 + $sql = 'SELECT a.rowid, a.datec, a.fk_user_author, a.fk_user_modif, a.tms';
  306 + $sql.= ' FROM '.MAIN_DB_PREFIX.'accountingaccount as a';
  307 + $sql.= ' WHERE a.rowid = '.$id;
293 308  
  309 + dol_syslog(get_class($this).'::info sql='.$sql);
  310 + $result = $this->db->query($sql);
294 311  
  312 + if ($result)
  313 + {
  314 + if ($this->db->num_rows($result))
  315 + {
  316 + $obj = $this->db->fetch_object($result);
  317 + $this->id = $obj->rowid;
  318 + if ($obj->fk_user_author)
  319 + {
  320 + $cuser = new User($this->db);
  321 + $cuser->fetch($obj->fk_user_author);
  322 + $this->user_creation = $cuser;
  323 + }
  324 + if ($obj->fk_user_modif)
  325 + {
  326 + $muser = new User($this->db);
  327 + $muser->fetch($obj->fk_user_modif);
  328 + $this->user_modification = $muser;
  329 + }
  330 + $this->date_creation = $this->db->jdate($obj->datec);
  331 + $this->date_modification = $this->db->jdate($obj->tms);
  332 + }
  333 + $this->db->free($result);
  334 + }
  335 + else
  336 + {
  337 + dol_print_error($this->db);
  338 + }
  339 + }
  340 +
  341 +}
295 342 ?>
... ...
core/lib/account.lib.php 0 → 100644
... ... @@ -0,0 +1,66 @@
  1 +<?php
  2 +/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
  3 + * Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
  4 + *
  5 + * This program is free software; you can redistribute it and/or modify
  6 + * it under the terms of the GNU General Public License as published by
  7 + * the Free Software Foundation; either version 3 of the License, or
  8 + * (at your option) any later version.
  9 + *
  10 + * This program is distributed in the hope that it will be useful,
  11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13 + * GNU General Public License for more details.
  14 + *
  15 + * You should have received a copy of the GNU General Public License
  16 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17 + * or see http://www.gnu.org/
  18 + */
  19 +
  20 +/**
  21 + * \file htdocs/core/lib/account.lib.php
  22 + * \brief Ensemble de fonctions de base pour les comptes comptables
  23 + */
  24 +
  25 +/**
  26 + * Prepare array with list of tabs
  27 + *
  28 + * @param Object $object Object related to tabs
  29 + * @return array Array of tabs to shoc
  30 + */
  31 +function account_prepare_head($object)
  32 +{
  33 + global $langs, $conf;
  34 +
  35 + $h = 0;
  36 + $head = array();
  37 +
  38 + $head[$h][0] = DOL_URL_ROOT . '/ventilation/admin/fiche.php?id=' . $object->id;
  39 + $head[$h][1] = $langs->trans("Card");
  40 + $head[$h][2] = 'card';
  41 + $h++;
  42 +
  43 + // Show more tabs from modules
  44 + // Entries must be declared in modules descriptor with line
  45 + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
  46 + // $this->tabs = array('entity:-tabname); to remove a tab
  47 + complete_head_from_modules($conf,$langs,$object,$head,$h,'accounting');
  48 +
  49 + /*
  50 + $head[$h][0] = DOL_URL_ROOT.'/ventilation/admin/document.php?id='.$object->id;
  51 + $head[$h][1] = $langs->trans("Documents");
  52 + $head[$h][2] = 'documents';
  53 + $h++;
  54 + */
  55 +
  56 + $head[$h][0] = DOL_URL_ROOT . '/ventilation/admin/info.php?id=' . $object->id;
  57 + $head[$h][1] = $langs->trans("Info");
  58 + $head[$h][2] = 'info';
  59 + $h++;
  60 +
  61 + complete_head_from_modules($conf,$langs,$object,$head,$h,'accounting','remove');
  62 +
  63 + return $head;
  64 +}
  65 +
  66 +?>
0 67 \ No newline at end of file
... ...
sql/llx_accountingaccount.update.sql
1 1 -- ============================================================================
2   --- Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
  2 +-- Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
  3 +-- Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
3 4 --
4 5 -- This program is free software; you can redistribute it and/or modify
5 6 -- it under the terms of the GNU General Public License as published by
... ... @@ -16,5 +17,9 @@
16 17 --
17 18 -- ============================================================================
18 19  
19   -ALTER TABLE llx_accountingaccount add column fk_user_author int(11) DEFAULT NULL
  20 +ALTER TABLE llx_accountingaccount add column entity integer DEFAULT 1 NOT NULL AFTER rowid;
  21 +ALTER TABLE llx_accountingaccount add column datec datetime NOT NULL AFTER entity;
  22 +ALTER TABLE llx_accountingaccount add column tms timestamp DEFAULT NULL AFTER datec;
  23 +ALTER TABLE llx_accountingaccount add column fk_user_author integer DEFAULT NULL AFTER label;
  24 +ALTER TABLE llx_accountingaccount add column fk_user_modif integer DEFAULT NULL AFTER fk_user_author;
20 25  
... ...