@@ -60,7 +60,7 @@ |
||
60 | 60 | //$conf->global->SOCIETE_FISCAL_MONTH_START = 7; |
61 | 61 | |
62 | 62 | // Date range |
63 | -$year = GETPOST('year', 'int'); // year with current month, is the month of the period we must show |
|
63 | +$year = GETPOST('year', 'int'); // year with current month, is the month of the period we must show |
|
64 | 64 | if (empty($year)) { |
65 | 65 | $year_current = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); |
66 | 66 | $month_current = dol_print_date(dol_now(), "%m"); |
@@ -124,8 +124,8 @@ |
||
124 | 124 | // Ref customer |
125 | 125 | //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', 0, 1); |
126 | 126 | //$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', null, null, '', 1); |
127 | - $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); |
|
128 | - $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); |
|
127 | + $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); |
|
128 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); |
|
129 | 129 | // Thirdparty |
130 | 130 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer'); |
131 | 131 | // Project |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
95 | 95 | $object = new Fichinter($db); |
96 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
96 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
97 | 97 | |
98 | 98 | $extrafields = new ExtraFields($db); |
99 | 99 | |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | // Output page |
375 | 375 | // -------------------------------------------------------------------- |
376 | 376 | |
377 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
377 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
378 | 378 | |
379 | 379 | |
380 | 380 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | $objectstatic->id = $obj->rowid; |
721 | 721 | $objectstatic->ref = $obj->ref; |
722 | 722 | $objectstatic->ref_client = $obj->ref_client; |
723 | - $objectstatic->statut = $obj->status; // deprecated |
|
723 | + $objectstatic->statut = $obj->status; // deprecated |
|
724 | 724 | $objectstatic->status = $obj->status; |
725 | 725 | |
726 | 726 | $companystatic->name = $obj->name; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | 'u.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), |
146 | 146 | ); |
147 | 147 | // Extra fields |
148 | -include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
148 | +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
149 | 149 | |
150 | 150 | $object->fields = dol_sort_array($object->fields, 'position'); |
151 | 151 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | if ($searchCategoryUserOperator == 0) { |
465 | 465 | $searchCategoryUserSqlList[] = " EXISTS (SELECT ck.fk_user FROM ".MAIN_DB_PREFIX."categorie_user as ck WHERE u.rowid = ck.fk_user AND ck.fk_categorie = ".((int) $searchCategoryUser).")"; |
466 | 466 | } else { |
467 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryUser); |
|
467 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryUser); |
|
468 | 468 | } |
469 | 469 | } |
470 | 470 | } |
@@ -972,7 +972,7 @@ discard block |
||
972 | 972 | } |
973 | 973 | |
974 | 974 | if (empty($obj->country_code)) { |
975 | - $obj->country_code = ''; // TODO Add join in select with country table to get country_code |
|
975 | + $obj->country_code = ''; // TODO Add join in select with country table to get country_code |
|
976 | 976 | } |
977 | 977 | |
978 | 978 | // Store properties in $object |
@@ -1161,7 +1161,7 @@ discard block |
||
1161 | 1161 | if ($api_key) { |
1162 | 1162 | if ($canreadsecretapi) { |
1163 | 1163 | print '<span class="opacitymedium">'; |
1164 | - print showValueWithClipboardCPButton($object->api_key, 1, dol_trunc($api_key, 3)); // TODO Add an option to also reveal the hash, not only copy paste |
|
1164 | + print showValueWithClipboardCPButton($object->api_key, 1, dol_trunc($api_key, 3)); // TODO Add an option to also reveal the hash, not only copy paste |
|
1165 | 1165 | print '</span>'; |
1166 | 1166 | } else { |
1167 | 1167 | print '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>'; |
@@ -50,7 +50,7 @@ |
||
50 | 50 | unset($_SESSION["dol_login"]); |
51 | 51 | unset($_SESSION['dol_entity']); |
52 | 52 | unset($_SESSION['urlfrom']); |
53 | - die("Applicative disconnection should be useless when connection was made in mode ".$_SESSION["dol_authmode"]); // TODO Really ? It at least delete the session file ?! |
|
53 | + die("Applicative disconnection should be useless when connection was made in mode ".$_SESSION["dol_authmode"]); // TODO Really ? It at least delete the session file ?! |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | //global $conf, $langs, $user; |
@@ -142,12 +142,12 @@ |
||
142 | 142 | $messagewarning .= '</div>'; |
143 | 143 | |
144 | 144 | if ($result <= 0 && $edituser->error == 'USERNOTFOUND') { |
145 | - usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
145 | + usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
146 | 146 | $message .= $messagewarning; |
147 | 147 | $username = ''; |
148 | 148 | } else { |
149 | 149 | if (empty($edituser->email)) { |
150 | - usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
150 | + usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
151 | 151 | $message .= $messagewarning; |
152 | 152 | } else { |
153 | 153 | $newpassword = $edituser->setPassword($user, '', 1); |
@@ -38,14 +38,14 @@ discard block |
||
38 | 38 | $action = GETPOST('action', 'aZ09'); |
39 | 39 | $backtopage = GETPOST('backtopage', 'alpha'); |
40 | 40 | $value = GETPOST('value', 'alpha'); |
41 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
41 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
42 | 42 | |
43 | 43 | $label = GETPOST('label', 'alpha'); |
44 | 44 | $scandir = GETPOST('scan_dir', 'alpha'); |
45 | 45 | $type = 'knowledgemanagement'; |
46 | 46 | |
47 | 47 | $arrayofparameters = array( |
48 | - 'KNOWLEDGEMANAGEMENT_MYPARAM1'=>array('type'=>'string', 'css'=>'minwidth500' ,'enabled'=>0), |
|
48 | + 'KNOWLEDGEMANAGEMENT_MYPARAM1'=>array('type'=>'string', 'css'=>'minwidth500', 'enabled'=>0), |
|
49 | 49 | //'KNOWLEDGEMANAGEMENT_MYPARAM2'=>array('type'=>'textarea','enabled'=>1), |
50 | 50 | //'KNOWLEDGEMANAGEMENT_MYPARAM3'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1), |
51 | 51 | //'KNOWLEDGEMANAGEMENT_MYPARAM4'=>array('type'=>'emailtemplate:thirdparty', 'enabled'=>1), |
@@ -200,25 +200,25 @@ discard block |
||
200 | 200 | print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; |
201 | 201 | |
202 | 202 | foreach ($arrayofparameters as $constname => $val) { |
203 | - if ($val['enabled']==1) { |
|
203 | + if ($val['enabled'] == 1) { |
|
204 | 204 | $setupnotempty++; |
205 | 205 | print '<tr class="oddeven"><td>'; |
206 | - $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); |
|
206 | + $tooltiphelp = (($langs->trans($constname.'Tooltip') != $constname.'Tooltip') ? $langs->trans($constname.'Tooltip') : ''); |
|
207 | 207 | print '<span id="helplink'.$constname.'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).'</span>'; |
208 | 208 | print '</td><td>'; |
209 | 209 | |
210 | 210 | if ($val['type'] == 'textarea') { |
211 | - print '<textarea class="flat" name="' . $constname . '" id="' . $constname . '" cols="50" rows="5" wrap="soft">' . "\n"; |
|
211 | + print '<textarea class="flat" name="'.$constname.'" id="'.$constname.'" cols="50" rows="5" wrap="soft">'."\n"; |
|
212 | 212 | print getDolGlobalString($constname); |
213 | 213 | print "</textarea>\n"; |
214 | 214 | } elseif ($val['type'] == 'html') { |
215 | - require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
215 | + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
216 | 216 | $doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); |
217 | 217 | $doleditor->Create(); |
218 | 218 | } elseif ($val['type'] == 'yesno') { |
219 | 219 | print $form->selectyesno($constname, getDolGlobalString($constname), 1); |
220 | 220 | } elseif (preg_match('/emailtemplate:/', $val['type'])) { |
221 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; |
|
221 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; |
|
222 | 222 | $formmail = new FormMail($db); |
223 | 223 | |
224 | 224 | $tmp = explode(':', $val['type']); |
@@ -230,10 +230,10 @@ discard block |
||
230 | 230 | //var_dump($modelmail); |
231 | 231 | $moreonlabel = ''; |
232 | 232 | if (!empty($arrayofmessagename[$modelmail->label])) { |
233 | - $moreonlabel = ' <span class="opacitymedium">(' . $langs->trans("SeveralLangugeVariatFound") . ')</span>'; |
|
233 | + $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>'; |
|
234 | 234 | } |
235 | 235 | // The 'label' is the key that is unique if we exclude the language |
236 | - $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel; |
|
236 | + $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; |
|
237 | 237 | } |
238 | 238 | } |
239 | 239 | print $form->selectarray($constname, $arrayofmessagename, getDolGlobalString($constname), 'None', 0, 0, '', 0, 0, 0, '', '', 1); |
@@ -267,27 +267,27 @@ discard block |
||
267 | 267 | print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; |
268 | 268 | |
269 | 269 | foreach ($arrayofparameters as $constname => $val) { |
270 | - if ($val['enabled']==1) { |
|
270 | + if ($val['enabled'] == 1) { |
|
271 | 271 | $setupnotempty++; |
272 | 272 | print '<tr class="oddeven"><td>'; |
273 | - $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); |
|
273 | + $tooltiphelp = (($langs->trans($constname.'Tooltip') != $constname.'Tooltip') ? $langs->trans($constname.'Tooltip') : ''); |
|
274 | 274 | print $form->textwithpicto($langs->trans($constname), $tooltiphelp); |
275 | 275 | print '</td><td>'; |
276 | 276 | |
277 | 277 | if ($val['type'] == 'textarea') { |
278 | 278 | print dol_nl2br(getDolGlobalString($constname)); |
279 | - } elseif ($val['type']== 'html') { |
|
279 | + } elseif ($val['type'] == 'html') { |
|
280 | 280 | print getDolGlobalString($constname); |
281 | 281 | } elseif ($val['type'] == 'yesno') { |
282 | 282 | print ajax_constantonoff($constname); |
283 | 283 | } elseif (preg_match('/emailtemplate:/', $val['type'])) { |
284 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; |
|
284 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; |
|
285 | 285 | $formmail = new FormMail($db); |
286 | 286 | |
287 | 287 | $tmp = explode(':', $val['type']); |
288 | 288 | |
289 | 289 | $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, getDolGlobalString($constname)); |
290 | - if ($template<0) { |
|
290 | + if ($template < 0) { |
|
291 | 291 | setEventMessages(null, $formmail->errors, 'errors'); |
292 | 292 | } |
293 | 293 | print $langs->trans($template->label); |
@@ -300,17 +300,17 @@ discard block |
||
300 | 300 | $ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text |
301 | 301 | $toprint = array(); |
302 | 302 | foreach ($ways as $way) { |
303 | - $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>'; |
|
303 | + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.$way.'</li>'; |
|
304 | 304 | } |
305 | - print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; |
|
305 | + print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>'; |
|
306 | 306 | } elseif (preg_match('/thirdparty_type/', $val['type'])) { |
307 | - if (getDolGlobalString($constname)==2) { |
|
307 | + if (getDolGlobalString($constname) == 2) { |
|
308 | 308 | print $langs->trans("Prospect"); |
309 | - } elseif (getDolGlobalString($constname)==3) { |
|
309 | + } elseif (getDolGlobalString($constname) == 3) { |
|
310 | 310 | print $langs->trans("ProspectCustomer"); |
311 | - } elseif (getDolGlobalInt($constname)==1) { |
|
311 | + } elseif (getDolGlobalInt($constname) == 1) { |
|
312 | 312 | print $langs->trans("Customer"); |
313 | - } elseif (getDolGlobalInt($constname)==0) { |
|
313 | + } elseif (getDolGlobalInt($constname) == 0) { |
|
314 | 314 | print $langs->trans("NorProspectNorCustomer"); |
315 | 315 | } |
316 | 316 | } else { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | $type = GETPOST('type', 'alpha'); |
44 | 44 | $value = GETPOST('value', 'alpha'); |
45 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
45 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
46 | 46 | |
47 | 47 | $label = GETPOST('label', 'alpha'); |
48 | 48 | $scandir = GETPOST('scan_dir', 'alpha'); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $langs->loadLangs(array("admin", "other", "trips", "errors", "dict")); |
37 | 37 | |
38 | 38 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
39 | -$hookmanager->initHooks(array('admin', 'dictionaryadmin','expensereport_rules')); |
|
39 | +$hookmanager->initHooks(array('admin', 'dictionaryadmin', 'expensereport_rules')); |
|
40 | 40 | |
41 | 41 | $object = new ExpenseReportRule($db); |
42 | 42 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | if (!$error) { |
147 | - header('Location: ' . $_SERVER['PHP_SELF']); |
|
147 | + header('Location: '.$_SERVER['PHP_SELF']); |
|
148 | 148 | exit; |
149 | 149 | } else { |
150 | 150 | $action = ''; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | dol_print_error($object->db); |
159 | 159 | } |
160 | 160 | |
161 | - header('Location: ' . $_SERVER['PHP_SELF']); |
|
161 | + header('Location: '.$_SERVER['PHP_SELF']); |
|
162 | 162 | exit; |
163 | 163 | } |
164 | 164 | |
@@ -184,47 +184,47 @@ discard block |
||
184 | 184 | |
185 | 185 | $form = new Form($db); |
186 | 186 | |
187 | - $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>'; |
|
187 | + $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; |
|
188 | 188 | print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup'); |
189 | 189 | |
190 | 190 | $head = expensereport_admin_prepare_head(); |
191 | 191 | print dol_get_fiche_head($head, 'expenserules', $langs->trans("ExpenseReportsRules"), -1, 'trip'); |
192 | 192 | |
193 | - echo '<span class="opacitymedium">' . $langs->trans('ExpenseReportRulesDesc') . '</span>'; |
|
193 | + echo '<span class="opacitymedium">'.$langs->trans('ExpenseReportRulesDesc').'</span>'; |
|
194 | 194 | print '<br><br>'; |
195 | 195 | |
196 | 196 | if ($action != 'edit') { |
197 | - echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; |
|
198 | - echo '<input type="hidden" name="token" value="' . newToken() . '" />'; |
|
197 | + echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post">'; |
|
198 | + echo '<input type="hidden" name="token" value="'.newToken().'" />'; |
|
199 | 199 | echo '<input type="hidden" name="action" value="save" />'; |
200 | 200 | |
201 | 201 | echo '<table class="noborder centpercent">'; |
202 | 202 | |
203 | 203 | echo '<tr class="liste_titre headerexpensereportrules">'; |
204 | - echo '<th class="linecolapplyto">' . $langs->trans('ExpenseReportApplyTo') . '</th>'; |
|
205 | - echo '<th class="linecoltype">' . $langs->trans('Type') . '</th>'; |
|
206 | - echo '<th class="linecollimiton">' . $langs->trans('ExpenseReportLimitOn') . '</th>'; |
|
207 | - echo '<th class="linecoldatestart">' . $langs->trans('ExpenseReportDateStart') . '</th>'; |
|
208 | - echo '<th class="linecoldateend">' . $langs->trans('ExpenseReportDateEnd') . '</th>'; |
|
209 | - echo '<th class="linecollimitamount">' . $langs->trans('ExpenseReportLimitAmount') . '</th>'; |
|
210 | - echo '<th class="linecolrestrictive">' . $langs->trans('ExpenseReportRestrictive') . '</th>'; |
|
204 | + echo '<th class="linecolapplyto">'.$langs->trans('ExpenseReportApplyTo').'</th>'; |
|
205 | + echo '<th class="linecoltype">'.$langs->trans('Type').'</th>'; |
|
206 | + echo '<th class="linecollimiton">'.$langs->trans('ExpenseReportLimitOn').'</th>'; |
|
207 | + echo '<th class="linecoldatestart">'.$langs->trans('ExpenseReportDateStart').'</th>'; |
|
208 | + echo '<th class="linecoldateend">'.$langs->trans('ExpenseReportDateEnd').'</th>'; |
|
209 | + echo '<th class="linecollimitamount">'.$langs->trans('ExpenseReportLimitAmount').'</th>'; |
|
210 | + echo '<th class="linecolrestrictive">'.$langs->trans('ExpenseReportRestrictive').'</th>'; |
|
211 | 211 | echo '<th> </th>'; |
212 | 212 | echo '</tr>'; |
213 | 213 | |
214 | 214 | echo '<tr class="oddeven">'; |
215 | 215 | echo '<td>'; |
216 | - echo '<div class="float linecolapplyto">' . $form->selectarray('apply_to', $tab_apply, '', 0) . '</div>'; |
|
217 | - echo '<div id="user" class="float linecoluser">' . $form->select_dolusers('', 'fk_user') . '</div>'; |
|
218 | - echo '<div id="group" class="float linecolgroup">' . $form->select_dolgroups('', 'fk_usergroup') . '</div>'; |
|
216 | + echo '<div class="float linecolapplyto">'.$form->selectarray('apply_to', $tab_apply, '', 0).'</div>'; |
|
217 | + echo '<div id="user" class="float linecoluser">'.$form->select_dolusers('', 'fk_user').'</div>'; |
|
218 | + echo '<div id="group" class="float linecolgroup">'.$form->select_dolgroups('', 'fk_usergroup').'</div>'; |
|
219 | 219 | echo '</td>'; |
220 | 220 | |
221 | - echo '<td class="linecoltype">' . $form->selectExpense('', 'fk_c_type_fees', 0, 1, 1) . '</td>'; |
|
222 | - echo '<td class="linecoltyperule">' . $form->selectarray('code_expense_rules_type', $tab_rules_type, '', 0) . '</td>'; |
|
223 | - echo '<td class="linecoldatestart">' . $form->selectDate(strtotime(date('Y-m-01', dol_now())), 'start', '', '', 0, '', 1, 0) . '</td>'; |
|
224 | - echo '<td class="linecoldateend">' . $form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0) . '</td>'; |
|
221 | + echo '<td class="linecoltype">'.$form->selectExpense('', 'fk_c_type_fees', 0, 1, 1).'</td>'; |
|
222 | + echo '<td class="linecoltyperule">'.$form->selectarray('code_expense_rules_type', $tab_rules_type, '', 0).'</td>'; |
|
223 | + echo '<td class="linecoldatestart">'.$form->selectDate(strtotime(date('Y-m-01', dol_now())), 'start', '', '', 0, '', 1, 0).'</td>'; |
|
224 | + echo '<td class="linecoldateend">'.$form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0).'</td>'; |
|
225 | 225 | echo '<td class="linecolamount"><input type="text" value="" class="maxwidth100" name="amount" class="amount right" /></td>'; |
226 | - echo '<td class="linecolrestrictive">' . $form->selectyesno('restrictive', 0, 1) . '</td>'; |
|
227 | - echo '<td class="right linecolbutton"><input type="submit" class="button button-add" value="' . $langs->trans('Add') . '" /></td>'; |
|
226 | + echo '<td class="linecolrestrictive">'.$form->selectyesno('restrictive', 0, 1).'</td>'; |
|
227 | + echo '<td class="right linecolbutton"><input type="submit" class="button button-add" value="'.$langs->trans('Add').'" /></td>'; |
|
228 | 228 | echo '</tr>'; |
229 | 229 | |
230 | 230 | echo '</table>'; |
@@ -232,24 +232,24 @@ discard block |
||
232 | 232 | } |
233 | 233 | |
234 | 234 | |
235 | - echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; |
|
236 | - echo '<input type="hidden" name="token" value="' . newToken() . '" />'; |
|
235 | + echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post">'; |
|
236 | + echo '<input type="hidden" name="token" value="'.newToken().'" />'; |
|
237 | 237 | |
238 | 238 | if ($action == 'edit') { |
239 | - echo '<input type="hidden" name="id" value="' . $object->id . '" />'; |
|
239 | + echo '<input type="hidden" name="id" value="'.$object->id.'" />'; |
|
240 | 240 | echo '<input type="hidden" name="action" value="save" />'; |
241 | 241 | } |
242 | 242 | |
243 | 243 | echo '<table class="noborder centpercent">'; |
244 | 244 | |
245 | 245 | echo '<tr class="liste_titre expensereportrules">'; |
246 | - echo '<th class="linecolapplyto">' . $langs->trans('ExpenseReportApplyTo') . '</th>'; |
|
247 | - echo '<th class="linecoltype">' . $langs->trans('Type') . '</th>'; |
|
248 | - echo '<th class="linecollimiton">' . $langs->trans('ExpenseReportLimitOn') . '</th>'; |
|
249 | - echo '<th class="linecoldatestart">' . $langs->trans('ExpenseReportDateStart') . '</th>'; |
|
250 | - echo '<th class="linecoldateend">' . $langs->trans('ExpenseReportDateEnd') . '</th>'; |
|
251 | - echo '<th class="linecollimitamount">' . $langs->trans('ExpenseReportLimitAmount') . '</th>'; |
|
252 | - echo '<th class="linecolrestrictive">' . $langs->trans('ExpenseReportRestrictive') . '</th>'; |
|
246 | + echo '<th class="linecolapplyto">'.$langs->trans('ExpenseReportApplyTo').'</th>'; |
|
247 | + echo '<th class="linecoltype">'.$langs->trans('Type').'</th>'; |
|
248 | + echo '<th class="linecollimiton">'.$langs->trans('ExpenseReportLimitOn').'</th>'; |
|
249 | + echo '<th class="linecoldatestart">'.$langs->trans('ExpenseReportDateStart').'</th>'; |
|
250 | + echo '<th class="linecoldateend">'.$langs->trans('ExpenseReportDateEnd').'</th>'; |
|
251 | + echo '<th class="linecollimitamount">'.$langs->trans('ExpenseReportLimitAmount').'</th>'; |
|
252 | + echo '<th class="linecolrestrictive">'.$langs->trans('ExpenseReportRestrictive').'</th>'; |
|
253 | 253 | echo '<th> </th>'; |
254 | 254 | echo '</tr>'; |
255 | 255 | |
@@ -259,16 +259,16 @@ discard block |
||
259 | 259 | echo '<td class="linecolusergroup">'; |
260 | 260 | if ($action == 'edit' && $object->id == $rule->id) { |
261 | 261 | $selected = ($object->is_for_all > 0) ? 'A' : ($object->fk_usergroup > 0 ? 'G' : 'U'); |
262 | - echo '<div class="float">' . $form->selectarray('apply_to', $tab_apply, $selected, 0) . '</div>'; |
|
263 | - echo '<div id="user" class="float">' . $form->select_dolusers($object->fk_user, 'fk_user') . '</div>'; |
|
264 | - echo '<div id="group" class="float">' . $form->select_dolgroups($object->fk_usergroup, 'fk_usergroup') . '</div>'; |
|
262 | + echo '<div class="float">'.$form->selectarray('apply_to', $tab_apply, $selected, 0).'</div>'; |
|
263 | + echo '<div id="user" class="float">'.$form->select_dolusers($object->fk_user, 'fk_user').'</div>'; |
|
264 | + echo '<div id="group" class="float">'.$form->select_dolgroups($object->fk_usergroup, 'fk_usergroup').'</div>'; |
|
265 | 265 | } else { |
266 | 266 | if ($rule->is_for_all > 0) { |
267 | 267 | echo $tab_apply['A']; |
268 | 268 | } elseif ($rule->fk_usergroup > 0) { |
269 | - echo $tab_apply['G'] . ' (' . $rule->getGroupLabel() . ')'; |
|
269 | + echo $tab_apply['G'].' ('.$rule->getGroupLabel().')'; |
|
270 | 270 | } elseif ($rule->fk_user > 0) { |
271 | - echo $tab_apply['U'] . ' (' . $rule->getUserName() . ')'; |
|
271 | + echo $tab_apply['U'].' ('.$rule->getUserName().')'; |
|
272 | 272 | } |
273 | 273 | } |
274 | 274 | echo '</td>'; |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | // Amount |
323 | 323 | echo '<td class="linecolamount">'; |
324 | 324 | if ($action == 'edit' && $object->id == $rule->id) { |
325 | - echo '<input type="text" value="' . price2num($object->amount) . '" name="amount" class="amount width50 right" />'; |
|
325 | + echo '<input type="text" value="'.price2num($object->amount).'" name="amount" class="amount width50 right" />'; |
|
326 | 326 | } else { |
327 | 327 | echo price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency); |
328 | 328 | } |
@@ -340,11 +340,11 @@ discard block |
||
340 | 340 | |
341 | 341 | echo '<td class="center">'; |
342 | 342 | if ($object->id != $rule->id) { |
343 | - echo '<a class="editfielda paddingright paddingleft" href="' . $_SERVER['PHP_SELF'] . '?action=edit&token=' . newToken() . '&id=' . $rule->id . '">' . img_edit() . '</a> '; |
|
344 | - echo '<a class="paddingright paddingleft" href="' . $_SERVER['PHP_SELF'] . '?action=delete&token=' . newToken() . '&id=' . $rule->id . '">' . img_delete() . '</a>'; |
|
343 | + echo '<a class="editfielda paddingright paddingleft" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&id='.$rule->id.'">'.img_edit().'</a> '; |
|
344 | + echo '<a class="paddingright paddingleft" href="'.$_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$rule->id.'">'.img_delete().'</a>'; |
|
345 | 345 | } else { |
346 | - echo '<input type="submit" class="button button-edit" value="' . $langs->trans('Update') . '" /> '; |
|
347 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '" class="button button-cancel">' . $langs->trans("Cancel") . '</a>'; |
|
346 | + echo '<input type="submit" class="button button-edit" value="'.$langs->trans('Update').'" /> '; |
|
347 | + echo '<a href="'.$_SERVER['PHP_SELF'].'" class="button button-cancel">'.$langs->trans("Cancel").'</a>'; |
|
348 | 348 | } |
349 | 349 | echo '</td>'; |
350 | 350 |