Passed
Branch develop (3f4b05)
by Laurent
95:01
created
htdocs/core/multicompany_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 $title = $langs->trans("Multicompanies");
82 82
 
83 83
 // URL http://mydolibarr/core/multicompany_page?dol_use_jmobile=1 can be used for tests
84
-$head = '<!-- Multicompany selection -->'."\n";	// This is used by DoliDroid to know page is a multicompany selection page
84
+$head = '<!-- Multicompany selection -->'."\n"; // This is used by DoliDroid to know page is a multicompany selection page
85 85
 $arrayofjs = array();
86 86
 $arrayofcss = array();
87 87
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/core/bookmarks_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 $title = $langs->trans("Bookmarks");
59 59
 
60 60
 // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests
61
-$head = '<!-- Bookmarks -->'."\n";	// This is used by DoliDroid to know page is a bookmark selection page
61
+$head = '<!-- Bookmarks -->'."\n"; // This is used by DoliDroid to know page is a bookmark selection page
62 62
 $arrayofjs = array();
63 63
 $arrayofcss = array();
64 64
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/core/get_menudiv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 $title = $langs->trans("Menu");
85 85
 
86 86
 // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests
87
-$head = '<!-- Menu -->'."\n";	// This is used by DoliDroid to know page is a menu page
87
+$head = '<!-- Menu -->'."\n"; // This is used by DoliDroid to know page is a menu page
88 88
 $arrayofjs = array();
89 89
 $arrayofcss = array();
90 90
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/core/search_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 $title = $langs->trans("Search");
59 59
 
60 60
 // URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests
61
-$head = '<!-- Quick access -->'."\n";	// This is used by DoliDroid to know page is a search page
61
+$head = '<!-- Quick access -->'."\n"; // This is used by DoliDroid to know page is a search page
62 62
 $arrayofjs = array();
63 63
 $arrayofcss = array();
64 64
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/accountancy/closure/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	// Specify as export : update field date_validated on selected month/year
88 88
 	$sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping";
89 89
 	$sql .= " SET date_validated = '".$db->idate($now)."'";
90
-	$sql .= " WHERE entity = " . ((int) $conf->entity);
91
-	$sql .= " AND doc_date >= '" . $db->idate($date_start) . "'";
92
-	$sql .= " AND doc_date <= '" . $db->idate($date_end) . "'";
90
+	$sql .= " WHERE entity = ".((int) $conf->entity);
91
+	$sql .= " AND doc_date >= '".$db->idate($date_start)."'";
92
+	$sql .= " AND doc_date <= '".$db->idate($date_end)."'";
93 93
 	$sql .= " AND date_validated IS NULL";
94 94
 
95 95
 	dol_syslog("/accountancy/closure/index.php action=validate_movement_confirm -> Set movements as validated", LOG_DEBUG);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
 $title = $langs->trans('Closure');
124 124
 
125
-$help_url ='EN:Module_Double_Entry_Accounting';
125
+$help_url = 'EN:Module_Double_Entry_Accounting';
126 126
 
127 127
 llxHeader('', $title, $help_url);
128 128
 
Please login to merge, or discard this patch.
htdocs/accountancy/bookkeeping/balance.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
73 73
 $object = new BookKeeping($db);
74
-$hookmanager->initHooks(array('balancelist'));  // Note that conf->hooks_modules contains array
74
+$hookmanager->initHooks(array('balancelist')); // Note that conf->hooks_modules contains array
75 75
 
76 76
 $formaccounting = new FormAccounting($db);
77 77
 $formother = new FormOther($db);
@@ -343,9 +343,9 @@  discard block
 block discarded – undo
343 343
 	// without time and class limits (Class 6 and 7 accounts ???) and does not take into account the "a-nouveau" journal.
344 344
 	if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
345 345
 		$sql = "SELECT t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance";
346
-		$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
347
-		$sql .= " WHERE t.entity = " . $conf->entity;        // Never do sharing into accounting features
348
-		$sql .= " AND t.doc_date < '" . $db->idate($search_date_start) . "'";
346
+		$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as t";
347
+		$sql .= " WHERE t.entity = ".$conf->entity; // Never do sharing into accounting features
348
+		$sql .= " AND t.doc_date < '".$db->idate($search_date_start)."'";
349 349
 		$sql .= " GROUP BY t.numero_compte";
350 350
 
351 351
 		$resql = $db->query($sql);
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 		$opening_balances = array();
354 354
 		for ($i = 0; $i < $nrows; $i++) {
355 355
 			$arr = $resql->fetch_array();
356
-			$opening_balances["'" . $arr['numero_compte'] . "'"] = $arr['opening_balance'];
356
+			$opening_balances["'".$arr['numero_compte']."'"] = $arr['opening_balance'];
357 357
 		}
358 358
 	}
359 359
 
@@ -383,9 +383,9 @@  discard block
 block discarded – undo
383 383
 		//var_dump($accounting_account);
384 384
 		//var_dump($accountingaccountstatic);
385 385
 		if (empty($accountingaccountstatic->label) && $accountingaccountstatic->id > 0) {
386
-			$link = '<a class="editfielda reposition" href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=update&token=' . newToken() . '&id=' . $accountingaccountstatic->id . '">' . img_edit() . '</a>';
386
+			$link = '<a class="editfielda reposition" href="'.DOL_URL_ROOT.'/accountancy/admin/card.php?action=update&token='.newToken().'&id='.$accountingaccountstatic->id.'">'.img_edit().'</a>';
387 387
 		} elseif ($accounting_account == 'NotDefined') {
388
-			$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=create&token=' . newToken() . '&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
388
+			$link = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/card.php?action=create&token='.newToken().'&accountingaccount='.length_accountg($line->numero_compte).'">'.img_edit_add().'</a>';
389 389
 		} elseif (empty($tmparrayforrootaccount['label'])) {
390 390
 			// $tmparrayforrootaccount['label'] not defined = the account has not parent with a parent.
391 391
 			// This is useless, we should not create a new account when an account has no parent, we must edit it to fix its parent.
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 
418 418
 				// Show first line of a break
419 419
 				print '<tr class="trforbreak">';
420
-				print '<td colspan="'.($colspan+1).'" class="tdforbreak">'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'</td>';
420
+				print '<td colspan="'.($colspan + 1).'" class="tdforbreak">'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'</td>';
421 421
 				print '</tr>';
422 422
 
423 423
 				$displayed_account = $root_account_number;
@@ -472,9 +472,9 @@  discard block
 block discarded – undo
472 472
 		print '<td class="right nowraponall amount">'.price(price2num($sous_total_debit, 'MT')).'</td>';
473 473
 		print '<td class="right nowraponall amount">'.price(price2num($sous_total_credit, 'MT')).'</td>';
474 474
 		if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
475
-			print '<td class="right nowraponall amount">' . price(price2num($sous_total_opening_balance + $sous_total_debit - $sous_total_credit, 'MT')) . '</td>';
475
+			print '<td class="right nowraponall amount">'.price(price2num($sous_total_opening_balance + $sous_total_debit - $sous_total_credit, 'MT')).'</td>';
476 476
 		} else {
477
-			print '<td class="right nowraponall amount">' . price(price2num($sous_total_debit - $sous_total_credit, 'MT')) . '</td>';
477
+			print '<td class="right nowraponall amount">'.price(price2num($sous_total_debit - $sous_total_credit, 'MT')).'</td>';
478 478
 		}
479 479
 		print "<td></td>\n";
480 480
 		print '</tr>';
@@ -487,9 +487,9 @@  discard block
 block discarded – undo
487 487
 	print '<td class="right nowraponall amount">'.price(price2num($total_debit, 'MT')).'</td>';
488 488
 	print '<td class="right nowraponall amount">'.price(price2num($total_credit, 'MT')).'</td>';
489 489
 	if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
490
-		print '<td class="right nowraponall amount">' . price(price2num($total_opening_balance + $total_debit - $total_credit, 'MT')) . '</td>';
490
+		print '<td class="right nowraponall amount">'.price(price2num($total_opening_balance + $total_debit - $total_credit, 'MT')).'</td>';
491 491
 	} else {
492
-		print '<td class="right nowraponall amount">' . price(price2num($total_debit - $total_credit, 'MT')) . '</td>';
492
+		print '<td class="right nowraponall amount">'.price(price2num($total_debit - $total_credit, 'MT')).'</td>';
493 493
 	}
494 494
 	print "<td></td>\n";
495 495
 	print '</tr>';
Please login to merge, or discard this patch.
htdocs/holiday/month_report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 $sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
150 150
 $sql .= " AND (";
151 151
 $sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";
152
-$sql .= " OR";	// For leave over several months
152
+$sql .= " OR"; // For leave over several months
153 153
 $sql .= " (date_format(cp.date_debut, '%Y-%m') < '".$db->escape($year_month)."' AND date_format(cp.date_fin, '%Y-%m') > '".$db->escape($year_month)."') ";
154 154
 $sql .= " )";
155 155
 if (!empty($search_ref)) {
Please login to merge, or discard this patch.
htdocs/reception/card.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -916,7 +916,7 @@
 block discarded – undo
916 916
 			/**
917 917
 			 * @var array $suffix2numAsked map HTTP query parameter suffixes (like '1_0') to line indices so that
918 918
 			 *                             extrafields from HTTP query can be assigned to the correct dispatch line
919
-			*/
919
+			 */
920 920
 			$suffix2numAsked = array();
921 921
 			$dispatchLines = array();
922 922
 
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $line_id = GETPOST('lineid', 'int') ?GETPOST('lineid', 'int') : '';
87 87
 $facid = GETPOST('facid', 'int');
88 88
 
89
-$action	= GETPOST('action', 'alpha');
89
+$action = GETPOST('action', 'alpha');
90 90
 //Select mail models is same action as presend
91 91
 if (GETPOST('modelselected')) {
92 92
 	$action = 'presend';
@@ -932,35 +932,35 @@  discard block
 block discarded – undo
932 932
 				$reg = array();
933 933
 				if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
934 934
 					$numAsked++;
935
-					$paramSuffix = $reg[1] . '_' . $reg[2];
935
+					$paramSuffix = $reg[1].'_'.$reg[2];
936 936
 					$suffix2numAsked[$paramSuffix] = $numAsked;
937 937
 
938 938
 					// $numline=$reg[2] + 1; // line of product
939 939
 					$numline = $numAsked;
940 940
 
941
-					$prod = "product_" . $paramSuffix;
942
-					$qty = "qty_" . $paramSuffix;
943
-					$ent = "entrepot_" . $paramSuffix;
944
-					$pu = "pu_" . $paramSuffix; // This is unit price including discount
945
-					$fk_commandefourndet = "fk_commandefourndet_" . $paramSuffix;
941
+					$prod = "product_".$paramSuffix;
942
+					$qty = "qty_".$paramSuffix;
943
+					$ent = "entrepot_".$paramSuffix;
944
+					$pu = "pu_".$paramSuffix; // This is unit price including discount
945
+					$fk_commandefourndet = "fk_commandefourndet_".$paramSuffix;
946 946
 					$dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'));
947 947
 				}
948 948
 
949 949
 				// with batch module enabled
950 950
 				if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
951 951
 					$numAsked++;
952
-					$paramSuffix = $reg[1] . '_' . $reg[2];
952
+					$paramSuffix = $reg[1].'_'.$reg[2];
953 953
 					$suffix2numAsked[$paramSuffix] = $numAsked;
954 954
 
955 955
 					// eat-by date dispatch
956 956
 					// $numline=$reg[2] + 1; // line of product
957 957
 					$numline = $numAsked;
958 958
 
959
-					$prod = 'product_batch_' . $paramSuffix;
960
-					$qty = 'qty_' . $paramSuffix;
961
-					$ent = 'entrepot_' . $paramSuffix;
962
-					$pu = 'pu_' . $paramSuffix;
963
-					$lot = 'lot_number_' . $paramSuffix;
959
+					$prod = 'product_batch_'.$paramSuffix;
960
+					$qty = 'qty_'.$paramSuffix;
961
+					$ent = 'entrepot_'.$paramSuffix;
962
+					$pu = 'pu_'.$paramSuffix;
963
+					$lot = 'lot_number_'.$paramSuffix;
964 964
 					$dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo_'.$paramSuffix.'month', 'int'), GETPOST('dluo_'.$paramSuffix.'day', 'int'), GETPOST('dluo_'.$paramSuffix.'year', 'int'));
965 965
 					$dDLC = dol_mktime(12, 0, 0, GETPOST('dlc_'.$paramSuffix.'month', 'int'), GETPOST('dlc_'.$paramSuffix.'day', 'int'), GETPOST('dlc_'.$paramSuffix.'year', 'int'));
966 966
 					$fk_commandefourndet = 'fk_commandefourndet_'.$paramSuffix;
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
 			// Note that if an extrafield with the same name exists in the origin supplier order line, the value
995 995
 			// from the HTTP query will be ignored
996 996
 			foreach ($suffix2numAsked as $suffix => $n) {
997
-				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_' . $suffix, '');
997
+				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_'.$suffix, '');
998 998
 			}
999 999
 
1000 1000
 			print '<script type="text/javascript">
@@ -1056,7 +1056,7 @@  discard block
 block discarded – undo
1056 1056
 			// $objectsrc->lines contains the line of the purchase order
1057 1057
 			// $dispatchLines is list of lines with dispatching detail (with product, qty and warehouse). One purchase order line may have n of this dispatch lines.
1058 1058
 
1059
-			$arrayofpurchaselinealreadyoutput= array();
1059
+			$arrayofpurchaselinealreadyoutput = array();
1060 1060
 
1061 1061
 			// $_POST contains fk_commandefourndet_X_Y    where Y is num of product line and X is number of splitted line
1062 1062
 			$indiceAsked = 1;
@@ -1093,7 +1093,7 @@  discard block
 block discarded – undo
1093 1093
 
1094 1094
 					print '<td>';
1095 1095
 					print '<a name="'.$line->id.'"></a>'; // ancre pour retourner sur la ligne
1096
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1096
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1097 1097
 						print '<input type="hidden" name="productid'.$indiceAsked.'" value="'.$line->fk_product.'">';
1098 1098
 
1099 1099
 						// Show product and description
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
 					print '</td>';
1116 1116
 				} else {
1117 1117
 					print "<td>";
1118
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1118
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1119 1119
 						if ($type == 1) {
1120 1120
 							$text = img_object($langs->trans('Service'), 'service');
1121 1121
 						} else {
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
 
1145 1145
 				// Qty in source purchase order line
1146 1146
 				print '<td class="center">';
1147
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1147
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1148 1148
 					print $line->qty;
1149 1149
 				}
1150 1150
 				print '<input type="hidden" name="fk_commandefournisseurdet'.$indiceAsked.'" value="'.$line->id.'">';
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
 				// Qty already received
1157 1157
 				print '<td class="center">';
1158 1158
 				$quantityDelivered = $objectsrc->receptions[$line->id];
1159
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1159
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1160 1160
 					print $quantityDelivered;
1161 1161
 				}
1162 1162
 				print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">';
@@ -1971,7 +1971,7 @@  discard block
 block discarded – undo
1971 1971
 								$detail = $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $batchinfo);
1972 1972
 							}
1973 1973
 						}
1974
-						print $detail . '</td>';
1974
+						print $detail.'</td>';
1975 1975
 					} else {
1976 1976
 						print '<td></td>';
1977 1977
 					}
Please login to merge, or discard this patch.
htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 				if ($idbankfordirectdebit > 0) {
245 245
 					$tmpbankfordirectdebit = new Account($this->db);
246 246
 					$tmpbankfordirectdebit->fetch($idbankfordirectdebit);
247
-					$ics = $tmpbankfordirectdebit->ics;	// ICS for direct debit
247
+					$ics = $tmpbankfordirectdebit->ics; // ICS for direct debit
248 248
 				}
249 249
 				if (empty($ics) && !empty($conf->global->PRELEVEMENT_ICS)) {
250 250
 					$ics = $conf->global->PRELEVEMENT_ICS;
@@ -313,9 +313,9 @@  discard block
 block discarded – undo
313 313
 
314 314
 				$address = '______________________________________________';
315 315
 				if ($thirdparty->id > 0) {
316
-					$tmpaddresswithoutcountry = $thirdparty->getFullAddress();	// we test on address without country
316
+					$tmpaddresswithoutcountry = $thirdparty->getFullAddress(); // we test on address without country
317 317
 					if ($tmpaddresswithoutcountry) {
318
-						$address = $thirdparty->getFullAddress(1);	// full address
318
+						$address = $thirdparty->getFullAddress(1); // full address
319 319
 					}
320 320
 				}
321 321
 				$posY = $pdf->GetY();
Please login to merge, or discard this patch.