Completed
Branch develop (0620ea)
by
unknown
20:22
created
htdocs/projet/list.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -143,38 +143,38 @@  discard block
 block discarded – undo
143 143
 $search_date_start_startmonth = GETPOST('search_date_start_startmonth', 'int');
144 144
 $search_date_start_startyear = GETPOST('search_date_start_startyear', 'int');
145 145
 $search_date_start_startday = GETPOST('search_date_start_startday', 'int');
146
-$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear);	// Use tzserver
146
+$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver
147 147
 $search_date_start_endmonth = GETPOST('search_date_start_endmonth', 'int');
148 148
 $search_date_start_endyear = GETPOST('search_date_start_endyear', 'int');
149 149
 $search_date_start_endday = GETPOST('search_date_start_endday', 'int');
150
-$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear);	// Use tzserver
150
+$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver
151 151
 
152 152
 $search_date_end_startmonth = GETPOST('search_date_end_startmonth', 'int');
153 153
 $search_date_end_startyear = GETPOST('search_date_end_startyear', 'int');
154 154
 $search_date_end_startday = GETPOST('search_date_end_startday', 'int');
155
-$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear);	// Use tzserver
155
+$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver
156 156
 $search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int');
157 157
 $search_date_end_endyear = GETPOST('search_date_end_endyear', 'int');
158 158
 $search_date_end_endday = GETPOST('search_date_end_endday', 'int');
159
-$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear);	// Use tzserver
159
+$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver
160 160
 
161 161
 $search_date_creation_startmonth = GETPOST('search_date_creation_startmonth', 'int');
162 162
 $search_date_creation_startyear = GETPOST('search_date_creation_startyear', 'int');
163 163
 $search_date_creation_startday = GETPOST('search_date_creation_startday', 'int');
164
-$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear);	// Use tzserver
164
+$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver
165 165
 $search_date_creation_endmonth = GETPOST('search_date_creation_endmonth', 'int');
166 166
 $search_date_creation_endyear = GETPOST('search_date_creation_endyear', 'int');
167 167
 $search_date_creation_endday = GETPOST('search_date_creation_endday', 'int');
168
-$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear);	// Use tzserver
168
+$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver
169 169
 
170 170
 $search_date_modif_startmonth = GETPOST('search_date_modif_startmonth', 'int');
171 171
 $search_date_modif_startyear = GETPOST('search_date_modif_startyear', 'int');
172 172
 $search_date_modif_startday = GETPOST('search_date_modif_startday', 'int');
173
-$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear);	// Use tzserver
173
+$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver
174 174
 $search_date_modif_endmonth = GETPOST('search_date_modif_endmonth', 'int');
175 175
 $search_date_modif_endyear = GETPOST('search_date_modif_endyear', 'int');
176 176
 $search_date_modif_endday = GETPOST('search_date_modif_endday', 'int');
177
-$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear);	// Use tzserver
177
+$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver
178 178
 
179 179
 $search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array");
180 180
 
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 $sqlfields = $sql; // $sql fields to remove for count total
493 493
 
494 494
 $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as p";
495
-if (!empty($extrafields->attributes[$object->table_element]['label']) &&is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
495
+if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
496 496
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)";
497 497
 }
498 498
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
 			if ($searchCategoryProjectOperator == 0) {
677 677
 				$searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")";
678 678
 			} else {
679
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject);
679
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject);
680 680
 			}
681 681
 		}
682 682
 	}
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
 	$param .= '&search_date_end_endday='.urlencode($search_date_end_endday);
873 873
 }
874 874
 if ($search_date_end_end) {
875
-	$param .= '&search_date_end_end=' . urlencode($search_date_end_end);
875
+	$param .= '&search_date_end_end='.urlencode($search_date_end_end);
876 876
 }
877 877
 if ($search_date_creation_startmonth) {
878 878
 	$param .= '&search_date_creation_startmonth='.urlencode($search_date_creation_startmonth);
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
 	$param .= '&search_date_modif_endday='.urlencode($search_date_modif_endday);
921 921
 }
922 922
 if ($search_date_modif_end) {
923
-	$param .= '&search_date_modif_end=' . urlencode($search_date_modif_end);
923
+	$param .= '&search_date_modif_end='.urlencode($search_date_modif_end);
924 924
 }
925 925
 if ($socid) {
926 926
 	$param .= '&socid='.urlencode($socid);
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
 	$categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -';
1125 1125
 	$moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300im minwidth300 widthcentpercentminusx', 0, 0, '', 'category', $tmptitle);
1126 1126
 	$moreforfilter .= ' <input type="checkbox" class="valignmiddle" id="search_category_customer_operator" name="search_category_customer_operator" value="1"'.($searchCategoryCustomerOperator == 1 ? ' checked="checked"' : '').'/>';
1127
-	$moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click
1127
+	$moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories').' : '.$tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click
1128 1128
 	$moreforfilter .= '</div>';
1129 1129
 }
1130 1130
 
@@ -1647,7 +1647,7 @@  discard block
 block discarded – undo
1647 1647
 		// Project url
1648 1648
 		if (!empty($arrayfields['p.ref']['checked'])) {
1649 1649
 			print '<td class="nowraponall tdoverflowmax200">';
1650
-			print $object->getNomUrl(1, (!empty(GETPOST('search_usage_event_organization', 'int'))?'eventorganization':''));
1650
+			print $object->getNomUrl(1, (!empty(GETPOST('search_usage_event_organization', 'int')) ? 'eventorganization' : ''));
1651 1651
 			if ($object->hasDelay()) {
1652 1652
 				print img_warning($langs->trans('Late'));
1653 1653
 			}
Please login to merge, or discard this patch.
htdocs/contrat/list.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 $search_date_endday = GETPOST('search_date_endday', 'int');
80 80
 $search_date_endmonth = GETPOST('search_date_endmonth', 'int');
81 81
 $search_date_endyear = GETPOST('search_date_endyear', 'int');
82
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
82
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
83 83
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
84 84
 $searchCategoryCustomerOperator = 0;
85 85
 if (GETPOSTISSET('formfilteraction')) {
@@ -92,20 +92,20 @@  discard block
 block discarded – undo
92 92
 $search_date_creation_startmonth = GETPOST('search_date_creation_startmonth', 'int');
93 93
 $search_date_creation_startyear = GETPOST('search_date_creation_startyear', 'int');
94 94
 $search_date_creation_startday = GETPOST('search_date_creation_startday', 'int');
95
-$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear);	// Use tzserver
95
+$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver
96 96
 $search_date_creation_endmonth = GETPOST('search_date_creation_endmonth', 'int');
97 97
 $search_date_creation_endyear = GETPOST('search_date_creation_endyear', 'int');
98 98
 $search_date_creation_endday = GETPOST('search_date_creation_endday', 'int');
99
-$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear);	// Use tzserver
99
+$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver
100 100
 
101 101
 $search_date_modif_startmonth = GETPOST('search_date_modif_startmonth', 'int');
102 102
 $search_date_modif_startyear = GETPOST('search_date_modif_startyear', 'int');
103 103
 $search_date_modif_startday = GETPOST('search_date_modif_startday', 'int');
104
-$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear);	// Use tzserver
104
+$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver
105 105
 $search_date_modif_endmonth = GETPOST('search_date_modif_endmonth', 'int');
106 106
 $search_date_modif_endyear = GETPOST('search_date_modif_endyear', 'int');
107 107
 $search_date_modif_endday = GETPOST('search_date_modif_endday', 'int');
108
-$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear);	// Use tzserver
108
+$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver
109 109
 
110 110
 // Load variable for pagination
111 111
 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 			if ($searchCategoryProductOperator == 0) {
398 398
 				$searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."contratdet as cd WHERE cd.fk_contrat = c.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")";
399 399
 			} else {
400
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct);
400
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct);
401 401
 			}
402 402
 		}
403 403
 	}
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 		$resql = $db->query($sql, 0, 'auto', 1);
520 520
 		while ($db->fetch_object($resql)) {
521 521
 			if (empty($nbtotalofrecords)) {
522
-				$nbtotalofrecords = 1;    // We can't make +1 because init value is ''
522
+				$nbtotalofrecords = 1; // We can't make +1 because init value is ''
523 523
 			} else {
524 524
 				$nbtotalofrecords++;
525 525
 			}
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
 	$param .= '&search_date_modif_endday='.urlencode($search_date_modif_endday);
664 664
 }
665 665
 if ($search_date_modif_end) {
666
-	$param .= '&search_date_modif_end=' . urlencode($search_date_modif_end);
666
+	$param .= '&search_date_modif_end='.urlencode($search_date_modif_end);
667 667
 }
668 668
 if ($search_date_startday > 0) {
669 669
 	$param .= '&search_date_startday='.urlencode($search_date_startday);
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
 	$categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -';
807 807
 	$moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300', 0, 0, '', 'category', $tmptitle);
808 808
 	$moreforfilter .= ' <input type="checkbox" class="valignmiddle" id="search_category_customer_operator" name="search_category_customer_operator" value="1"'.($searchCategoryCustomerOperator == 1 ? ' checked="checked"' : '').'/>';
809
-	$moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click
809
+	$moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories').' : '.$tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click
810 810
 	$moreforfilter .= '</div>';
811 811
 }
812 812
 
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
 // Company type
892 892
 if (!empty($arrayfields['typent.code']['checked'])) {
893 893
 	print '<td class="liste_titre maxwidthonsmartphone center">';
894
-	print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT),  '', 1);
894
+	print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
895 895
 	print '</td>';
896 896
 }
897 897
 if (!empty($arrayfields['sale_representative']['checked'])) {
@@ -969,55 +969,55 @@  discard block
 block discarded – undo
969 969
 print '<tr class="liste_titre">';
970 970
 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
971 971
 	print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
972
-	$totalarray['nbfield']++;	// For the column action
972
+	$totalarray['nbfield']++; // For the column action
973 973
 }
974 974
 if (!empty($arrayfields['c.ref']['checked'])) {
975 975
 	print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
976
-	$totalarray['nbfield']++;	// For the column action
976
+	$totalarray['nbfield']++; // For the column action
977 977
 }
978 978
 if (!empty($arrayfields['c.ref_customer']['checked'])) {
979 979
 	print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer", "", $param, '', $sortfield, $sortorder);
980
-	$totalarray['nbfield']++;	// For the column action
980
+	$totalarray['nbfield']++; // For the column action
981 981
 }
982 982
 if (!empty($arrayfields['c.ref_supplier']['checked'])) {
983 983
 	print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier", "", $param, '', $sortfield, $sortorder);
984
-	$totalarray['nbfield']++;	// For the column action
984
+	$totalarray['nbfield']++; // For the column action
985 985
 }
986 986
 if (!empty($arrayfields['s.nom']['checked'])) {
987 987
 	print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder);
988
-	$totalarray['nbfield']++;	// For the column action
988
+	$totalarray['nbfield']++; // For the column action
989 989
 }
990 990
 if (!empty($arrayfields['s.email']['checked'])) {
991 991
 	print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email", "", $param, '', $sortfield, $sortorder);
992
-	$totalarray['nbfield']++;	// For the column action
992
+	$totalarray['nbfield']++; // For the column action
993 993
 }
994 994
 if (!empty($arrayfields['s.town']['checked'])) {
995 995
 	print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
996
-	$totalarray['nbfield']++;	// For the column action
996
+	$totalarray['nbfield']++; // For the column action
997 997
 }
998 998
 if (!empty($arrayfields['s.zip']['checked'])) {
999 999
 	print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
1000
-	$totalarray['nbfield']++;	// For the column action
1000
+	$totalarray['nbfield']++; // For the column action
1001 1001
 }
1002 1002
 if (!empty($arrayfields['state.nom']['checked'])) {
1003 1003
 	print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
1004
-	$totalarray['nbfield']++;	// For the column action
1004
+	$totalarray['nbfield']++; // For the column action
1005 1005
 }
1006 1006
 if (!empty($arrayfields['country.code_iso']['checked'])) {
1007 1007
 	print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
1008
-	$totalarray['nbfield']++;	// For the column action
1008
+	$totalarray['nbfield']++; // For the column action
1009 1009
 }
1010 1010
 if (!empty($arrayfields['typent.code']['checked'])) {
1011 1011
 	print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
1012
-	$totalarray['nbfield']++;	// For the column action
1012
+	$totalarray['nbfield']++; // For the column action
1013 1013
 }
1014 1014
 if (!empty($arrayfields['sale_representative']['checked'])) {
1015 1015
 	print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder);
1016
-	$totalarray['nbfield']++;	// For the column action
1016
+	$totalarray['nbfield']++; // For the column action
1017 1017
 }
1018 1018
 if (!empty($arrayfields['c.date_contrat']['checked'])) {
1019 1019
 	print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat", "", $param, '', $sortfield, $sortorder, 'center ');
1020
-	$totalarray['nbfield']++;	// For the column action
1020
+	$totalarray['nbfield']++; // For the column action
1021 1021
 }
1022 1022
 // Extra fields
1023 1023
 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@@ -1027,29 +1027,29 @@  discard block
 block discarded – undo
1027 1027
 print $hookmanager->resPrint;
1028 1028
 if (!empty($arrayfields['c.datec']['checked'])) {
1029 1029
 	print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1030
-	$totalarray['nbfield']++;	// For the column action
1030
+	$totalarray['nbfield']++; // For the column action
1031 1031
 }
1032 1032
 if (!empty($arrayfields['c.tms']['checked'])) {
1033 1033
 	print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1034
-	$totalarray['nbfield']++;	// For the column action
1034
+	$totalarray['nbfield']++; // For the column action
1035 1035
 }
1036 1036
 if (!empty($arrayfields['lower_planned_end_date']['checked'])) {
1037 1037
 	print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, '', $sortfield, $sortorder, 'center ');
1038
-	$totalarray['nbfield']++;	// For the column action
1038
+	$totalarray['nbfield']++; // For the column action
1039 1039
 }
1040 1040
 if (!empty($arrayfields['status']['checked'])) {
1041 1041
 	print_liste_field_titre($staticcontratligne->LibStatut(0, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
1042
-	$totalarray['nbfield']++;	// For the column action
1042
+	$totalarray['nbfield']++; // For the column action
1043 1043
 	print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
1044
-	$totalarray['nbfield']++;	// For the column action
1044
+	$totalarray['nbfield']++; // For the column action
1045 1045
 	print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
1046
-	$totalarray['nbfield']++;	// For the column action
1046
+	$totalarray['nbfield']++; // For the column action
1047 1047
 	print_liste_field_titre($staticcontratligne->LibStatut(5, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
1048
-	$totalarray['nbfield']++;	// For the column action
1048
+	$totalarray['nbfield']++; // For the column action
1049 1049
 }
1050 1050
 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
1051 1051
 	print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
1052
-	$totalarray['nbfield']++;	// For the column action
1052
+	$totalarray['nbfield']++; // For the column action
1053 1053
 }
1054 1054
 print "</tr>\n";
1055 1055
 
@@ -1338,7 +1338,7 @@  discard block
 block discarded – undo
1338 1338
 
1339 1339
 // If no record found
1340 1340
 if ($num == 0) {
1341
-	$colspan = 4;	// Include the 4 columns of status
1341
+	$colspan = 4; // Include the 4 columns of status
1342 1342
 	foreach ($arrayfields as $key => $val) {
1343 1343
 		if (!empty($val['checked'])) {
1344 1344
 			$colspan++;
Please login to merge, or discard this patch.
htdocs/comm/propal/card.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 		// Validation
279 279
 		$idwarehouse = GETPOST('idwarehouse', 'int');
280 280
 		$result = $object->valid($user);
281
-		if ( $result > 0 && ! empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) ) {
281
+		if ($result > 0 && !empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) {
282 282
 			$result = $object->closeProposal($user, $object::STATUS_SIGNED);
283 283
 		}
284 284
 		if ($result >= 0) {
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 					$object->deposit_percent = GETPOST('cond_reglement_id_deposit_percent', 'alpha');
431 431
 					$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
432 432
 					$object->fk_account = GETPOST('fk_account', 'int');
433
-					$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU', 2);	// deprecated
433
+					$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU', 2); // deprecated
434 434
 					$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2);
435 435
 					$object->socid = GETPOST('socid', 'int');
436 436
 					$object->contact_id = GETPOST('contactid', 'int');
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 		} elseif (GETPOST('statut', 'int') == $object::STATUS_SIGNED || GETPOST('statut', 'int') == $object::STATUS_NOTSIGNED) {
709 709
 			$locationTarget = '';
710 710
 			// prevent browser refresh from closing proposal several times
711
-			if ($object->statut == $object::STATUS_VALIDATED || ( ! empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) && $object->statut == $object::STATUS_DRAFT)) {
711
+			if ($object->statut == $object::STATUS_VALIDATED || (!empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) && $object->statut == $object::STATUS_DRAFT)) {
712 712
 				$db->begin();
713 713
 
714 714
 				$result = $object->closeProposal($user, GETPOST('statut', 'int'), GETPOST('note_private', 'restricthtml'));
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
 					$error++;
718 718
 				} else {
719 719
 					// Needed if object linked modified by trigger (because linked objects can't be fetched two times : linkedObjectsFullLoaded)
720
-					$locationTarget = DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id;
720
+					$locationTarget = DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id;
721 721
 				}
722 722
 
723 723
 				$deposit = null;
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
 					!$error && GETPOST('statut', 'int') == $object::STATUS_SIGNED && GETPOST('generate_deposit', 'alpha') == 'on'
729 729
 					&& !empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && $user->hasRight('facture', 'creer')
730 730
 				) {
731
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
731
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
732 732
 
733 733
 					$date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int'));
734 734
 					$forceFields = array();
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
 
742 742
 					if ($deposit) {
743 743
 						setEventMessage('DepositGenerated');
744
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
744
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
745 745
 					} else {
746 746
 						$error++;
747 747
 						setEventMessages($object->error, $object->errors, 'errors');
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
 					}
770 770
 
771 771
 					if ($locationTarget) {
772
-						header('Location: ' . $locationTarget);
772
+						header('Location: '.$locationTarget);
773 773
 						exit;
774 774
 					}
775 775
 				} else {
@@ -929,11 +929,11 @@  discard block
 block discarded – undo
929 929
 		// Define margin
930 930
 		$margin_rate = (GETPOST('marginforalllines') ? GETPOST('marginforalllines') : 0);
931 931
 		foreach ($object->lines as &$line) {
932
-			$subprice = price2num($line->pa_ht * (1 + $margin_rate/100), 'MU');
932
+			$subprice = price2num($line->pa_ht * (1 + $margin_rate / 100), 'MU');
933 933
 			$prod = new Product($db);
934 934
 			$prod->fetch($line->fk_product);
935 935
 			if ($prod->price_min > $subprice) {
936
-				$price_subprice  = price($subprice,        0, $outlangs, 1, -1, -1, 'auto');
936
+				$price_subprice  = price($subprice, 0, $outlangs, 1, -1, -1, 'auto');
937 937
 				$price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto');
938 938
 				setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings');
939 939
 			}
@@ -1047,7 +1047,7 @@  discard block
 block discarded – undo
1047 1047
 			$pu_ttc_devise = 0;
1048 1048
 			$price_min = 0;
1049 1049
 			$price_min_ttc = 0;
1050
-			$tva_npr=0;
1050
+			$tva_npr = 0;
1051 1051
 			$price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT');
1052 1052
 
1053 1053
 			$db->begin();
@@ -1106,8 +1106,8 @@  discard block
 block discarded – undo
1106 1106
 						if (count($prodcustprice->lines) > 0) {
1107 1107
 							$pu_ht = price($prodcustprice->lines[0]->price);
1108 1108
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
1109
-							$price_min =  price($prodcustprice->lines[0]->price_min);
1110
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
1109
+							$price_min = price($prodcustprice->lines[0]->price_min);
1110
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
1111 1111
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
1112 1112
 							/*$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
1113 1113
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -1205,8 +1205,8 @@  discard block
 block discarded – undo
1205 1205
 				}
1206 1206
 
1207 1207
 				//If text set in desc is the same as product description (as now it's preloaded) whe add it only one time
1208
-				if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
1209
-					$product_desc='';
1208
+				if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
1209
+					$product_desc = '';
1210 1210
 				}
1211 1211
 
1212 1212
 				if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) {
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
 	}
1668 1668
 
1669 1669
 	// Actions to build doc
1670
-	$upload_dir = !empty($conf->propal->multidir_output[$object->entity])?$conf->propal->multidir_output[$object->entity]:$conf->propal->dir_output;
1670
+	$upload_dir = !empty($conf->propal->multidir_output[$object->entity]) ? $conf->propal->multidir_output[$object->entity] : $conf->propal->dir_output;
1671 1671
 	$permissiontoadd = $usercancreate;
1672 1672
 	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
1673 1673
 }
@@ -1758,7 +1758,7 @@  discard block
 block discarded – undo
1758 1758
 
1759 1759
 			$cond_reglement_id 	= (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0));
1760 1760
 			$mode_reglement_id 	= (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0));
1761
-			$remise_absolue 	= (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0));	// deprecated
1761
+			$remise_absolue 	= (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0)); // deprecated
1762 1762
 			$remise_percent 	= (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_percent) ? $soc->remise_percent : 0));
1763 1763
 			$warehouse_id       = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0));
1764 1764
 
@@ -1821,7 +1821,7 @@  discard block
 block discarded – undo
1821 1821
 	print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1822 1822
 	print '<input type="hidden" name="token" value="'.newToken().'">';
1823 1823
 	print '<input type="hidden" name="action" value="add">';
1824
-	print '<input type="hidden" name="changecompany" value="0">';	// will be set to 1 by javascript so we know post is done after a company change
1824
+	print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change
1825 1825
 	print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
1826 1826
 	if ($origin != 'project' && $originid) {
1827 1827
 		print '<input type="hidden" name="origin" value="'.$origin.'">';
@@ -1839,7 +1839,7 @@  discard block
 block discarded – undo
1839 1839
 
1840 1840
 	// Ref customer
1841 1841
 	print '<tr class="field_ref_client"><td class="titlefieldcreate">'.$langs->trans('RefCustomer').'</td><td class="valuefieldcreate">';
1842
-	print '<input type="text" name="ref_client" value="'.(!empty($ref_client)?$ref_client:GETPOST('ref_client')).'"></td>';
1842
+	print '<input type="text" name="ref_client" value="'.(!empty($ref_client) ? $ref_client : GETPOST('ref_client')).'"></td>';
1843 1843
 	print '</tr>';
1844 1844
 
1845 1845
 	// Third party
@@ -2014,7 +2014,7 @@  discard block
 block discarded – undo
2014 2014
 		print '<tr class="field_currency">';
2015 2015
 		print '<td class="titlefieldcreate">'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>';
2016 2016
 		print '<td class="valuefieldcreate maxwidthonsmartphone">';
2017
-		print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany'))?GETPOST('multicurrency_code'):$currency_code), 'multicurrency_code', 0);
2017
+		print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ?GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0);
2018 2018
 		print '</td></tr>';
2019 2019
 	}
2020 2020
 
@@ -2046,7 +2046,7 @@  discard block
 block discarded – undo
2046 2046
 		// TODO for compatibility
2047 2047
 		if ($origin == 'contrat') {
2048 2048
 			// Calcul contrat->price (HT), contrat->total (TTC), contrat->tva
2049
-			$objectsrc->remise_absolue = $remise_absolue;	// deprecated
2049
+			$objectsrc->remise_absolue = $remise_absolue; // deprecated
2050 2050
 			$objectsrc->remise_percent = $remise_percent;
2051 2051
 			$objectsrc->update_price(1, 'auto', 1);
2052 2052
 		}
@@ -2204,7 +2204,7 @@  discard block
 block discarded – undo
2204 2204
 		if (empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) {
2205 2205
 			$formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">'.$langs->trans("CloseAs").'</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED)));
2206 2206
 		}
2207
-		$formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => '');				// Field to complete private note (not replace)
2207
+		$formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace)
2208 2208
 
2209 2209
 		if (getDolGlobalInt('PROPOSAL_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) {
2210 2210
 			// This is a hidden option:
@@ -2214,7 +2214,7 @@  discard block
 block discarded – undo
2214 2214
 			$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2215 2215
 
2216 2216
 			if (!empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && $user->hasRight('facture', 'creer')) {
2217
-				require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2217
+				require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2218 2218
 
2219 2219
 				$object->fetchObjectLinked();
2220 2220
 
@@ -2296,7 +2296,7 @@  discard block
 block discarded – undo
2296 2296
 						'type' => 'onecolumn',
2297 2297
 						'value' => '
2298 2298
 							<script>
2299
-								let signedValue = ' . $object::STATUS_SIGNED . ';
2299
+								let signedValue = ' . $object::STATUS_SIGNED.';
2300 2300
 
2301 2301
 								$(document).ready(function() {
2302 2302
 									$("[name=generate_deposit]").change(function () {
@@ -2346,7 +2346,7 @@  discard block
 block discarded – undo
2346 2346
 		if (empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) {
2347 2347
 			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2348 2348
 		} else {
2349
-			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2349
+			$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?statut=3&id='.$object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250);
2350 2350
 		}
2351 2351
 	} elseif ($action == 'delete') {
2352 2352
 		// Confirm delete
@@ -2385,8 +2385,8 @@  discard block
 block discarded – undo
2385 2385
 		$nbMandated = 0;
2386 2386
 		foreach ($object->lines as $line) {
2387 2387
 			$res = $line->fetch_product();
2388
-			if ($res  > 0  ) {
2389
-				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) {
2388
+			if ($res > 0) {
2389
+				if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2390 2390
 					$nbMandated++;
2391 2391
 					break;
2392 2392
 				}
@@ -2805,46 +2805,46 @@  discard block
 block discarded – undo
2805 2805
 	print '<table class="border tableforfield centpercent">';
2806 2806
 
2807 2807
 	print '<tr>';
2808
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
2809
-	print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency) . '</td>';
2808
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
2809
+	print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency).'</td>';
2810 2810
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2811
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2811
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2812 2812
 	}
2813 2813
 	print '</tr>';
2814 2814
 
2815 2815
 	print '<tr>';
2816
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
2817
-	print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency) . '</td>';
2816
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
2817
+	print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency).'</td>';
2818 2818
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2819
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2819
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2820 2820
 	}
2821 2821
 	print '</tr>';
2822 2822
 
2823 2823
 	if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
2824 2824
 		print '<tr>';
2825
-		print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
2826
-		print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 1, -1, -1, $conf->currency) . '</td>';
2825
+		print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
2826
+		print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 1, -1, -1, $conf->currency).'</td>';
2827 2827
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2828
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2828
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2829 2829
 		}
2830 2830
 		print '</tr>';
2831 2831
 
2832 2832
 		if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
2833 2833
 			print '<tr>';
2834
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
2835
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 1, -1, -1, $conf->currency) . '</td>';
2834
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
2835
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 1, -1, -1, $conf->currency).'</td>';
2836 2836
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2837
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2837
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2838 2838
 			}
2839 2839
 			print '</tr>';
2840 2840
 		}
2841 2841
 	}
2842 2842
 
2843 2843
 	print '<tr>';
2844
-	print '<td>' . $langs->trans('AmountTTC') . '</td>';
2845
-	print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency) . '</td>';
2844
+	print '<td>'.$langs->trans('AmountTTC').'</td>';
2845
+	print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency).'</td>';
2846 2846
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2847
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
2847
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>';
2848 2848
 	}
2849 2849
 	print '</tr>';
2850 2850
 
@@ -2962,7 +2962,7 @@  discard block
 block discarded – undo
2962 2962
 				}
2963 2963
 
2964 2964
 				// ReOpen
2965
-				if ( (( !empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) {
2965
+				if (((!empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) {
2966 2966
 					print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#reopen').'"';
2967 2967
 					print '>'.$langs->trans('ReOpen').'</a>';
2968 2968
 				}
@@ -3037,8 +3037,8 @@  discard block
 block discarded – undo
3037 3037
 				} else {
3038 3038
 					// Set not signed (close)
3039 3039
 					if ($object->statut == Propal::STATUS_DRAFT && $usercanclose) {
3040
-						print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&token='.newToken().'&action=closeas&token='.newToken() . (empty($conf->global->MAIN_JUMP_TAG) ? '' : '#close') . '"';
3041
-						print '>' . $langs->trans('SetRefusedAndClose') . '</a>';
3040
+						print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=closeas&token='.newToken().(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#close').'"';
3041
+						print '>'.$langs->trans('SetRefusedAndClose').'</a>';
3042 3042
 					}
3043 3043
 				}
3044 3044
 
Please login to merge, or discard this patch.
htdocs/societe/list.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
 
52 52
 
53 53
 // Get parameters
54
-$action 	= GETPOST('action', 'aZ09');
54
+$action = GETPOST('action', 'aZ09');
55 55
 $massaction = GETPOST('massaction', 'alpha');
56 56
 $show_files = GETPOST('show_files', 'int');
57
-$confirm 	= GETPOST('confirm', 'alpha');
58
-$toselect 	= GETPOST('toselect', 'array');
57
+$confirm = GETPOST('confirm', 'alpha');
58
+$toselect = GETPOST('toselect', 'array');
59 59
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'thirdpartylist';
60 60
 $optioncss 	= GETPOST('optioncss', 'alpha');
61 61
 if ($contextpage == 'poslist') {
@@ -109,20 +109,20 @@  discard block
 block discarded – undo
109 109
 $search_date_creation_startmonth = GETPOST('search_date_creation_startmonth', 'int');
110 110
 $search_date_creation_startyear = GETPOST('search_date_creation_startyear', 'int');
111 111
 $search_date_creation_startday = GETPOST('search_date_creation_startday', 'int');
112
-$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear);	// Use tzserver
112
+$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver
113 113
 $search_date_creation_endmonth = GETPOST('search_date_creation_endmonth', 'int');
114 114
 $search_date_creation_endyear = GETPOST('search_date_creation_endyear', 'int');
115 115
 $search_date_creation_endday = GETPOST('search_date_creation_endday', 'int');
116
-$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear);	// Use tzserver
116
+$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver
117 117
 
118 118
 $search_date_modif_startmonth = GETPOST('search_date_modif_startmonth', 'int');
119 119
 $search_date_modif_startyear = GETPOST('search_date_modif_startyear', 'int');
120 120
 $search_date_modif_startday = GETPOST('search_date_modif_startday', 'int');
121
-$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear);	// Use tzserver
121
+$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver
122 122
 $search_date_modif_endmonth = GETPOST('search_date_modif_endmonth', 'int');
123 123
 $search_date_modif_endyear = GETPOST('search_date_modif_endyear', 'int');
124 124
 $search_date_modif_endday = GETPOST('search_date_modif_endday', 'int');
125
-$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear);	// Use tzserver
125
+$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver
126 126
 
127 127
 
128 128
 $type = GETPOST('type', 'alpha');
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 			if ($searchCategoryCustomerOperator == 0) {
587 587
 				$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).")";
588 588
 			} else {
589
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer);
589
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer);
590 590
 			}
591 591
 		}
592 592
 	}
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
 			if ($searchCategorySupplierOperator == 0) {
617 617
 				$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).")";
618 618
 			} else {
619
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategorySupplier);
619
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategorySupplier);
620 620
 			}
621 621
 		}
622 622
 	}
@@ -1027,7 +1027,7 @@  discard block
 block discarded – undo
1027 1027
 	$param .= '&search_date_modif_endday='.urlencode($search_date_modif_endday);
1028 1028
 }
1029 1029
 if ($search_date_modif_end) {
1030
-	$param .= '&search_date_modif_end=' . urlencode($search_date_modif_end);
1030
+	$param .= '&search_date_modif_end='.urlencode($search_date_modif_end);
1031 1031
 }
1032 1032
 
1033 1033
 // Add $param from extra fields
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
 	if (!empty($socid)) {
1096 1096
 		$url .= '&socid='.$socid;
1097 1097
 	}
1098
-	$newcardbutton   = '';
1098
+	$newcardbutton = '';
1099 1099
 	$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
1100 1100
 	$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
1101 1101
 	$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->hasRight('societe', 'creer'));
@@ -1616,19 +1616,19 @@  discard block
 block discarded – undo
1616 1616
 print $hookmanager->resPrint;
1617 1617
 if (!empty($arrayfields['s.datec']['checked'])) {
1618 1618
 	print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER["PHP_SELF"], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1619
-	$totalarray['nbfield']++;	// For the column action
1619
+	$totalarray['nbfield']++; // For the column action
1620 1620
 }
1621 1621
 if (!empty($arrayfields['s.tms']['checked'])) {
1622 1622
 	print_liste_field_titre($arrayfields['s.tms']['label'], $_SERVER["PHP_SELF"], "s.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1623
-	$totalarray['nbfield']++;	// For the column action
1623
+	$totalarray['nbfield']++; // For the column action
1624 1624
 }
1625 1625
 if (!empty($arrayfields['s.status']['checked'])) {
1626 1626
 	print_liste_field_titre($arrayfields['s.status']['label'], $_SERVER["PHP_SELF"], "s.status", "", $param, '', $sortfield, $sortorder, 'center ');
1627
-	$totalarray['nbfield']++;	// For the column action
1627
+	$totalarray['nbfield']++; // For the column action
1628 1628
 }
1629 1629
 if (!empty($arrayfields['s.import_key']['checked'])) {
1630 1630
 	print_liste_field_titre($arrayfields['s.import_key']['label'], $_SERVER["PHP_SELF"], "s.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
1631
-	$totalarray['nbfield']++;	// For the column action
1631
+	$totalarray['nbfield']++; // For the column action
1632 1632
 }
1633 1633
 // Action column
1634 1634
 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
@@ -1830,7 +1830,7 @@  discard block
 block discarded – undo
1830 1830
 			if (!isset($typenArray) || !is_array($typenArray) || count($typenArray) == 0) {
1831 1831
 				$typenArray = $formcompany->typent_array(1);
1832 1832
 			}
1833
-			$labeltypeofcompany= empty($typenArray[$obj->typent_code]) ? '' : $typenArray[$obj->typent_code];
1833
+			$labeltypeofcompany = empty($typenArray[$obj->typent_code]) ? '' : $typenArray[$obj->typent_code];
1834 1834
 
1835 1835
 			print '<td class="center tdoverflowmax125" title="'.dol_escape_htmltag($labeltypeofcompany).'">';
1836 1836
 			print dol_escape_htmltag($labeltypeofcompany);
Please login to merge, or discard this patch.
htdocs/commande/list_det.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55),
191 191
 	'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60),
192 192
 	'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE), 'position'=>65),
193
-	'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled('expedition')),
193
+	'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66, 'enabled'=>isModEnabled('expedition')),
194 194
 	'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67),
195 195
 	'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68),
196 196
 	'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69),
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 	'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
215 215
 	'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135),
216 216
 	'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140),
217
-	'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled('expedition')), 'position'=>990),
217
+	'shippable'=>array('label'=>"Shippable", 'checked'=>1, 'enabled'=>(isModEnabled('expedition')), 'position'=>990),
218 218
 	'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position'=>995),
219 219
 	'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999),
220 220
 	'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000)
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 	$sql .= natural_search('pr.ref', $search_refProduct);
456 456
 }
457 457
 if ($search_descProduct) {
458
-	$sql .= natural_search(array('pr.label','cdet.description'), $search_descProduct);
458
+	$sql .= natural_search(array('pr.label', 'cdet.description'), $search_descProduct);
459 459
 }
460 460
 if ($search_ref) {
461 461
 	$sql .= natural_search('c.ref', $search_ref);
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
 	if (!empty($socid)) {
827 827
 		$url .= '&socid='.$socid;
828 828
 	}
829
-	$newcardbutton = '';//dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlistdet' && $permissiontoadd);
829
+	$newcardbutton = ''; //dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlistdet' && $permissiontoadd);
830 830
 
831 831
 	// Lines of title fields
832 832
 	print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
@@ -859,9 +859,9 @@  discard block
 block discarded – undo
859 859
 
860 860
 	$moreforfilter = '';
861 861
 
862
-	$moreforfilter .= '<input type="checkbox" name="productobuy"'.(!empty($productobuy)?'value="productobuychecked" checked':'' ).'><label for="productobuy">'.$langs->trans("productobuy").'</label>';
863
-	$moreforfilter .= '<input type="checkbox" name="productonly"'.(!empty($productonly)?'value="productonlychecked" checked':'' ).'><label for="productonly">'.$langs->trans("productonly").'</label>';
864
-	$moreforfilter .= '<input type="checkbox" name="disablelinefree"'.(!empty($disablelinefree)?'value="disablelinefreechecked" checked':'' ).'><label for="disablelinefree">'.$langs->trans("disablelinefree").'</label>';
862
+	$moreforfilter .= '<input type="checkbox" name="productobuy"'.(!empty($productobuy) ? 'value="productobuychecked" checked' : '').'><label for="productobuy">'.$langs->trans("productobuy").'</label>';
863
+	$moreforfilter .= '<input type="checkbox" name="productonly"'.(!empty($productonly) ? 'value="productonlychecked" checked' : '').'><label for="productonly">'.$langs->trans("productonly").'</label>';
864
+	$moreforfilter .= '<input type="checkbox" name="disablelinefree"'.(!empty($disablelinefree) ? 'value="disablelinefreechecked" checked' : '').'><label for="disablelinefree">'.$langs->trans("disablelinefree").'</label>';
865 865
 	$moreforfilter .= '<br>';
866 866
 
867 867
 	// If the user can view prospects other than his'
@@ -1552,7 +1552,7 @@  discard block
 block discarded – undo
1552 1552
 		// Product QtyOrdered
1553 1553
 		if (!empty($arrayfields['cdet.qty']['checked'])) {
1554 1554
 			print '<td class="nowrap right">'.$obj->qty.'</td>';
1555
-			if (isset($totalarray['val']['cdet.qty']) || isset($subtotalarray['val']['cdet.qty']) ) {
1555
+			if (isset($totalarray['val']['cdet.qty']) || isset($subtotalarray['val']['cdet.qty'])) {
1556 1556
 				$totalarray['val']['cdet.qty'] += $obj->qty;
1557 1557
 				$subtotalarray['val']['cdet.qty'] += $obj->qty;
1558 1558
 			} else {
@@ -2030,10 +2030,10 @@  discard block
 block discarded – undo
2030 2030
 			print '<td class="center">';
2031 2031
 			if (!empty($show_shippable_command) && isModEnabled('stock')) {
2032 2032
 				if (($obj->fk_statut > $generic_commande::STATUS_DRAFT) && ($obj->fk_statut < $generic_commande::STATUS_CLOSED)) {
2033
-					$generic_commande->loadExpeditions();	// Load array ->expeditions
2033
+					$generic_commande->loadExpeditions(); // Load array ->expeditions
2034 2034
 
2035 2035
 					if (isset($generic_commande->expeditions[$obj->rowid])) {
2036
-						$reliquat =  $obj->qty - $generic_commande->expeditions[$obj->rowid];
2036
+						$reliquat = $obj->qty - $generic_commande->expeditions[$obj->rowid];
2037 2037
 					} else {
2038 2038
 						$reliquat = $obj->qty;
2039 2039
 					}
Please login to merge, or discard this patch.