|
From: <dai...@us...> - 2014-09-01 09:47:23
|
Revision: 6861
http://sourceforge.net/p/web-erp/reponame/6861
Author: daintree
Date: 2014-09-01 09:47:13 +0000 (Mon, 01 Sep 2014)
Log Message:
-----------
keep more verbose row colour code
Modified Paths:
--------------
trunk/TaxGroups.php
trunk/TaxProvinces.php
Modified: trunk/TaxGroups.php
===================================================================
--- trunk/TaxGroups.php 2014-09-01 09:43:08 UTC (rev 6860)
+++ trunk/TaxGroups.php 2014-09-01 09:47:13 UTC (rev 6861)
@@ -176,9 +176,15 @@
<th colspan="2" > </th>
</tr>';
- $k = False;// Row counter to determine background colour.
+ $j = 1;
while($myrow = DB_fetch_array($result)) {
- $k = TableRows($k);// Outputs html table row with class (Odd|Even).
+ if ($j==1) {
+ echo '<tr class="OddTableRows">';
+ $j=0;
+ } else {
+ echo '<tr class="EvenTableRows">';
+ $j++;
+ }
printf('<td class="number">%s</td>
<td>%s</td>
<td><a href="%s&SelectedGroup=%s">' . _('Edit') . '</a></td>
@@ -283,14 +289,20 @@
<th>' . _('Order') . '</th>
<th>' . _('Tax on Prior Taxes') . '</th>
</tr>';
- $k = False;// Row counter to determine background colour.
+ $j = 1;
for ($i=1;$i < count($TaxAuthRow)+1;$i++) {
if($TaxAuthRow[$i]['calculationorder']==0) {
$TaxAuthRow[$i]['calculationorder'] = $i;
}
- $k = TableRows($k);// Outputs html table row with class (Odd|Even).
+ if ($j==1) {
+ echo '<tr class="OddTableRows">';
+ $j=0;
+ } else {
+ echo '<tr class="EvenTableRows">';
+ $j++;
+ }
echo '<td>' . $TaxAuthRow[$i]['taxname'] . '</td>
<td><input type="text" class="integer" pattern="[1-4] {1}" title="'._('The input must be positive integer and less than 5').'" name="CalcOrder_' . $TaxAuthRow[$i]['taxauthid'] . '" value="' . $TaxAuthRow[$i]['calculationorder'] . '" size="2" maxlength="2" style="width: 100%" /></td>
<td><select name="TaxOnTax_' . $TaxAuthRow[$i]['taxauthid'] . '" style="width: 100%">';
@@ -335,12 +347,18 @@
'</div>';
}
- $k = False;// Row counter to determine background colour.
+ $j = 1;
while($AvailRow = DB_fetch_array($Result)) {
$TaxAuthUsedPointer = array_search($AvailRow['taxid'],$TaxAuthsUsed);
- $k = TableRows($k);// Outputs html table row with class (Odd|Even).
+ if ($j==1) {
+ echo '<tr class="OddTableRows">';
+ $j=0;
+ } else {
+ echo '<tr class="EvenTableRows">';
+ $j++;
+ }
if($TaxAuthUsedPointer) {
if($TaxAuthRow[$TaxAuthUsedPointer]['taxontax'] ==1) {
$TaxOnTax = _('Yes');
Modified: trunk/TaxProvinces.php
===================================================================
--- trunk/TaxProvinces.php 2014-09-01 09:43:08 UTC (rev 6860)
+++ trunk/TaxProvinces.php 2014-09-01 09:47:13 UTC (rev 6861)
@@ -166,9 +166,15 @@
<th colspan="2"> </th>
</tr>';
- $k = False;// Row counter to determine background colour.
+ $j = 1;
while($myrow = DB_fetch_row($result)) {
- $k = TableRows($k);// Outputs html table row with class (Odd|Even).
+ if ($j==1) {
+ echo '<tr class="OddTableRows">';
+ $j=0;
+ } else {
+ echo '<tr class="EvenTableRows">';
+ $j++;
+ }
echo '<td>' . $myrow[1] . '</td>
<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedTaxProvince=' . $myrow[0] . '">' . _('Edit') . '</a></td>
<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedTaxProvince=' . $myrow[0] . '&delete=1">' . _('Delete') . '</a></td>
|