Remove useless $var

This commit is contained in:
Laurent Destailleur 2018-04-22 18:51:03 +02:00
parent 21add1c10b
commit fec9303d18
17 changed files with 23 additions and 74 deletions

View File

@ -129,8 +129,6 @@ if ($resql)
print '</td>';
print '</tr>';
$var = True;
$users = array();
while ($i < min($num,$limit))

View File

@ -71,7 +71,6 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
$thirdpartystatic=new Societe($db);
$invoicestatic=new Facture($db);
$bprev = new BonPrelevement($db);
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").'</th></tr>';
@ -117,7 +116,6 @@ if ($resql)
print '<th colspan="5">'.$langs->trans("InvoiceWaitingWithdraw").' ('.$num.')</th></tr>';
if ($num)
{
$var = True;
while ($i < $num && $i < 20)
{
$obj = $db->fetch_object($resql);
@ -184,7 +182,6 @@ if ($result)
{
$num = $db->num_rows($result);
$i = 0;
$var=True;
print"\n<!-- debut table -->\n";
print '<table class="noborder" width="100%">';

View File

@ -551,7 +551,6 @@ print '</div>';
if ($num)
{
$var = True;
$total_ttc_Rac = $totalam_Rac = $total_Rac = 0;
while ($i < $num)
{
@ -602,7 +601,6 @@ print '</div>';
if ($num)
{
$var = True;
$total_pr = 0;
while ($i < $num)
{

View File

@ -461,15 +461,14 @@ class printing_printgcp extends PrintingDriver
$html .= '<td>'.$langs->trans("Status").'</td>';
$html .= '<td>'.$langs->trans("Cancel").'</td>';
$html .= '</tr>'."\n";
$var = True;
$jobs = $responsedata['jobs'];
//$html .= '<pre>'.print_r($jobs['0'],true).'</pre>';
if (is_array($jobs))
{
foreach ($jobs as $value)
{
$var = !$var;
$html .= '<tr '.$bc[$var].'>';
$html .= '<tr class="oddeven">';
$html .= '<td>'.$value['id'].'</td>';
$dates=dol_print_date((int) substr($value['createTime'], 0, 10), 'dayhour');
$html .= '<td>'.$dates.'</td>';

View File

@ -287,12 +287,11 @@ class printing_printipp extends PrintingDriver
$html .= '<td>Cancel</td>';
$html .= '</tr>'."\n";
$jobs = $ipp->jobs_attributes;
$var = True;
//$html .= '<pre>'.print_r($jobs,true).'</pre>';
foreach ($jobs as $value )
{
$var = !$var;
$html .= '<tr '.$bc[$var].'>';
$html .= '<tr class="oddeven">';
$html .= '<td>'.$value->job_id->_value0.'</td>';
$html .= '<td>'.$value->job_originating_user_name->_value0.'</td>';
$html .= '<td>'.$value->printer_uri->_value0.'</td>';

View File

@ -150,7 +150,6 @@ print '</tr>';
$total=0;
$totalnb=0;
$var=true;
foreach ($listofstatus as $status)
{
@ -200,10 +199,8 @@ if ($resql)
if ($num)
{
$i = 0;
$var = True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';

View File

@ -73,7 +73,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->expensere
$db->begin();
$result=$object->valide();
if ($result > 0)
{
$db->commit();
@ -112,7 +112,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->expensere
llxHeader('', $langs->trans("ExpenseReportPayment"));
if ($id > 0)
if ($id > 0)
{
$result=$object->fetch($id);
if (! $result) dol_print_error($db,'Failed to get payment id '.$id);
@ -240,8 +240,6 @@ if ($resql)
if ($num > 0)
{
$var=True;
while ($i < $num)
{
$objp = $db->fetch_object($resql);
@ -277,7 +275,7 @@ if ($resql)
$i++;
}
}
print "</table>\n";
print '</div>';

View File

@ -430,8 +430,6 @@ if ($object->id > 0)
print $boxstat;
$var=true;
$MAXLIST=$conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
// Lien recap
@ -549,12 +547,10 @@ if ($object->id > 0)
print '</td></tr>';
}
$var = True;
while ($i < $num && $i <= $MAXLIST)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td class="nowrap">';
$proposalstatic->id = $obj->rowid;
@ -654,12 +650,10 @@ if ($object->id > 0)
print '</td></tr>';
}
$var = True;
while ($i < $num && $i < $MAXLIST)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td class="nowrap">';
$orderstatic->id = $obj->rowid;
@ -727,7 +721,7 @@ if ($object->id > 0)
print '</tr></table>';
print '</td></tr>';
}
$var=True;
while ($i < min($num,$MAXLIST))
{
$obj = $db->fetch_object($resql);

View File

@ -55,7 +55,6 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
$var=false;
print '<form method="post" action="list.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover" width="100%">';
@ -86,8 +85,6 @@ if ($resql)
$num = $db->num_rows($resql);
$i = 0;
$var=True;
$total=0;
$totalinprocess=0;
$dataseries=array();
@ -181,7 +178,6 @@ if ($resql)
print '<tr class="liste_titre"><th>'.$langs->trans("Status").'</th>';
print '<th align="right">'.$langs->trans("Nb").'</th>';
print "</tr>\n";
$var=True;
while ($i < $num)
{
@ -230,11 +226,10 @@ if (! empty($conf->fournisseur->enabled))
if ($num)
{
$i = 0;
$var = True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td class="nowrap">';
print "<a href=\"card.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."</a></td>";
@ -271,13 +266,11 @@ if ($resql)
print '<table class="liste" width="100%">';
print '<tr class="liste_titre"><th>'.$langs->trans("UserWithApproveOrderGrant").'</th>';
print "</tr>\n";
$var=True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td>';
$userstatic->id=$obj->rowid;
@ -329,10 +322,8 @@ if ($resql)
if ($num)
{
$i = 0;
$var = True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
@ -398,11 +389,10 @@ print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_R
if ($num)
{
$i = 0;
$var = True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td class="nowrap">';

View File

@ -542,13 +542,12 @@ if (($action != 'create' && $action != 'add') && !$error) {
print '</td></tr>';
$var = True;
$generic_commande = new CommandeFournisseur($db);
while ( $i < $num ) {
while ($i < $num) {
$objp = $db->fetch_object($resql);
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
print '<td class="nowrap">';
$generic_commande->id = $objp->rowid;

View File

@ -126,11 +126,10 @@ if (! empty($conf->fournisseur->enabled))
print '<td colspan="3">'.$langs->trans("DraftOrders").' <span class="badge">'.$num.'</span></td></tr>';
$i = 0;
$var = true;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven"><td class="nowrap">';
$commandestatic->id=$obj->rowid;
$commandestatic->ref=$obj->ref;
@ -183,7 +182,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
print '<td colspan="3">'.$langs->trans("DraftBills").' <span class="badge">'.$num.'</span></td></tr>';
$i = 0;
$tot_ttc = 0;
$var = True;
while ($i < $num && $i < 20)
{
$obj = $db->fetch_object($resql);
@ -256,12 +255,8 @@ if ($resql)
print '<td align="right">'.$langs->trans("DateModification")."</td>\n";
print "</tr>\n";
$var=True;
while ($obj = $db->fetch_object($resql) )
{
print '<tr class="oddeven">';
print '<td><a href="card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"),"company").'</a>';
print "&nbsp;<a href=\"card.php?socid=".$obj->socid."\">".$obj->name."</a></td>\n";
@ -293,12 +288,10 @@ if (count($companystatic->SupplierCategories))
print '<tr class="liste_titre"><td colspan="2">';
print $langs->trans("Category");
print "</td></tr>\n";
$var=True;
foreach ($companystatic->SupplierCategories as $rowid => $label)
{
print "<tr ".$bc[$var].">\n";
print '<tr class="oddeven">'."\n";
print '<td>';
$categstatic->id=$rowid;
$categstatic->ref=$label;

View File

@ -220,12 +220,11 @@ if ($id > 0 || ! empty($ref)) {
print "</tr>\n";
if ($num > 0) {
$var = True;
while ( $i < $num && $i < $conf->liste_limit ) {
$objp = $db->fetch_object($result);
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
print '<td>';
$supplierorderstatic->id = $objp->commandeid;
$supplierorderstatic->ref = $objp->ref;

View File

@ -213,7 +213,6 @@ if ($id > 0 || ! empty($ref))
if ($num > 0)
{
$var = True;
while ($i < $num && $i < $conf->liste_limit)
{
$objp = $db->fetch_object($result);

View File

@ -216,13 +216,11 @@ if ($id > 0 || ! empty($ref))
if ($num > 0)
{
$var = True;
while ($i < $num && $i < $conf->liste_limit)
{
$objp = $db->fetch_object($result);
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
print '<td>';
$propalstatic->id=$objp->propalid;
$propalstatic->ref=$objp->ref;

View File

@ -216,13 +216,11 @@ if ($id > 0 || ! empty($ref))
if ($num > 0)
{
$var = True;
while ($i < $num && $i < $conf->liste_limit)
{
$objp = $db->fetch_object($result);
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
print '<td>';
$propalstatic->id=$objp->propalid;
$propalstatic->ref=$objp->ref;

View File

@ -452,11 +452,9 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<td>&nbsp;</td>';
print '</tr>';
$var = True;
foreach ( $prodcustprice->lines as $line ) {
print '<tr'. $bc[$var].'>';
print '<tr class="oddeven">';
$staticprod = new Product($db);
$staticprod->fetch($line->fk_product);
@ -558,11 +556,9 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
if (count($prodcustprice->lines) > 0)
{
$var = False;
foreach ($prodcustprice->lines as $line)
{
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
$staticprod = new Product($db);
$staticprod->fetch($line->fk_product);

View File

@ -184,11 +184,10 @@ if (! empty($conf->supplier_proposal->enabled))
if ($num)
{
$i = 0;
$var = True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
$supplier_proposalstatic->id=$obj->rowid;
@ -242,10 +241,8 @@ if ($resql)
if ($num)
{
$i = 0;
$var = True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';