Completed
Branch develop (68d67a)
by
unknown
16:20
created
htdocs/core/modules/workstation/mod_workstation_standard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
  *  \ingroup    workstation
24 24
  *  \brief      File of class to manage Workstation numbering rules standard
25 25
  */
26
-require_once DOL_DOCUMENT_ROOT . '/core/modules/workstation/modules_workstation.php';
26
+require_once DOL_DOCUMENT_ROOT.'/core/modules/workstation/modules_workstation.php';
27 27
 
28 28
 /**
29 29
  * Class to manage the Standard numbering rule for Workstation
Please login to merge, or discard this patch.
htdocs/core/modules/product_batch/mod_sn_advanced.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
 			}
155 155
 		}
156 156
 
157
-		if (!$mask)	{
157
+		if (!$mask) {
158 158
 			$this->error = 'NotConfigured';
159 159
 			return 0;
160 160
 		}
Please login to merge, or discard this patch.
htdocs/core/modules/mailings/thirdparties_services_expired.modules.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,8 +135,8 @@
 block discarded – undo
135 135
 					'lastname' => $obj->name, // For thirdparties, lastname must be name
136 136
 					'firstname' => '', // For thirdparties, firstname is ''
137 137
 					'other' =>
138
-					('DateStart='.dol_print_date($this->db->jdate($obj->date_start_real), 'day')).';'.	// date start real
139
-					('DateEnd='.dol_print_date($this->db->jdate($obj->date_end), 'day')).';'.			// date end planned
138
+					('DateStart='.dol_print_date($this->db->jdate($obj->date_start_real), 'day')).';'.// date start real
139
+					('DateEnd='.dol_print_date($this->db->jdate($obj->date_end), 'day')).';'.// date end planned
140 140
 					('Contract='.$obj->fk_contrat).';'.
141 141
 					('ContactLine='.$obj->cdid),
142 142
 					'source_url' => $this->url($obj->id),
Please login to merge, or discard this patch.
htdocs/projet/tasks/time.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -788,7 +788,9 @@  discard block
 block discarded – undo
788 788
 if ($action == 'confirm_generateinter') {
789 789
 	$langs->load('interventions');
790 790
 
791
-	if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty();
791
+	if (!empty($projectstatic->socid)) {
792
+		$projectstatic->fetch_thirdparty();
793
+	}
792 794
 
793 795
 	if (!($projectstatic->thirdparty->id > 0)) {
794 796
 		setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors');
@@ -1561,7 +1563,9 @@  discard block
 block discarded – undo
1561 1563
 			if (empty($search_user)) {
1562 1564
 				$search_user = $user->id;
1563 1565
 			}
1564
-			if ($search_user > 0) $sql .= " AND t.fk_user = ".((int) $search_user);
1566
+			if ($search_user > 0) {
1567
+				$sql .= " AND t.fk_user = ".((int) $search_user);
1568
+			}
1565 1569
 		}
1566 1570
 
1567 1571
 		if ($search_note) {
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php';
41 41
 
42 42
 // Load translation files required by the page
43
-$langsLoad=array('projects', 'bills', 'orders', 'companies');
43
+$langsLoad = array('projects', 'bills', 'orders', 'companies');
44 44
 if (isModEnabled('eventorganization')) {
45
-	$langsLoad[]='eventorganization';
45
+	$langsLoad[] = 'eventorganization';
46 46
 }
47 47
 
48 48
 $langs->loadLangs($langsLoad);
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
 $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
55 55
 $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'timespentlist'; // To manage different context of search
56 56
 $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
57
-$optioncss	= GETPOST('optioncss', 'alpha');
57
+$optioncss = GETPOST('optioncss', 'alpha');
58 58
 $mode       = GETPOST('mode', 'alpha');
59 59
 
60 60
 $id			= GETPOST('id', 'int');
61
-$projectid	= GETPOST('projectid', 'int');
61
+$projectid = GETPOST('projectid', 'int');
62 62
 $ref		= GETPOST('ref', 'alpha');
63 63
 $withproject = GETPOST('withproject', 'int');
64 64
 $project_ref = GETPOST('project_ref', 'alpha');
@@ -354,10 +354,10 @@  discard block
 block discarded – undo
354 354
 }
355 355
 
356 356
 if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) {
357
-	$object->fetchTimeSpent(GETPOST('lineid', 'int'));	// load properties like $object->timespent_xxx
357
+	$object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_xxx
358 358
 
359 359
 	if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
360
-		$result = $object->delTimeSpent($user);	// delete line with $object->timespent_id
360
+		$result = $object->delTimeSpent($user); // delete line with $object->timespent_id
361 361
 
362 362
 		if ($result < 0) {
363 363
 			$langs->load("errors");
@@ -432,13 +432,13 @@  discard block
 block discarded – undo
432 432
 		$product_data_cache = array();
433 433
 		if ($idprod > 0) {
434 434
 			$tmpproduct->fetch($idprod);
435
-			if ($result<0) {
435
+			if ($result < 0) {
436 436
 				$error++;
437 437
 				setEventMessages($tmpproduct->error, $tmpproduct->errors, 'errors');
438 438
 			}
439 439
 
440
-			$prodDurationHoursBase=$tmpproduct->getProductDurationHours();
441
-			if ($prodDurationHoursBase<0) {
440
+			$prodDurationHoursBase = $tmpproduct->getProductDurationHours();
441
+			if ($prodDurationHoursBase < 0) {
442 442
 				$error++;
443 443
 				$langs->load("errors");
444 444
 				setEventMessages(null, $tmpproduct->errors, 'errors');
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 				$arrayoftasks = array();
482 482
 				foreach ($toselect as $key => $value) {
483 483
 					// Get userid, timepent
484
-					$object->fetchTimeSpent($value);	// $value is ID of 1 line in timespent table
484
+					$object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table
485 485
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
486 486
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
487 487
 				}
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
 
514 514
 						// Add lines
515 515
 						$prodDurationHours = $prodDurationHoursBase;
516
-						$idprodline=$idprod;
516
+						$idprodline = $idprod;
517 517
 						$pu_htline = $pu_ht;
518 518
 						$txtvaline = $txtva;
519 519
 						$localtax1line = $localtax1;
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 								$localtax1line = $dataforprice['localtax1'];
542 542
 								$localtax2line = $dataforprice['localtax2'];
543 543
 
544
-								$product_data_cache[$fk_product] = array('duration'=>$prodDurationHours,'dataforprice'=>$dataforprice);
544
+								$product_data_cache[$fk_product] = array('duration'=>$prodDurationHours, 'dataforprice'=>$dataforprice);
545 545
 							} else {
546 546
 								$prodDurationHours = $product_data_cache[$fk_product]['duration'];
547 547
 								$pu_htline = empty($product_data_cache[$fk_product]['dataforprice']['pu_ht']) ? 0 : $product_data_cache[$fk_product]['dataforprice']['pu_ht'];
@@ -549,12 +549,12 @@  discard block
 block discarded – undo
549 549
 								$localtax1line = $product_data_cache[$fk_product]['dataforprice']['localtax1'];
550 550
 								$localtax2line = $product_data_cache[$fk_product]['dataforprice']['localtax2'];
551 551
 							}
552
-							$idprodline=$fk_product;
552
+							$idprodline = $fk_product;
553 553
 						}
554 554
 
555 555
 						// Add lines
556 556
 						$lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0));
557
-						if ($lineid<0) {
557
+						if ($lineid < 0) {
558 558
 							$error++;
559 559
 							setEventMessages(null, $tmpinvoice->errors, 'errors');
560 560
 						}
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 			} elseif ($generateinvoicemode == 'onelineperperiod') {	// One line for each time spent line
574 574
 				$arrayoftasks = array();
575 575
 
576
-				$withdetail=GETPOST('detail_time_duration', 'alpha');
576
+				$withdetail = GETPOST('detail_time_duration', 'alpha');
577 577
 				foreach ($toselect as $key => $value) {
578 578
 					// Get userid, timepent
579 579
 					$object->fetchTimeSpent($value);
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 
587 587
 					$arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration;
588 588
 					$arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm;
589
-					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username.($object->timespent_note ? ' - '.$object->timespent_note : '');		// TODO Add user name in note
589
+					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username.($object->timespent_note ? ' - '.$object->timespent_note : ''); // TODO Add user name in note
590 590
 					if (!empty($withdetail)) {
591 591
 						if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) {
592 592
 							$arrayoftasks[$object->timespent_id]['note'] .= "<br/>";
@@ -595,9 +595,9 @@  discard block
 block discarded – undo
595 595
 						}
596 596
 
597 597
 						if (!empty($object->timespent_withhour)) {
598
-							$arrayoftasks[$object->timespent_id]['note'] .= $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour);
598
+							$arrayoftasks[$object->timespent_id]['note'] .= $langs->trans("Date").': '.dol_print_date($object->timespent_datehour);
599 599
 						} else {
600
-							$arrayoftasks[$object->timespent_id]['note'] .= $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date);
600
+							$arrayoftasks[$object->timespent_id]['note'] .= $langs->trans("Date").': '.dol_print_date($object->timespent_date);
601 601
 						}
602 602
 						$arrayoftasks[$object->timespent_id]['note'] .= ' - '.$langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
603 603
 					}
@@ -619,13 +619,13 @@  discard block
 block discarded – undo
619 619
 
620 620
 					// Add lines
621 621
 					$prodDurationHours = $prodDurationHoursBase;
622
-					$idprodline=$idprod;
622
+					$idprodline = $idprod;
623 623
 					$pu_htline = $pu_ht;
624 624
 					$txtvaline = $txtva;
625 625
 					$localtax1line = $localtax1;
626 626
 					$localtax2line = $localtax2;
627 627
 
628
-					if (!empty($value['fk_product']) && $value['fk_product']!==$idprod) {
628
+					if (!empty($value['fk_product']) && $value['fk_product'] !== $idprod) {
629 629
 						if (!array_key_exists($value['fk_product'], $product_data_cache)) {
630 630
 							$result = $tmpproduct->fetch($value['fk_product']);
631 631
 							if ($result < 0) {
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 							$localtax1line = $dataforprice['localtax1'];
647 647
 							$localtax2line = $dataforprice['localtax2'];
648 648
 
649
-							$product_data_cache[$value['fk_product']] = array('duration'=>$prodDurationHours,'dataforprice'=>$dataforprice);
649
+							$product_data_cache[$value['fk_product']] = array('duration'=>$prodDurationHours, 'dataforprice'=>$dataforprice);
650 650
 						} else {
651 651
 							$prodDurationHours = $product_data_cache[$value['fk_product']]['duration'];
652 652
 							$pu_htline = empty($product_data_cache[$value['fk_product']]['dataforprice']['pu_ht']) ? 0 : $product_data_cache[$value['fk_product']]['dataforprice']['pu_ht'];
@@ -654,10 +654,10 @@  discard block
 block discarded – undo
654 654
 							$localtax1line = $product_data_cache[$value['fk_product']]['dataforprice']['localtax1'];
655 655
 							$localtax2line = $product_data_cache[$value['fk_product']]['dataforprice']['localtax2'];
656 656
 						}
657
-						$idprodline=$value['fk_product'];
657
+						$idprodline = $value['fk_product'];
658 658
 					}
659 659
 					$lineid = $tmpinvoice->addline($value['note'], $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0));
660
-					if ($lineid<0) {
660
+					if ($lineid < 0) {
661 661
 						$error++;
662 662
 						setEventMessages(null, $tmpinvoice->errors, 'errors');
663 663
 					}
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
 				$arrayoftasks = array();
678 678
 				foreach ($toselect as $key => $value) {
679 679
 					// Get userid, timepent
680
-					$object->fetchTimeSpent($value);		// Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object)
680
+					$object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object)
681 681
 					// $object->id is now the task id
682 682
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
683 683
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
@@ -693,13 +693,13 @@  discard block
 block discarded – undo
693 693
 
694 694
 						// Add lines
695 695
 						$prodDurationHours = $prodDurationHoursBase;
696
-						$idprodline=$idprod;
696
+						$idprodline = $idprod;
697 697
 						$pu_htline = $pu_ht;
698 698
 						$txtvaline = $txtva;
699 699
 						$localtax1line = $localtax1;
700 700
 						$localtax2line = $localtax2;
701 701
 
702
-						if (!empty($fk_product) && $fk_product!==$idprod) {
702
+						if (!empty($fk_product) && $fk_product !== $idprod) {
703 703
 							if (!array_key_exists($fk_product, $product_data_cache)) {
704 704
 								$result = $tmpproduct->fetch($fk_product);
705 705
 								if ($result < 0) {
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
 								$localtax1line = $dataforprice['localtax1'];
721 721
 								$localtax2line = $dataforprice['localtax2'];
722 722
 
723
-								$product_data_cache[$fk_product] = array('duration'=>$prodDurationHours,'dataforprice'=>$dataforprice);
723
+								$product_data_cache[$fk_product] = array('duration'=>$prodDurationHours, 'dataforprice'=>$dataforprice);
724 724
 							} else {
725 725
 								$prodDurationHours = $product_data_cache[$fk_product]['duration'];
726 726
 								$pu_htline = empty($product_data_cache[$fk_product]['dataforprice']['pu_ht']) ? 0 : $product_data_cache[$fk_product]['dataforprice']['pu_ht'];
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
 								$localtax1line = $product_data_cache[$fk_product]['dataforprice']['localtax1'];
729 729
 								$localtax2line = $product_data_cache[$fk_product]['dataforprice']['localtax2'];
730 730
 							}
731
-							$idprodline=$fk_product;
731
+							$idprodline = $fk_product;
732 732
 						}
733 733
 
734 734
 
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
 						// Add lines
754 754
 						$date_start = '';
755 755
 						$date_end = '';
756
-						$lineName = $ftask->ref . ' - ' . $ftask->label;
756
+						$lineName = $ftask->ref.' - '.$ftask->label;
757 757
 						$lineid = $tmpinvoice->addline($lineName, $pu_ht_for_task, price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), 0, $date_start, $date_end, 0, 0, '', 'HT', 0, 1, -1, 0, '', 0, 0, null, $pa_ht);
758 758
 						if ($lineid < 0) {
759 759
 							$error++;
@@ -763,8 +763,8 @@  discard block
 block discarded – undo
763 763
 
764 764
 						if (!$error) {
765 765
 							// Update lineid into line of timespent
766
-							$sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id);
767
-							$sql .= ' WHERE rowid IN (' . $db->sanitize(join(',', $toselect)) . ')';
766
+							$sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id);
767
+							$sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).')';
768 768
 							$result = $db->query($sql);
769 769
 							if (!$result) {
770 770
 								$error++;
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 		$tmpinter->socid = $projectstatic->thirdparty->id;
818 818
 		$tmpinter->date = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
819 819
 		$tmpinter->fk_project = $projectstatic->id;
820
-		$tmpinter->description = $projectstatic->title . ( !empty($projectstatic->description) ? '-' . $projectstatic->label : '' );
820
+		$tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : '');
821 821
 
822 822
 		if ($interToUse) {
823 823
 			$tmpinter->fetch($interToUse);
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
 				$qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
851 851
 
852 852
 				// Add lines
853
-				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . ( !empty($value['note']) ? ' - ' . $value['note'] : '' ), $value['date'], $value['timespent']);
853
+				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']);
854 854
 			}
855 855
 		}
856 856
 
@@ -881,9 +881,9 @@  discard block
 block discarded – undo
881 881
 //$result = $projectstatic->fetch($object->fk_project);
882 882
 $arrayofselected = is_array($toselect) ? $toselect : array();
883 883
 
884
-$title = $object->ref . ' - ' . $langs->trans("TimeSpent");
884
+$title = $object->ref.' - '.$langs->trans("TimeSpent");
885 885
 if (!empty($withproject)) {
886
-	$title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '')  ;
886
+	$title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '');
887 887
 }
888 888
 $help_url = '';
889 889
 
@@ -1034,7 +1034,7 @@  discard block
 block discarded – undo
1034 1034
 			$cols = 2;
1035 1035
 			$savobject = $object;
1036 1036
 			$object = $projectstatic;
1037
-			include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
1037
+			include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
1038 1038
 			$object = $savobject;
1039 1039
 
1040 1040
 			print '</table>';
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
 				//'builddoc'=>$langs->trans("PDFMerge"),
1113 1113
 			);
1114 1114
 		}
1115
-		if ( isModEnabled('ficheinter') && $user->hasRight('ficheinter', 'creer')) {
1115
+		if (isModEnabled('ficheinter') && $user->hasRight('ficheinter', 'creer')) {
1116 1116
 			$langs->load("interventions");
1117 1117
 			$arrayofmassactions['generateinter'] = $langs->trans("GenerateInter");
1118 1118
 		}
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
 		}
1137 1137
 
1138 1138
 		$param = ($withproject ? '&withproject=1' : '');
1139
-		$param .= ($param ? '&' : '').'id='.$object->id;		// ID of task
1139
+		$param .= ($param ? '&' : '').'id='.$object->id; // ID of task
1140 1140
 		$linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : '';
1141 1141
 
1142 1142
 		if (!GETPOST('withproject') || empty($projectstatic->id)) {
@@ -1266,10 +1266,10 @@  discard block
 block discarded – undo
1266 1266
 		// Definition of fields for list
1267 1267
 		$arrayfields = array();
1268 1268
 		$arrayfields['t.element_date'] = array('label'=>$langs->trans("Date"), 'checked'=>1);
1269
-		$arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1','checked'=>1);
1269
+		$arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1', 'checked'=>1);
1270 1270
 		$arrayfields['s.name_alias'] = array('label'=>$langs->trans("AliasNameShort"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1');
1271 1271
 		if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) {	// Not a dedicated task
1272
-			if (! empty($allprojectforuser)) {
1272
+			if (!empty($allprojectforuser)) {
1273 1273
 				$arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1];
1274 1274
 				$arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1];
1275 1275
 			}
@@ -1642,13 +1642,13 @@  discard block
 block discarded – undo
1642 1642
 			if ($search_timespent_starthour || $search_timespent_startmin) {
1643 1643
 				$timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds
1644 1644
 				$timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds
1645
-				$sql .= " AND t.element_duration >= " . $timespent_duration_start;
1645
+				$sql .= " AND t.element_duration >= ".$timespent_duration_start;
1646 1646
 			}
1647 1647
 
1648 1648
 			if ($search_timespent_endhour || $search_timespent_endmin) {
1649 1649
 				$timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds
1650 1650
 				$timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds
1651
-				$sql .= " AND t.element_duration <= " . $timespent_duration_end;
1651
+				$sql .= " AND t.element_duration <= ".$timespent_duration_end;
1652 1652
 			}
1653 1653
 		}
1654 1654
 
@@ -2197,7 +2197,7 @@  discard block
 block discarded – undo
2197 2197
 					}
2198 2198
 					print $tmpproject->getNomUrl(1);
2199 2199
 					print '</td>';
2200
-					if (! $i) {
2200
+					if (!$i) {
2201 2201
 						$totalarray['nbfield']++;
2202 2202
 					}
2203 2203
 				}
@@ -2212,7 +2212,7 @@  discard block
 block discarded – undo
2212 2212
 					}
2213 2213
 					print $tmpproject->title;
2214 2214
 					print '</td>';
2215
-					if (! $i) {
2215
+					if (!$i) {
2216 2216
 						$totalarray['nbfield']++;
2217 2217
 					}
2218 2218
 				}
@@ -2388,7 +2388,7 @@  discard block
 block discarded – undo
2388 2388
 						if ($task_time->invoice_id) {
2389 2389
 							$result = $tmpinvoice->fetch($task_time->invoice_id);
2390 2390
 							if ($result > 0) {
2391
-								if ($action=='editline' && $_GET['lineid'] == $task_time->rowid) {
2391
+								if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) {
2392 2392
 									print $formproject->selectInvoiceAndLine($task_time->invoice_id, $task_time->invoice_line_id, 'invoiceid', 'invoicelineid', 'maxwidth500', array('p.rowid'=>$projectstatic->id));
2393 2393
 								} else {
2394 2394
 									print $tmpinvoice->getNomUrl(1);
Please login to merge, or discard this patch.
htdocs/projet/tasks/task.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
 $title = $object->ref;
227 227
 if (!empty($withproject)) {
228
-	$title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '')  ;
228
+	$title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '');
229 229
 }
230 230
 $help_url = '';
231 231
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 		// Title
267 267
 		$morehtmlref .= $projectstatic->title;
268 268
 		// Thirdparty
269
-		if (!empty($projectstatic->thirdparty->id) &&$projectstatic->thirdparty->id > 0) {
269
+		if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
270 270
 			$morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
271 271
 		}
272 272
 		$morehtmlref .= '</div>';
Please login to merge, or discard this patch.
htdocs/knowledgemanagement/knowledgerecord_card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordcard'; // To manage different context of search
45 45
 $backtopage = GETPOST('backtopage', 'alpha');
46 46
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
47
-$lineid   = GETPOST('lineid', 'int');
47
+$lineid = GETPOST('lineid', 'int');
48 48
 
49 49
 // Initialize technical objects
50 50
 $object = new KnowledgeRecord($db);
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 	print '<table class="border centpercent tableforfield">'."\n";
426 426
 
427 427
 	// Common attributes
428
-	$keyforbreak='fk_c_ticket_category';	// We change column just before this field
428
+	$keyforbreak = 'fk_c_ticket_category'; // We change column just before this field
429 429
 	//unset($object->fields['fk_project']);				// Hide field already shown in banner
430 430
 	//unset($object->fields['fk_soc']);					// Hide field already shown in banner
431 431
 	$object->fields['answer']['enabled'] = 0;
Please login to merge, or discard this patch.
htdocs/takepos/receipt.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 $reshook = $hookmanager->executeHooks('TakeposReceipt', $parameters, $object);
86 86
 if (!empty($hookmanager->resPrint)) {
87 87
 	print $hookmanager->resPrint;
88
-	return;	// Receipt page can be called by the takepos/send.php page that use ob_start/end so we must use return and not exit to stop page
88
+	return; // Receipt page can be called by the takepos/send.php page that use ob_start/end so we must use return and not exit to stop page
89 89
 }
90 90
 
91 91
 // IMPORTANT: This file is sended to 'Takepos Printing' application. Keep basic file. No external files as css, js... If you need images use absolute path.
@@ -173,13 +173,13 @@  discard block
 block discarded – undo
173 173
 	if ($action == 'without_details') {
174 174
 		$qty = GETPOST('qty', 'int') > 0 ? GETPOST('qty', 'int') : 1;
175 175
 		print '<tr>';
176
-		print '<td>' . GETPOST('label', 'alphanohtml') . '</td>';
177
-		print '<td class="right">' . $qty . '</td>';
178
-		print '<td class="right">' . price(price2num($object->total_ttc / $qty, 'MU'), 1) . '</td>';
176
+		print '<td>'.GETPOST('label', 'alphanohtml').'</td>';
177
+		print '<td class="right">'.$qty.'</td>';
178
+		print '<td class="right">'.price(price2num($object->total_ttc / $qty, 'MU'), 1).'</td>';
179 179
 		if (!empty($conf->global->TAKEPOS_SHOW_HT_RECEIPT)) {
180
-			print '<td class="right">' . price($object->total_ht, 1) . '</td>';
180
+			print '<td class="right">'.price($object->total_ht, 1).'</td>';
181 181
 		}
182
-		print '<td class="right">' . price($object->total_ttc, 1) . '</td>';
182
+		print '<td class="right">'.price($object->total_ttc, 1).'</td>';
183 183
 		print '</tr>';
184 184
 	} else {
185 185
 		foreach ($object->lines as $line) {
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -331,7 +331,10 @@
 block discarded – undo
331 331
 
332 332
 <script type="text/javascript">
333 333
 	<?php
334
-	if ($facid) print 'window.print();'; //Avoid print when is specimen
334
+	if ($facid) {
335
+		print 'window.print();';
336
+	}
337
+	//Avoid print when is specimen
335 338
 	?>
336 339
 </script>
337 340
 
Please login to merge, or discard this patch.
htdocs/takepos/floors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
 
180 180
 
181 181
 $( document ).ready(function() {
182
-	$.getJSON('./floors.php?action=getTables&token=<?php echo newToken();?>&floor=<?php echo $floor; ?>', function(data) {
182
+	$.getJSON('./floors.php?action=getTables&token=<?php echo newToken(); ?>&floor=<?php echo $floor; ?>', function(data) {
183 183
 		$.each(data, function(key, val) {
184 184
 			<?php if ($mode == "edit") {?>
185 185
 			$('body').append('<div class="tablediv" contenteditable onblur="updatename('+val.rowid+');" style="position: absolute; left: '+val.leftpos+'%; top: '+val.toppos+'%;" id="tablename'+val.rowid+'">'+val.label+'</div>');
Please login to merge, or discard this patch.
htdocs/societe/class/api_thirdparties.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
 			$sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
151 151
 		}
152 152
 		$sql .= " FROM ".MAIN_DB_PREFIX."societe as t";
153
-		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields AS ef ON ef.fk_object = t.rowid";	// So we will be able to filter on extrafields
153
+		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields
154 154
 		if ($category > 0) {
155 155
 			if ($mode != 4) {
156 156
 				$sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c";
Please login to merge, or discard this patch.