From bdb2f851032c9f4a8a6253cd45bde4470eb6374e Mon Sep 17 00:00:00 2001 From: philippe grand <philippe.grand@atoo-net.com> Date: Mon, 15 May 2017 16:25:51 +0200 Subject: [PATCH] Update code using new css class --- htdocs/expedition/card.php | 2 +- htdocs/expedition/index.php | 22 +++++++--------------- htdocs/expedition/stats/index.php | 6 ++---- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index cbe602f7313..a0280ce9e39 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1013,7 +1013,7 @@ if ($action == 'create') { $img=img_warning($langs->trans("StockTooLow")); } - print "<tr ".$bc[$var]."><td> -> + print "<tr class=\"oddeven\"><td> -> <a href=\"".DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." </a> (".$value['nb'].")</td><td align=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> <td align=\"center\">".$value['stock']." ".$img."</td></tr>"; diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index c3e277ad7b0..039a038f18a 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -90,17 +90,15 @@ if ($resql) print '<tr class="liste_titre">'; print '<th colspan="3">'.$langs->trans("SendingsToValidate").'</th></tr>'; $i = 0; - $var = True; while ($i < $num) { $obj = $db->fetch_object($resql); $shipment->id=$obj->rowid; $shipment->ref=$obj->ref; - $shipment->ref_customer=$obj->ref_customer; - + $shipment->ref_customer=$obj->ref_customer; - print "<tr ".$bc[$var].'><td class="nowrap">'; + print '<tr class="oddeven"><td class="nowrap">'; print $shipment->getNomUrl(1); print "</td>"; print '<td>'; @@ -142,7 +140,6 @@ if ($resql) print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<th colspan="3">'.$langs->trans("OrdersToProcess").'</th></tr>'; - $var = True; while ($i < $num) { $obj = $db->fetch_object($resql); @@ -154,8 +151,7 @@ if ($resql) $orderstatic->facturee=0; $companystatic->name=$obj->name; - $companystatic->id=$obj->socid; - + $companystatic->id=$obj->socid; print '<tr class="oddeven">'; print '<td class="nowrap">'; @@ -204,7 +200,6 @@ if ( $resql ) print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<th colspan="3">'.$langs->trans("OrdersInProcess").'</th></tr>'; - $var = True; while ($i < $num) { $obj = $db->fetch_object($resql); @@ -216,10 +211,9 @@ if ( $resql ) $orderstatic->facturee=$obj->billed; $companystatic->name=$obj->name; - $companystatic->id=$obj->socid; - + $companystatic->id=$obj->socid; - print "<tr ".$bc[$var]."><td>"; + print '<tr class="oddeven"><td>'; print $orderstatic->getNomUrl(1); print '</td>'; print '<td>'; @@ -264,16 +258,14 @@ if ($resql) $i = 0; print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; - print '<th colspan="3">'.$langs->trans("LastSendings",$num).'</th></tr>'; - $var = True; + print '<th colspan="3">'.$langs->trans("LastSendings", $num).'</th></tr>'; while ($i < $num) { $obj = $db->fetch_object($resql); $shipment->id=$obj->rowid; $shipment->ref=$obj->ref; - $shipment->ref_customer=$obj->ref_customer; - + $shipment->ref_customer=$obj->ref_customer; print '<tr class="oddeven"><td>'; print $shipment->getNomUrl(1); diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index cccfc0d90a0..53837c76fd1 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -269,7 +269,6 @@ print '<td align="center">'.$langs->trans("AmountAverage").'</td>';*/ print '</tr>'; $oldyear=0; -$var=true; foreach ($data as $val) { $year = $val['year']; @@ -278,7 +277,7 @@ foreach ($data as $val) $oldyear--; - print '<tr '.$bc[$var].' height="24">'; + print '<tr class="oddeven" height="24">'; print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.'">'.$oldyear.'</a></td>'; print '<td align="right">0</td>'; @@ -286,9 +285,8 @@ foreach ($data as $val) print '<td align="right">0</td>';*/ print '</tr>'; } - - print '<tr '.$bc[$var].' height="24">'; + print '<tr class="oddeven" height="24">'; print '<td align="center">'; if ($year) print '<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.'">'.$year.'</a>'; else print $langs->trans("ValidationDateNotDefinedEvenIfShipmentValidated"); -- GitLab