@@ -143,8 +143,8 @@ discard block |
||
143 | 143 | llxHeader('', $langs->trans("VATDeclarations")); |
144 | 144 | |
145 | 145 | $sql = 'SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.paye, t.fk_typepayment as type, t.fk_account,'; |
146 | -$sql.= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,'; |
|
147 | -$sql.= ' t.num_payment, pst.code as payment_code,'; |
|
146 | +$sql .= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,'; |
|
147 | +$sql .= ' t.num_payment, pst.code as payment_code,'; |
|
148 | 148 | $sql .= ' SUM(ptva.amount) as alreadypayed'; |
149 | 149 | $sql .= ' FROM '.MAIN_DB_PREFIX.'tva as t'; |
150 | 150 | $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as pst ON (t.fk_typepayment = pst.id)'; |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | // Amount |
510 | 510 | if (!empty($arrayfields['t.amount']['checked'])) { |
511 | 511 | $total = $total + $obj->amount; |
512 | - print '<td class="nowrap right"><span class="amount">' . price($obj->amount) . '</span></td>'; |
|
512 | + print '<td class="nowrap right"><span class="amount">'.price($obj->amount).'</span></td>'; |
|
513 | 513 | if (!$i) { |
514 | 514 | $totalarray['nbfield']++; |
515 | 515 | } |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | } |
519 | 519 | |
520 | 520 | if (!empty($arrayfields['t.status']['checked'])) { |
521 | - print '<td class="nowrap right">' . $tva_static->LibStatut($obj->paye, 5, $obj->alreadypayed) . '</td>'; |
|
521 | + print '<td class="nowrap right">'.$tva_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>'; |
|
522 | 522 | if (!$i) { |
523 | 523 | $totalarray['nbfield']++; |
524 | 524 | } |
@@ -311,14 +311,14 @@ |
||
311 | 311 | $importcsv = new ImportCsv($db, 'massstocklist'); |
312 | 312 | //print $importcsv->separator; |
313 | 313 | |
314 | - $nblinesrecord = $importcsv->import_get_nb_of_lines($fullpath)-1; |
|
314 | + $nblinesrecord = $importcsv->import_get_nb_of_lines($fullpath) - 1; |
|
315 | 315 | $importcsv->import_open_file($fullpath); |
316 | 316 | $labelsrecord = $importcsv->import_read_record(); |
317 | 317 | |
318 | 318 | if ($nblinesrecord < 1) { |
319 | 319 | setEventMessages($langs->trans("BadNumberOfLinesMustHaveAtLeastOneLinePlusTitle"), null, 'errors'); |
320 | 320 | } else { |
321 | - $i=0; |
|
321 | + $i = 0; |
|
322 | 322 | $data = array(); |
323 | 323 | $productstatic = new Product($db); |
324 | 324 | $warehousestatics = new Entrepot($db); |
@@ -286,19 +286,19 @@ |
||
286 | 286 | |
287 | 287 | // sort list |
288 | 288 | if ($sortfield == "name" && $sortorder == "asc") { |
289 | - usort($moduleList, function (stdClass $a, stdClass $b) { |
|
289 | + usort($moduleList, function(stdClass $a, stdClass $b) { |
|
290 | 290 | return strcasecmp($a->name, $b->name); |
291 | 291 | }); |
292 | 292 | } elseif ($sortfield == "name" && $sortorder == "desc") { |
293 | - usort($moduleList, function (stdClass $a, stdClass $b) { |
|
293 | + usort($moduleList, function(stdClass $a, stdClass $b) { |
|
294 | 294 | return strcasecmp($b->name, $a->name); |
295 | 295 | }); |
296 | 296 | } elseif ($sortfield == "version" && $sortorder == "asc") { |
297 | - usort($moduleList, function (stdClass $a, stdClass $b) { |
|
297 | + usort($moduleList, function(stdClass $a, stdClass $b) { |
|
298 | 298 | return strcasecmp($a->version, $b->version); |
299 | 299 | }); |
300 | 300 | } elseif ($sortfield == "version" && $sortorder == "desc") { |
301 | - usort($moduleList, function (stdClass $a, stdClass $b) { |
|
301 | + usort($moduleList, function(stdClass $a, stdClass $b) { |
|
302 | 302 | return strcasecmp($b->version, $a->version); |
303 | 303 | }); |
304 | 304 | } elseif ($sortfield == "id" && $sortorder == "asc") { |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * \brief Popup screen to validate VAT |
22 | 22 | */ |
23 | 23 | |
24 | -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
|
24 | +if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
|
25 | 25 | |
26 | 26 | require "../../main.inc.php"; |
27 | 27 | require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | global $conf, $dolibarr_main_authentication, $dolibarr_auto_user; |
60 | 60 | |
61 | 61 | // Is the login API disabled ? The token must be generated from backoffice only. |
62 | - if (! empty($conf->global->API_DISABLE_LOGIN_API)) { |
|
62 | + if (!empty($conf->global->API_DISABLE_LOGIN_API)) { |
|
63 | 63 | dol_syslog("Warning: A try to use the login API has been done while the login API is disabled. You must generate or get the token from the backoffice.", LOG_WARNING); |
64 | 64 | throw new RestException(403, "Error, the login API has been disabled for security purpose. You must generate or get the token from the backoffice."); |
65 | 65 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } |
92 | 92 | |
93 | 93 | include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; |
94 | - $login = checkLoginPassEntity($login, $password, $entity, $authmode, 'api'); // Check credentials. |
|
94 | + $login = checkLoginPassEntity($login, $password, $entity, $authmode, 'api'); // Check credentials. |
|
95 | 95 | if (empty($login)) { |
96 | 96 | throw new RestException(403, 'Access denied'); |
97 | 97 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | // Generate token for user |
115 | - $token = dol_hash($login.uniqid().(empty($conf->global->MAIN_API_KEY)?'':$conf->global->MAIN_API_KEY), 1); |
|
115 | + $token = dol_hash($login.uniqid().(empty($conf->global->MAIN_API_KEY) ? '' : $conf->global->MAIN_API_KEY), 1); |
|
116 | 116 | |
117 | 117 | // We store API token into database |
118 | 118 | $sql = "UPDATE ".MAIN_DB_PREFIX."user"; |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $socid = $user->socid; |
80 | 80 | } |
81 | 81 | |
82 | -$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known |
|
82 | +$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known |
|
83 | 83 | |
84 | 84 | |
85 | 85 |
@@ -264,17 +264,17 @@ |
||
264 | 264 | $r = 0; |
265 | 265 | // Add here entries to declare new permissions |
266 | 266 | /* BEGIN MODULEBUILDER PERMISSIONS */ |
267 | - $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used) |
|
267 | + $this->rights[$r][0] = $this->numero.sprintf("%02d", $r + 1); // Permission id (must not be already used) |
|
268 | 268 | $this->rights[$r][1] = 'Read objects of MyModule'; // Permission label |
269 | 269 | $this->rights[$r][4] = 'myobject'; |
270 | 270 | $this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->read) |
271 | 271 | $r++; |
272 | - $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used) |
|
272 | + $this->rights[$r][0] = $this->numero.sprintf("%02d", $r + 1); // Permission id (must not be already used) |
|
273 | 273 | $this->rights[$r][1] = 'Create/Update objects of MyModule'; // Permission label |
274 | 274 | $this->rights[$r][4] = 'myobject'; |
275 | 275 | $this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->write) |
276 | 276 | $r++; |
277 | - $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used) |
|
277 | + $this->rights[$r][0] = $this->numero.sprintf("%02d", $r + 1); // Permission id (must not be already used) |
|
278 | 278 | $this->rights[$r][1] = 'Delete objects of MyModule'; // Permission label |
279 | 279 | $this->rights[$r][4] = 'myobject'; |
280 | 280 | $this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->delete) |
@@ -51,10 +51,10 @@ |
||
51 | 51 | $constantes = array( |
52 | 52 | 'MEMBER_REMINDER_EMAIL'=>array('type'=>'yesno', 'label'=>$langs->trans('MEMBER_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"))), |
53 | 53 | 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>'emailtemplate:member', |
54 | - 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_AUTOREGISTER_MAIL |
|
55 | - 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_VALID |
|
56 | - 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_COTIS |
|
57 | - 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_RESIL |
|
54 | + 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_AUTOREGISTER_MAIL |
|
55 | + 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_VALID |
|
56 | + 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_COTIS |
|
57 | + 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_RESIL |
|
58 | 58 | 'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>'emailtemplate:member', |
59 | 59 | 'ADHERENT_MAIL_FROM' =>'string', |
60 | 60 | 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>'string', |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | if (empty($reshook)) { |
154 | - include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
154 | + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
155 | 155 | |
156 | 156 | // Purge search criteria |
157 | 157 | if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $objectclass = 'Account'; |
166 | 166 | $objectlabel = 'FinancialAccount'; |
167 | 167 | $uploaddir = $conf->banque->dir_output; |
168 | - include DOL_DOCUMENT_ROOT . '/core/actions_massactions.inc.php'; |
|
168 | + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /* |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | if ($user->rights->banque->modifier) { |
305 | 305 | $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); |
306 | 306 | } |
307 | -if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) { |
|
307 | +if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { |
|
308 | 308 | $arrayofmassactions = array(); |
309 | 309 | } |
310 | 310 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |