@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | * \brief Page with information on database tables. Add also some maintenance action to convert tables. |
26 | 26 | */ |
27 | 27 | |
28 | -if (! defined('CSRFCHECK_WITH_TOKEN')) { |
|
29 | - define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET |
|
28 | +if (!defined('CSRFCHECK_WITH_TOKEN')) { |
|
29 | + define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | // Load Dolibarr environment |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | //print $shortsqlfilename.' '; |
122 | 122 | $shortsqlfilename = preg_replace('/\-[a-z]+\./', '.', $value['name']); |
123 | 123 | $arrayoffiles[$value['name']] = $shortsqlfilename; |
124 | - if ($value['name'] == $shortsqlfilename && ! preg_match('/\.key\.sql$/', $value['name'])) { |
|
124 | + if ($value['name'] == $shortsqlfilename && !preg_match('/\.key\.sql$/', $value['name'])) { |
|
125 | 125 | // This is a sql file automatically created |
126 | 126 | $arrayoftablesautocreated[$value['name']] = $shortsqlfilename; |
127 | 127 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | print '<td class="center">'; |
194 | 194 | //print "> ".$conf->global->PAYMENT_ADDON." - ".$file; |
195 | - if ($conf->global->PAYMENT_ADDON == $file || getDolGlobalString('PAYMENT_ADDON') . '.php' == $file) { |
|
195 | + if ($conf->global->PAYMENT_ADDON == $file || getDolGlobalString('PAYMENT_ADDON').'.php' == $file) { |
|
196 | 196 | print img_picto($langs->trans("Activated"), 'switch_on'); |
197 | 197 | } else { |
198 | 198 | print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.preg_replace('/\.php$/', '', $file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | print '<td class="center">'; |
222 | 222 | print $form->textwithpicto('', $htmltooltip, 1, 0); |
223 | 223 | |
224 | - if (getDolGlobalString('PAYMENT_ADDON') . '.php' == $file) { // If module is the one used, we show existing errors |
|
224 | + if (getDolGlobalString('PAYMENT_ADDON').'.php' == $file) { // If module is the one used, we show existing errors |
|
225 | 225 | if (!empty($module->error)) { |
226 | 226 | dol_htmloutput_mesg($module->error, array(), 'error', 1); |
227 | 227 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | $type = GETPOST('type', 'alpha'); |
46 | 46 | $value = GETPOST('value', 'alpha'); |
47 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
47 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
48 | 48 | |
49 | 49 | $label = GETPOST('label', 'alpha'); |
50 | 50 | $scandir = GETPOST('scan_dir', 'alpha'); |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | $module = new $classname($db, $specimenthirdparty); |
395 | 395 | '@phan-var-force ModelePDFSuppliersOrders $module'; |
396 | 396 | if (method_exists($module, 'info')) { |
397 | - print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
397 | + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
398 | 398 | } else { |
399 | 399 | print $module->description; |
400 | 400 | } |
@@ -555,8 +555,8 @@ discard block |
||
555 | 555 | |
556 | 556 | |
557 | 557 | // Disallow to classify billed a supplier order without invoice |
558 | -print '<tr class="oddeven"><td>'.$langs->trans("SupplierOrderClassifyBilledWithoutInvoice"). ' ' ; |
|
559 | -print $form->textwithpicto('', $langs->trans("SupplierOrderClassifyBilledWithoutInvoiceHelp"), 1, 'help') . '</td>'; |
|
558 | +print '<tr class="oddeven"><td>'.$langs->trans("SupplierOrderClassifyBilledWithoutInvoice").' '; |
|
559 | +print $form->textwithpicto('', $langs->trans("SupplierOrderClassifyBilledWithoutInvoiceHelp"), 1, 'help').'</td>'; |
|
560 | 560 | print '<td class="left" colspan="2">'; |
561 | 561 | print ajax_constantonoff('SUPPLIER_ORDER_DISABLE_CLASSIFY_BILLED_FROM_SUPPLIER_ORDER'); |
562 | 562 | print '</td></tr>'; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $langs->loadLangs(array("admin", "other", "trips", "errors", "dict")); |
38 | 38 | |
39 | 39 | // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context |
40 | -$hookmanager->initHooks(array('admin', 'dictionaryadmin','expensereport_rules')); |
|
40 | +$hookmanager->initHooks(array('admin', 'dictionaryadmin', 'expensereport_rules')); |
|
41 | 41 | |
42 | 42 | $object = new ExpenseReportRule($db); |
43 | 43 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | if (!$error) { |
151 | - header('Location: ' . $_SERVER['PHP_SELF']); |
|
151 | + header('Location: '.$_SERVER['PHP_SELF']); |
|
152 | 152 | exit; |
153 | 153 | } else { |
154 | 154 | $action = ''; |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | dol_print_error($object->db); |
163 | 163 | } |
164 | 164 | |
165 | - header('Location: ' . $_SERVER['PHP_SELF']); |
|
165 | + header('Location: '.$_SERVER['PHP_SELF']); |
|
166 | 166 | exit; |
167 | 167 | } |
168 | 168 | |
@@ -190,47 +190,47 @@ discard block |
||
190 | 190 | |
191 | 191 | $form = new Form($db); |
192 | 192 | |
193 | -$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>'; |
|
193 | +$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; |
|
194 | 194 | print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup'); |
195 | 195 | |
196 | 196 | $head = expensereport_admin_prepare_head(); |
197 | 197 | print dol_get_fiche_head($head, 'expenserules', $langs->trans("ExpenseReportsRules"), -1, 'trip'); |
198 | 198 | |
199 | -echo '<span class="opacitymedium">' . $langs->trans('ExpenseReportRulesDesc') . '</span>'; |
|
199 | +echo '<span class="opacitymedium">'.$langs->trans('ExpenseReportRulesDesc').'</span>'; |
|
200 | 200 | print '<br><br>'; |
201 | 201 | |
202 | 202 | if ($action != 'edit') { |
203 | - echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; |
|
204 | - echo '<input type="hidden" name="token" value="' . newToken() . '" />'; |
|
203 | + echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post">'; |
|
204 | + echo '<input type="hidden" name="token" value="'.newToken().'" />'; |
|
205 | 205 | echo '<input type="hidden" name="action" value="save" />'; |
206 | 206 | |
207 | 207 | echo '<table class="noborder centpercent">'; |
208 | 208 | |
209 | 209 | echo '<tr class="liste_titre headerexpensereportrules">'; |
210 | - echo '<th class="linecolapplyto">' . $langs->trans('ExpenseReportApplyTo') . '</th>'; |
|
211 | - echo '<th class="linecoltype">' . $langs->trans('Type') . '</th>'; |
|
212 | - echo '<th class="linecollimiton">' . $langs->trans('ExpenseReportLimitOn') . '</th>'; |
|
213 | - echo '<th class="linecoldatestart">' . $langs->trans('ExpenseReportDateStart') . '</th>'; |
|
214 | - echo '<th class="linecoldateend">' . $langs->trans('ExpenseReportDateEnd') . '</th>'; |
|
215 | - echo '<th class="linecollimitamount">' . $langs->trans('ExpenseReportLimitAmount') . '</th>'; |
|
216 | - echo '<th class="linecolrestrictive">' . $langs->trans('ExpenseReportRestrictive') . '</th>'; |
|
210 | + echo '<th class="linecolapplyto">'.$langs->trans('ExpenseReportApplyTo').'</th>'; |
|
211 | + echo '<th class="linecoltype">'.$langs->trans('Type').'</th>'; |
|
212 | + echo '<th class="linecollimiton">'.$langs->trans('ExpenseReportLimitOn').'</th>'; |
|
213 | + echo '<th class="linecoldatestart">'.$langs->trans('ExpenseReportDateStart').'</th>'; |
|
214 | + echo '<th class="linecoldateend">'.$langs->trans('ExpenseReportDateEnd').'</th>'; |
|
215 | + echo '<th class="linecollimitamount">'.$langs->trans('ExpenseReportLimitAmount').'</th>'; |
|
216 | + echo '<th class="linecolrestrictive">'.$langs->trans('ExpenseReportRestrictive').'</th>'; |
|
217 | 217 | echo '<th> </th>'; |
218 | 218 | echo '</tr>'; |
219 | 219 | |
220 | 220 | echo '<tr class="oddeven">'; |
221 | 221 | echo '<td>'; |
222 | - echo '<div class="float linecolapplyto">' . $form->selectarray('apply_to', $tab_apply, '', 0) . '</div>'; |
|
223 | - echo '<div id="user" class="float linecoluser">' . $form->select_dolusers('', 'fk_user') . '</div>'; |
|
224 | - echo '<div id="group" class="float linecolgroup">' . $form->select_dolgroups(0, 'fk_usergroup') . '</div>'; |
|
222 | + echo '<div class="float linecolapplyto">'.$form->selectarray('apply_to', $tab_apply, '', 0).'</div>'; |
|
223 | + echo '<div id="user" class="float linecoluser">'.$form->select_dolusers('', 'fk_user').'</div>'; |
|
224 | + echo '<div id="group" class="float linecolgroup">'.$form->select_dolgroups(0, 'fk_usergroup').'</div>'; |
|
225 | 225 | echo '</td>'; |
226 | 226 | |
227 | - echo '<td class="linecoltype">' . $form->selectExpense('', 'fk_c_type_fees', 0, 1, 1) . '</td>'; |
|
228 | - echo '<td class="linecoltyperule">' . $form->selectarray('code_expense_rules_type', $tab_rules_type, '', 0) . '</td>'; |
|
229 | - echo '<td class="linecoldatestart">' . $form->selectDate(strtotime(date('Y-m-01', dol_now())), 'start', 0, 0, 0, '', 1, 0) . '</td>'; |
|
230 | - echo '<td class="linecoldateend">' . $form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', 0, 0, 0, '', 1, 0) . '</td>'; |
|
227 | + echo '<td class="linecoltype">'.$form->selectExpense('', 'fk_c_type_fees', 0, 1, 1).'</td>'; |
|
228 | + echo '<td class="linecoltyperule">'.$form->selectarray('code_expense_rules_type', $tab_rules_type, '', 0).'</td>'; |
|
229 | + echo '<td class="linecoldatestart">'.$form->selectDate(strtotime(date('Y-m-01', dol_now())), 'start', 0, 0, 0, '', 1, 0).'</td>'; |
|
230 | + echo '<td class="linecoldateend">'.$form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', 0, 0, 0, '', 1, 0).'</td>'; |
|
231 | 231 | echo '<td class="linecolamount"><input type="text" value="" class="maxwidth100" name="amount" class="amount right" /></td>'; |
232 | - echo '<td class="linecolrestrictive">' . $form->selectyesno('restrictive', 0, 1) . '</td>'; |
|
233 | - echo '<td class="right linecolbutton"><input type="submit" class="button button-add" value="' . $langs->trans('Add') . '" /></td>'; |
|
232 | + echo '<td class="linecolrestrictive">'.$form->selectyesno('restrictive', 0, 1).'</td>'; |
|
233 | + echo '<td class="right linecolbutton"><input type="submit" class="button button-add" value="'.$langs->trans('Add').'" /></td>'; |
|
234 | 234 | echo '</tr>'; |
235 | 235 | |
236 | 236 | echo '</table>'; |
@@ -238,11 +238,11 @@ discard block |
||
238 | 238 | } |
239 | 239 | |
240 | 240 | |
241 | -echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; |
|
242 | -echo '<input type="hidden" name="token" value="' . newToken() . '" />'; |
|
241 | +echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post">'; |
|
242 | +echo '<input type="hidden" name="token" value="'.newToken().'" />'; |
|
243 | 243 | |
244 | 244 | if ($action == 'edit') { |
245 | - echo '<input type="hidden" name="id" value="' . $object->id . '" />'; |
|
245 | + echo '<input type="hidden" name="id" value="'.$object->id.'" />'; |
|
246 | 246 | echo '<input type="hidden" name="action" value="save" />'; |
247 | 247 | } |
248 | 248 | |
@@ -252,13 +252,13 @@ discard block |
||
252 | 252 | echo '<table class="noborder centpercent">'; |
253 | 253 | |
254 | 254 | echo '<tr class="liste_titre expensereportrules">'; |
255 | -echo '<th class="linecolapplyto">' . $langs->trans('ExpenseReportApplyTo') . '</th>'; |
|
256 | -echo '<th class="linecoltype">' . $langs->trans('Type') . '</th>'; |
|
257 | -echo '<th class="linecollimiton">' . $langs->trans('ExpenseReportLimitOn') . '</th>'; |
|
258 | -echo '<th class="linecoldatestart">' . $langs->trans('ExpenseReportDateStart') . '</th>'; |
|
259 | -echo '<th class="linecoldateend">' . $langs->trans('ExpenseReportDateEnd') . '</th>'; |
|
260 | -echo '<th class="linecollimitamount">' . $langs->trans('ExpenseReportLimitAmount') . '</th>'; |
|
261 | -echo '<th class="linecolrestrictive">' . $langs->trans('ExpenseReportRestrictive') . '</th>'; |
|
255 | +echo '<th class="linecolapplyto">'.$langs->trans('ExpenseReportApplyTo').'</th>'; |
|
256 | +echo '<th class="linecoltype">'.$langs->trans('Type').'</th>'; |
|
257 | +echo '<th class="linecollimiton">'.$langs->trans('ExpenseReportLimitOn').'</th>'; |
|
258 | +echo '<th class="linecoldatestart">'.$langs->trans('ExpenseReportDateStart').'</th>'; |
|
259 | +echo '<th class="linecoldateend">'.$langs->trans('ExpenseReportDateEnd').'</th>'; |
|
260 | +echo '<th class="linecollimitamount">'.$langs->trans('ExpenseReportLimitAmount').'</th>'; |
|
261 | +echo '<th class="linecolrestrictive">'.$langs->trans('ExpenseReportRestrictive').'</th>'; |
|
262 | 262 | echo '<th> </th>'; |
263 | 263 | echo '</tr>'; |
264 | 264 | |
@@ -268,16 +268,16 @@ discard block |
||
268 | 268 | echo '<td class="linecolusergroup">'; |
269 | 269 | if ($action == 'edit' && $object->id == $rule->id) { |
270 | 270 | $selected = ($object->is_for_all > 0) ? 'A' : ($object->fk_usergroup > 0 ? 'G' : 'U'); |
271 | - echo '<div class="float">' . $form->selectarray('apply_to', $tab_apply, $selected, 0) . '</div>'; |
|
272 | - echo '<div id="user" class="float">' . $form->select_dolusers($object->fk_user, 'fk_user') . '</div>'; |
|
273 | - echo '<div id="group" class="float">' . $form->select_dolgroups($object->fk_usergroup, 'fk_usergroup') . '</div>'; |
|
271 | + echo '<div class="float">'.$form->selectarray('apply_to', $tab_apply, $selected, 0).'</div>'; |
|
272 | + echo '<div id="user" class="float">'.$form->select_dolusers($object->fk_user, 'fk_user').'</div>'; |
|
273 | + echo '<div id="group" class="float">'.$form->select_dolgroups($object->fk_usergroup, 'fk_usergroup').'</div>'; |
|
274 | 274 | } else { |
275 | 275 | if ($rule->is_for_all > 0) { |
276 | 276 | echo $tab_apply['A']; |
277 | 277 | } elseif ($rule->fk_usergroup > 0) { |
278 | - echo $tab_apply['G'] . ' (' . $rule->getGroupLabel() . ')'; |
|
278 | + echo $tab_apply['G'].' ('.$rule->getGroupLabel().')'; |
|
279 | 279 | } elseif ($rule->fk_user > 0) { |
280 | - echo $tab_apply['U'] . ' (' . $rule->getUserName() . ')'; |
|
280 | + echo $tab_apply['U'].' ('.$rule->getUserName().')'; |
|
281 | 281 | } |
282 | 282 | } |
283 | 283 | echo '</td>'; |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | // Amount |
331 | 331 | echo '<td class="linecolamount">'; |
332 | 332 | if ($action == 'edit' && $object->id == $rule->id) { |
333 | - echo '<input type="text" value="' . price2num($object->amount) . '" name="amount" class="amount width50 right" />'; |
|
333 | + echo '<input type="text" value="'.price2num($object->amount).'" name="amount" class="amount width50 right" />'; |
|
334 | 334 | } else { |
335 | 335 | echo price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency); |
336 | 336 | } |
@@ -348,11 +348,11 @@ discard block |
||
348 | 348 | |
349 | 349 | echo '<td class="center">'; |
350 | 350 | if ($object->id != $rule->id) { |
351 | - echo '<a class="editfielda paddingright paddingleft" href="' . $_SERVER['PHP_SELF'] . '?action=edit&token=' . newToken() . '&id=' . $rule->id . '">' . img_edit() . '</a> '; |
|
352 | - echo '<a class="paddingright paddingleft" href="' . $_SERVER['PHP_SELF'] . '?action=delete&token=' . newToken() . '&id=' . $rule->id . '">' . img_delete() . '</a>'; |
|
351 | + echo '<a class="editfielda paddingright paddingleft" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&id='.$rule->id.'">'.img_edit().'</a> '; |
|
352 | + echo '<a class="paddingright paddingleft" href="'.$_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$rule->id.'">'.img_delete().'</a>'; |
|
353 | 353 | } else { |
354 | - echo '<input type="submit" class="button button-edit" value="' . $langs->trans('Update') . '" /> '; |
|
355 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '" class="button button-cancel">' . $langs->trans("Cancel") . '</a>'; |
|
354 | + echo '<input type="submit" class="button button-edit" value="'.$langs->trans('Update').'" /> '; |
|
355 | + echo '<a href="'.$_SERVER['PHP_SELF'].'" class="button button-cancel">'.$langs->trans("Cancel").'</a>'; |
|
356 | 356 | } |
357 | 357 | echo '</td>'; |
358 | 358 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | $value = GETPOST('value', 'alpha'); |
55 | 55 | $label = GETPOST('label', 'alpha'); |
56 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
56 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
57 | 57 | |
58 | 58 | $scandir = GETPOST('scan_dir', 'alpha'); |
59 | 59 | $type = 'invoice'; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity); |
83 | 83 | require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
84 | 84 | |
85 | - $logofile = $conf->mycompany->dir_output.'/logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND'); |
|
85 | + $logofile = $conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND'); |
|
86 | 86 | dol_delete_file($logofile); |
87 | 87 | dolibarr_del_const($db, "MAIN_LOGIN_BACKGROUND", $conf->entity); |
88 | 88 | $mysoc->logo = ''; |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | //dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities |
275 | 275 | |
276 | 276 | $varforimage = 'imagebackground'; |
277 | - $dirforimage = $conf->mycompany->dir_output . '/logos/'; |
|
277 | + $dirforimage = $conf->mycompany->dir_output.'/logos/'; |
|
278 | 278 | if ($_FILES[$varforimage]["tmp_name"]) { |
279 | 279 | $reg = array(); |
280 | 280 | if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) { |
@@ -282,11 +282,11 @@ discard block |
||
282 | 282 | |
283 | 283 | $isimage = image_format_supported($original_file); |
284 | 284 | if ($isimage >= 0) { |
285 | - dol_syslog("Move file " . $_FILES[$varforimage]["tmp_name"] . " to " . $dirforimage . $original_file); |
|
285 | + dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file); |
|
286 | 286 | if (!is_dir($dirforimage)) { |
287 | 287 | dol_mkdir($dirforimage); |
288 | 288 | } |
289 | - $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage . $original_file, 1, 0, $_FILES[$varforimage]['error']); |
|
289 | + $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); |
|
290 | 290 | if ($result > 0) { |
291 | 291 | dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity); |
292 | 292 | } elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) { |
@@ -392,17 +392,17 @@ discard block |
||
392 | 392 | print '</tr>'; |
393 | 393 | |
394 | 394 | // Multilingual GUI |
395 | - print '<tr class="oddeven"><td>' . $langs->trans("EnableMultilangInterface") . '</td><td>'; |
|
395 | + print '<tr class="oddeven"><td>'.$langs->trans("EnableMultilangInterface").'</td><td>'; |
|
396 | 396 | print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'language'); |
397 | 397 | print '</td>'; |
398 | 398 | print '</tr>'; |
399 | 399 | |
400 | - print '</table>' . "\n"; |
|
400 | + print '</table>'."\n"; |
|
401 | 401 | print '</div>'; |
402 | 402 | |
403 | 403 | print '<div class="center">'; |
404 | - print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">'; |
|
405 | - print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
404 | + print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">'; |
|
405 | + print '<input class="button button-cancel reposition" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
406 | 406 | print '</div>'; |
407 | 407 | |
408 | 408 | print '<br>'; |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | |
421 | 421 | if (!empty($conf->use_javascript_ajax)) { |
422 | 422 | // Show Quick Add link |
423 | - print '<tr class="oddeven"><td>' . $langs->trans("ShowQuickAddLink") . '</td><td>'; |
|
423 | + print '<tr class="oddeven"><td>'.$langs->trans("ShowQuickAddLink").'</td><td>'; |
|
424 | 424 | print ajax_constantonoff("MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
425 | 425 | print '</td>'; |
426 | 426 | print '</tr>'; |
@@ -428,14 +428,14 @@ discard block |
||
428 | 428 | |
429 | 429 | // Hide wiki link on login page |
430 | 430 | $pictohelp = '<span class="fa fa-question-circle"></span>'; |
431 | - print '<tr class="oddeven"><td>' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . '</td><td>'; |
|
431 | + print '<tr class="oddeven"><td>'.str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')).'</td><td>'; |
|
432 | 432 | print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
433 | 433 | //print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1); |
434 | 434 | print '</td>'; |
435 | 435 | print '</tr>'; |
436 | 436 | |
437 | 437 | // Max size of lists |
438 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeList") . '</td><td><input class="flat width50" name="MAIN_SIZE_LISTE_LIMIT" value="'; |
|
438 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat width50" name="MAIN_SIZE_LISTE_LIMIT" value="'; |
|
439 | 439 | if (getDolGlobalInt('MAIN_SIZE_LISTE_LIMIT') > 0) { |
440 | 440 | print getDolGlobalString('MAIN_SIZE_LISTE_LIMIT'); |
441 | 441 | } |
@@ -447,11 +447,11 @@ discard block |
||
447 | 447 | print '</tr>'; |
448 | 448 | |
449 | 449 | // Max size of short lists on customer card |
450 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeShortList") . '</td><td><input class="flat width50" name="MAIN_SIZE_SHORTLIST_LIMIT" value="' . getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT') . '"></td>'; |
|
450 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat width50" name="MAIN_SIZE_SHORTLIST_LIMIT" value="'.getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT').'"></td>'; |
|
451 | 451 | print '</tr>'; |
452 | 452 | |
453 | 453 | // Display checkboxes and fields menu left / right |
454 | - print '<tr class="oddeven"><td>' . $langs->trans("MAIN_CHECKBOX_LEFT_COLUMN") . '</td><td>'; |
|
454 | + print '<tr class="oddeven"><td>'.$langs->trans("MAIN_CHECKBOX_LEFT_COLUMN").'</td><td>'; |
|
455 | 455 | print ajax_constantonoff("MAIN_CHECKBOX_LEFT_COLUMN", array(), $conf->entity, 0, 0, 1, 0, 0, 1, '', 'other'); |
456 | 456 | print '</td>'; |
457 | 457 | print '</tr>'; |
@@ -465,39 +465,39 @@ discard block |
||
465 | 465 | */ |
466 | 466 | |
467 | 467 | // First day for weeks |
468 | - print '<tr class="oddeven"><td>' . $langs->trans("WeekStartOnDay") . '</td><td>'; |
|
468 | + print '<tr class="oddeven"><td>'.$langs->trans("WeekStartOnDay").'</td><td>'; |
|
469 | 469 | print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0); |
470 | 470 | print '</td>'; |
471 | 471 | print '</tr>'; |
472 | 472 | |
473 | 473 | // DefaultWorkingDays |
474 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingDays") . '</td><td>'; |
|
475 | - print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5') . '">'; |
|
474 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingDays").'</td><td>'; |
|
475 | + print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5').'">'; |
|
476 | 476 | print '</td>'; |
477 | 477 | print '</tr>'; |
478 | 478 | |
479 | 479 | // DefaultWorkingHours |
480 | - print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingHours") . '</td><td>'; |
|
481 | - print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18') . '">'; |
|
480 | + print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingHours").'</td><td>'; |
|
481 | + print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18').'">'; |
|
482 | 482 | print '</td>'; |
483 | 483 | print '</tr>'; |
484 | 484 | |
485 | 485 | // Firstname/Name |
486 | - print '<tr class="oddeven"><td>' . $langs->trans("FirstnameNamePosition") . '</td><td>'; |
|
487 | - $array = array(0 => $langs->trans("Firstname") . ' ' . $langs->trans("Lastname"), 1 => $langs->trans("Lastname") . ' ' . $langs->trans("Firstname")); |
|
486 | + print '<tr class="oddeven"><td>'.$langs->trans("FirstnameNamePosition").'</td><td>'; |
|
487 | + $array = array(0 => $langs->trans("Firstname").' '.$langs->trans("Lastname"), 1 => $langs->trans("Lastname").' '.$langs->trans("Firstname")); |
|
488 | 488 | print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0)); |
489 | 489 | print '</td>'; |
490 | 490 | print '</tr>'; |
491 | 491 | |
492 | 492 | // Hide unauthorized menus |
493 | - print '<tr class="oddeven"><td>' . $langs->trans("HideUnauthorizedMenu") . '</td><td>'; |
|
493 | + print '<tr class="oddeven"><td>'.$langs->trans("HideUnauthorizedMenu").'</td><td>'; |
|
494 | 494 | //print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1); |
495 | 495 | print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
496 | 496 | print '</td>'; |
497 | 497 | print '</tr>'; |
498 | 498 | |
499 | 499 | // Hide unauthorized button |
500 | - print '<tr class="oddeven"><td>' . $langs->trans("ButtonHideUnauthorized") . '</td><td>'; |
|
500 | + print '<tr class="oddeven"><td>'.$langs->trans("ButtonHideUnauthorized").'</td><td>'; |
|
501 | 501 | //print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1); |
502 | 502 | print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
503 | 503 | print '</td>'; |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | |
515 | 515 | |
516 | 516 | // Show search area in top menu |
517 | - print '<tr class="oddeven"><td>' . $langs->trans("ShowSearchAreaInTopMenu") . '</td><td>'; |
|
517 | + print '<tr class="oddeven"><td>'.$langs->trans("ShowSearchAreaInTopMenu").'</td><td>'; |
|
518 | 518 | print ajax_constantonoff("MAIN_USE_TOP_MENU_SEARCH_DROPDOWN", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
519 | 519 | print '</td>'; |
520 | 520 | print '</tr>'; |
@@ -523,17 +523,17 @@ discard block |
||
523 | 523 | print '<tr class="oddeven"><td>'; |
524 | 524 | print $form->textwithpicto($langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")), $langs->trans("ShowBugTrackLinkDesc")); |
525 | 525 | print '</td><td>'; |
526 | - print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . (!getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK) . '">'; |
|
526 | + print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="'.(!getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK).'">'; |
|
527 | 527 | print '</td>'; |
528 | 528 | print '</tr>'; |
529 | 529 | |
530 | 530 | // Disable javascript and ajax |
531 | - print '<tr class="oddeven"><td>' . $form->textwithpicto($langs->trans("DisableJavascript"), $langs->trans("DisableJavascriptNote")) . '</td><td>'; |
|
531 | + print '<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans("DisableJavascript"), $langs->trans("DisableJavascriptNote")).'</td><td>'; |
|
532 | 532 | print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); |
533 | 533 | print '</td>'; |
534 | 534 | print '</tr>'; |
535 | 535 | |
536 | - print '</table>' . "\n"; |
|
536 | + print '</table>'."\n"; |
|
537 | 537 | print '</div>'; |
538 | 538 | } |
539 | 539 | |
@@ -553,9 +553,9 @@ discard block |
||
553 | 553 | complete_substitutions_array($substitutionarray, $langs); |
554 | 554 | |
555 | 555 | print '<tr class="oddeven width25p"><td>'; |
556 | - $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>'; |
|
556 | + $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>'; |
|
557 | 557 | foreach ($substitutionarray as $key => $val) { |
558 | - $texthelp .= $key . '<br>'; |
|
558 | + $texthelp .= $key.'<br>'; |
|
559 | 559 | } |
560 | 560 | print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday'); |
561 | 561 | |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | $doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); |
565 | 565 | $doleditor->Create(); |
566 | 566 | |
567 | - print '</td></tr>' . "\n"; |
|
567 | + print '</td></tr>'."\n"; |
|
568 | 568 | |
569 | 569 | /* no more need for this option. It is now a widget already controlled by end user |
570 | 570 | print '<tr class="oddeven"><td>' . $langs->trans('BoxstatsDisableGlobal') . '</td><td>'; |
@@ -586,80 +586,80 @@ discard block |
||
586 | 586 | print '</td><td class="titlefieldmiddle">'; |
587 | 587 | print '</td></tr>'; |
588 | 588 | |
589 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableGlobal') . '</td><td>'; |
|
589 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableGlobal').'</td><td>'; |
|
590 | 590 | print ajax_constantonoff("MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
591 | 591 | print '</td>'; |
592 | 592 | print '</tr>'; |
593 | 593 | |
594 | 594 | if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_WORKBOARD')) { |
595 | 595 | // Block meteo |
596 | - print '<tr class="oddeven"><td>' . $langs->trans('MAIN_DISABLE_METEO') . '</td><td>'; |
|
596 | + print '<tr class="oddeven"><td>'.$langs->trans('MAIN_DISABLE_METEO').'</td><td>'; |
|
597 | 597 | print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
598 | 598 | print '</td>'; |
599 | 599 | print '</tr>'; |
600 | 600 | |
601 | 601 | // Block agenda |
602 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAgenda') . '</td><td>'; |
|
602 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockAgenda').'</td><td>'; |
|
603 | 603 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
604 | 604 | print '</td>'; |
605 | 605 | print '</tr>'; |
606 | 606 | |
607 | 607 | // Block agenda |
608 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockProject') . '</td><td>'; |
|
608 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockProject').'</td><td>'; |
|
609 | 609 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
610 | 610 | print '</td>'; |
611 | 611 | print '</tr>'; |
612 | 612 | |
613 | 613 | // Block customer |
614 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockCustomer') . '</td><td>'; |
|
614 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockCustomer').'</td><td>'; |
|
615 | 615 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
616 | 616 | print '</td>'; |
617 | 617 | print '</tr>'; |
618 | 618 | |
619 | 619 | // Block supplier |
620 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockSupplier') . '</td><td>'; |
|
620 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockSupplier').'</td><td>'; |
|
621 | 621 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
622 | 622 | print '</td>'; |
623 | 623 | print '</tr>'; |
624 | 624 | |
625 | 625 | // Block contract |
626 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockContract') . '</td><td>'; |
|
626 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockContract').'</td><td>'; |
|
627 | 627 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
628 | 628 | print '</td>'; |
629 | 629 | print '</tr>'; |
630 | 630 | |
631 | 631 | // Block ticket |
632 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockTicket') . '</td><td>'; |
|
632 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockTicket').'</td><td>'; |
|
633 | 633 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
634 | 634 | print '</td>'; |
635 | 635 | print '</tr>'; |
636 | 636 | |
637 | 637 | // Block bank |
638 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockBank') . '</td><td>'; |
|
638 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockBank').'</td><td>'; |
|
639 | 639 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
640 | 640 | print '</td>'; |
641 | 641 | print '</tr>'; |
642 | 642 | |
643 | 643 | // Block adherent |
644 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAdherent') . '</td><td>'; |
|
644 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockAdherent').'</td><td>'; |
|
645 | 645 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
646 | 646 | print '</td>'; |
647 | 647 | print '</tr>'; |
648 | 648 | |
649 | 649 | // Block expense report |
650 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockExpenseReport') . '</td><td>'; |
|
650 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockExpenseReport').'</td><td>'; |
|
651 | 651 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
652 | 652 | print '</td>'; |
653 | 653 | print '</tr>'; |
654 | 654 | |
655 | 655 | // Block holiday |
656 | - print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockHoliday') . '</td><td>'; |
|
656 | + print '<tr class="oddeven"><td>'.$langs->trans('DashboardDisableBlockHoliday').'</td><td>'; |
|
657 | 657 | print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard'); |
658 | 658 | print '</td>'; |
659 | 659 | print '</tr>'; |
660 | 660 | } |
661 | 661 | |
662 | - print '</table>' . "\n"; |
|
662 | + print '</table>'."\n"; |
|
663 | 663 | print '</div>'; |
664 | 664 | } |
665 | 665 | |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | print '</td></tr>'; |
677 | 677 | |
678 | 678 | // Hide helpcenter link on login page |
679 | - print '<tr class="oddeven"><td>' . $langs->trans("DisableLinkToHelpCenter") . '</td><td>'; |
|
679 | + print '<tr class="oddeven"><td>'.$langs->trans("DisableLinkToHelpCenter").'</td><td>'; |
|
680 | 680 | print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '', 'login'); |
681 | 681 | print '</td>'; |
682 | 682 | print '</tr>'; |
@@ -685,18 +685,18 @@ discard block |
||
685 | 685 | $substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user')); |
686 | 686 | complete_substitutions_array($substitutionarray, $langs); |
687 | 687 | print '<tr class="oddeven"><td>'; |
688 | - $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>'; |
|
688 | + $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>'; |
|
689 | 689 | foreach ($substitutionarray as $key => $val) { |
690 | - $texthelp .= $key . '<br>'; |
|
690 | + $texthelp .= $key.'<br>'; |
|
691 | 691 | } |
692 | 692 | print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin'); |
693 | 693 | print '</td><td>'; |
694 | 694 | $doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); |
695 | 695 | $doleditor->Create(); |
696 | - print '</td></tr>' . "\n"; |
|
696 | + print '</td></tr>'."\n"; |
|
697 | 697 | |
698 | 698 | // Background |
699 | - print '<tr class="oddeven"><td><label for="imagebackground">' . $langs->trans("BackgroundImageLogin") . ' (png,jpg)</label></td><td>'; |
|
699 | + print '<tr class="oddeven"><td><label for="imagebackground">'.$langs->trans("BackgroundImageLogin").' (png,jpg)</label></td><td>'; |
|
700 | 700 | print '<div class="centpercent inline-block">'; |
701 | 701 | $disabled = ''; |
702 | 702 | if (getDolGlobalString('ADD_UNSPLASH_LOGIN_BACKGROUND')) { |
@@ -705,25 +705,25 @@ discard block |
||
705 | 705 | $maxfilesizearray = getMaxFileSizeArray(); |
706 | 706 | $maxmin = $maxfilesizearray['maxmin']; |
707 | 707 | if ($maxmin > 0) { |
708 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
708 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
709 | 709 | } |
710 | - print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"' . $disabled . '>'; |
|
710 | + print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"'.$disabled.'>'; |
|
711 | 711 | if ($disabled) { |
712 | - print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') '; |
|
712 | + print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') '; |
|
713 | 713 | } |
714 | 714 | if (getDolGlobalString('MAIN_LOGIN_BACKGROUND')) { |
715 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin&token='.newToken().'&mode=login">' . img_delete($langs->trans("Delete")) . '</a>'; |
|
716 | - if (file_exists($conf->mycompany->dir_output . '/logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND'))) { |
|
715 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removebackgroundlogin&token='.newToken().'&mode=login">'.img_delete($langs->trans("Delete")).'</a>'; |
|
716 | + if (file_exists($conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND'))) { |
|
717 | 717 | print ' '; |
718 | - print '<img class="marginleftonly boxshadow valignmiddle" width="100" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&file=' . urlencode('logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND')) . '">'; |
|
718 | + print '<img class="marginleftonly boxshadow valignmiddle" width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/'.getDolGlobalString('MAIN_LOGIN_BACKGROUND')).'">'; |
|
719 | 719 | } |
720 | 720 | } else { |
721 | - print '<img class="marginleftonly valignmiddle" width="100" src="' . DOL_URL_ROOT . '/public/theme/common/nophoto.png">'; |
|
721 | + print '<img class="marginleftonly valignmiddle" width="100" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">'; |
|
722 | 722 | } |
723 | 723 | print '</div>'; |
724 | 724 | print '</td></tr>'; |
725 | 725 | |
726 | - print '</table>' . "\n"; |
|
726 | + print '</table>'."\n"; |
|
727 | 727 | print '</div>'; |
728 | 728 | } |
729 | 729 | |
@@ -747,8 +747,8 @@ discard block |
||
747 | 747 | |
748 | 748 | |
749 | 749 | print '<div class="center">'; |
750 | -print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans("Save") . '">'; |
|
751 | -print '<input class="button button-cancel reposition" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
750 | +print '<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="'.$langs->trans("Save").'">'; |
|
751 | +print '<input class="button button-cancel reposition" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
752 | 752 | print '</div>'; |
753 | 753 | |
754 | 754 | print '</form>'; |
@@ -104,14 +104,14 @@ |
||
104 | 104 | |
105 | 105 | // Param |
106 | 106 | $label = $langs->trans($key); |
107 | - print '<td><label for="' . $key . '">' . $label . '</label></td>'; |
|
107 | + print '<td><label for="'.$key.'">'.$label.'</label></td>'; |
|
108 | 108 | |
109 | 109 | // Value |
110 | 110 | print '<td>'; |
111 | 111 | if ($formaccounting instanceof FormAccounting) { |
112 | 112 | print $formaccounting->select_account(getDolGlobalString($key), $key, 1, array(), 1, 1); |
113 | 113 | } else { |
114 | - print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . getDolGlobalString($key) . '">'; |
|
114 | + print '<input type="text" size="20" id="'.$key.'" name="'.$key.'" value="'.getDolGlobalString($key).'">'; |
|
115 | 115 | } |
116 | 116 | print '</td></tr>'; |
117 | 117 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $backtopage = GETPOST('backtopage', 'alpha'); |
105 | 105 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
106 | 106 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
107 | -$confirm = GETPOST('confirm', 'alpha'); |
|
107 | +$confirm = GETPOST('confirm', 'alpha'); |
|
108 | 108 | |
109 | 109 | $dol_openinpopup = ''; |
110 | 110 | if (!empty($backtopagejsfields)) { |
@@ -155,12 +155,12 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | // Permissions |
158 | -$permissiontoread = $user->hasRight('societe', 'lire'); |
|
159 | -$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
158 | +$permissiontoread = $user->hasRight('societe', 'lire'); |
|
159 | +$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
160 | 160 | $permissiontodelete = $user->hasRight('societe', 'supprimer') || ($permissiontoadd && isset($object->status) && $object->status == 0); |
161 | -$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php |
|
161 | +$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php |
|
162 | 162 | $permissiondellink = $user->hasRight('societe', 'creer'); // Used by the include of actions_dellink.inc.php |
163 | -$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; |
|
163 | +$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; |
|
164 | 164 | |
165 | 165 | // Security check |
166 | 166 | $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | if ($action == 'confirm_merge' && $confirm == 'yes' && $permissiontoadd) { |
205 | 205 | $soc_origin_id = GETPOSTINT('soc_origin'); |
206 | - $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
206 | + $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
207 | 207 | |
208 | 208 | if ($soc_origin_id <= 0) { |
209 | 209 | $langs->load('errors'); |
@@ -319,19 +319,19 @@ discard block |
||
319 | 319 | $object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml')); |
320 | 320 | $object->civility_id = GETPOST('civility_id', 'alphanohtml'); // Note: civility id is a code, not an int |
321 | 321 | // Add non official properties |
322 | - $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
323 | - $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
322 | + $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
323 | + $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
324 | 324 | } else { |
325 | - $object->name = GETPOST('name', 'alphanohtml'); |
|
325 | + $object->name = GETPOST('name', 'alphanohtml'); |
|
326 | 326 | } |
327 | 327 | $object->entity = ((GETPOSTISSET('entity') && GETPOST('entity') != '') ? GETPOSTINT('entity') : $conf->entity); |
328 | - $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
328 | + $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
329 | 329 | $object->parent = GETPOSTISSET('parent_company_id') ? GETPOSTINT('parent_company_id') : $object->parent; |
330 | 330 | $object->address = GETPOST('address', 'alphanohtml'); |
331 | - $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
332 | - $object->town = GETPOST('town', 'alphanohtml'); |
|
333 | - $object->country_id = GETPOSTINT('country_id'); |
|
334 | - $object->state_id = GETPOSTINT('state_id'); |
|
331 | + $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
332 | + $object->town = GETPOST('town', 'alphanohtml'); |
|
333 | + $object->country_id = GETPOSTINT('country_id'); |
|
334 | + $object->state_id = GETPOSTINT('state_id'); |
|
335 | 335 | |
336 | 336 | $object->socialnetworks = array(); |
337 | 337 | if (isModEnabled('socialnetworks')) { |
@@ -343,10 +343,10 @@ discard block |
||
343 | 343 | } |
344 | 344 | |
345 | 345 | $object->phone = GETPOST('phone', 'alpha'); |
346 | - $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
346 | + $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
347 | 347 | $object->fax = GETPOST('fax', 'alpha'); |
348 | 348 | $object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); |
349 | - $object->no_email = GETPOSTINT("no_email"); |
|
349 | + $object->no_email = GETPOSTINT("no_email"); |
|
350 | 350 | $object->url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL)); |
351 | 351 | $object->idprof1 = trim(GETPOST('idprof1', 'alphanohtml')); |
352 | 352 | $object->idprof2 = trim(GETPOST('idprof2', 'alphanohtml')); |
@@ -356,13 +356,13 @@ discard block |
||
356 | 356 | $object->idprof6 = trim(GETPOST('idprof6', 'alphanohtml')); |
357 | 357 | $object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml'); |
358 | 358 | $object->code_client = GETPOSTISSET('customer_code') ? GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha'); |
359 | - $object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
359 | + $object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
360 | 360 | $object->capital = GETPOST('capital', 'alphanohtml'); |
361 | 361 | $object->barcode = GETPOST('barcode', 'alphanohtml'); |
362 | 362 | |
363 | 363 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
364 | 364 | $object->tva_assuj = GETPOST('assujtva_value', 'alpha'); |
365 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
365 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
366 | 366 | $object->status = GETPOST('status', 'alpha'); |
367 | 367 | |
368 | 368 | // Local Taxes |
@@ -372,9 +372,9 @@ discard block |
||
372 | 372 | $object->localtax1_value = GETPOST('lt1', 'alpha'); |
373 | 373 | $object->localtax2_value = GETPOST('lt2', 'alpha'); |
374 | 374 | |
375 | - $object->forme_juridique_code = GETPOSTINT('forme_juridique_code'); |
|
375 | + $object->forme_juridique_code = GETPOSTINT('forme_juridique_code'); |
|
376 | 376 | $object->effectif_id = GETPOSTINT('effectif_id'); |
377 | - $object->typent_id = GETPOSTINT('typent_id'); |
|
377 | + $object->typent_id = GETPOSTINT('typent_id'); |
|
378 | 378 | |
379 | 379 | $object->typent_code = dol_getIdFromCode($db, $object->typent_id, 'c_typent', 'id', 'code'); // Force typent_code too so check in verify() will be done on new type |
380 | 380 | |
@@ -383,18 +383,18 @@ discard block |
||
383 | 383 | $prospect = (GETPOSTINT('prospect') > 0 ? 2 : 0); |
384 | 384 | $prospectcustomer = $customer + $prospect; |
385 | 385 | |
386 | - $object->client = $prospectcustomer; |
|
387 | - $object->fournisseur = (GETPOSTINT('supplier') > 0 ? 1 : 0); |
|
386 | + $object->client = $prospectcustomer; |
|
387 | + $object->fournisseur = (GETPOSTINT('supplier') > 0 ? 1 : 0); |
|
388 | 388 | |
389 | - $object->commercial_id = GETPOSTINT('commercial_id'); |
|
390 | - $object->default_lang = GETPOST('default_lang'); |
|
389 | + $object->commercial_id = GETPOSTINT('commercial_id'); |
|
390 | + $object->default_lang = GETPOST('default_lang'); |
|
391 | 391 | |
392 | 392 | // Webservices url/key |
393 | 393 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
394 | 394 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
395 | 395 | |
396 | 396 | if (GETPOSTISSET('accountancy_code_sell')) { |
397 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
397 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
398 | 398 | |
399 | 399 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
400 | 400 | $object->accountancy_code_sell = ''; |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | } |
404 | 404 | } |
405 | 405 | if (GETPOSTISSET('accountancy_code_buy')) { |
406 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
406 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
407 | 407 | |
408 | 408 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
409 | 409 | $object->accountancy_code_buy = ''; |
@@ -874,7 +874,7 @@ discard block |
||
874 | 874 | } else { |
875 | 875 | $db->commit(); |
876 | 876 | $db->close(); |
877 | - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); |
|
877 | + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); |
|
878 | 878 | exit; |
879 | 879 | } |
880 | 880 | } else { |
@@ -1053,7 +1053,7 @@ discard block |
||
1053 | 1053 | } |
1054 | 1054 | |
1055 | 1055 | $object->phone = GETPOST('phone', 'alpha'); |
1056 | - $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
1056 | + $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
1057 | 1057 | $object->fax = GETPOST('fax', 'alpha'); |
1058 | 1058 | $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); |
1059 | 1059 | $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL); |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | $object->civility_id = GETPOST('civility_id', 'alpha'); |
1071 | 1071 | |
1072 | 1072 | $object->tva_assuj = GETPOSTINT('assujtva_value'); |
1073 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
1073 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
1074 | 1074 | $object->status = GETPOSTINT('status'); |
1075 | 1075 | |
1076 | 1076 | //Local Taxes |
@@ -1086,7 +1086,7 @@ discard block |
||
1086 | 1086 | $object->default_lang = GETPOST('default_lang'); |
1087 | 1087 | |
1088 | 1088 | if (GETPOSTISSET('accountancy_code_sell')) { |
1089 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1089 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1090 | 1090 | |
1091 | 1091 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
1092 | 1092 | $object->accountancy_code_sell = ''; |
@@ -1095,7 +1095,7 @@ discard block |
||
1095 | 1095 | } |
1096 | 1096 | } |
1097 | 1097 | if (GETPOSTISSET('accountancy_code_buy')) { |
1098 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1098 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1099 | 1099 | |
1100 | 1100 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
1101 | 1101 | $object->accountancy_code_buy = ''; |
@@ -1220,7 +1220,7 @@ discard block |
||
1220 | 1220 | |
1221 | 1221 | print '<script type="text/javascript">'; |
1222 | 1222 | print '$(document).ready(function () { |
1223 | - var canHaveCustomerCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1') . '; |
|
1223 | + var canHaveCustomerCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1').'; |
|
1224 | 1224 | |
1225 | 1225 | init_customer_categ(); |
1226 | 1226 | $("#customerprospect").change(function() { |
@@ -1292,7 +1292,7 @@ discard block |
||
1292 | 1292 | print '</td><td'.(!getDolGlobalString('SOCIETE_USEPREFIX') ? ' colspan="3"' : '').'>'; |
1293 | 1293 | |
1294 | 1294 | print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus">'; |
1295 | - print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
1295 | + print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
1296 | 1296 | // This implementation of the feature to search already existing company has been disabled. It must be implemented by keeping the "input text" and we must call the search ajax societe/ajax/ajaxcompanies.php |
1297 | 1297 | // on a keydown of the input. We should show data about a duplicate found if we found less than 5 answers into a div under the input. |
1298 | 1298 | /* |
@@ -1640,7 +1640,7 @@ discard block |
||
1640 | 1640 | print '<td></td>'; |
1641 | 1641 | print '<td></td>'; |
1642 | 1642 | } |
1643 | - print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
1643 | + print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
1644 | 1644 | print '<td class="individualline" '.(($conf->browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1).'</td>'; |
1645 | 1645 | print '</tr>'; |
1646 | 1646 | } |
@@ -1688,7 +1688,7 @@ discard block |
||
1688 | 1688 | // Vat is used |
1689 | 1689 | print '<tr><td><label for="assujtva_value">'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</label></td>'; |
1690 | 1690 | print '<td>'; |
1691 | - print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? (GETPOST('assujtva', 'alpha') != '' ? ' checked="checked"' : '') : 'checked="checked"') . ' value="1">'; // Assujeti par default en creation |
|
1691 | + print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.(GETPOSTISSET('assujtva_value') ? (GETPOST('assujtva', 'alpha') != '' ? ' checked="checked"' : '') : 'checked="checked"').' value="1">'; // Assujeti par default en creation |
|
1692 | 1692 | print '</td>'; |
1693 | 1693 | if ($conf->browser->layout == 'phone') { |
1694 | 1694 | print '</tr><tr>'; |
@@ -1729,7 +1729,7 @@ discard block |
||
1729 | 1729 | |
1730 | 1730 | // VAT reverse charge by default |
1731 | 1731 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
1732 | - print '<tr><td><label for="vat_reverse_charge">' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</label></td><td colspan="3">'; |
|
1732 | + print '<tr><td><label for="vat_reverse_charge">'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</label></td><td colspan="3">'; |
|
1733 | 1733 | print '<input type="checkbox" name="vat_reverse_charge" id="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
1734 | 1734 | print '</td></tr>'; |
1735 | 1735 | } |
@@ -1738,21 +1738,21 @@ discard block |
||
1738 | 1738 | //TODO: Place into a function to control showing by country or study better option |
1739 | 1739 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
1740 | 1740 | print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; |
1741 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">'; |
|
1741 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">'; |
|
1742 | 1742 | print '</td>'; |
1743 | 1743 | if ($conf->browser->layout == 'phone') { |
1744 | 1744 | print '</tr><tr>'; |
1745 | 1745 | } |
1746 | 1746 | print '<td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; |
1747 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">'; |
|
1747 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">'; |
|
1748 | 1748 | print '</td></tr>'; |
1749 | 1749 | } elseif ($mysoc->localtax1_assuj == "1") { |
1750 | 1750 | print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
1751 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">'; |
|
1751 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">'; |
|
1752 | 1752 | print '</td></tr>'; |
1753 | 1753 | } elseif ($mysoc->localtax2_assuj == "1") { |
1754 | 1754 | print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
1755 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">'; |
|
1755 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">'; |
|
1756 | 1756 | print '</td></tr>'; |
1757 | 1757 | } |
1758 | 1758 | |
@@ -1993,10 +1993,10 @@ discard block |
||
1993 | 1993 | } |
1994 | 1994 | |
1995 | 1995 | $object->phone = GETPOST('phone', 'alpha'); |
1996 | - $object->phone_mobile = (string) GETPOST('phone_mobile', 'alpha'); |
|
1996 | + $object->phone_mobile = (string) GETPOST('phone_mobile', 'alpha'); |
|
1997 | 1997 | $object->fax = GETPOST('fax', 'alpha'); |
1998 | 1998 | $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); |
1999 | - $object->no_email = GETPOSTINT("no_email"); |
|
1999 | + $object->no_email = GETPOSTINT("no_email"); |
|
2000 | 2000 | $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL); |
2001 | 2001 | $object->capital = GETPOST('capital', 'alphanohtml'); |
2002 | 2002 | $object->idprof1 = GETPOST('idprof1', 'alphanohtml'); |
@@ -2012,16 +2012,16 @@ discard block |
||
2012 | 2012 | $object->default_lang = GETPOST('default_lang', 'alpha'); |
2013 | 2013 | |
2014 | 2014 | $object->tva_assuj = GETPOSTINT('assujtva_value'); |
2015 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
2015 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
2016 | 2016 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
2017 | - $object->status = GETPOSTINT('status'); |
|
2017 | + $object->status = GETPOSTINT('status'); |
|
2018 | 2018 | |
2019 | 2019 | // Webservices url/key |
2020 | 2020 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
2021 | 2021 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
2022 | 2022 | |
2023 | 2023 | if (GETPOSTISSET('accountancy_code_sell')) { |
2024 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
2024 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
2025 | 2025 | |
2026 | 2026 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
2027 | 2027 | $object->accountancy_code_sell = ''; |
@@ -2030,7 +2030,7 @@ discard block |
||
2030 | 2030 | } |
2031 | 2031 | } |
2032 | 2032 | if (GETPOSTISSET('accountancy_code_buy')) { |
2033 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
2033 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
2034 | 2034 | |
2035 | 2035 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
2036 | 2036 | $object->accountancy_code_buy = ''; |
@@ -2112,7 +2112,7 @@ discard block |
||
2112 | 2112 | } |
2113 | 2113 | }); |
2114 | 2114 | |
2115 | - var canHaveCustomerCategoryIfNotCustomerProspect = ' . (getDolGlobalInt('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '1' : '0') . '; |
|
2115 | + var canHaveCustomerCategoryIfNotCustomerProspect = ' . (getDolGlobalInt('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '1' : '0').'; |
|
2116 | 2116 | |
2117 | 2117 | init_customer_categ(); |
2118 | 2118 | $("#customerprospect").change(function() { |
@@ -2461,14 +2461,14 @@ discard block |
||
2461 | 2461 | |
2462 | 2462 | // VAT is used |
2463 | 2463 | print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td><td colspan="3">'; |
2464 | - print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . ($object->tva_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
2464 | + print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.($object->tva_assuj ? 'checked="checked"' : '').' value="1">'; |
|
2465 | 2465 | print '</td></tr>'; |
2466 | 2466 | |
2467 | 2467 | // Local Taxes |
2468 | 2468 | //TODO: Place into a function to control showing by country or study better option |
2469 | 2469 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
2470 | 2470 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td>'; |
2471 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
2471 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">'; |
|
2472 | 2472 | if (!isOnlyOneLocalTax(1)) { |
2473 | 2473 | print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
2474 | 2474 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
@@ -2477,7 +2477,7 @@ discard block |
||
2477 | 2477 | print '</td>'; |
2478 | 2478 | print '</tr><tr>'; |
2479 | 2479 | print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>'; |
2480 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1"></td></tr>'; |
|
2480 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1"></td></tr>'; |
|
2481 | 2481 | if (!isOnlyOneLocalTax(2)) { |
2482 | 2482 | print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
2483 | 2483 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
@@ -2486,7 +2486,7 @@ discard block |
||
2486 | 2486 | print '</td></tr>'; |
2487 | 2487 | } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") { |
2488 | 2488 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td colspan="3">'; |
2489 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
2489 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">'; |
|
2490 | 2490 | if (!isOnlyOneLocalTax(1)) { |
2491 | 2491 | print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
2492 | 2492 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
@@ -2495,7 +2495,7 @@ discard block |
||
2495 | 2495 | print '</td></tr>'; |
2496 | 2496 | } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") { |
2497 | 2497 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td colspan="3">'; |
2498 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
2498 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1">'; |
|
2499 | 2499 | if (!isOnlyOneLocalTax(2)) { |
2500 | 2500 | print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
2501 | 2501 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
@@ -2506,7 +2506,7 @@ discard block |
||
2506 | 2506 | |
2507 | 2507 | // VAT reverse charge by default |
2508 | 2508 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
2509 | - print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">'; |
|
2509 | + print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">'; |
|
2510 | 2510 | print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
2511 | 2511 | print '</td></tr>'; |
2512 | 2512 | } |
@@ -2675,7 +2675,7 @@ discard block |
||
2675 | 2675 | $maxfilesizearray = getMaxFileSizeArray(); |
2676 | 2676 | $maxmin = $maxfilesizearray['maxmin']; |
2677 | 2677 | if ($maxmin > 0) { |
2678 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
2678 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
2679 | 2679 | } |
2680 | 2680 | print '<input type="file" class="flat" name="photo" id="photoinput">'; |
2681 | 2681 | print '</td></tr>'; |
@@ -2906,7 +2906,7 @@ discard block |
||
2906 | 2906 | print '<tr><td>'; |
2907 | 2907 | print $form->textwithpicto($langs->trans('VATReverseChargeByDefault'), $langs->trans('VATReverseChargeByDefaultDesc')); |
2908 | 2908 | print '</td><td>'; |
2909 | - print '<input type="checkbox" name="vat_reverse_charge" ' . ($object->vat_reverse_charge == '1' ? ' checked' : '') . ' disabled>'; |
|
2909 | + print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').' disabled>'; |
|
2910 | 2910 | print '</td>'; |
2911 | 2911 | print '</tr>'; |
2912 | 2912 | } |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | require_once DOL_DOCUMENT_ROOT."/core/class/html.formcontract.class.php"; |
50 | 50 | require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"; |
51 | 51 | } |
52 | -if (getDolGlobalString('FICHEINTER_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_" . getDolGlobalString('FICHEINTER_ADDON').".php")) { |
|
53 | - require_once DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_" . getDolGlobalString('FICHEINTER_ADDON').'.php'; |
|
52 | +if (getDolGlobalString('FICHEINTER_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_".getDolGlobalString('FICHEINTER_ADDON').".php")) { |
|
53 | + require_once DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_".getDolGlobalString('FICHEINTER_ADDON').'.php'; |
|
54 | 54 | } |
55 | 55 | require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
56 | 56 | require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | $id = GETPOSTINT('id'); |
62 | 62 | $ref = GETPOST('ref', 'alpha'); |
63 | -$ref_client = GETPOST('ref_client', 'alpha'); |
|
63 | +$ref_client = GETPOST('ref_client', 'alpha'); |
|
64 | 64 | $socid = GETPOSTINT('socid'); |
65 | 65 | $contratid = GETPOSTINT('contratid'); |
66 | 66 | $action = GETPOST('action', 'alpha'); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->model_pdf : GETPOST('model', 'alpha'), $outputlangs); |
223 | 223 | } |
224 | 224 | |
225 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
225 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
226 | 226 | exit; |
227 | 227 | } else { |
228 | 228 | $mesg = $object->error; |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->model_pdf : GETPOST('model', 'alpha'), $outputlangs); |
248 | 248 | } |
249 | 249 | |
250 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
250 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
251 | 251 | exit; |
252 | 252 | } else { |
253 | 253 | $mesg = $object->error; |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->model_pdf : GETPOST('model', 'alpha'), $outputlangs); |
273 | 273 | } |
274 | 274 | |
275 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
275 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
276 | 276 | exit; |
277 | 277 | } else { |
278 | 278 | $mesg = $object->error; |
@@ -1123,7 +1123,7 @@ discard block |
||
1123 | 1123 | } else { |
1124 | 1124 | print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">'; |
1125 | 1125 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
1126 | - print '<input type="hidden" name="action" value="create">'; // We go back to create action |
|
1126 | + print '<input type="hidden" name="action" value="create">'; // We go back to create action |
|
1127 | 1127 | print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
1128 | 1128 | |
1129 | 1129 | print dol_get_fiche_head([]); |
@@ -1808,9 +1808,9 @@ discard block |
||
1808 | 1808 | // Sign |
1809 | 1809 | if ($object->statut > Fichinter::STATUS_DRAFT) { |
1810 | 1810 | if ($object->signed_status != Fichinter::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) { |
1811 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=sign&token=' . newToken() . '">' . $langs->trans("InterventionSign") . '</a></div>'; |
|
1811 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=sign&token='.newToken().'">'.$langs->trans("InterventionSign").'</a></div>'; |
|
1812 | 1812 | } else { |
1813 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=unsign&token=' . newToken() . '">' . $langs->trans("InterventionUnsign") . '</a></div>'; |
|
1813 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=unsign&token='.newToken().'">'.$langs->trans("InterventionUnsign").'</a></div>'; |
|
1814 | 1814 | } |
1815 | 1815 | } |
1816 | 1816 |