Test Failed
Branch develop (86e751)
by Laurent
34:11
created
htdocs/accountancy/customer/index.php 1 patch
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,10 +42,12 @@  discard block
 block discarded – undo
42 42
 if (empty($conf->accounting->enabled)) {
43 43
 	accessforbidden();
44 44
 }
45
-if ($user->societe_id > 0)
45
+if ($user->societe_id > 0) {
46 46
 	accessforbidden();
47
-if (! $user->rights->accounting->bind->write)
47
+}
48
+if (! $user->rights->accounting->bind->write) {
48 49
 	accessforbidden();
50
+}
49 51
 
50 52
 // Filter
51 53
 $year = GETPOST("year",'int');
@@ -238,15 +240,17 @@  discard block
 block discarded – undo
238 240
 		if ($row[0] == 'tobind')
239 241
 		{
240 242
 			print $langs->trans("Unknown");
243
+		} else {
244
+			print length_accountg($row[0]);
241 245
 		}
242
-		else print length_accountg($row[0]);
243 246
 		print '</td>';
244 247
 		print '<td align="left">';
245 248
 		if ($row[0] == 'tobind')
246 249
 		{
247 250
 			print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
251
+		} else {
252
+			print $row[1];
248 253
 		}
249
-		else print $row[1];
250 254
 		print '</td>';
251 255
 		for($i = 2; $i <= 12; $i ++) {
252 256
 			print '<td align="right">' . price($row[$i]) . '</td>';
@@ -307,16 +311,18 @@  discard block
 block discarded – undo
307 311
 		if ($row[0] == 'tobind')
308 312
 		{
309 313
 			print $langs->trans("Unknown");
314
+		} else {
315
+			print length_accountg($row[0]);
310 316
 		}
311
-		else print length_accountg($row[0]);
312 317
 		print '</td>';
313 318
 
314 319
 		print '<td align="left">';
315 320
 		if ($row[0] == 'tobind')
316 321
 		{
317 322
 			print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
323
+		} else {
324
+			print $row[1];
318 325
 		}
319
-		else print $row[1];
320 326
 		print '</td>';
321 327
 
322 328
 		for($i = 2; $i <= 12; $i ++) {
@@ -334,9 +340,11 @@  discard block
 block discarded – undo
334 340
 print '</div>';
335 341
 
336 342
 
337
-if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
343
+if ($conf->global->MAIN_FEATURES_LEVEL > 0) {
344
+	// This part of code looks strange. Why showing a report that should rely on result of this step ?
338 345
 {
339 346
 	print '<br>';
347
+}
340 348
 	print '<br>';
341 349
 
342 350
 	print_fiche_titre($langs->trans("OtherInfo"), '', '');
Please login to merge, or discard this patch.
htdocs/accountancy/journal/purchasesjournal.php 1 patch
Braces   +76 added lines, -42 removed lines patch added patch discarded remove patch
@@ -48,13 +48,16 @@  discard block
 block discarded – undo
48 48
 $date_endday = GETPOST('date_endday');
49 49
 $date_endyear = GETPOST('date_endyear');
50 50
 $in_bookkeeping = GETPOST('in_bookkeeping');
51
-if ($in_bookkeeping == '') $in_bookkeeping = 'notyet';
51
+if ($in_bookkeeping == '') {
52
+	$in_bookkeeping = 'notyet';
53
+}
52 54
 
53 55
 $now = dol_now();
54 56
 
55 57
 // Security check
56
-if ($user->societe_id > 0)
58
+if ($user->societe_id > 0) {
57 59
 	accessforbidden();
60
+}
58 61
 
59 62
 /*
60 63
  * Actions
@@ -77,9 +80,11 @@  discard block
 block discarded – undo
77 80
 $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
78 81
 $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear);
79 82
 
80
-if (empty($date_start) || empty($date_end)) // We define date_start and date_end
83
+if (empty($date_start) || empty($date_end)) {
84
+	// We define date_start and date_end
81 85
 {
82 86
 	$date_start = dol_get_first_day($pastmonthyear, $pastmonth, false);
87
+}
83 88
 	$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
84 89
 }
85 90
 
@@ -104,12 +109,15 @@  discard block
 block discarded – undo
104 109
 } else {
105 110
     $sql .= " AND f.type IN (" . FactureFournisseur::TYPE_STANDARD . "," . FactureFournisseur::TYPE_REPLACEMENT . "," . FactureFournisseur::TYPE_CREDIT_NOTE . "," . FactureFournisseur::TYPE_DEPOSIT . "," . FactureFournisseur::TYPE_SITUATION . ")";
106 111
 }
107
-if ($date_start && $date_end)
112
+if ($date_start && $date_end) {
108 113
 	$sql .= " AND f.datef >= '" . $db->idate($date_start) . "' AND f.datef <= '" . $db->idate($date_end) . "'";
109
-if ($in_bookkeeping == 'already')
114
+}
115
+if ($in_bookkeeping == 'already') {
110 116
 	$sql .= " AND f.rowid IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab  WHERE ab.doc_type='supplier_invoice')";
111
-if ($in_bookkeeping == 'notyet')
117
+}
118
+if ($in_bookkeeping == 'notyet') {
112 119
 	$sql .= " AND f.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab  WHERE ab.doc_type='supplier_invoice')";
120
+}
113 121
 $sql .= " ORDER BY f.datef";
114 122
 
115 123
 dol_syslog('accountancy/journal/purchasesjournal.php', LOG_DEBUG);
@@ -139,10 +147,11 @@  discard block
 block discarded – undo
139 147
 
140 148
 		$compta_prod = $obj->compte;
141 149
 		if (empty($compta_prod)) {
142
-			if ($obj->product_type == 0)
143
-				$compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : 'NotDefined';
144
-			else
145
-				$compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : 'NotDefined';
150
+			if ($obj->product_type == 0) {
151
+							$compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : 'NotDefined';
152
+			} else {
153
+							$compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : 'NotDefined';
154
+			}
146 155
 		}
147 156
 
148 157
 		$vatdata = getTaxesFromId($obj->tva_tx.($obj->vat_src_code?' ('.$obj->vat_src_code.')':''), $mysoc, $mysoc, 0);
@@ -165,11 +174,21 @@  discard block
 block discarded – undo
165 174
 		//$tabfac[$obj->rowid]["fk_facturefourndet"] = $obj->fdid;
166 175
 
167 176
 		// Avoid warnings
168
-		if (! isset($tabttc[$obj->rowid][$compta_soc])) $tabttc[$obj->rowid][$compta_soc] = 0;
169
-		if (! isset($tabht[$obj->rowid][$compta_prod])) $tabht[$obj->rowid][$compta_prod] = 0;
170
-		if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva] = 0;
171
-		if (! isset($tablocaltax1[$obj->rowid][$compta_localtax1])) $tablocaltax1[$obj->rowid][$compta_localtax1] = 0;
172
-		if (! isset($tablocaltax2[$obj->rowid][$compta_localtax2])) $tablocaltax2[$obj->rowid][$compta_localtax2] = 0;
177
+		if (! isset($tabttc[$obj->rowid][$compta_soc])) {
178
+			$tabttc[$obj->rowid][$compta_soc] = 0;
179
+		}
180
+		if (! isset($tabht[$obj->rowid][$compta_prod])) {
181
+			$tabht[$obj->rowid][$compta_prod] = 0;
182
+		}
183
+		if (! isset($tabtva[$obj->rowid][$compta_tva])) {
184
+			$tabtva[$obj->rowid][$compta_tva] = 0;
185
+		}
186
+		if (! isset($tablocaltax1[$obj->rowid][$compta_localtax1])) {
187
+			$tablocaltax1[$obj->rowid][$compta_localtax1] = 0;
188
+		}
189
+		if (! isset($tablocaltax2[$obj->rowid][$compta_localtax2])) {
190
+			$tablocaltax2[$obj->rowid][$compta_localtax2] = 0;
191
+		}
173 192
 
174 193
 		$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc;
175 194
 		$tabht[$obj->rowid][$compta_prod] += $obj->total_ht;
@@ -244,13 +263,14 @@  discard block
 block discarded – undo
244 263
 
245 264
 					$result = $bookkeeping->create($user);
246 265
 					if ($result < 0) {
247
-						if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists')	// Already exists
266
+						if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') {
267
+							// Already exists
248 268
 						{
249 269
 							$error++;
270
+						}
250 271
 							$errorforline++;
251 272
 							//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
252
-						}
253
-						else
273
+						} else
254 274
 						{
255 275
 							$error++;
256 276
 							$errorforline++;
@@ -292,13 +312,14 @@  discard block
 block discarded – undo
292 312
 
293 313
 						$result = $bookkeeping->create($user);
294 314
 						if ($result < 0) {
295
-							if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists')	// Already exists
315
+							if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') {
316
+								// Already exists
296 317
 							{
297 318
 								$error++;
319
+							}
298 320
 								$errorforline++;
299 321
 								//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
300
-							}
301
-							else
322
+							} else
302 323
 							{
303 324
 								$error++;
304 325
 								$errorforline++;
@@ -318,8 +339,12 @@  discard block
 block discarded – undo
318 339
 			foreach($listoftax as $numtax)
319 340
 			{
320 341
 				$arrayofvat = $tabtva;
321
-				if ($numtax == 1) $arrayofvat = $tablocaltax1;
322
-				if ($numtax == 2) $arrayofvat = $tablocaltax2;
342
+				if ($numtax == 1) {
343
+					$arrayofvat = $tablocaltax1;
344
+				}
345
+				if ($numtax == 2) {
346
+					$arrayofvat = $tablocaltax2;
347
+				}
323 348
 
324 349
 				foreach ( $arrayofvat[$key] as $k => $mt ) {
325 350
 				if ($mt) {
@@ -346,13 +371,14 @@  discard block
 block discarded – undo
346 371
 
347 372
 					$result = $bookkeeping->create($user);
348 373
 					if ($result < 0) {
349
-						if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists')	// Already exists
374
+						if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') {
375
+							// Already exists
350 376
 						{
351 377
 							$error++;
378
+						}
352 379
 							$errorforline++;
353 380
 							//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
354
-						}
355
-						else
381
+						} else
356 382
 						{
357 383
 							$error++;
358 384
 							$errorforline++;
@@ -367,8 +393,7 @@  discard block
 block discarded – undo
367 393
 		if (! $errorforline)
368 394
 		{
369 395
 			$db->commit();
370
-		}
371
-		else
396
+		} else
372 397
 		{
373 398
 			$db->rollback();
374 399
 
@@ -382,12 +407,10 @@  discard block
 block discarded – undo
382 407
 
383 408
 	if (empty($error) && count($tabpay) > 0) {
384 409
 		setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
385
-	}
386
-	elseif (count($tabpay) == $error)
410
+	} elseif (count($tabpay) == $error)
387 411
 	{
388 412
 		setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings');
389
-	}
390
-	else
413
+	} else
391 414
 	{
392 415
 		setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
393 416
 	}
@@ -482,8 +505,12 @@  discard block
 block discarded – undo
482 505
 			$listoftax = array(0, 1, 2);
483 506
 			foreach ($listoftax as $numtax) {
484 507
 				$arrayofvat = $tabtva;
485
-				if ($numtax == 1) $arrayofvat = $tablocaltax1;
486
-				if ($numtax == 2) $arrayofvat = $tablocaltax2;
508
+				if ($numtax == 1) {
509
+					$arrayofvat = $tablocaltax1;
510
+				}
511
+				if ($numtax == 2) {
512
+					$arrayofvat = $tablocaltax2;
513
+				}
487 514
 
488 515
 				foreach ($arrayofvat[$key] as $k => $mt) {
489 516
 				if ($mt) {
@@ -537,8 +564,7 @@  discard block
 block discarded – undo
537 564
 	print '<div class="tabsAction tabsActionNoBottom">';
538 565
 	if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
539 566
 		print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
540
-	}
541
-	else {
567
+	} else {
542 568
 		print '<input type="button" class="butAction" name="writebookkeeping" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
543 569
 	}
544 570
 	print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
@@ -610,8 +636,9 @@  discard block
 block discarded – undo
610 636
 			if (empty($accountoshow) || $accountoshow == 'NotDefined')
611 637
 			{
612 638
 				print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
639
+			} else {
640
+				print $accountoshow;
613 641
 			}
614
-			else print $accountoshow;
615 642
 			print '</td>';
616 643
 			// Subledger account
617 644
 			print "<td>";
@@ -619,8 +646,9 @@  discard block
 block discarded – undo
619 646
 			if (empty($accountoshow) || $accountoshow == 'NotDefined')
620 647
 			{
621 648
 				print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
649
+			} else {
650
+				print $accountoshow;
622 651
 			}
623
-			else print $accountoshow;
624 652
 			print '</td>';
625 653
 			print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
626 654
 			print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
@@ -644,8 +672,9 @@  discard block
 block discarded – undo
644 672
 				if (empty($accountoshow) || $accountoshow == 'NotDefined')
645 673
 				{
646 674
 					print '<span class="error">'.$langs->trans("ProductAccountNotDefined").'</span>';
675
+				} else {
676
+					print $accountoshow;
647 677
 				}
648
-				else print $accountoshow;
649 678
 				print "</td>";
650 679
 				// Subledger account
651 680
 				print "<td>";
@@ -663,8 +692,12 @@  discard block
 block discarded – undo
663 692
 		$listoftax = array(0, 1, 2);
664 693
 		foreach ($listoftax as $numtax) {
665 694
 			$arrayofvat = $tabtva;
666
-			if ($numtax == 1) $arrayofvat = $tablocaltax1;
667
-			if ($numtax == 2) $arrayofvat = $tablocaltax2;
695
+			if ($numtax == 1) {
696
+				$arrayofvat = $tablocaltax1;
697
+			}
698
+			if ($numtax == 2) {
699
+				$arrayofvat = $tablocaltax2;
700
+			}
668 701
 
669 702
 			foreach ( $arrayofvat[$key] as $k => $mt ) {
670 703
 				if ($mt) {
@@ -678,8 +711,9 @@  discard block
 block discarded – undo
678 711
 				if (empty($accountoshow) || $accountoshow == 'NotDefined')
679 712
 				{
680 713
 					print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
714
+				} else {
715
+					print $accountoshow;
681 716
 				}
682
-				else print $accountoshow;
683 717
 				print "</td>";
684 718
 				// Subledger account
685 719
 				print "<td>";
Please login to merge, or discard this patch.
htdocs/accountancy/bookkeeping/list.php 1 patch
Braces   +37 added lines, -23 removed lines patch added patch discarded remove patch
@@ -86,8 +86,12 @@  discard block
 block discarded – undo
86 86
 $offset = $limit * $page;
87 87
 $pageprev = $page - 1;
88 88
 $pagenext = $page + 1;
89
-if ($sortorder == "") $sortorder = "ASC";
90
-if ($sortfield == "") $sortfield = "t.rowid";
89
+if ($sortorder == "") {
90
+	$sortorder = "ASC";
91
+}
92
+if ($sortfield == "") {
93
+	$sortfield = "t.rowid";
94
+}
91 95
 
92 96
 
93 97
 $object = new BookKeeping($db);
@@ -111,9 +115,11 @@  discard block
 block discarded – undo
111 115
 if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
112 116
 if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
113 117
 
114
-if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
118
+if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) {
119
+	// All tests are required to be compatible with all browsers
115 120
 {
116 121
 	$search_mvt_num = '';
122
+}
117 123
 	$search_doc_type = '';
118 124
 	$search_doc_ref = '';
119 125
 	$search_doc_date = '';
@@ -226,15 +232,13 @@  discard block
 block discarded – undo
226 232
 		$result = $object->deleteByYearAndJournal($delyear,$deljournal);
227 233
 		if ($result < 0) {
228 234
 			setEventMessages($object->error, $object->errors, 'errors');
229
-		}
230
-		else
235
+		} else
231 236
 		{
232 237
 			setEventMessages("RecordDeleted", null, 'mesgs');
233 238
 		}
234 239
 		Header("Location: list.php");
235 240
 		exit;
236
-	}
237
-	else
241
+	} else
238 242
 	{
239 243
 		setEventMessages("NoRecordDeleted", null, 'warnings');
240 244
 		Header("Location: list.php");
@@ -249,8 +253,7 @@  discard block
 block discarded – undo
249 253
 		$result = $object->deleteMvtNum($mvt_num);
250 254
 		if ($result < 0) {
251 255
 			setEventMessages($object->error, $object->errors, 'errors');
252
-		}
253
-		else
256
+		} else
254 257
 		{
255 258
 			setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
256 259
 		}
@@ -267,8 +270,7 @@  discard block
 block discarded – undo
267 270
 	if ($result < 0)
268 271
 	{
269 272
 		setEventMessages($object->error, $object->errors, 'errors');
270
-	}
271
-	else
273
+	} else
272 274
 	{
273 275
 		$accountancyexport = new AccountancyExport($db);
274 276
 		$accountancyexport->export($object->lines);
@@ -341,12 +343,18 @@  discard block
 block discarded – undo
341 343
 }
342 344
 
343 345
 //$param='';	param started before
344
-if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
345
-if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
346
+if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
347
+	$param.='&contextpage='.$contextpage;
348
+}
349
+if ($limit > 0 && $limit != $conf->liste_limit) {
350
+	$param.='&limit='.$limit;
351
+}
346 352
 
347 353
 print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
348 354
 print '<input type="hidden" name="action" value="list">';
349
-if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
355
+if ($optioncss != '') {
356
+	print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
357
+}
350 358
 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
351 359
 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
352 360
 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
@@ -355,8 +363,11 @@  discard block
 block discarded – undo
355 363
 
356 364
 $listofformat=AccountancyExport::getType();
357 365
 $button = '<a class="butAction" name="button_export_file" href="'.$_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'').'">';
358
-if (count($filter)) $button.= $langs->trans("ExportFilteredList");
359
-else $button.= $langs->trans("ExportList");
366
+if (count($filter)) {
367
+	$button.= $langs->trans("ExportFilteredList");
368
+} else {
369
+	$button.= $langs->trans("ExportList");
370
+}
360 371
 $button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')';
361 372
 $button.= '</a>';
362 373
 
@@ -404,8 +415,7 @@  discard block
 block discarded – undo
404 415
 if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
405 416
 {
406 417
 	print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
407
-}
408
-else
418
+} else
409 419
 {
410 420
 	print '<input type="text" name="search_accountancy_aux_code_start" value="'.$search_accountancy_aux_code_start.'">';
411 421
 }
@@ -417,8 +427,7 @@  discard block
 block discarded – undo
417 427
 if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
418 428
 {
419 429
 	print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
420
-}
421
-else
430
+} else
422 431
 {
423 432
 	print '<input type="text" name="search_accountancy_aux_code_end" value="'.$search_accountancy_aux_code_end.'">';
424 433
 }
@@ -447,7 +456,9 @@  discard block
 block discarded – undo
447 456
 print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
448 457
 print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
449 458
 $checkpicto='';
450
-if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
459
+if ($massactionbutton) {
460
+	$checkpicto=$form->showCheckAddButtons('checkforselect', 1);
461
+}
451 462
 print_liste_field_titre($checkpicto, $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
452 463
 print "</tr>\n";
453 464
 
@@ -489,8 +500,11 @@  discard block
 block discarded – undo
489 500
 }
490 501
 
491 502
 print '<tr class="liste_total">';
492
-if ($num < $limit) print '<td align="left" colspan="7">'.$langs->trans("Total").'</td>';
493
-else print '<td align="left" colspan="7">'.$langs->trans("Totalforthispage").'</td>';
503
+if ($num < $limit) {
504
+	print '<td align="left" colspan="7">'.$langs->trans("Total").'</td>';
505
+} else {
506
+	print '<td align="left" colspan="7">'.$langs->trans("Totalforthispage").'</td>';
507
+}
494 508
 print '</td>';
495 509
 print '<td  align="right">';
496 510
 print price($total_debit);
Please login to merge, or discard this patch.