From 8f617b196a2db926665dd2a7130b21971d4f254d Mon Sep 17 00:00:00 2001
From: Juanjo Menent <jmenent@2byte.es>
Date: Sat, 4 Jun 2016 15:51:28 +0200
Subject: [PATCH] Fix printing following the rules

---
 htdocs/accountancy/admin/categories.php          | 2 +-
 htdocs/accountancy/admin/importaccounts.php      | 2 +-
 htdocs/accountancy/admin/productaccount.php      | 4 ++--
 htdocs/accountancy/bookkeeping/balance.php       | 2 +-
 htdocs/accountancy/bookkeeping/card.php          | 4 ++--
 htdocs/accountancy/bookkeeping/list.php          | 2 +-
 htdocs/accountancy/bookkeeping/listbyyear.php    | 2 +-
 htdocs/accountancy/customer/lines.php            | 2 +-
 htdocs/accountancy/customer/list.php             | 2 +-
 htdocs/accountancy/report/result.php             | 2 +-
 htdocs/accountancy/supplier/lines.php            | 2 +-
 htdocs/accountancy/supplier/list.php             | 2 +-
 htdocs/expensereport/synchro_compta.php          | 2 +-
 htdocs/product/price.php                         | 2 +-
 htdocs/societe/price.php                         | 2 +-
 scripts/accountancy/export-thirdpartyaccount.php | 2 +-
 16 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php
index f0013632b53..b1836836e84 100644
--- a/htdocs/accountancy/admin/categories.php
+++ b/htdocs/accountancy/admin/categories.php
@@ -138,7 +138,7 @@ if ($action == 'display' || $action == 'delete') {
 		if(!empty($obj)){
 			foreach ( $obj as $cpt ) {
 				$var = ! $var;
-				print "<tr $bc[$var]>";
+				print '<tr'. $bc[$var].'>';
 				print '<td>' . length_accountg($cpt->account_number) . '</td>';
 				print '<td>' . $cpt->label . '</td>';
 				print $form->formconfirm($_SERVER["PHP_SELF"]."?account_category=$cat_id&cptid=".$cpt->rowid, $langs->trans("DeleteCptCategory"), $langs->trans("ConfirmDeleteCptCategory"), "delete", '', 0, "action-delete".$j);
diff --git a/htdocs/accountancy/admin/importaccounts.php b/htdocs/accountancy/admin/importaccounts.php
index 0dc560aa62e..720f3a4f012 100644
--- a/htdocs/accountancy/admin/importaccounts.php
+++ b/htdocs/accountancy/admin/importaccounts.php
@@ -138,7 +138,7 @@ if ($result) {
 	while ( $i < min($num_lines, $limit) ) {
 		$objp = $db->fetch_object($result);
 		$var = ! $var;
-		print "<tr $bc[$var]>";
+		print '<tr'. $bc[$var].'>';
 		
 		print '<td align="left">';
 		print $objp->accounting;
diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php
index 80ed3f6fb47..63060e1ed60 100644
--- a/htdocs/accountancy/admin/productaccount.php
+++ b/htdocs/accountancy/admin/productaccount.php
@@ -328,10 +328,10 @@ if ($result) {
 		
 		$product_static = new Product($db);
 		
-		print "<tr $bc[$var]>";
+		print '<tr'. $bc[$var].'>';
 		
 		print "</tr>";
-		print "<tr $bc[$var]>";
+		print '<tr'. $bc[$var].'>';
 		// Ref produit as link
 		$product_static->ref = $obj->ref;
 		$product_static->id = $obj->rowid;
diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php
index e89799d765e..736aec48644 100644
--- a/htdocs/accountancy/bookkeeping/balance.php
+++ b/htdocs/accountancy/bookkeeping/balance.php
@@ -223,7 +223,7 @@ else {
 		if(empty($description)){
 			$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() .'</a>';
 		}
-		print "<tr $bc[$var]>";
+		print '<tr'. $bc[$var].'>';
 
 		print '<td>' . length_accountg($line->numero_compte) . '</td>';
 		print '<td>' . $description . '</td>';
diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php
index 5421a4a350d..7293797ecc6 100644
--- a/htdocs/accountancy/bookkeeping/card.php
+++ b/htdocs/accountancy/bookkeeping/card.php
@@ -346,7 +346,7 @@ if ($action == 'create') {
 				
 				foreach ( $book->linesmvt as $line ) {
 					$var = ! $var;
-					print "<tr $bc[$var]>";
+					print '<tr'. $bc[$var].'>';
 					
 					$total_debit += $line->debit;
 					$total_credit += $line->credit;
@@ -400,7 +400,7 @@ if ($action == 'create') {
 				
 				if ($action == "" || $action == 'add') {
 					$var = ! $var;
-					print "<tr $bc[$var]>";
+					print '<tr'. $bc[$var].'>';
 					print '<td>';
 					print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
 					print '</td>';
diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index 557143164a9..cb5d7caf006 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -368,7 +368,7 @@ foreach ( $object->lines as $line ) {
 	$total_debit += $line->debit;
 	$total_credit += $line->credit;
 
-	print "<tr $bc[$var]>";
+	print '<tr'. $bc[$var].'>';
 
 	print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->piece_num . '</a></td>';
 	print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php
index 10640c1887a..23eeb79621a 100644
--- a/htdocs/accountancy/bookkeeping/listbyyear.php
+++ b/htdocs/accountancy/bookkeeping/listbyyear.php
@@ -269,7 +269,7 @@ $var = True;
 foreach ( $object->lines as $line ) {
 	$var = ! $var;
 
-	print "<tr $bc[$var]>";
+	print '<tr'. $bc[$var].'>';
 	print '<td>' . $line->piece_num . '</td>' . "\n";
 	print '<td>' . $line->doc_type . '</td>' . "\n";
 	print '<td>' . dol_print_date($line->doc_date) . '</td>';
diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php
index 292b52b5863..3549651cbd6 100644
--- a/htdocs/accountancy/customer/lines.php
+++ b/htdocs/accountancy/customer/lines.php
@@ -288,7 +288,7 @@ if ($result) {
 		$var = ! $var;
 		$codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte;
 		
-		print "<tr $bc[$var]>";
+		print '<tr'. $bc[$var].'>';
 		
 		// Ref Invoice
 		$facture_static->ref = $objp->facnumber;
diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index 438eb30c621..167f558d830 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -302,7 +302,7 @@ if ($result) {
 		if ($objp->code_sell_l != $objp->code_sell_p)
 			$code_sell_p_l_differ = 'color:red';
 
-		print "<tr $bc[$var]>";
+		print '<tr'. $bc[$var].'>';
 
 		// Ref Invoice
 		$facture_static->ref = $objp->facnumber;
diff --git a/htdocs/accountancy/report/result.php b/htdocs/accountancy/report/result.php
index 48d587b575b..72a4d6e96b2 100644
--- a/htdocs/accountancy/report/result.php
+++ b/htdocs/accountancy/report/result.php
@@ -127,7 +127,7 @@ if(!empty($cats))
 			$resultN = $AccCat->getResult($cpt['account_number'], 0, $year_current, $cpt['dc']);
 			$sommes[$code]['NP'] += $resultNP;
 			$sommes[$code]['N'] += $resultN; 
-			print "<tr $bc[$var]>";
+			print '<tr'. $bc[$var].'>';
 			print '<td>' . $cpt['account_number'] . '</td>';
 			print '<td>' . $cpt['name_cpt'] . '</td>';
 			print '<td>' . price($resultNP)  . '</td>';
diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php
index 6ab2cf589a6..a0b2365350f 100644
--- a/htdocs/accountancy/supplier/lines.php
+++ b/htdocs/accountancy/supplier/lines.php
@@ -236,7 +236,7 @@ if ($result) {
 		$var = ! $var;
 		$codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label;
 		
-		print "<tr $bc[$var]>";
+		print '<tr'. $bc[$var].'>';
 		
 		// Ref Invoice
 		$facturefournisseur_static->ref = $objp->facnumber;
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index 8685cb7d5d4..c98ba050222 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -314,7 +314,7 @@ if ($result) {
 		if ($objp->code_buy_l != $objp->code_buy_p)
 			$code_buy_p_l_differ = 'color:red';
 		
-		print "<tr $bc[$var]>";
+		print '<tr'. $bc[$var].'>';
 
 		// Ref Invoice
 		$facturefourn_static->ref = $objp->ref;
diff --git a/htdocs/expensereport/synchro_compta.php b/htdocs/expensereport/synchro_compta.php
index 59a6b8926fe..31c2d985840 100644
--- a/htdocs/expensereport/synchro_compta.php
+++ b/htdocs/expensereport/synchro_compta.php
@@ -165,7 +165,7 @@ else:
 				while($i<$num):
 					$objp = $db->fetch_object($resql);
 					$var=!$var;
-						print "<tr $bc[$var]>";
+						print '<tr'. $bc[$var].'>';
 							print '<td>'.$objp->ref.'</td>';
 							print '<td>'.dol_print_date($db->jdate($objp->date_valid),'day').'</td>';
 							print '<td><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$objp->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$objp->declarant_NDF.'</a></td>';
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index 67bb3165fb6..694297b5b2f 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -1315,7 +1315,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
     		{
     			$objp = $db->fetch_object($result);
     			$var = ! $var;
-    			print "<tr $bc[$var]>";
+    			print '<tr'. $bc[$var].'>';
     			// Date
     			print "<td>" . dol_print_date($db->jdate($objp->dp), "dayhour") . "</td>";
     
diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php
index 45eba9b397f..4c988603417 100644
--- a/htdocs/societe/price.php
+++ b/htdocs/societe/price.php
@@ -416,7 +416,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
 
 			foreach ( $prodcustprice->lines as $line ) {
 
-				print "<tr $bc[$var]>";
+				print '<tr'. $bc[$var].'>';
 				$staticprod = new Product($db);
 				$staticprod->fetch($line->fk_product);
 
diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php
index 05236aabf7e..c84ffdabc0f 100755
--- a/scripts/accountancy/export-thirdpartyaccount.php
+++ b/scripts/accountancy/export-thirdpartyaccount.php
@@ -207,7 +207,7 @@ if ($resql) {
 
 		$var = ! $var;
 
-		print "<tr $bc[$var]>";
+		print '<tr'. $bc[$var].'>';
 		print '<td>';
 		$thirdpartystatic->id = $obj->rowid;
 		$thirdpartystatic->name = $obj->name;
-- 
GitLab