Commit 23a8f35d11d49461f88a060229630aad775b7aa8
1 parent
e170a7ce
Exists in
3.5
and in
1 other branch
review PSR2
Showing
28 changed files
with
271 additions
and
280 deletions
Show diff stats
accountingex/admin/about.php
... | ... | @@ -83,7 +83,7 @@ print '<a target="_blank" href="http://twiter.com/elarifr"><img src="../img/twee |
83 | 83 | print '<a target="_blank" href="https://plus.google.com/109875408706351786851"><img src="../img/google+.png" width="20"></a>'; |
84 | 84 | print '</td></tr>'; |
85 | 85 | |
86 | -//Florian HENRY - Open-concept.pro | |
86 | +// Florian HENRY - Open-concept.pro | |
87 | 87 | print '<tr><td><img src="http://demo.open-concept.pro/prestashop/img/logo.jpg"></td>'; |
88 | 88 | print '<td><b>Florian Henry</b> - Intégrateur/développeur Solution Open-Source'; |
89 | 89 | print '<br>Florian HENRY - Open-Concept.pro <BR> florian.henry@open-concept.pro <BR> +33 6 03 76 48 07'; | ... | ... |
accountingex/admin/account.php
... | ... | @@ -69,7 +69,7 @@ if (! $sortorder) |
69 | 69 | $sortorder = "ASC"; |
70 | 70 | |
71 | 71 | if ($action == 'delete') { |
72 | - $formconfirm = $html->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); | |
72 | + $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); | |
73 | 73 | print $formconfirm; |
74 | 74 | } |
75 | 75 | |
... | ... | @@ -111,20 +111,20 @@ $sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount as aa, " . MAIN_DB_PREFIX |
111 | 111 | $sql .= " WHERE aa.fk_pcg_version = asy.pcg_version"; |
112 | 112 | $sql .= " AND asy.rowid = " . $pcgver; |
113 | 113 | |
114 | -if (strlen(trim($_GET ["search_account"]))) { | |
115 | - $sql .= " AND aa.account_number like '%" . $_GET ["search_account"] . "%'"; | |
114 | +if (strlen(trim($_GET["search_account"]))) { | |
115 | + $sql .= " AND aa.account_number like '%" . $_GET["search_account"] . "%'"; | |
116 | 116 | } |
117 | -if (strlen(trim($_GET ["search_label"]))) { | |
118 | - $sql .= " AND aa.label like '%" . $_GET ["search_label"] . "%'"; | |
117 | +if (strlen(trim($_GET["search_label"]))) { | |
118 | + $sql .= " AND aa.label like '%" . $_GET["search_label"] . "%'"; | |
119 | 119 | } |
120 | -if (strlen(trim($_GET ["search_accountparent"]))) { | |
121 | - $sql .= " AND aa.account_parent like '%" . $_GET ["search_accountparent"] . "%'"; | |
120 | +if (strlen(trim($_GET["search_accountparent"]))) { | |
121 | + $sql .= " AND aa.account_parent like '%" . $_GET["search_accountparent"] . "%'"; | |
122 | 122 | } |
123 | -if (strlen(trim($_GET ["search_pcgtype"]))) { | |
124 | - $sql .= " AND aa.pcg_type like '%" . $_GET ["search_pcgtype"] . "%'"; | |
123 | +if (strlen(trim($_GET["search_pcgtype"]))) { | |
124 | + $sql .= " AND aa.pcg_type like '%" . $_GET["search_pcgtype"] . "%'"; | |
125 | 125 | } |
126 | -if (strlen(trim($_GET ["search_pcgsubtype"]))) { | |
127 | - $sql .= " AND aa.pcg_subtype like '%" . $_GET ["search_pcgsubtype"] . "%'"; | |
126 | +if (strlen(trim($_GET["search_pcgsubtype"]))) { | |
127 | + $sql .= " AND aa.pcg_subtype like '%" . $_GET["search_pcgsubtype"] . "%'"; | |
128 | 128 | } |
129 | 129 | |
130 | 130 | $sql .= $db->order($sortfield, $sortorder); |
... | ... | @@ -136,11 +136,11 @@ $result = $db->query($sql); |
136 | 136 | if ($result) { |
137 | 137 | $num = $db->num_rows($result); |
138 | 138 | |
139 | - print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER ["PHP_SELF"], '', $sortfield, $sortorder, '', $num); | |
139 | + print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num); | |
140 | 140 | |
141 | 141 | $i = 0; |
142 | 142 | |
143 | - print '<form method="GET" action="' . $_SERVER ["PHP_SELF"] . '">'; | |
143 | + print '<form method="GET" action="' . $_SERVER["PHP_SELF"] . '">'; | |
144 | 144 | |
145 | 145 | print '<br/>'; |
146 | 146 | |
... | ... | @@ -177,7 +177,7 @@ if ($result) { |
177 | 177 | $obj = $db->fetch_object($resql); |
178 | 178 | |
179 | 179 | $var = ! $var; |
180 | - print '<tr ' . $bc [$var] . '>'; | |
180 | + print '<tr ' . $bc[$var] . '>'; | |
181 | 181 | print '<td><a href="./fiche.php?id=' . $obj->rowid . '">' . $obj->account_number . '</td>'; |
182 | 182 | print '<td>' . $obj->label . '</td>'; |
183 | 183 | print '<td>' . $obj->account_parent . '</td>'; |
... | ... | @@ -185,11 +185,11 @@ if ($result) { |
185 | 185 | print '<td>' . $obj->pcg_subtype . '</td>'; |
186 | 186 | print '<td>'; |
187 | 187 | if (empty($obj->active)) { |
188 | - print '<a href="' . $_SERVER ["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">'; | |
188 | + print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">'; | |
189 | 189 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
190 | 190 | print '</a>'; |
191 | 191 | } else { |
192 | - print '<a href="' . $_SERVER ["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">'; | |
192 | + print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">'; | |
193 | 193 | print img_picto($langs->trans("Activated"), 'switch_on'); |
194 | 194 | print '</a>'; |
195 | 195 | } | ... | ... |
accountingex/admin/export.php
... | ... | @@ -104,8 +104,8 @@ $head = admin_account_prepare_head(null); |
104 | 104 | |
105 | 105 | dol_fiche_head($head, 'export', $langs->trans("Configuration"), 0, 'cron'); |
106 | 106 | |
107 | -print '<form action="' . $_SERVER ["PHP_SELF"] . '" method="post">'; | |
108 | -print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; | |
107 | +print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">'; | |
108 | +print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; | |
109 | 109 | print '<input type="hidden" name="action" value="update">'; |
110 | 110 | |
111 | 111 | print '<table class="noborder" width="100%">'; |
... | ... | @@ -117,7 +117,7 @@ print '</tr>'; |
117 | 117 | |
118 | 118 | $var = ! $var; |
119 | 119 | |
120 | -print '<tr ' . $bc [$var] . '>'; | |
120 | +print '<tr ' . $bc[$var] . '>'; | |
121 | 121 | print "<td>" . $langs->trans("Selectmodelcsv") . "</td>"; |
122 | 122 | print "<td>"; |
123 | 123 | print '<select class="flat" name="modelcsv" id="modelcsv">'; |
... | ... | @@ -156,7 +156,7 @@ if ($num) { |
156 | 156 | foreach ( $list as $key ) { |
157 | 157 | $var = ! $var; |
158 | 158 | |
159 | - print '<tr ' . $bc [$var] . ' class="value">'; | |
159 | + print '<tr ' . $bc[$var] . ' class="value">'; | |
160 | 160 | |
161 | 161 | // Param |
162 | 162 | $label = $langs->trans($key); | ... | ... |
accountingex/admin/fiche.php
... | ... | @@ -103,13 +103,13 @@ if ($action == 'add') { |
103 | 103 | $result = $accounting->update($user); |
104 | 104 | |
105 | 105 | if ($result > 0) { |
106 | - header("Location: " . $_SERVER ["PHP_SELF"] . "?id=" . $id); | |
106 | + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); | |
107 | 107 | exit(); |
108 | 108 | } else { |
109 | 109 | $mesg = $object->error; |
110 | 110 | } |
111 | 111 | } else { |
112 | - header("Location: " . $_SERVER ["PHP_SELF"] . "?id=" . $id); | |
112 | + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); | |
113 | 113 | exit(); |
114 | 114 | } |
115 | 115 | } else if ($action == 'delete') { |
... | ... | @@ -141,8 +141,8 @@ $htmlacc = new FormVentilation($db); |
141 | 141 | if ($action == 'create') { |
142 | 142 | print_fiche_titre($langs->trans('NewAccount')); |
143 | 143 | |
144 | - print '<form name="add" action="' . $_SERVER ["PHP_SELF"] . '" method="POST">' . "\n"; | |
145 | - print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; | |
144 | + print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n"; | |
145 | + print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; | |
146 | 146 | print '<input type="hidden" name="action" value="add">'; |
147 | 147 | |
148 | 148 | print '<table class="border" width="100%">'; |
... | ... | @@ -192,8 +192,8 @@ if ($action == 'create') { |
192 | 192 | |
193 | 193 | dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr'); |
194 | 194 | |
195 | - print '<form name="update" action="' . $_SERVER ["PHP_SELF"] . '" method="POST">' . "\n"; | |
196 | - print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; | |
195 | + print '<form name="update" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n"; | |
196 | + print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; | |
197 | 197 | print '<input type="hidden" name="action" value="edit">'; |
198 | 198 | print '<input type="hidden" name="id" value="' . $id . '">'; |
199 | 199 | |
... | ... | @@ -275,13 +275,13 @@ if ($action == 'create') { |
275 | 275 | print '<div class="tabsAction">'; |
276 | 276 | |
277 | 277 | if ($user->rights->accountingex->admin) { |
278 | - print '<a class="butAction" href="' . $_SERVER ["PHP_SELF"] . '?action=update&id=' . $id . '">' . $langs->trans('Modify') . '</a>'; | |
278 | + print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $id . '">' . $langs->trans('Modify') . '</a>'; | |
279 | 279 | } else { |
280 | 280 | print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Modify') . '</a>'; |
281 | 281 | } |
282 | 282 | |
283 | 283 | if ($user->rights->accountingex->admin) { |
284 | - print '<a class="butActionDelete" href="' . $_SERVER ["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>'; | |
284 | + print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>'; | |
285 | 285 | } else { |
286 | 286 | print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Delete') . '</a>'; |
287 | 287 | } | ... | ... |
accountingex/admin/importaccounts.php
... | ... | @@ -56,13 +56,12 @@ llxHeader('', $langs->trans("ImportAccount")); |
56 | 56 | |
57 | 57 | $to_import = GETPOST("mesCasesCochees"); |
58 | 58 | |
59 | -if ($_POST ["action"] == 'import') { | |
59 | +if ($_POST["action"] == 'import') { | |
60 | 60 | print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>'; |
61 | 61 | if (is_array($to_import) && count($to_import) > 0) { |
62 | 62 | print '<div><font color="red">' . count($to_import) . ' ' . $langs->trans("SelectedLines") . '</font></div>'; |
63 | 63 | $sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS; |
64 | 64 | |
65 | - | |
66 | 65 | $result = $db->query($sql); |
67 | 66 | if ($result && ($db->num_rows($result) > 0)) { |
68 | 67 | ... | ... |
accountingex/admin/index.php
... | ... | @@ -148,14 +148,14 @@ dol_fiche_head($head, 'general', $langs->trans("Configuration"), 0, 'cron'); |
148 | 148 | print '<table class="noborder" width="100%">'; |
149 | 149 | |
150 | 150 | // Cas du parametre COMPTA_MODE |
151 | -print '<form action="' . $_SERVER ["PHP_SELF"] . '" method="post">'; | |
152 | -print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; | |
151 | +print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">'; | |
152 | +print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; | |
153 | 153 | print '<input type="hidden" name="action" value="setcomptamode">'; |
154 | 154 | print '<tr class="liste_titre">'; |
155 | 155 | print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>'; |
156 | 156 | print '<td align="right"><input class="button" type="submit" value="' . $langs->trans('Modify') . '"></td>'; |
157 | 157 | print "</tr>\n"; |
158 | -print '<tr ' . $bc [false] . '><td width="200"><input type="radio" name="compta_mode" value="RECETTES-DEPENSES"' . ($compta_mode != 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeTrue') . '</td>'; | |
158 | +print '<tr ' . $bc[false] . '><td width="200"><input type="radio" name="compta_mode" value="RECETTES-DEPENSES"' . ($compta_mode != 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeTrue') . '</td>'; | |
159 | 159 | print '<td colspan="2">' . nl2br($langs->trans('OptionModeTrueDesc')); |
160 | 160 | // Write info on way to count VAT |
161 | 161 | if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) { |
... | ... | @@ -166,7 +166,7 @@ if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) { |
166 | 166 | print nl2br($langs->trans('OptionModeTrueInfoExpert')); |
167 | 167 | } |
168 | 168 | print "</td></tr>\n"; |
169 | -print '<tr ' . $bc [true] . '><td width="200"><input type="radio" name="compta_mode" value="CREANCES-DETTES"' . ($compta_mode == 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeVirtual') . '</td>'; | |
169 | +print '<tr ' . $bc[true] . '><td width="200"><input type="radio" name="compta_mode" value="CREANCES-DETTES"' . ($compta_mode == 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeVirtual') . '</td>'; | |
170 | 170 | print '<td colspan="2">' . nl2br($langs->trans('OptionModeVirtualDesc')) . "</td></tr>\n"; |
171 | 171 | print '</form>'; |
172 | 172 | |
... | ... | @@ -178,8 +178,8 @@ print "</table>\n"; |
178 | 178 | */ |
179 | 179 | print '<br>'; |
180 | 180 | |
181 | -print '<form action="' . $_SERVER ["PHP_SELF"] . '" method="POST">'; | |
182 | -print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '" />'; | |
181 | +print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; | |
182 | +print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />'; | |
183 | 183 | |
184 | 184 | print '<table class="noborder" width="100%">'; |
185 | 185 | $var = True; |
... | ... | @@ -191,7 +191,7 @@ print $langs->trans("Chartofaccounts") . '</td>'; |
191 | 191 | print '<td align="right"><input type="submit" class="button" value="' . $langs->trans("Modify") . '"></td>'; |
192 | 192 | print "</tr>\n"; |
193 | 193 | $var = ! $var; |
194 | -print '<tr ' . $bc [$var] . '>'; | |
194 | +print '<tr ' . $bc[$var] . '>'; | |
195 | 195 | print "<td>" . $langs->trans("Selectchartofaccounts") . "</td>"; |
196 | 196 | print "<td>"; |
197 | 197 | print '<select class="flat" name="chartofaccounts" id="chartofaccounts">'; |
... | ... | @@ -214,9 +214,9 @@ if ($resql) { |
214 | 214 | $var = ! $var; |
215 | 215 | $row = $db->fetch_row($resql); |
216 | 216 | |
217 | - print '<option value="' . $row [0] . '"'; | |
218 | - print $conf->global->CHARTOFACCOUNTS == $row [0] ? ' selected="selected"' : ''; | |
219 | - print '>' . $row [1] . ' - ' . $row [3] . '</option>'; | |
217 | + print '<option value="' . $row[0] . '"'; | |
218 | + print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected="selected"' : ''; | |
219 | + print '>' . $row[1] . ' - ' . $row[3] . '</option>'; | |
220 | 220 | |
221 | 221 | $i ++; |
222 | 222 | } |
... | ... | @@ -258,13 +258,13 @@ foreach ( $list as $key ) { |
258 | 258 | $var = ! $var; |
259 | 259 | |
260 | 260 | print '<form action="index.php" method="POST">'; |
261 | - print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; | |
261 | + print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; | |
262 | 262 | |
263 | 263 | print '<input type="hidden" name="action" value="update">'; |
264 | 264 | print '<input type="hidden" name="consttype" value="string">'; |
265 | 265 | print '<input type="hidden" name="constname" value="' . $key . '">'; |
266 | 266 | |
267 | - print '<tr ' . $bc [$var] . ' class="value">'; | |
267 | + print '<tr ' . $bc[$var] . ' class="value">'; | |
268 | 268 | |
269 | 269 | // Param |
270 | 270 | $label = $langs->trans($key); |
... | ... | @@ -283,32 +283,32 @@ foreach ( $list as $key ) { |
283 | 283 | $i ++; |
284 | 284 | } |
285 | 285 | |
286 | -print '<form method="POST" action="' . $_SERVER ['PHP_SELF'] . '">'; | |
287 | -print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; | |
286 | +print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; | |
287 | +print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; | |
288 | 288 | print '<input type="hidden" name="action" value="updateoptions">'; |
289 | 289 | |
290 | 290 | $var = ! $var; |
291 | -print "<tr " . $bc [$var] . ">"; | |
291 | +print "<tr " . $bc[$var] . ">"; | |
292 | 292 | print '<td width="80%">' . $langs->trans("ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO") . '</td>'; |
293 | 293 | if (! empty($conf->global->ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO)) { |
294 | - print '<td align="center" colspan="2"><a href="' . $_SERVER ['PHP_SELF'] . '?action=setlistsorttodo&value=0">'; | |
294 | + print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">'; | |
295 | 295 | print img_picto($langs->trans("Activated"), 'switch_on'); |
296 | 296 | print '</a></td>'; |
297 | 297 | } else { |
298 | - print '<td align="center" colspan="2"><a href="' . $_SERVER ['PHP_SELF'] . '?action=setlistsorttodo&value=1">'; | |
298 | + print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=1">'; | |
299 | 299 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
300 | 300 | print '</a></td>'; |
301 | 301 | } |
302 | 302 | print '</tr>'; |
303 | 303 | |
304 | -print "<tr " . $bc [$var] . ">"; | |
304 | +print "<tr " . $bc[$var] . ">"; | |
305 | 305 | print '<td width="80%">' . $langs->trans("ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE") . '</td>'; |
306 | 306 | if (! empty($conf->global->ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE)) { |
307 | - print '<td align="center" colspan="2"><a href="' . $_SERVER ['PHP_SELF'] . '?action=setlistsortdone&value=0">'; | |
307 | + print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">'; | |
308 | 308 | print img_picto($langs->trans("Activated"), 'switch_on'); |
309 | 309 | print '</a></td>'; |
310 | 310 | } else { |
311 | - print '<td align="center" colspan="2"><a href="' . $_SERVER ['PHP_SELF'] . '?action=setlistsortdone&value=1">'; | |
311 | + print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=1">'; | |
312 | 312 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
313 | 313 | print '</a></td>'; |
314 | 314 | } | ... | ... |
accountingex/admin/journaux.php
... | ... | @@ -94,8 +94,8 @@ $head = admin_account_prepare_head(null); |
94 | 94 | |
95 | 95 | dol_fiche_head($head, 'journal', $langs->trans("Configuration"), 0, 'cron'); |
96 | 96 | |
97 | -print '<form action="' . $_SERVER ["PHP_SELF"] . '" method="post">'; | |
98 | -print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; | |
97 | +print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">'; | |
98 | +print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; | |
99 | 99 | print '<input type="hidden" name="action" value="update">'; |
100 | 100 | |
101 | 101 | print '<table class="noborder" width="100%">'; |
... | ... | @@ -106,7 +106,7 @@ print "</tr>\n"; |
106 | 106 | foreach ( $list as $key ) { |
107 | 107 | $var = ! $var; |
108 | 108 | |
109 | - print '<tr ' . $bc [$var] . ' class="value">'; | |
109 | + print '<tr ' . $bc[$var] . ' class="value">'; | |
110 | 110 | |
111 | 111 | // Param |
112 | 112 | $label = $langs->trans($key); | ... | ... |
accountingex/admin/thirdpartyaccount.php
accountingex/bookkeeping/balancebymonth.php
... | ... | @@ -47,7 +47,7 @@ $langs->load("other"); |
47 | 47 | $langs->load("accountingex@accountingex"); |
48 | 48 | |
49 | 49 | // Filter |
50 | -$year = $_GET ["year"]; | |
50 | +$year = $_GET["year"]; | |
51 | 51 | if ($year == 0) { |
52 | 52 | $year_current = strftime("%Y", time()); |
53 | 53 | $year_start = $year_current; |
... | ... | @@ -75,7 +75,7 @@ dol_syslog('accountingex/bookkeeping/balancebymonth.php:: $sql=' . $sql); |
75 | 75 | $result = $db->query($sql); |
76 | 76 | if ($result) { |
77 | 77 | $row = $db->fetch_row($result); |
78 | - $nbfac = $row [0]; | |
78 | + $nbfac = $row[0]; | |
79 | 79 | |
80 | 80 | $db->free($result); |
81 | 81 | } |
... | ... | @@ -115,20 +115,20 @@ if ($resql) { |
115 | 115 | |
116 | 116 | $row = $db->fetch_row($resql); |
117 | 117 | |
118 | - print '<tr><td width="14%">' . length_accountg($row [0]) . '</td>'; | |
119 | - print '<td align="right" width="6.5%">' . price($row [1]) . '</td>'; | |
120 | - print '<td align="right" width="6.5%">' . price($row [2]) . '</td>'; | |
121 | - print '<td align="right" width="6.5%">' . price($row [3]) . '</td>'; | |
122 | - print '<td align="right" width="6.5%">' . price($row [4]) . '</td>'; | |
123 | - print '<td align="right" width="6.5%">' . price($row [5]) . '</td>'; | |
124 | - print '<td align="right" width="6.5%">' . price($row [6]) . '</td>'; | |
125 | - print '<td align="right" width="6.5%">' . price($row [7]) . '</td>'; | |
126 | - print '<td align="right" width="6.5%">' . price($row [8]) . '</td>'; | |
127 | - print '<td align="right" width="6.5%">' . price($row [9]) . '</td>'; | |
128 | - print '<td align="right" width="6.5%">' . price($row [10]) . '</td>'; | |
129 | - print '<td align="right" width="6.5%">' . price($row [11]) . '</td>'; | |
130 | - print '<td align="right" width="6.5%">' . price($row [12]) . '</td>'; | |
131 | - print '<td align="right" width="8%"><b>' . price($row [13]) . '</b></td>'; | |
118 | + print '<tr><td width="14%">' . length_accountg($row[0]) . '</td>'; | |
119 | + print '<td align="right" width="6.5%">' . price($row[1]) . '</td>'; | |
120 | + print '<td align="right" width="6.5%">' . price($row[2]) . '</td>'; | |
121 | + print '<td align="right" width="6.5%">' . price($row[3]) . '</td>'; | |
122 | + print '<td align="right" width="6.5%">' . price($row[4]) . '</td>'; | |
123 | + print '<td align="right" width="6.5%">' . price($row[5]) . '</td>'; | |
124 | + print '<td align="right" width="6.5%">' . price($row[6]) . '</td>'; | |
125 | + print '<td align="right" width="6.5%">' . price($row[7]) . '</td>'; | |
126 | + print '<td align="right" width="6.5%">' . price($row[8]) . '</td>'; | |
127 | + print '<td align="right" width="6.5%">' . price($row[9]) . '</td>'; | |
128 | + print '<td align="right" width="6.5%">' . price($row[10]) . '</td>'; | |
129 | + print '<td align="right" width="6.5%">' . price($row[11]) . '</td>'; | |
130 | + print '<td align="right" width="6.5%">' . price($row[12]) . '</td>'; | |
131 | + print '<td align="right" width="8%"><b>' . price($row[13]) . '</b></td>'; | |
132 | 132 | print '</tr>'; |
133 | 133 | |
134 | 134 | $i ++; | ... | ... |
accountingex/bookkeeping/fiche.php
... | ... | @@ -196,7 +196,7 @@ $nbligne = 0; |
196 | 196 | * Confirmation to delete the command |
197 | 197 | */ |
198 | 198 | if ($action == 'delete') { |
199 | - $formconfirm = $html->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); | |
199 | + $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); | |
200 | 200 | print $formconfirm; |
201 | 201 | } |
202 | 202 | |
... | ... | @@ -214,7 +214,7 @@ if ($action == 'create') { |
214 | 214 | $book = new BookKeeping($db); |
215 | 215 | $next_num_mvt = $book->next_num_mvt(); |
216 | 216 | |
217 | - print '<form action="' . $_SERVER ["PHP_SELF"] . '" name="create_mvt" method="post">'; | |
217 | + print '<form action="' . $_SERVER["PHP_SELF"] . '" name="create_mvt" method="post">'; | |
218 | 218 | print '<input type="hidden" name="action" value="confirm_create">' . "\n"; |
219 | 219 | print '<input type="hidden" name="next_num_mvt" value="' . $next_num_mvt . '">' . "\n"; |
220 | 220 | |
... | ... | @@ -309,7 +309,7 @@ if ($action == 'create') { |
309 | 309 | |
310 | 310 | if ($action == 'update' && $line->id == $id) { |
311 | 311 | |
312 | - print '<form action="' . $_SERVER ["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">'; | |
312 | + print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">'; | |
313 | 313 | print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n"; |
314 | 314 | print '<input type="hidden" name="action" value="confirm_update">' . "\n"; |
315 | 315 | print '<td><input type="text" size="6" name="numero_compte" value="' . $line->numero_compte . '"/></td>'; |
... | ... | @@ -353,7 +353,7 @@ if ($action == 'create') { |
353 | 353 | $var = ! $var; |
354 | 354 | print "<tr $bc[$var]>"; |
355 | 355 | |
356 | - print '<form action="' . $_SERVER ["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">'; | |
356 | + print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">'; | |
357 | 357 | print '<input type="hidden" name="action" value="add">' . "\n"; |
358 | 358 | print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n"; |
359 | 359 | print '<input type="hidden" name="doc_type" value="' . $book->doc_type . '">' . "\n"; | ... | ... |
accountingex/bookkeeping/liste.php
... | ... | @@ -101,7 +101,7 @@ else { |
101 | 101 | |
102 | 102 | llxHeader('', $langs->trans("Accounting") . ' - ' . $langs->trans("Bookkeeping")); |
103 | 103 | |
104 | -/* | |
104 | + /* | |
105 | 105 | * List |
106 | 106 | */ |
107 | 107 | |
... | ... | @@ -139,8 +139,8 @@ else { |
139 | 139 | |
140 | 140 | print_barre_liste($langs->trans("Bookkeeping"), $page, "liste.php", "", $sortfield, $sortorder, '', $num); |
141 | 141 | |
142 | - print '<form name="add" action="' . $_SERVER ["PHP_SELF"] . '" method="POST">'; | |
143 | - print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; | |
142 | + print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; | |
143 | + print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; | |
144 | 144 | print '<input type="hidden" name="action" value="delbookkeeping">'; |
145 | 145 | |
146 | 146 | print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey')); |
... | ... | @@ -151,41 +151,41 @@ else { |
151 | 151 | |
152 | 152 | print '<a href="./fiche.php?action=create" class="butAction">Nouveau mouvement comptable</a>'; |
153 | 153 | |
154 | - print '<form name="add" action="' . $_SERVER ["PHP_SELF"] . '" method="POST">'; | |
155 | - print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; | |
154 | + print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; | |
155 | + print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; | |
156 | 156 | print '<input type="hidden" name="action" value="export_csv">'; |
157 | 157 | print '<input type="submit" class="button" style="float: right;" value="Export CSV" />'; |
158 | 158 | print '</form>'; |
159 | 159 | |
160 | 160 | print "<table class=\"noborder\" width=\"100%\">"; |
161 | 161 | print '<tr class="liste_titre">'; |
162 | - print_liste_field_titre($langs->trans("Doctype"), $_SERVER ['PHP_SELF'], "bk.doc_type", "", "", "", $sortfield, $sortorder); | |
163 | - print_liste_field_titre($langs->trans("Docdate"), $_SERVER ['PHP_SELF'], "bk.doc_date", "", "", "", $sortfield, $sortorder); | |
164 | - print_liste_field_titre($langs->trans("Docref"), $_SERVER ['PHP_SELF'], "bk.doc_ref", "", "", "", $sortfield, $sortorder); | |
165 | - print_liste_field_titre($langs->trans("Numerocompte"), $_SERVER ['PHP_SELF'], "bk.numero_compte", "", "", "", $sortfield, $sortorder); | |
166 | - print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER ['PHP_SELF'], "bk.code_tiers", "", "", "", $sortfield, $sortorder); | |
167 | - print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER ['PHP_SELF'], "bk_label_compte", "", "", "", $sortfield, $sortorder); | |
168 | - print_liste_field_titre($langs->trans("Debit"), $_SERVER ['PHP_SELF'], "bk.debit", "", "", "", $sortfield, $sortorder); | |
169 | - print_liste_field_titre($langs->trans("Credit"), $_SERVER ['PHP_SELF'], "bk.credit", "", "", "", $sortfield, $sortorder); | |
170 | - print_liste_field_titre($langs->trans("Amount"), $_SERVER ['PHP_SELF'], "bk.montant", "", "", "", $sortfield, $sortorder); | |
171 | - print_liste_field_titre($langs->trans("Sens"), $_SERVER ['PHP_SELF'], "bk.sens", "", "", "", $sortfield, $sortorder); | |
172 | - print_liste_field_titre($langs->trans("Codejournal"), $_SERVER ['PHP_SELF'], "bk.code_journal", "", "", "", $sortfield, $sortorder); | |
162 | + print_liste_field_titre($langs->trans("Doctype"), $_SERVER['PHP_SELF'], "bk.doc_type", "", "", "", $sortfield, $sortorder); | |
163 | + print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "bk.doc_date", "", "", "", $sortfield, $sortorder); | |
164 | + print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "bk.doc_ref", "", "", "", $sortfield, $sortorder); | |
165 | + print_liste_field_titre($langs->trans("Numerocompte"), $_SERVER['PHP_SELF'], "bk.numero_compte", "", "", "", $sortfield, $sortorder); | |
166 | + print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER['PHP_SELF'], "bk.code_tiers", "", "", "", $sortfield, $sortorder); | |
167 | + print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "bk_label_compte", "", "", "", $sortfield, $sortorder); | |
168 | + print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "bk.debit", "", "", "", $sortfield, $sortorder); | |
169 | + print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "bk.credit", "", "", "", $sortfield, $sortorder); | |
170 | + print_liste_field_titre($langs->trans("Amount"), $_SERVER['PHP_SELF'], "bk.montant", "", "", "", $sortfield, $sortorder); | |
171 | + print_liste_field_titre($langs->trans("Sens"), $_SERVER['PHP_SELF'], "bk.sens", "", "", "", $sortfield, $sortorder); | |
172 | + print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "bk.code_journal", "", "", "", $sortfield, $sortorder); | |
173 | 173 | print_liste_field_titre(" "); |
174 | 174 | print "</tr>\n"; |
175 | 175 | |
176 | 176 | print '<tr class="liste_titre">'; |
177 | 177 | print '<form action="liste.php" method="GET">'; |
178 | - print '<td><input type="text" name="search_doc_type" value="' . $_GET ["search_doc_type"] . '"></td>'; | |
178 | + print '<td><input type="text" name="search_doc_type" value="' . $_GET["search_doc_type"] . '"></td>'; | |
179 | 179 | print '<td> </td>'; |
180 | - print '<td><input type="text" name="search_doc_ref" value="' . $_GET ["search_doc_ref"] . '"></td>'; | |
181 | - print '<td><input type="text" name="search_compte" value="' . $_GET ["search_compte"] . '"></td>'; | |
182 | - print '<td><input type="text" name="search_tiers" value="' . $_GET ["search_tiers"] . '"></td>'; | |
180 | + print '<td><input type="text" name="search_doc_ref" value="' . $_GET["search_doc_ref"] . '"></td>'; | |
181 | + print '<td><input type="text" name="search_compte" value="' . $_GET["search_compte"] . '"></td>'; | |
182 | + print '<td><input type="text" name="search_tiers" value="' . $_GET["search_tiers"] . '"></td>'; | |
183 | 183 | print '<td> </td>'; |
184 | 184 | print '<td> </td>'; |
185 | 185 | print '<td> </td>'; |
186 | 186 | print '<td> </td>'; |
187 | 187 | print '<td> </td>'; |
188 | - print '<td><input type="text" name="search_journal" size="3" value="' . $_GET ["search_journal"] . '"></td>'; | |
188 | + print '<td><input type="text" name="search_journal" size="3" value="' . $_GET["search_journal"] . '"></td>'; | |
189 | 189 | print '<td align="right">'; |
190 | 190 | print '<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">'; |
191 | 191 | print '</td>'; | ... | ... |
accountingex/bookkeeping/listebyyear.php
... | ... | @@ -85,21 +85,21 @@ if ($resql) { |
85 | 85 | $num = $db->num_rows($resql); |
86 | 86 | $i = 0; |
87 | 87 | |
88 | - print_barre_liste($langs->trans("Bookkeeping") . " $textprevyear " . $langs->trans("Year") . " $year_start $textnextyear", $page, $_SERVER ['PHP_SELF'], "", $sortfield, $sortorder, '', $num); | |
88 | + print_barre_liste($langs->trans("Bookkeeping") . " $textprevyear " . $langs->trans("Year") . " $year_start $textnextyear", $page, $_SERVER['PHP_SELF'], "", $sortfield, $sortorder, '', $num); | |
89 | 89 | print "<table class=\"noborder\" width=\"100%\">"; |
90 | 90 | |
91 | 91 | print '<tr class="liste_titre">'; |
92 | - print_liste_field_titre($langs->trans("Doctype"), $_SERVER ['PHP_SELF'], "bk.doc_type", "", "", "", $sortfield, $sortorder); | |
93 | - print_liste_field_titre($langs->trans("Docdate"), $_SERVER ['PHP_SELF'], "bk.doc_date", "", "", "", $sortfield, $sortorder); | |
94 | - print_liste_field_titre($langs->trans("Docref"), $_SERVER ['PHP_SELF'], "bk.doc_ref", "", "", "", $sortfield, $sortorder); | |
95 | - print_liste_field_titre($langs->trans("Numerocompte"), $_SERVER ['PHP_SELF'], "bk.numero_compte", "", "", "", $sortfield, $sortorder); | |
96 | - print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER ['PHP_SELF'], "bk.code_tiers", "", "", "", $sortfield, $sortorder); | |
97 | - print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER ['PHP_SELF'], "bk_label_compte", "", "", "", $sortfield, $sortorder); | |
98 | - print_liste_field_titre($langs->trans("Debit"), $_SERVER ['PHP_SELF'], "bk.debit", "", "", "", $sortfield, $sortorder); | |
99 | - print_liste_field_titre($langs->trans("Credit"), $_SERVER ['PHP_SELF'], "bk.credit", "", "", "", $sortfield, $sortorder); | |
100 | - print_liste_field_titre($langs->trans("Amount"), $_SERVER ['PHP_SELF'], "bk.montant", "", "", "", $sortfield, $sortorder); | |
101 | - print_liste_field_titre($langs->trans("Sens"), $_SERVER ['PHP_SELF'], "bk.sens", "", "", "", $sortfield, $sortorder); | |
102 | - print_liste_field_titre($langs->trans("Codejournal"), $_SERVER ['PHP_SELF'], "bk.code_journal", "", "", "", $sortfield, $sortorder); | |
92 | + print_liste_field_titre($langs->trans("Doctype"), $_SERVER['PHP_SELF'], "bk.doc_type", "", "", "", $sortfield, $sortorder); | |
93 | + print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "bk.doc_date", "", "", "", $sortfield, $sortorder); | |
94 | + print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "bk.doc_ref", "", "", "", $sortfield, $sortorder); | |
95 | + print_liste_field_titre($langs->trans("Numerocompte"), $_SERVER['PHP_SELF'], "bk.numero_compte", "", "", "", $sortfield, $sortorder); | |
96 | + print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER['PHP_SELF'], "bk.code_tiers", "", "", "", $sortfield, $sortorder); | |
97 | + print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "bk_label_compte", "", "", "", $sortfield, $sortorder); | |
98 | + print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "bk.debit", "", "", "", $sortfield, $sortorder); | |
99 | + print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "bk.credit", "", "", "", $sortfield, $sortorder); | |
100 | + print_liste_field_titre($langs->trans("Amount"), $_SERVER['PHP_SELF'], "bk.montant", "", "", "", $sortfield, $sortorder); | |
101 | + print_liste_field_titre($langs->trans("Sens"), $_SERVER['PHP_SELF'], "bk.sens", "", "", "", $sortfield, $sortorder); | |
102 | + print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "bk.code_journal", "", "", "", $sortfield, $sortorder); | |
103 | 103 | print_liste_field_titre(" "); |
104 | 104 | print "</tr>\n"; |
105 | 105 | ... | ... |
accountingex/class/accountingaccount.class.php
... | ... | @@ -156,7 +156,7 @@ class AccountingAccount { |
156 | 156 | $resql = $this->db->query($sql); |
157 | 157 | if (! $resql) { |
158 | 158 | $error ++; |
159 | - $this->errors [] = "Error " . $this->db->lasterror(); | |
159 | + $this->errors[] = "Error " . $this->db->lasterror(); | |
160 | 160 | } |
161 | 161 | |
162 | 162 | if (! $error) { |
... | ... | @@ -295,7 +295,7 @@ class AccountingAccount { |
295 | 295 | $resql = $this->db->query($sql); |
296 | 296 | if (! $resql) { |
297 | 297 | $error ++; |
298 | - $this->errors [] = "Error " . $this->db->lasterror(); | |
298 | + $this->errors[] = "Error " . $this->db->lasterror(); | |
299 | 299 | } |
300 | 300 | } |
301 | 301 | ... | ... |
accountingex/class/bookkeeping.class.php
... | ... | @@ -181,7 +181,7 @@ class BookKeeping { |
181 | 181 | $line->code_journal = $obj->code_journal; |
182 | 182 | $line->piece_num = $obj->piece_num; |
183 | 183 | |
184 | - $this->linesmvt [] = $line; | |
184 | + $this->linesmvt[] = $line; | |
185 | 185 | } |
186 | 186 | } else { |
187 | 187 | $this->error = "Error " . $this->db->lasterror(); |
... | ... | @@ -213,7 +213,7 @@ class BookKeeping { |
213 | 213 | |
214 | 214 | if ($resql) { |
215 | 215 | $row = $this->db->fetch_array($resql); |
216 | - if ($row [0] == 0) { | |
216 | + if ($row[0] == 0) { | |
217 | 217 | |
218 | 218 | // Determine piece_num |
219 | 219 | $sqlnum = "SELECT piece_num"; |
... | ... | @@ -299,7 +299,7 @@ class BookKeeping { |
299 | 299 | $resql = $this->db->query($sql); |
300 | 300 | if (! $resql) { |
301 | 301 | $error ++; |
302 | - $this->errors [] = "Error " . $this->db->lasterror(); | |
302 | + $this->errors[] = "Error " . $this->db->lasterror(); | |
303 | 303 | } |
304 | 304 | |
305 | 305 | // Commit or rollback |
... | ... | @@ -410,7 +410,7 @@ class BookKeeping { |
410 | 410 | $resql = $this->db->query($sql); |
411 | 411 | if (! $resql) { |
412 | 412 | $error ++; |
413 | - $this->errors [] = "Error " . $this->db->lasterror(); | |
413 | + $this->errors[] = "Error " . $this->db->lasterror(); | |
414 | 414 | } |
415 | 415 | |
416 | 416 | if (! $error) { |
... | ... | @@ -518,7 +518,7 @@ class BookKeeping { |
518 | 518 | $resql = $this->db->query($sql); |
519 | 519 | if (! $resql) { |
520 | 520 | $error ++; |
521 | - $this->errors [] = "Error " . $this->db->lasterror(); | |
521 | + $this->errors[] = "Error " . $this->db->lasterror(); | |
522 | 522 | } |
523 | 523 | |
524 | 524 | if (! $error) { |
... | ... | @@ -584,7 +584,7 @@ class BookKeeping { |
584 | 584 | $resql = $this->db->query($sql); |
585 | 585 | if (! $resql) { |
586 | 586 | $error ++; |
587 | - $this->errors [] = "Error " . $this->db->lasterror(); | |
587 | + $this->errors[] = "Error " . $this->db->lasterror(); | |
588 | 588 | } |
589 | 589 | } |
590 | 590 | |
... | ... | @@ -640,7 +640,7 @@ class BookKeeping { |
640 | 640 | $line->code_journal = $obj->code_journal; |
641 | 641 | $line->piece_num = $obj->piece_num; |
642 | 642 | |
643 | - $this->linesexport [] = $line; | |
643 | + $this->linesexport[] = $line; | |
644 | 644 | } |
645 | 645 | $this->db->free($resql); |
646 | 646 | ... | ... |
accountingex/class/html.formventilation.class.php
... | ... | @@ -118,14 +118,13 @@ class FormVentilation extends Form { |
118 | 118 | $obj = $this->db->fetch_object($resql); |
119 | 119 | $label = $obj->account_number . ' - ' . $obj->label; |
120 | 120 | |
121 | - | |
122 | - //Remember guy's we store in database llx_facturedet the rowid of accountingaccount and not the account_number | |
123 | - //Bacause same account_number can be share between different accounting_system and do have the same meaning | |
121 | + // Remember guy's we store in database llx_facturedet the rowid of accountingaccount and not the account_number | |
122 | + // Bacause same account_number can be share between different accounting_system and do have the same meaning | |
124 | 123 | if (($selectid != '') && $selectid == $obj->rowid) { |
125 | - //$out .= '<option value="' . $obj->account_number . '" selected="selected">' . $label . '</option>'; | |
124 | + // $out .= '<option value="' . $obj->account_number . '" selected="selected">' . $label . '</option>'; | |
126 | 125 | $out .= '<option value="' . $obj->rowid . '" selected="selected">' . $label . '</option>'; |
127 | 126 | } else { |
128 | - //$out .= '<option value="' . $obj->account_number . '">' . $label . '</option>'; | |
127 | + // $out .= '<option value="' . $obj->account_number . '">' . $label . '</option>'; | |
129 | 128 | $out .= '<option value="' . $obj->rowid . '">' . $label . '</option>'; |
130 | 129 | } |
131 | 130 | $i ++; | ... | ... |
accountingex/core/lib/account.lib.php
... | ... | @@ -35,9 +35,9 @@ function admin_account_prepare_head($object) { |
35 | 35 | $h = 0; |
36 | 36 | $head = array (); |
37 | 37 | |
38 | - $head [$h] [0] = dol_buildpath('/accountingex/admin/index.php', 1); | |
39 | - $head [$h] [1] = $langs->trans("Configuration"); | |
40 | - $head [$h] [2] = 'general'; | |
38 | + $head[$h][0] = dol_buildpath('/accountingex/admin/index.php', 1); | |
39 | + $head[$h][1] = $langs->trans("Configuration"); | |
40 | + $head[$h][2] = 'general'; | |
41 | 41 | $h ++; |
42 | 42 | |
43 | 43 | // Show more tabs from modules |
... | ... | @@ -46,19 +46,19 @@ function admin_account_prepare_head($object) { |
46 | 46 | // $this->tabs = array('entity:-tabname); to remove a tab |
47 | 47 | complete_head_from_modules($conf, $langs, $object, $head, $h, 'accountingex_admin'); |
48 | 48 | |
49 | - $head [$h] [0] = dol_buildpath('/accountingex/admin/journaux.php', 1); | |
50 | - $head [$h] [1] = $langs->trans("Journaux"); | |
51 | - $head [$h] [2] = 'journal'; | |
49 | + $head[$h][0] = dol_buildpath('/accountingex/admin/journaux.php', 1); | |
50 | + $head[$h][1] = $langs->trans("Journaux"); | |
51 | + $head[$h][2] = 'journal'; | |
52 | 52 | $h ++; |
53 | 53 | |
54 | - $head [$h] [0] = dol_buildpath('/accountingex/admin/export.php', 1); | |
55 | - $head [$h] [1] = $langs->trans("Export"); | |
56 | - $head [$h] [2] = 'export'; | |
54 | + $head[$h][0] = dol_buildpath('/accountingex/admin/export.php', 1); | |
55 | + $head[$h][1] = $langs->trans("Export"); | |
56 | + $head[$h][2] = 'export'; | |
57 | 57 | $h ++; |
58 | 58 | |
59 | - $head [$h] [0] = dol_buildpath('/accountingex/admin/about.php', 1); | |
60 | - $head [$h] [1] = $langs->trans("About"); | |
61 | - $head [$h] [2] = 'about'; | |
59 | + $head[$h][0] = dol_buildpath('/accountingex/admin/about.php', 1); | |
60 | + $head[$h][1] = $langs->trans("About"); | |
61 | + $head[$h][2] = 'about'; | |
62 | 62 | $h ++; |
63 | 63 | |
64 | 64 | complete_head_from_modules($conf, $langs, $object, $head, $h, 'accountingex_admin', 'remove'); |
... | ... | @@ -78,9 +78,9 @@ function account_prepare_head($object) { |
78 | 78 | $h = 0; |
79 | 79 | $head = array (); |
80 | 80 | |
81 | - $head [$h] [0] = dol_buildpath('/accountingex/admin/fiche.php', 1) . '?id=' . $object->id; | |
82 | - $head [$h] [1] = $langs->trans("Card"); | |
83 | - $head [$h] [2] = 'card'; | |
81 | + $head[$h][0] = dol_buildpath('/accountingex/admin/fiche.php', 1) . '?id=' . $object->id; | |
82 | + $head[$h][1] = $langs->trans("Card"); | |
83 | + $head[$h][2] = 'card'; | |
84 | 84 | $h ++; |
85 | 85 | |
86 | 86 | // Show more tabs from modules | ... | ... |
accountingex/core/modules/modAccountingExpert.class.php
... | ... | @@ -84,82 +84,82 @@ class modAccountingExpert extends DolibarrModules { |
84 | 84 | |
85 | 85 | // Constantes |
86 | 86 | $this->const = array (); |
87 | - $this->const [1] = array ( | |
87 | + $this->const[1] = array ( | |
88 | 88 | "ACCOUNTINGEX_SEPARATORCSV", |
89 | 89 | "string", |
90 | 90 | "," |
91 | 91 | ); |
92 | - $this->const [2] = array ( | |
92 | + $this->const[2] = array ( | |
93 | 93 | "ACCOUNTINGEX_ACCOUNT_SUSPENSE", |
94 | 94 | "chaine", |
95 | 95 | "471" |
96 | 96 | ); |
97 | - $this->const [3] = array ( | |
97 | + $this->const[3] = array ( | |
98 | 98 | "ACCOUNTINGEX_SELL_JOURNAL", |
99 | 99 | "chaine", |
100 | 100 | "VTE" |
101 | 101 | ); |
102 | - $this->const [4] = array ( | |
102 | + $this->const[4] = array ( | |
103 | 103 | "ACCOUNTINGEX_PURCHASE_JOURNAL", |
104 | 104 | "chaine", |
105 | 105 | "ACH" |
106 | 106 | ); |
107 | - $this->const [5] = array ( | |
107 | + $this->const[5] = array ( | |
108 | 108 | "ACCOUNTINGEX_SOCIAL_JOURNAL", |
109 | 109 | "chaine", |
110 | 110 | "SOC" |
111 | 111 | ); |
112 | - $this->const [6] = array ( | |
112 | + $this->const[6] = array ( | |
113 | 113 | "ACCOUNTINGEX_CASH_JOURNAL", |
114 | 114 | "chaine", |
115 | 115 | "CAI" |
116 | 116 | ); |
117 | - $this->const [7] = array ( | |
117 | + $this->const[7] = array ( | |
118 | 118 | "ACCOUNTINGEX_MISCELLANEOUS_JOURNAL", |
119 | 119 | "chaine", |
120 | 120 | "OD" |
121 | 121 | ); |
122 | - $this->const [8] = array ( | |
122 | + $this->const[8] = array ( | |
123 | 123 | "ACCOUNTINGEX_BANK_JOURNAL", |
124 | 124 | "chaine", |
125 | 125 | "BQ" |
126 | 126 | ); // Deprecated Move into llx_bank_account |
127 | - $this->const [9] = array ( | |
127 | + $this->const[9] = array ( | |
128 | 128 | "ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH", |
129 | 129 | "chaine", |
130 | 130 | "58" |
131 | 131 | ); |
132 | - $this->const [10] = array ( | |
132 | + $this->const[10] = array ( | |
133 | 133 | "CHARTOFACCOUNTS", |
134 | 134 | "chaine", |
135 | 135 | "2" |
136 | 136 | ); |
137 | - $this->const [11] = array ( | |
137 | + $this->const[11] = array ( | |
138 | 138 | "ACCOUNTINGEX_MODELCSV", |
139 | 139 | "chaine", |
140 | 140 | "0" |
141 | 141 | ); |
142 | - $this->const [12] = array ( | |
142 | + $this->const[12] = array ( | |
143 | 143 | "ACCOUNTINGEX_LENGTH_GACCOUNT", |
144 | 144 | "chaine", |
145 | 145 | "" |
146 | 146 | ); |
147 | - $this->const [13] = array ( | |
147 | + $this->const[13] = array ( | |
148 | 148 | "ACCOUNTINGEX_LENGTH_AACCOUNT", |
149 | 149 | "chaine", |
150 | 150 | "" |
151 | 151 | ); |
152 | - $this->const [14] = array ( | |
152 | + $this->const[14] = array ( | |
153 | 153 | "ACCOUNTINGEX_LIMIT_LIST_VENTILATION", |
154 | 154 | "chaine", |
155 | 155 | "50" |
156 | 156 | ); |
157 | - $this->const [15] = array ( | |
157 | + $this->const[15] = array ( | |
158 | 158 | "ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO", |
159 | 159 | "yesno", |
160 | 160 | "1" |
161 | 161 | ); |
162 | - $this->const [16] = array ( | |
162 | + $this->const[16] = array ( | |
163 | 163 | "ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE", |
164 | 164 | "yesno", |
165 | 165 | "1" |
... | ... | @@ -181,32 +181,32 @@ class modAccountingExpert extends DolibarrModules { |
181 | 181 | $this->rights = array (); // Permission array used by this module |
182 | 182 | $r = 0; |
183 | 183 | |
184 | - $this->rights [$r] [0] = 150001; // Permission id (must not be already used) | |
185 | - $this->rights [$r] [1] = 'Acces_module'; // Permission label | |
186 | - $this->rights [$r] [3] = 0; // Permission by default for new user (0/1) | |
187 | - $this->rights [$r] [4] = 'access'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
188 | - $this->rights [$r] [5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
184 | + $this->rights[$r][0] = 150001; // Permission id (must not be already used) | |
185 | + $this->rights[$r][1] = 'Acces_module'; // Permission label | |
186 | + $this->rights[$r][3] = 0; // Permission by default for new user (0/1) | |
187 | + $this->rights[$r][4] = 'access'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
188 | + $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
189 | 189 | $r ++; |
190 | 190 | |
191 | - $this->rights [$r] [0] = 150002; // Permission id (must not be already used) | |
192 | - $this->rights [$r] [1] = 'Administration_module'; // Permission label | |
193 | - $this->rights [$r] [3] = 0; // Permission by default for new user (0/1) | |
194 | - $this->rights [$r] [4] = 'admin'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
195 | - $this->rights [$r] [5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
191 | + $this->rights[$r][0] = 150002; // Permission id (must not be already used) | |
192 | + $this->rights[$r][1] = 'Administration_module'; // Permission label | |
193 | + $this->rights[$r][3] = 0; // Permission by default for new user (0/1) | |
194 | + $this->rights[$r][4] = 'admin'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
195 | + $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
196 | 196 | $r ++; |
197 | 197 | |
198 | - $this->rights [$r] [0] = 150010; // Permission id (must not be already used) | |
199 | - $this->rights [$r] [1] = 'Développement'; // Permission label | |
200 | - $this->rights [$r] [3] = 0; // Permission by default for new user (0/1) | |
201 | - $this->rights [$r] [4] = 'dev'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
202 | - $this->rights [$r] [5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
198 | + $this->rights[$r][0] = 150010; // Permission id (must not be already used) | |
199 | + $this->rights[$r][1] = 'Développement'; // Permission label | |
200 | + $this->rights[$r][3] = 0; // Permission by default for new user (0/1) | |
201 | + $this->rights[$r][4] = 'dev'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
202 | + $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) | |
203 | 203 | $r ++; |
204 | 204 | |
205 | 205 | // Main menu entries |
206 | 206 | $this->menus = array (); |
207 | 207 | $r = 0; |
208 | 208 | |
209 | - $this->menu [$r] = array ( | |
209 | + $this->menu[$r] = array ( | |
210 | 210 | 'fk_menu' => 0, |
211 | 211 | 'type' => 'top', |
212 | 212 | 'titre' => 'Accounting', |
... | ... | @@ -222,7 +222,7 @@ class modAccountingExpert extends DolibarrModules { |
222 | 222 | ); |
223 | 223 | $r ++; |
224 | 224 | |
225 | - $this->menu [$r] = array ( | |
225 | + $this->menu[$r] = array ( | |
226 | 226 | 'fk_menu' => 'fk_mainmenu=accounting', |
227 | 227 | 'type' => 'left', |
228 | 228 | 'titre' => 'CustomersVentilation', |
... | ... | @@ -238,7 +238,7 @@ class modAccountingExpert extends DolibarrModules { |
238 | 238 | ); |
239 | 239 | $r ++; |
240 | 240 | |
241 | - $this->menu [$r] = array ( | |
241 | + $this->menu[$r] = array ( | |
242 | 242 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=CustomersVentilation', |
243 | 243 | 'type' => 'left', |
244 | 244 | 'titre' => 'ToDispatch', |
... | ... | @@ -254,7 +254,7 @@ class modAccountingExpert extends DolibarrModules { |
254 | 254 | ); |
255 | 255 | $r ++; |
256 | 256 | |
257 | - $this->menu [$r] = array ( | |
257 | + $this->menu[$r] = array ( | |
258 | 258 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=CustomersVentilation', |
259 | 259 | 'type' => 'left', |
260 | 260 | 'titre' => 'Dispatched', |
... | ... | @@ -270,7 +270,7 @@ class modAccountingExpert extends DolibarrModules { |
270 | 270 | ); |
271 | 271 | $r ++; |
272 | 272 | |
273 | - $this->menu [$r] = array ( | |
273 | + $this->menu[$r] = array ( | |
274 | 274 | 'fk_menu' => 'fk_mainmenu=accounting', |
275 | 275 | 'type' => 'left', |
276 | 276 | 'titre' => 'SuppliersVentilation', |
... | ... | @@ -286,7 +286,7 @@ class modAccountingExpert extends DolibarrModules { |
286 | 286 | ); |
287 | 287 | $r ++; |
288 | 288 | |
289 | - $this->menu [$r] = array ( | |
289 | + $this->menu[$r] = array ( | |
290 | 290 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=SuppliersVentilation', |
291 | 291 | 'type' => 'left', |
292 | 292 | 'titre' => 'ToDispatch', |
... | ... | @@ -302,7 +302,7 @@ class modAccountingExpert extends DolibarrModules { |
302 | 302 | ); |
303 | 303 | $r ++; |
304 | 304 | |
305 | - $this->menu [$r] = array ( | |
305 | + $this->menu[$r] = array ( | |
306 | 306 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=SuppliersVentilation', |
307 | 307 | 'type' => 'left', |
308 | 308 | 'titre' => 'Dispatched', |
... | ... | @@ -318,7 +318,7 @@ class modAccountingExpert extends DolibarrModules { |
318 | 318 | ); |
319 | 319 | $r ++; |
320 | 320 | |
321 | - $this->menu [$r] = array ( | |
321 | + $this->menu[$r] = array ( | |
322 | 322 | 'fk_menu' => 'fk_mainmenu=accounting', |
323 | 323 | 'type' => 'left', |
324 | 324 | 'titre' => 'Journaux', |
... | ... | @@ -334,7 +334,7 @@ class modAccountingExpert extends DolibarrModules { |
334 | 334 | ); |
335 | 335 | $r ++; |
336 | 336 | |
337 | - $this->menu [$r] = array ( | |
337 | + $this->menu[$r] = array ( | |
338 | 338 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=Journaux', |
339 | 339 | 'type' => 'left', |
340 | 340 | 'titre' => 'SellsJournal', |
... | ... | @@ -350,7 +350,7 @@ class modAccountingExpert extends DolibarrModules { |
350 | 350 | ); |
351 | 351 | $r ++; |
352 | 352 | |
353 | - $this->menu [$r] = array ( | |
353 | + $this->menu[$r] = array ( | |
354 | 354 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=Journaux', |
355 | 355 | 'type' => 'left', |
356 | 356 | 'titre' => 'PurchasesJournal', |
... | ... | @@ -366,7 +366,7 @@ class modAccountingExpert extends DolibarrModules { |
366 | 366 | ); |
367 | 367 | $r ++; |
368 | 368 | |
369 | - $this->menu [$r] = array ( | |
369 | + $this->menu[$r] = array ( | |
370 | 370 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=Journaux', |
371 | 371 | 'type' => 'left', |
372 | 372 | 'titre' => 'CashJournal', |
... | ... | @@ -382,7 +382,7 @@ class modAccountingExpert extends DolibarrModules { |
382 | 382 | ); |
383 | 383 | $r ++; |
384 | 384 | |
385 | - $this->menu [$r] = array ( | |
385 | + $this->menu[$r] = array ( | |
386 | 386 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=Journaux', |
387 | 387 | 'type' => 'left', |
388 | 388 | 'titre' => 'BankJournal', |
... | ... | @@ -398,7 +398,7 @@ class modAccountingExpert extends DolibarrModules { |
398 | 398 | ); |
399 | 399 | $r ++; |
400 | 400 | |
401 | - $this->menu [$r] = array ( | |
401 | + $this->menu[$r] = array ( | |
402 | 402 | 'fk_menu' => 'fk_mainmenu=accounting', |
403 | 403 | 'type' => 'left', |
404 | 404 | 'titre' => 'Bookkeeping', |
... | ... | @@ -414,7 +414,7 @@ class modAccountingExpert extends DolibarrModules { |
414 | 414 | ); |
415 | 415 | $r ++; |
416 | 416 | |
417 | - $this->menu [$r] = array ( | |
417 | + $this->menu[$r] = array ( | |
418 | 418 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=Bookkeeping', |
419 | 419 | 'type' => 'left', |
420 | 420 | 'titre' => 'ByYear', |
... | ... | @@ -430,7 +430,7 @@ class modAccountingExpert extends DolibarrModules { |
430 | 430 | ); |
431 | 431 | $r ++; |
432 | 432 | |
433 | - $this->menu [$r] = array ( | |
433 | + $this->menu[$r] = array ( | |
434 | 434 | 'fk_menu' => 'fk_mainmenu=accounting,fk_leftmenu=Bookkeeping', |
435 | 435 | 'type' => 'left', |
436 | 436 | 'titre' => 'AccountBalanceByMonth', |
... | ... | @@ -447,7 +447,7 @@ class modAccountingExpert extends DolibarrModules { |
447 | 447 | $r ++; |
448 | 448 | |
449 | 449 | // Parameters Menu |
450 | - $this->menu [$r] = array ( | |
450 | + $this->menu[$r] = array ( | |
451 | 451 | 'fk_menu' => 'fk_mainmenu=accounting', |
452 |