update and clean code
This commit is contained in:
parent
3615b7b45d
commit
1bb91c7860
@ -321,10 +321,8 @@ if (empty($conf->use_javascript_ajax) || ! empty($conf->global->MAIN_ECM_DISABLE
|
||||
|
||||
$nbofentries=0;
|
||||
$oldvallevel=0;
|
||||
$var=true;
|
||||
foreach($sqltree as $key => $val)
|
||||
{
|
||||
$var=false;
|
||||
|
||||
$ecmdirstatic->id=$val['id'];
|
||||
$ecmdirstatic->ref=$val['label'];
|
||||
|
||||
@ -33,12 +33,11 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
$langs->load("donations");
|
||||
|
||||
$total=0; $ilink=0;
|
||||
$var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
$trclass='oddeven';
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
<tr class="<?php echo $trclass; ?>">
|
||||
|
||||
@ -1403,7 +1403,6 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
$var=true;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
@ -143,7 +143,6 @@ if ($resql)
|
||||
|
||||
print '</td></tr>';
|
||||
}
|
||||
$var=true;
|
||||
$bool=false;
|
||||
foreach ($listofstatus as $status)
|
||||
{
|
||||
@ -198,10 +197,8 @@ if (! empty($conf->ficheinter->enabled))
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">';
|
||||
@ -248,10 +245,8 @@ if ($resql)
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
@ -319,10 +314,8 @@ if (! empty($conf->ficheinter->enabled))
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap" width="20%">';
|
||||
|
||||
@ -285,7 +285,6 @@ print '<td align="right">%</td>';
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
$var=true;
|
||||
foreach ($data as $val)
|
||||
{
|
||||
$year = $val['year'];
|
||||
@ -293,7 +292,7 @@ foreach ($data as $val)
|
||||
{ // If we have empty year
|
||||
$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.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
||||
|
||||
print '<td align="right">0</td>';
|
||||
@ -306,7 +305,7 @@ foreach ($data as $val)
|
||||
}
|
||||
|
||||
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||
|
||||
@ -36,12 +36,11 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
$langs->load("interventions");
|
||||
|
||||
$ilink=0;
|
||||
$var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
$trclass='oddeven';
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
<tr class="<?php echo $trclass; ?>">
|
||||
|
||||
@ -935,13 +935,11 @@ if ($resql)
|
||||
$projectstatic=new Project($db);
|
||||
|
||||
$i=0;
|
||||
$var=true;
|
||||
$totalarray=array();
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
$objectstatic->id=$obj->rowid;
|
||||
$objectstatic->ref=$obj->ref;
|
||||
$objectstatic->ref_supplier = $obj->ref_supplier;
|
||||
|
||||
@ -38,12 +38,11 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
$langs->load("orders");
|
||||
|
||||
$total=0; $ilink=0;
|
||||
$var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
$trclass='oddeven';
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
<tr class="<?php echo $trclass; ?>">
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
@ -44,10 +44,8 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
if (!$user->rights->fournisseur->facture->lire) accessforbidden();
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load("companies");
|
||||
$langs->load('products');
|
||||
$langs->load('projects');
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('products', 'bills', 'companies', 'projects'));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
@ -823,7 +821,6 @@ if ($resql)
|
||||
{
|
||||
$i=0;
|
||||
|
||||
$var=true;
|
||||
$totalarray=array();
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
|
||||
@ -146,17 +146,15 @@ if ($year)
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Date").'</td>';
|
||||
print '</tr>';
|
||||
$var=true;
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (preg_match('/^supplier_payment/i',$file))
|
||||
{
|
||||
|
||||
$tfile = $dir . '/'.$year.'/'.$file;
|
||||
$relativepath = $year.'/'.$file;
|
||||
print "<tr ".$bc[$var].">".'<td><a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart=facture_fournisseur&file=payments/'.urlencode($relativepath).'">'.img_pdf().' '.$file.'</a></td>';
|
||||
print '<tr class="oddeven">'.'<td><a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart=facture_fournisseur&file=payments/'.urlencode($relativepath).'">'.img_pdf().' '.$file.'</a></td>';
|
||||
print '<td align="right">'.dol_print_size(dol_filesize($tfile)).'</td>';
|
||||
print '<td align="right">'.dol_print_date(dol_filemtime($tfile),"dayhour").'</td></tr>';
|
||||
}
|
||||
|
||||
@ -26,8 +26,8 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("bills");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('bills', 'companies'));
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid",'int');
|
||||
@ -82,7 +82,6 @@ if ($socid > 0)
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$var=true;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@ -116,7 +115,6 @@ if ($socid > 0)
|
||||
}
|
||||
$totalpaye = $fac->getSommePaiement();
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print "<td align=\"center\">".dol_print_date($fac->date)."</td>\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user