Passed
Push — dev ( f7d146...05f415 )
by Rafael
60:50
created
public/htdocs/societe/index.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 }
109 109
 $sql .= ' WHERE s.entity IN (' . getEntity('societe') . ')';
110 110
 if (!$user->hasRight('societe', 'client', 'voir')) {
111
-    $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . ((int)$user->id);
111
+    $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . ((int) $user->id);
112 112
 }
113 113
 if (!$user->hasRight('fournisseur', 'lire')) {
114 114
     $sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $thirdparty_static); // Note that $action and $object may have been modified by hook
119 119
 if (empty($reshook)) {
120 120
     if ($socid > 0) {
121
-        $sql .= " AND s.rowid = " . ((int)$socid);
121
+        $sql .= " AND s.rowid = " . ((int) $socid);
122 122
     }
123 123
 }
124 124
 $sql .= $hookmanager->resPrint;
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 $sql .= ", s.canvas, s.tms as date_modification, s.status as status";
293 293
 $sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
294 294
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
295
-    $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int)$conf->entity);
295
+    $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
296 296
 }
297 297
 // TODO Replace this
298 298
 if (!$user->hasRight('societe', 'client', 'voir')) {
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 }
301 301
 $sql .= ' WHERE s.entity IN (' . getEntity('societe') . ')';
302 302
 if (!$user->hasRight('societe', 'client', 'voir')) {
303
-    $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . ((int)$user->id);
303
+    $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . ((int) $user->id);
304 304
 }
305 305
 if (!$user->hasRight('fournisseur', 'lire')) {
306 306
     $sql .= " AND (s.fournisseur != 1 OR s.client != 0)";
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $thirdparty_static); // Note that $action and $object may have been modified by hook
311 311
 if (empty($reshook)) {
312 312
     if ($socid > 0) {
313
-        $sql .= " AND s.rowid = " . ((int)$socid);
313
+        $sql .= " AND s.rowid = " . ((int) $socid);
314 314
     }
315 315
 }
316 316
 $sql .= $hookmanager->resPrint;
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 $sql .= ", sp.address as caddress, sp.phone as cphone";
415 415
 $sql .= " FROM " . MAIN_DB_PREFIX . "societe as s, " . MAIN_DB_PREFIX . "socpeople as sp";
416 416
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
417
-    $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int)$conf->entity);
417
+    $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
418 418
 }
419 419
 // TODO Replace this
420 420
 if (!$user->hasRight('societe', 'client', 'voir')) {
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 }
423 423
 $sql .= ' WHERE s.entity IN (' . getEntity('societe') . ') AND sp.fk_soc = s.rowid';
424 424
 if (!$user->hasRight('societe', 'client', 'voir')) {
425
-    $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . ((int)$user->id);
425
+    $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . ((int) $user->id);
426 426
 }
427 427
 if (!$user->hasRight('fournisseur', 'lire')) {
428 428
     $sql .= " AND (s.fournisseur != 1 OR s.client != 0)";
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $thirdparty_static); // Note that $action and $object may have been modified by hook
433 433
 if (empty($reshook)) {
434 434
     if ($socid > 0) {
435
-        $sql .= " AND s.rowid = " . ((int)$socid);
435
+        $sql .= " AND s.rowid = " . ((int) $socid);
436 436
     }
437 437
 }
438 438
 $sql .= $hookmanager->resPrint;
Please login to merge, or discard this patch.
public/htdocs/societe/admin/societe.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
 $action = GETPOST('action', 'aZ09');
43 43
 $value = GETPOST('value', 'alpha');
44
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
44
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
45 45
 
46 46
 if (!$user->admin) {
47 47
     accessforbidden();
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
     $type = 'company';
120 120
     $sql = "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity, libelle, description)";
121
-    $sql .= " VALUES ('" . $db->escape($value) . "', '" . $db->escape($type) . "', " . ((int)$conf->entity) . ", ";
121
+    $sql .= " VALUES ('" . $db->escape($value) . "', '" . $db->escape($type) . "', " . ((int) $conf->entity) . ", ";
122 122
     $sql .= ($label ? "'" . $db->escape($label) . "'" : 'null') . ", ";
123 123
     $sql .= (!empty($scandir) ? "'" . $db->escape($scandir) . "'" : "null");
124 124
     $sql .= ")";
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 if ($action == 'del') {
134 134
     $type = 'company';
135 135
     $sql = "DELETE FROM " . MAIN_DB_PREFIX . "document_model";
136
-    $sql .= " WHERE nom='" . $db->escape($value) . "' AND type='" . $db->escape($type) . "' AND entity=" . ((int)$conf->entity);
136
+    $sql .= " WHERE nom='" . $db->escape($value) . "' AND type='" . $db->escape($type) . "' AND entity=" . ((int) $conf->entity);
137 137
     $resql = $db->query($sql);
138 138
     if (!$resql) {
139 139
         dol_print_error($db);
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
     $sql_del = "DELETE FROM " . MAIN_DB_PREFIX . "document_model";
155 155
     $sql_del .= " WHERE nom = '" . $db->escape(GETPOST('value', 'alpha')) . "'";
156 156
     $sql_del .= " AND type = '" . $db->escape($type) . "'";
157
-    $sql_del .= " AND entity = " . ((int)$conf->entity);
157
+    $sql_del .= " AND entity = " . ((int) $conf->entity);
158 158
     dol_syslog("societe.php " . $sql);
159 159
     $result1 = $db->query($sql_del);
160 160
 
161 161
     $sql = "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity, libelle, description)";
162
-    $sql .= " VALUES ('" . $db->escape($value) . "', '" . $db->escape($type) . "', " . ((int)$conf->entity) . ", ";
162
+    $sql .= " VALUES ('" . $db->escape($value) . "', '" . $db->escape($type) . "', " . ((int) $conf->entity) . ", ";
163 163
     $sql .= ($label ? "'" . $db->escape($label) . "'" : 'null') . ", ";
164 164
     $sql .= (!empty($scandir) ? "'" . $db->escape($scandir) . "'" : "null");
165 165
     $sql .= ")";
Please login to merge, or discard this patch.
public/htdocs/societe/consumption.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         print ' <span class="error">(' . $langs->trans("WrongCustomerCode") . ')</span>';
175 175
     }
176 176
     print '</td></tr>';
177
-    $sql = "SELECT count(*) as nb from " . MAIN_DB_PREFIX . "facture where fk_soc = " . ((int)$socid);
177
+    $sql = "SELECT count(*) as nb from " . MAIN_DB_PREFIX . "facture where fk_soc = " . ((int) $socid);
178 178
     $resql = $db->query($sql);
179 179
     if (!$resql) {
180 180
         dol_print_error($db);
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         print ' <span class="error">(' . $langs->trans("WrongSupplierCode") . ')</span>';
216 216
     }
217 217
     print '</td></tr>';
218
-    $sql = "SELECT count(*) as nb from " . MAIN_DB_PREFIX . "commande_fournisseur where fk_soc = " . ((int)$socid);
218
+    $sql = "SELECT count(*) as nb from " . MAIN_DB_PREFIX . "commande_fournisseur where fk_soc = " . ((int) $socid);
219 219
     $resql = $db->query($sql);
220 220
     if (!$resql) {
221 221
         dol_print_error($db);
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
     $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datec as dateprint, f.fk_statut as status, NULL as paid, ';
267 267
     $sql_select .= 'NULL as fk_product, NULL as info_bits, NULL as date_start, NULL as date_end, NULL as prod_qty, NULL as total_ht, ';
268 268
     $tables_from = MAIN_DB_PREFIX . "fichinter as f LEFT JOIN " . MAIN_DB_PREFIX . "fichinterdet as d ON d.fk_fichinter = f.rowid"; // Must use left join to work also with option that disable usage of lines.
269
-    $where = " WHERE f.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
269
+    $where = " WHERE f.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
270 270
     $where .= " AND f.entity = " . $conf->entity;
271 271
     $dateprint = 'f.datec';
272 272
     $doc_number = 'f.ref';
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     $documentstatic = new Facture($db);
276 276
     $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, d.fk_remise_except, ';
277 277
     $tables_from = MAIN_DB_PREFIX . "facture as f," . MAIN_DB_PREFIX . "facturedet as d";
278
-    $where = " WHERE f.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
278
+    $where = " WHERE f.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
279 279
     $where .= " AND d.fk_facture = f.rowid";
280 280
     $where .= " AND f.entity IN (" . getEntity('invoice') . ")";
281 281
     $dateprint = 'f.datef';
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     $documentstatic = new Propal($db);
287 287
     $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as dateprint, c.fk_statut as status, NULL as paid,';
288 288
     $tables_from = MAIN_DB_PREFIX . "propal as c," . MAIN_DB_PREFIX . "propaldet as d";
289
-    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
289
+    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
290 290
     $where .= " AND d.fk_propal = c.rowid";
291 291
     $where .= " AND c.entity = " . $conf->entity;
292 292
     $dateprint = 'c.datep';
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     $documentstatic = new Commande($db);
299 299
     $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, NULL as paid, c.date_livraison as delivery_planned_date,';
300 300
     $tables_from = MAIN_DB_PREFIX . "commande as c," . MAIN_DB_PREFIX . "commandedet as d";
301
-    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
301
+    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
302 302
     $where .= " AND d.fk_commande = c.rowid";
303 303
     $where .= " AND c.entity = " . $conf->entity;
304 304
     $dateprint = 'c.date_commande';
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     $documentstatic = new Expedition($db);
311 311
     $sql_select = 'SELECT e.rowid as doc_id, e.ref as doc_number, \'1\' as doc_type, e.date_creation as dateprint, e.fk_statut as status, NULL as paid, e.date_delivery as delivery_planned_date,';
312 312
     $tables_from = MAIN_DB_PREFIX . "expedition as e," . MAIN_DB_PREFIX . "expeditiondet as ed," . MAIN_DB_PREFIX . "commandedet as d";
313
-    $where = " WHERE e.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
313
+    $where = " WHERE e.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
314 314
     $where .= " AND ed.fk_expedition = e.rowid";
315 315
     $where .= " AND ed.element_type = 'commande' AND ed.fk_elementdet = d.rowid";
316 316
     $where .= " AND e.entity = " . $conf->entity;
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
     $documentstatic = new FactureFournisseur($db);
323 323
     $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, ';
324 324
     $tables_from = MAIN_DB_PREFIX . "facture_fourn as f," . MAIN_DB_PREFIX . "facture_fourn_det as d";
325
-    $where = " WHERE f.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
325
+    $where = " WHERE f.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
326 326
     $where .= " AND d.fk_facture_fourn = f.rowid";
327 327
     $where .= " AND f.entity = " . $conf->entity;
328 328
     $dateprint = 'f.datef';
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
     $documentstatic = new SupplierProposal($db);
334 334
     $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, NULL as paid, ';
335 335
     $tables_from = MAIN_DB_PREFIX . "supplier_proposal as c," . MAIN_DB_PREFIX . "supplier_proposaldet as d";
336
-    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
336
+    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
337 337
     $where .= " AND d.fk_supplier_proposal = c.rowid";
338 338
     $where .= " AND c.entity = " . $conf->entity;
339 339
     $dateprint = 'c.date_valid';
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     $documentstatic = new CommandeFournisseur($db);
346 346
     $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, NULL as paid, c.date_livraison as delivery_planned_date, ';
347 347
     $tables_from = MAIN_DB_PREFIX . "commande_fournisseur as c," . MAIN_DB_PREFIX . "commande_fournisseurdet as d";
348
-    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
348
+    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
349 349
     $where .= " AND d.fk_commande = c.rowid";
350 350
     $where .= " AND c.entity = " . $conf->entity;
351 351
     $dateprint = 'c.date_valid';
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
     $documentstatic = new Reception($db);
358 358
     $sql_select = 'SELECT r.rowid as doc_id, r.ref as doc_number, \'1\' as doc_type, r.date_creation as dateprint, r.fk_statut as status, NULL as paid, r.date_delivery as delivery_planned_date, ';
359 359
     $tables_from = MAIN_DB_PREFIX . "reception as r," . MAIN_DB_PREFIX . "receptiondet_batch as rd," . MAIN_DB_PREFIX . "commande_fournisseurdet as d";
360
-    $where = " WHERE r.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
360
+    $where = " WHERE r.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
361 361
     $where .= " AND rd.fk_reception = r.rowid";
362 362
     $where .= " AND rd.fk_elementdet = d.rowid AND rd.element_type = 'supplier_order'";
363 363
     $where .= " AND r.entity = " . $conf->entity;
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
     $documentstaticline = new ContratLigne($db);
371 371
     $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, NULL as paid,';
372 372
     $tables_from = MAIN_DB_PREFIX . "contrat as c," . MAIN_DB_PREFIX . "contratdet as d";
373
-    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int)$socid);
373
+    $where = " WHERE c.fk_soc = s.rowid AND s.rowid = " . ((int) $socid);
374 374
     $where .= " AND d.fk_contrat = c.rowid";
375 375
     $where .= " AND c.entity = " . $conf->entity;
376 376
     $dateprint = 'c.date_valid';
@@ -459,12 +459,12 @@  discard block
 block discarded – undo
459 459
 
460 460
     $num = $db->num_rows($resql);
461 461
 
462
-    $param = "&socid=" . urlencode((string)($socid)) . "&type_element=" . urlencode((string)($type_element));
462
+    $param = "&socid=" . urlencode((string) ($socid)) . "&type_element=" . urlencode((string) ($type_element));
463 463
     if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
464 464
         $param .= '&contextpage=' . urlencode($contextpage);
465 465
     }
466 466
     if ($limit > 0 && $limit != $conf->liste_limit) {
467
-        $param .= '&limit=' . ((int)$limit);
467
+        $param .= '&limit=' . ((int) $limit);
468 468
     }
469 469
     if ($sprod_fulldescr) {
470 470
         $param .= "&sprod_fulldescr=" . urlencode($sprod_fulldescr);
@@ -473,10 +473,10 @@  discard block
 block discarded – undo
473 473
         $param .= "&sref=" . urlencode($sref);
474 474
     }
475 475
     if ($month) {
476
-        $param .= "&month=" . urlencode((string)($month));
476
+        $param .= "&month=" . urlencode((string) ($month));
477 477
     }
478 478
     if ($year) {
479
-        $param .= "&year=" . urlencode((string)($year));
479
+        $param .= "&year=" . urlencode((string) ($year));
480 480
     }
481 481
     if ($optioncss) {
482 482
         $param .= '&optioncss=' . urlencode($optioncss);
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 
725 725
         print '<td class="right"><span class="amount">' . price($objp->total_ht) . '</span></td>';
726 726
 
727
-        $total_ht += (float)$objp->total_ht;
727
+        $total_ht += (float) $objp->total_ht;
728 728
 
729 729
         print '<td class="right">' . price($objp->total_ht / (empty($objp->prod_qty) ? 1 : $objp->prod_qty)) . '</td>';
730 730
 
Please login to merge, or discard this patch.
public/htdocs/societe/list.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -135,20 +135,20 @@  discard block
 block discarded – undo
135 135
 $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth');
136 136
 $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear');
137 137
 $search_date_creation_startday = GETPOSTINT('search_date_creation_startday');
138
-$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear);   // Use tzserver
138
+$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver
139 139
 $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth');
140 140
 $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear');
141 141
 $search_date_creation_endday = GETPOSTINT('search_date_creation_endday');
142
-$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear);    // Use tzserver
142
+$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver
143 143
 
144 144
 $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth');
145 145
 $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear');
146 146
 $search_date_modif_startday = GETPOSTINT('search_date_modif_startday');
147
-$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear);   // Use tzserver
147
+$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver
148 148
 $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth');
149 149
 $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear');
150 150
 $search_date_modif_endday = GETPOSTINT('search_date_modif_endday');
151
-$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear);    // Use tzserver
151
+$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver
152 152
 
153 153
 $type = GETPOST('type', 'alpha');
154 154
 $place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
 $object->fields = dol_sort_array($object->fields, 'position');
324 324
 $arrayfields = dol_sort_array($arrayfields, 'position');
325
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
325
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
326 326
 
327 327
 // Security check
328 328
 $socid = GETPOSTINT('socid');
@@ -351,11 +351,11 @@  discard block
 block discarded – undo
351 351
         $invoice->module_source = 'takepos';
352 352
         $invoice->pos_source = $_SESSION["takeposterminal"];
353 353
         $placeid = $invoice->create($user);
354
-        $sql = "UPDATE " . MAIN_DB_PREFIX . "facture set ref='(PROV-POS" . $_SESSION["takeposterminal"] . "-" . $place . ")' where rowid = " . ((int)$placeid);
354
+        $sql = "UPDATE " . MAIN_DB_PREFIX . "facture set ref='(PROV-POS" . $_SESSION["takeposterminal"] . "-" . $place . ")' where rowid = " . ((int) $placeid);
355 355
         $db->query($sql);
356 356
     }
357 357
 
358
-    $sql = "UPDATE " . MAIN_DB_PREFIX . "facture set fk_soc=" . ((int)$idcustomer) . " where ref='(PROV-POS" . $_SESSION["takeposterminal"] . "-" . $place . ")'";
358
+    $sql = "UPDATE " . MAIN_DB_PREFIX . "facture set fk_soc=" . ((int) $idcustomer) . " where ref='(PROV-POS" . $_SESSION["takeposterminal"] . "-" . $place . ")'";
359 359
     $resql = $db->query($sql); ?>
360 360
     <script>
361 361
         console.log("Reload page invoice.php with place=<?php print $place; ?>");
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
     if ($search_sale == -2) {
597 597
         $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = s.rowid)";
598 598
     } elseif ($search_sale > 0) {
599
-        $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = s.rowid AND sc.fk_user = " . ((int)$search_sale) . ")";
599
+        $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = s.rowid AND sc.fk_user = " . ((int) $search_sale) . ")";
600 600
     }
601 601
 }
602 602
 
@@ -609,9 +609,9 @@  discard block
 block discarded – undo
609 609
             $searchCategoryCustomerSqlList[] = "NOT EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_societe as ck WHERE s.rowid = ck.fk_soc)";
610 610
         } elseif (intval($searchCategoryCustomer) > 0) {
611 611
             if ($searchCategoryCustomerOperator == 0) {
612
-                $searchCategoryCustomerSqlList[] = " EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_societe as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = " . ((int)$searchCategoryCustomer) . ")";
612
+                $searchCategoryCustomerSqlList[] = " EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_societe as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = " . ((int) $searchCategoryCustomer) . ")";
613 613
             } else {
614
-                $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int)$searchCategoryCustomer);
614
+                $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int) $searchCategoryCustomer);
615 615
             }
616 616
         }
617 617
     }
@@ -638,9 +638,9 @@  discard block
 block discarded – undo
638 638
             $searchCategorySupplierSqlList[] = "NOT EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc)";
639 639
         } elseif (intval($searchCategorySupplier) > 0) {
640 640
             if ($searchCategorySupplierOperator == 0) {
641
-                $searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = " . ((int)$searchCategorySupplier) . ")";
641
+                $searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = " . ((int) $searchCategorySupplier) . ")";
642 642
             } else {
643
-                $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int)$searchCategorySupplier);
643
+                $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int) $searchCategorySupplier);
644 644
             }
645 645
         }
646 646
     }
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
 $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
808 808
 if (empty($reshook)) {
809 809
     if ($socid) {
810
-        $sql .= " AND s.rowid = " . ((int)$socid);
810
+        $sql .= " AND s.rowid = " . ((int) $socid);
811 811
     }
812 812
 }
813 813
 $sql .= $hookmanager->resPrint;
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
     $param .= '&contextpage=' . urlencode($contextpage);
897 897
 }
898 898
 if ($limit > 0 && $limit != $conf->liste_limit) {
899
-    $param .= '&limit=' . ((int)$limit);
899
+    $param .= '&limit=' . ((int) $limit);
900 900
 }
901 901
 if ($optioncss != '') {
902 902
     $param .= '&optioncss=' . urlencode($optioncss);
@@ -905,16 +905,16 @@  discard block
 block discarded – undo
905 905
     $param = "&search_all=" . urlencode($search_all);
906 906
 }
907 907
 if ($search_categ_cus > 0) {
908
-    $param .= '&search_categ_cus=' . urlencode((string)($search_categ_cus));
908
+    $param .= '&search_categ_cus=' . urlencode((string) ($search_categ_cus));
909 909
 }
910 910
 if ($search_categ_sup > 0) {
911
-    $param .= '&search_categ_sup=' . urlencode((string)($search_categ_sup));
911
+    $param .= '&search_categ_sup=' . urlencode((string) ($search_categ_sup));
912 912
 }
913 913
 if ($searchCategoryCustomerOperator == 1) {
914
-    $param .= "&search_category_customer_operator=" . urlencode((string)($searchCategoryCustomerOperator));
914
+    $param .= "&search_category_customer_operator=" . urlencode((string) ($searchCategoryCustomerOperator));
915 915
 }
916 916
 if ($searchCategorySupplierOperator == 1) {
917
-    $param .= "&search_category_supplier_operator=" . urlencode((string)($searchCategorySupplierOperator));
917
+    $param .= "&search_category_supplier_operator=" . urlencode((string) ($searchCategorySupplierOperator));
918 918
 }
919 919
 foreach ($searchCategoryCustomerList as $searchCategoryCustomer) {
920 920
     $param .= "&search_category_customer_list[]=" . urlencode($searchCategoryCustomer);
@@ -923,10 +923,10 @@  discard block
 block discarded – undo
923 923
     $param .= "&search_category_supplier_list[]=" . urlencode($searchCategorySupplier);
924 924
 }
925 925
 if ($search_sale > 0) {
926
-    $param .= '&search_sale=' . ((int)$search_sale);
926
+    $param .= '&search_sale=' . ((int) $search_sale);
927 927
 }
928 928
 if ($search_id > 0) {
929
-    $param .= "&search_id=" . ((int)$search_id);
929
+    $param .= "&search_id=" . ((int) $search_id);
930 930
 }
931 931
 if ($search_nom != '') {
932 932
     $param .= "&search_nom=" . urlencode($search_nom);
@@ -1007,13 +1007,13 @@  discard block
 block discarded – undo
1007 1007
     $param .= '&search_price_level=' . urlencode($search_price_level);
1008 1008
 }
1009 1009
 if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) {
1010
-    $param .= '&search_type_thirdparty=' . urlencode((string)($search_type_thirdparty));
1010
+    $param .= '&search_type_thirdparty=' . urlencode((string) ($search_type_thirdparty));
1011 1011
 }
1012 1012
 if ($search_type != '') {
1013 1013
     $param .= '&search_type=' . urlencode($search_type);
1014 1014
 }
1015 1015
 if ($search_status != '') {
1016
-    $param .= '&search_status=' . urlencode((string)($search_status));
1016
+    $param .= '&search_status=' . urlencode((string) ($search_status));
1017 1017
 }
1018 1018
 if (is_array($search_level) && count($search_level)) {
1019 1019
     foreach ($search_level as $slevel) {
@@ -1035,49 +1035,49 @@  discard block
 block discarded – undo
1035 1035
     $param .= '&type=' . urlencode($type);
1036 1036
 }
1037 1037
 if ($search_date_creation_startmonth) {
1038
-    $param .= '&search_date_creation_startmonth=' . urlencode((string)($search_date_creation_startmonth));
1038
+    $param .= '&search_date_creation_startmonth=' . urlencode((string) ($search_date_creation_startmonth));
1039 1039
 }
1040 1040
 if ($search_date_creation_startyear) {
1041
-    $param .= '&search_date_creation_startyear=' . urlencode((string)($search_date_creation_startyear));
1041
+    $param .= '&search_date_creation_startyear=' . urlencode((string) ($search_date_creation_startyear));
1042 1042
 }
1043 1043
 if ($search_date_creation_startday) {
1044
-    $param .= '&search_date_creation_startday=' . urlencode((string)($search_date_creation_startday));
1044
+    $param .= '&search_date_creation_startday=' . urlencode((string) ($search_date_creation_startday));
1045 1045
 }
1046 1046
 if ($search_date_creation_start) {
1047 1047
     $param .= '&search_date_creation_start=' . urlencode($search_date_creation_start);
1048 1048
 }
1049 1049
 if ($search_date_creation_endmonth) {
1050
-    $param .= '&search_date_creation_endmonth=' . urlencode((string)($search_date_creation_endmonth));
1050
+    $param .= '&search_date_creation_endmonth=' . urlencode((string) ($search_date_creation_endmonth));
1051 1051
 }
1052 1052
 if ($search_date_creation_endyear) {
1053
-    $param .= '&search_date_creation_endyear=' . urlencode((string)($search_date_creation_endyear));
1053
+    $param .= '&search_date_creation_endyear=' . urlencode((string) ($search_date_creation_endyear));
1054 1054
 }
1055 1055
 if ($search_date_creation_endday) {
1056
-    $param .= '&search_date_creation_endday=' . urlencode((string)($search_date_creation_endday));
1056
+    $param .= '&search_date_creation_endday=' . urlencode((string) ($search_date_creation_endday));
1057 1057
 }
1058 1058
 if ($search_date_creation_end) {
1059 1059
     $param .= '&search_date_creation_end=' . urlencode($search_date_creation_end);
1060 1060
 }
1061 1061
 if ($search_date_modif_startmonth) {
1062
-    $param .= '&search_date_modif_startmonth=' . urlencode((string)($search_date_modif_startmonth));
1062
+    $param .= '&search_date_modif_startmonth=' . urlencode((string) ($search_date_modif_startmonth));
1063 1063
 }
1064 1064
 if ($search_date_modif_startyear) {
1065
-    $param .= '&search_date_modif_startyear=' . urlencode((string)($search_date_modif_startyear));
1065
+    $param .= '&search_date_modif_startyear=' . urlencode((string) ($search_date_modif_startyear));
1066 1066
 }
1067 1067
 if ($search_date_modif_startday) {
1068
-    $param .= '&search_date_modif_startday=' . urlencode((string)($search_date_modif_startday));
1068
+    $param .= '&search_date_modif_startday=' . urlencode((string) ($search_date_modif_startday));
1069 1069
 }
1070 1070
 if ($search_date_modif_start) {
1071 1071
     $param .= '&search_date_modif_start=' . urlencode($search_date_modif_start);
1072 1072
 }
1073 1073
 if ($search_date_modif_endmonth) {
1074
-    $param .= '&search_date_modif_endmonth=' . urlencode((string)($search_date_modif_endmonth));
1074
+    $param .= '&search_date_modif_endmonth=' . urlencode((string) ($search_date_modif_endmonth));
1075 1075
 }
1076 1076
 if ($search_date_modif_endyear) {
1077
-    $param .= '&search_date_modif_endyear=' . urlencode((string)($search_date_modif_endyear));
1077
+    $param .= '&search_date_modif_endyear=' . urlencode((string) ($search_date_modif_endyear));
1078 1078
 }
1079 1079
 if ($search_date_modif_endday) {
1080
-    $param .= '&search_date_modif_endday=' . urlencode((string)($search_date_modif_endday));
1080
+    $param .= '&search_date_modif_endday=' . urlencode((string) ($search_date_modif_endday));
1081 1081
 }
1082 1082
 if ($search_date_modif_end) {
1083 1083
     $param .= '&search_date_modif_end=' . urlencode($search_date_modif_end);
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
 }
1261 1261
 
1262 1262
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1263
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1263
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1264 1264
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1265 1265
 $selectedfields .= ((count($arrayofmassactions) && $contextpage != 'poslist') ? $form->showCheckAddButtons('checkforselect', 1) : '');
1266 1266
 
@@ -1704,19 +1704,19 @@  discard block
 block discarded – undo
1704 1704
 print $hookmanager->resPrint;
1705 1705
 if (!empty($arrayfields['s.datec']['checked'])) {
1706 1706
     print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER["PHP_SELF"], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1707
-    $totalarray['nbfield']++;   // For the column action
1707
+    $totalarray['nbfield']++; // For the column action
1708 1708
 }
1709 1709
 if (!empty($arrayfields['s.tms']['checked'])) {
1710 1710
     print_liste_field_titre($arrayfields['s.tms']['label'], $_SERVER["PHP_SELF"], "s.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1711
-    $totalarray['nbfield']++;   // For the column action
1711
+    $totalarray['nbfield']++; // For the column action
1712 1712
 }
1713 1713
 if (!empty($arrayfields['s.status']['checked'])) {
1714 1714
     print_liste_field_titre($arrayfields['s.status']['label'], $_SERVER["PHP_SELF"], "s.status", "", $param, '', $sortfield, $sortorder, 'center ');
1715
-    $totalarray['nbfield']++;   // For the column action
1715
+    $totalarray['nbfield']++; // For the column action
1716 1716
 }
1717 1717
 if (!empty($arrayfields['s.import_key']['checked'])) {
1718 1718
     print_liste_field_titre($arrayfields['s.import_key']['label'], $_SERVER["PHP_SELF"], "s.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
1719
-    $totalarray['nbfield']++;   // For the column action
1719
+    $totalarray['nbfield']++; // For the column action
1720 1720
 }
1721 1721
 // Action column
1722 1722
 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
Please login to merge, or discard this patch.
public/htdocs/societe/agenda.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,12 +194,12 @@
 block discarded – undo
194 194
 if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
195 195
     print '<br>';
196 196
 
197
-    $param = '&socid=' . urlencode((string)($socid));
197
+    $param = '&socid=' . urlencode((string) ($socid));
198 198
     if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
199 199
         $param .= '&contextpage=' . urlencode($contextpage);
200 200
     }
201 201
     if ($limit > 0 && $limit != $conf->liste_limit) {
202
-        $param .= '&limit=' . ((int)$limit);
202
+        $param .= '&limit=' . ((int) $limit);
203 203
     }
204 204
 
205 205
     // Try to know count of actioncomm from cache
Please login to merge, or discard this patch.
public/htdocs/societe/price.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                 $sql = "SELECT t.rowid, t.code, t.recuperableonly, t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type";
125 125
                 $sql .= " FROM " . MAIN_DB_PREFIX . "c_tva as t, " . MAIN_DB_PREFIX . "c_country as c";
126 126
                 $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '" . $db->escape($mysoc->country_code) . "'";
127
-                $sql .= " AND t.taux = " . ((float)$tva_tx) . " AND t.active = 1";
127
+                $sql .= " AND t.taux = " . ((float) $tva_tx) . " AND t.active = 1";
128 128
                 $sql .= " AND t.code = '" . $db->escape($vatratecode) . "'";
129 129
                 $sql .= " AND t.entity IN (" . getEntity('c_tva') . ")";
130 130
                 $resql = $db->query($sql);
@@ -545,11 +545,11 @@  discard block
 block discarded – undo
545 545
         foreach ($prodcustprice->fields as $key => $val) {
546 546
             // If $val['visible']==0, then we never show the field
547 547
             if (!empty($val['visible'])) {
548
-                $visible = (int)dol_eval($val['visible'], 1, 1, '1');
548
+                $visible = (int) dol_eval($val['visible'], 1, 1, '1');
549 549
                 $arrayfields['t.' . $key] = array(
550 550
                     'label' => $val['label'],
551 551
                     'checked' => (($visible < 0) ? 0 : 1),
552
-                    'enabled' => (abs($visible) != 3 && (int)dol_eval($val['enabled'], 1, 1, '1')),
552
+                    'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')),
553 553
                     'position' => $val['position'],
554 554
                     'help' => isset($val['help']) ? $val['help'] : ''
555 555
                 );
Please login to merge, or discard this patch.
public/htdocs/societe/card.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
     if ($action == 'confirm_merge' && $confirm == 'yes' && $user->hasRight('societe', 'creer')) {
198 198
         $soc_origin_id = GETPOSTINT('soc_origin');
199
-        $soc_origin = new Societe($db);     // The thirdparty that we will delete
199
+        $soc_origin = new Societe($db); // The thirdparty that we will delete
200 200
 
201 201
         if ($soc_origin_id <= 0) {
202 202
             $langs->load('errors');
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
             }
336 336
 
337 337
             $object->phone = GETPOST('phone', 'alpha');
338
-            $object->phone_mobile = (string)GETPOST("phone_mobile", 'alpha');
338
+            $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha');
339 339
             $object->fax = GETPOST('fax', 'alpha');
340 340
             $object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL));
341 341
             $object->no_email = GETPOSTINT("no_email");
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
                     }
594 594
 
595 595
                     if (!empty($backtopage)) {
596
-                        $backtopage = preg_replace('/--IDFORBACKTOPAGE--/', (string)$object->id, $backtopage); // New method to autoselect project after a New on another form object creation
596
+                        $backtopage = preg_replace('/--IDFORBACKTOPAGE--/', (string) $object->id, $backtopage); // New method to autoselect project after a New on another form object creation
597 597
                         if (preg_match('/\?/', $backtopage)) {
598 598
                             $backtopage .= '&socid=' . $object->id; // Old method
599 599
                         }
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
                 // Update linked member
750 750
                 if (!$error && isset($object->fk_soc) && $object->fk_soc > 0) {
751 751
                     $sql = "UPDATE " . MAIN_DB_PREFIX . "adherent";
752
-                    $sql .= " SET fk_soc = NULL WHERE fk_soc = " . ((int)$socid);
752
+                    $sql .= " SET fk_soc = NULL WHERE fk_soc = " . ((int) $socid);
753 753
                     if (!$object->db->query($sql)) {
754 754
                         $error++;
755 755
                         $object->error .= $object->db->lasterror();
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
         }
988 988
 
989 989
         $object->phone = GETPOST('phone', 'alpha');
990
-        $object->phone_mobile = (string)GETPOST("phone_mobile", 'alpha');
990
+        $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha');
991 991
         $object->fax = GETPOST('fax', 'alpha');
992 992
         $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
993 993
         $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
@@ -1226,7 +1226,7 @@  discard block
 block discarded – undo
1226 1226
             print '</td><td' . (!getDolGlobalString('SOCIETE_USEPREFIX') ? ' colspan="3"' : '') . '>';
1227 1227
 
1228 1228
             print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="' . dol_escape_htmltag($object->name) . '" autofocus="autofocus">';
1229
-            print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300');   // For some countries that need the company name in 2 languages
1229
+            print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages
1230 1230
             // 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
1231 1231
             // 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.
1232 1232
             /*
@@ -1874,7 +1874,7 @@  discard block
 block discarded – undo
1874 1874
                 }
1875 1875
 
1876 1876
                 $object->phone = GETPOST('phone', 'alpha');
1877
-                $object->phone_mobile = (string)GETPOST('phone_mobile', 'alpha');
1877
+                $object->phone_mobile = (string) GETPOST('phone_mobile', 'alpha');
1878 1878
                 $object->fax = GETPOST('fax', 'alpha');
1879 1879
                 $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
1880 1880
                 $object->no_email = GETPOSTINT("no_email");
@@ -2536,7 +2536,7 @@  discard block
 block discarded – undo
2536 2536
                     $maxfilesizearray = getMaxFileSizeArray();
2537 2537
                     $maxmin = $maxfilesizearray['maxmin'];
2538 2538
                     if ($maxmin > 0) {
2539
-                        print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
2539
+                        print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
2540 2540
                     }
2541 2541
                     print '<input type="file" class="flat" name="photo" id="photoinput">';
2542 2542
                     print '</td></tr>';
Please login to merge, or discard this patch.
public/htdocs/societe/societecontact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@
 block discarded – undo
220 220
             $sql .= " t.libelle as type_label, t.subscription";
221 221
             $sql .= " FROM " . MAIN_DB_PREFIX . "adherent as d";
222 222
             $sql .= ", " . MAIN_DB_PREFIX . "adherent_type as t";
223
-            $sql .= " WHERE d.fk_soc = " . ((int)$id);
223
+            $sql .= " WHERE d.fk_soc = " . ((int) $id);
224 224
             $sql .= " AND d.fk_adherent_type = t.rowid";
225 225
 
226 226
             dol_syslog("get list sql=" . $sql);
Please login to merge, or discard this patch.
public/htdocs/societe/notify/card.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
             $db->begin();
107 107
 
108 108
             $sql = "DELETE FROM " . MAIN_DB_PREFIX . "notify_def";
109
-            $sql .= " WHERE fk_soc=" . ((int)$socid) . " AND fk_contact=" . ((int)$contactid) . " AND fk_action=" . ((int)$actionid);
109
+            $sql .= " WHERE fk_soc=" . ((int) $socid) . " AND fk_contact=" . ((int) $contactid) . " AND fk_action=" . ((int) $actionid);
110 110
             if ($db->query($sql)) {
111 111
                 $sql = "INSERT INTO " . MAIN_DB_PREFIX . "notify_def (datec,fk_soc, fk_contact, fk_action)";
112
-                $sql .= " VALUES ('" . $db->idate($now) . "'," . ((int)$socid) . "," . ((int)$contactid) . "," . ((int)$actionid) . ")";
112
+                $sql .= " VALUES ('" . $db->idate($now) . "'," . ((int) $socid) . "," . ((int) $contactid) . "," . ((int) $actionid) . ")";
113 113
 
114 114
                 if (!$db->query($sql)) {
115 115
                     $error++;
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     $sql .= " " . MAIN_DB_PREFIX . "socpeople as c";
242 242
     $sql .= " WHERE a.rowid = n.fk_action";
243 243
     $sql .= " AND c.rowid = n.fk_contact";
244
-    $sql .= " AND c.fk_soc = " . ((int)$object->id);
244
+    $sql .= " AND c.fk_soc = " . ((int) $object->id);
245 245
 
246 246
     $resql = $db->query($sql);
247 247
     if ($resql) {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
     $sql .= " " . MAIN_DB_PREFIX . "notify as n ";
385 385
     $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "socpeople as c ON n.fk_contact = c.rowid";
386 386
     $sql .= " WHERE a.rowid = n.fk_action";
387
-    $sql .= " AND n.fk_soc = " . ((int)$object->id);
387
+    $sql .= " AND n.fk_soc = " . ((int) $object->id);
388 388
     $sql .= $db->order($sortfield, $sortorder);
389 389
 
390 390
     // Count total nb of records
Please login to merge, or discard this patch.