mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Clean code from $var = True
This commit is contained in:
parent
f513e3a179
commit
69adf73f4f
32
.travis.yml
32
.travis.yml
|
|
@ -248,40 +248,24 @@ before_script:
|
|||
- sudo apt-get install apache2 libapache2-mod-fastcgi
|
||||
# enable php-fpm
|
||||
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
# Copy the included pool
|
||||
sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
- sudo a2enmod rewrite actions fastcgi alias
|
||||
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
||||
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
||||
# configure apache virtual hosts
|
||||
# configure apache virtual hosts for precise
|
||||
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$TRAVIS_BUILD_DIR?g" --in-place /etc/apache2/sites-available/default
|
||||
- sudo cat /etc/apache2/sites-available/default
|
||||
# configure apache virtual hosts for trusty
|
||||
- sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
- sudo cat /etc/apache2/sites-available/000-default.conf
|
||||
- sudo service apache2 restart
|
||||
|
||||
|
||||
- |
|
||||
echo "Setting up Apache + FPM (old)"
|
||||
# enable php-fpm
|
||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
# Copy the included pool
|
||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
if [ "$DEBUG" = true ]; then
|
||||
cat ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
|
||||
fi
|
||||
sudo a2enmod rewrite actions fastcgi alias
|
||||
echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
if [ "$DEBUG" = true ]; then
|
||||
cat ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
fi
|
||||
~/.phpenv/versions/$PHP_VERSION_NAME/sbin/php-fpm
|
||||
# configure apache virtual hosts
|
||||
sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/default
|
||||
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$TRAVIS_BUILD_DIR?g" --in-place /etc/apache2/sites-available/default
|
||||
sudo cat /etc/apache2/sites-available/default
|
||||
sudo service apache2 restart
|
||||
echo
|
||||
|
||||
|
|
|
|||
|
|
@ -284,8 +284,6 @@ foreach ($dirmodels as $reldir)
|
|||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (! is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS'))
|
||||
|
|
@ -316,7 +314,6 @@ foreach ($dirmodels as $reldir)
|
|||
|
||||
if ($module->isEnabled())
|
||||
{
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
echo preg_replace('/\-.*$/','',preg_replace('/mod_facture_/','',preg_replace('/\.php$/','',$file)));
|
||||
print "</td><td>\n";
|
||||
|
|
@ -470,7 +467,6 @@ print "</tr>\n";
|
|||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
foreach (array('','/doc') as $valdir)
|
||||
|
|
@ -507,7 +503,6 @@ foreach ($dirmodels as $reldir)
|
|||
|
||||
if ($modulequalified)
|
||||
{
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
|
|
@ -598,7 +593,6 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
|||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
$var=True;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
|
|
@ -662,7 +656,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
|||
$sql.= " WHERE clos = 0";
|
||||
$sql.= " AND courant = 1";
|
||||
$sql.= " AND entity IN (".getEntity('bank_account').")";
|
||||
$var=True;
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
|
@ -670,7 +664,6 @@ if ($resql)
|
|||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<option value="'.$row[0].'"';
|
||||
|
|
@ -695,10 +688,8 @@ print '<td>'.$langs->trans("Parameter").'</td>';
|
|||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
// Force date validation
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
print '<input type="hidden" name="action" value="setforcedate" />';
|
||||
|
|
@ -717,7 +708,6 @@ $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
|||
foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
|
||||
$htmltext.='</i>';
|
||||
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
print '<input type="hidden" name="action" value="set_INVOICE_FREE_TEXT" />';
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ else
|
|||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$var=True;
|
||||
$i=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
|
@ -109,7 +108,7 @@ else
|
|||
|
||||
//$sql = "DESCRIBE ".$table;
|
||||
$sql = "SHOW FULL COLUMNS IN ".$db->escape($table);
|
||||
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
|
@ -129,7 +128,7 @@ else
|
|||
|
||||
print "<td>".(isset($link[$row[0]][0])?$link[$row[0]][0]:'').".";
|
||||
print (isset($link[$row[0]][1])?$link[$row[0]][1]:'')."</td>";
|
||||
|
||||
|
||||
print '<!-- ALTER ALTER TABLE '.$table.' MODIFY '.$row[0].' '.$row[1].' COLLATE utf8_unicode_ci; -->';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ if (empty($xmlremote)) $xmlremote = 'https://www.dolibarr.org/files/stable/signa
|
|||
|
||||
|
||||
// Test if remote test is ok
|
||||
$enableremotecheck = True;
|
||||
$enableremotecheck = true;
|
||||
if (preg_match('/beta|alpha|rc/i', DOL_VERSION) || ! empty($conf->global->MAIN_ALLOW_INTEGRITY_CHECK_ON_UNSTABLE)) $enableremotecheck=False;
|
||||
$enableremotecheck = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -137,12 +137,8 @@ if ($savehandler == 'files')
|
|||
print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
|
||||
foreach ($listofsessions as $key => $sessionentry)
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Login
|
||||
|
|
|
|||
|
|
@ -65,10 +65,8 @@ print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'act
|
|||
print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
|
||||
print '</tr>';
|
||||
|
||||
$var=True;
|
||||
foreach ($triggers as $trigger)
|
||||
{
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>';
|
||||
print '<td class="tdtop">'.$trigger['file'].'</td>';
|
||||
|
|
|
|||
|
|
@ -125,12 +125,10 @@ if ($resql)
|
|||
print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Id
|
||||
|
|
|
|||
|
|
@ -144,14 +144,11 @@ if ($resql)
|
|||
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
$i = 0;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$obj->cidp.'&socid='.$obj->rowid.'">'.img_object($langs->trans("ShowContact"),"contact");
|
||||
print '</a> <a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$obj->cidp.'&socid='.$obj->rowid.'">'.$obj->name.'</a></td>';
|
||||
|
|
|
|||
|
|
@ -52,7 +52,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
|
||||
//{
|
||||
// Recherche emails
|
||||
$var=false;
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/mailing/list.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
|
|
@ -62,7 +61,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print '<tr class="oddeven"><td class="nowrap">';
|
||||
print $langs->trans("Other").':</td><td><input type="text" class="flat inputsearch" name="sall"></td>';
|
||||
|
||||
|
||||
print "</table></form><br>\n";
|
||||
//}
|
||||
|
||||
|
|
@ -74,7 +73,6 @@ print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("TargetsStatistic
|
|||
$dir=DOL_DOCUMENT_ROOT."/core/modules/mailings";
|
||||
$handle=opendir($dir);
|
||||
|
||||
$var=True;
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
|
|
@ -106,8 +104,6 @@ if (is_resource($handle))
|
|||
// Si le module mailing est qualifi<66>
|
||||
if ($qualified)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
foreach ($mailmodule->getSqlArrayForStats() as $sql)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
|
|
@ -169,14 +165,12 @@ if ($result)
|
|||
|
||||
$num = $db->num_rows($result);
|
||||
if ($num > 0)
|
||||
{
|
||||
$var = true;
|
||||
{
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num )
|
||||
while ($i < $num )
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap"><a href="card.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.'</a></td>';
|
||||
|
|
|
|||
|
|
@ -101,11 +101,10 @@ if ($result)
|
|||
$num = $db->num_rows($result);
|
||||
$i = 0; $total = 0;
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/bank/budget.php?bid='.$objp->rowid.'">'.$objp->rowid.'</a></td>';
|
||||
if (GETPOST('action','aZ09') == 'edit' && GETPOST("categid")== $objp->rowid)
|
||||
|
|
@ -136,7 +135,7 @@ if ($result)
|
|||
*/
|
||||
if ($action != 'edit')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td><td><input name="label" type="text" size="45"></td>';
|
||||
print '<td align="center"><input type="submit" name="add" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||
|
|
|
|||
|
|
@ -395,7 +395,6 @@ if (empty($numref))
|
|||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$var=True;
|
||||
$numrows = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
|
@ -572,7 +571,6 @@ else
|
|||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$var=False;
|
||||
$numrows = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -2363,7 +2363,7 @@ class Facture extends CommonInvoice
|
|||
|
||||
if (!empty($conf->global->INVOICE_USE_SITUATION))
|
||||
{
|
||||
$final = True;
|
||||
$final = true;
|
||||
$nboflines = count($this->lines);
|
||||
while (($i < $nboflines) && $final) {
|
||||
$final = ($this->lines[$i]->situation_percent == 100);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ if ($resql)
|
|||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=True;
|
||||
|
||||
print_barre_liste($langs->trans("ReceivedCustomersPaymentsToValid"), $page, $_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num);
|
||||
|
||||
|
|
|
|||
|
|
@ -245,13 +245,10 @@ if ($resql)
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
// Ref
|
||||
print '<td>';
|
||||
|
|
|
|||
|
|
@ -298,8 +298,6 @@ if ($result)
|
|||
print '<td align="center">'.$langs->trans("Date").'</td><td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$var=True;
|
||||
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
|
|
|||
|
|
@ -241,11 +241,10 @@ function show_list_sending_receive($origin,$origin_id,$filter='')
|
|||
}
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Sending id
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
|
|||
$handle=opendir($dir);
|
||||
|
||||
// Recherche des fichiers drivers exports disponibles
|
||||
$var=True;
|
||||
$i=0;
|
||||
if (is_resource($handle))
|
||||
{
|
||||
|
|
@ -72,7 +71,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
|
|||
if (class_exists($classname))
|
||||
{
|
||||
$module = new $classname($db);
|
||||
|
||||
|
||||
// Picto
|
||||
$this->picto[$module->id]=$module->picto;
|
||||
// Driver properties
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
// Situation invoice handling
|
||||
if ($object->situation_cycle_ref)
|
||||
{
|
||||
$this->situationinvoice = True;
|
||||
$this->situationinvoice = true;
|
||||
$progress_width = 18;
|
||||
$this->posxtva -= $progress_width;
|
||||
$this->posxup -= $progress_width;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class ModeleImports
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* getDriverId
|
||||
*
|
||||
|
|
@ -69,7 +69,7 @@ class ModeleImports
|
|||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getDriverLabel
|
||||
*
|
||||
|
|
@ -79,7 +79,7 @@ class ModeleImports
|
|||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getDriverDesc
|
||||
*
|
||||
|
|
@ -89,7 +89,7 @@ class ModeleImports
|
|||
{
|
||||
return $this->desc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getDriverExtension
|
||||
*
|
||||
|
|
@ -99,7 +99,7 @@ class ModeleImports
|
|||
{
|
||||
return $this->extension;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getDriverVersion
|
||||
*
|
||||
|
|
@ -109,7 +109,7 @@ class ModeleImports
|
|||
{
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getDriverLabel
|
||||
*
|
||||
|
|
@ -119,7 +119,7 @@ class ModeleImports
|
|||
{
|
||||
return $this->label_lib;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getLibVersion
|
||||
*
|
||||
|
|
@ -129,8 +129,8 @@ class ModeleImports
|
|||
{
|
||||
return $this->version_lib;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Charge en memoire et renvoie la liste des modeles actifs
|
||||
*
|
||||
|
|
@ -146,7 +146,6 @@ class ModeleImports
|
|||
$handle=opendir($dir);
|
||||
|
||||
// Recherche des fichiers drivers imports disponibles
|
||||
$var=True;
|
||||
$i=0;
|
||||
if (is_resource($handle))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -248,13 +248,11 @@ class pdf_paiement
|
|||
{
|
||||
$num = $this->db->num_rows($result);
|
||||
$i = 0;
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
|
||||
$lines[$i][0] = $objp->facnumber;
|
||||
$lines[$i][1] = dol_print_date($this->db->jdate($objp->dp),"day",false,$outputlangs,true);
|
||||
$lines[$i][2] = $langs->transnoentities("PaymentTypeShort".$objp->paiement_code);
|
||||
|
|
|
|||
|
|
@ -226,13 +226,10 @@ if ($resql)
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
// Ref
|
||||
print '<td>';
|
||||
|
|
|
|||
|
|
@ -105,14 +105,11 @@ if ($result)
|
|||
print_liste_field_titre("Phone");
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
$i = 0;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$obj->cidp.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$obj->lastname.'</a></td>';
|
||||
|
|
|
|||
|
|
@ -223,7 +223,6 @@ if ($user->rights->fournisseur->facture->lire)
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
$total_ht=0;
|
||||
$total_ttc=0;
|
||||
$total_paid=0;
|
||||
|
|
|
|||
|
|
@ -524,7 +524,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||
if (!empty($conf->multicurrency->enabled)) print '<td align="center">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$var=True;
|
||||
$total=0;
|
||||
$total_ttc=0;
|
||||
$totalrecu=0;
|
||||
|
|
@ -794,7 +793,6 @@ if (empty($action))
|
|||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=True;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
|
|
|
|||
|
|
@ -288,8 +288,6 @@ if ($result > 0)
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
|
||||
$facturestatic=new FactureFournisseur($db);
|
||||
|
||||
while ($i < $num)
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ if ($resql)
|
|||
print "</tr>\n";
|
||||
|
||||
$oldid = '';
|
||||
$var=True;
|
||||
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
|
|
|||
|
|
@ -702,7 +702,6 @@ if ($id > 0)
|
|||
print '<td align="right">'.$langs->trans("LoanCapital").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ if ($user->societe_id) $socid=$user->societe_id;
|
|||
//$result = restrictedArea($user, 'facture', $id,'');
|
||||
|
||||
$payment = new PaymentLoan($db);
|
||||
if ($id > 0)
|
||||
if ($id > 0)
|
||||
{
|
||||
$result=$payment->fetch($id);
|
||||
if (! $result) dol_print_error($db,'Failed to get payment id '.$id);
|
||||
|
|
@ -76,7 +76,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->loan->wri
|
|||
$db->begin();
|
||||
|
||||
$result=$payment->valide();
|
||||
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
|
|
@ -141,7 +141,7 @@ if ($action == 'delete')
|
|||
if ($action == 'valide')
|
||||
{
|
||||
$facid = $_GET['facid'];
|
||||
print $form->formconfirm('card.php?id='.$payment->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
|
||||
print $form->formconfirm('card.php?id='.$payment->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -220,13 +220,10 @@ if ($resql)
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
// Ref
|
||||
print '<td>';
|
||||
|
|
@ -250,7 +247,7 @@ if ($resql)
|
|||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
$db->free($resql);
|
||||
|
|
|
|||
|
|
@ -245,9 +245,6 @@ if ($action == 'create')
|
|||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
if ($loan->datestart > 0)
|
||||
|
|
|
|||
|
|
@ -283,8 +283,6 @@ if ($result)
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
|
||||
while ($i < $num /*&& $i < $conf->liste_limit*/)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
|
@ -304,8 +302,6 @@ if ($result)
|
|||
$markRate = ($pv != 0)?(100 * $marge / $pv):'' ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
if ($client) {
|
||||
print '<td>';
|
||||
|
|
|
|||
|
|
@ -258,8 +258,6 @@ if ($result)
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
|
||||
while ($i < $num /*&& $i < $conf->liste_limit*/)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
|
@ -278,8 +276,6 @@ if ($result)
|
|||
$markRate = ($pv != 0)?(100 * $marge / $pv):'' ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
if ($id > 0) {
|
||||
print '<td>';
|
||||
|
|
|
|||
|
|
@ -193,11 +193,9 @@ if ($id > 0 || ! empty($ref))
|
|||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
|
||||
if ($num > 0) {
|
||||
$var=True;
|
||||
while ($i < $num /*&& $i < $conf->liste_limit*/) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
$marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ;
|
||||
$markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ;
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,6 @@ if ($socid > 0)
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
while ($i < $num /*&& $i < $conf->liste_limit*/)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
|
@ -207,8 +206,6 @@ if ($socid > 0)
|
|||
$marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ;
|
||||
$markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
$invoicestatic->id=$objp->facid;
|
||||
|
|
|
|||
|
|
@ -89,10 +89,9 @@ if (empty($conf) || ! is_object($conf))
|
|||
<!-- FIELDS DATA -->
|
||||
|
||||
<?php
|
||||
$var=True;
|
||||
foreach($datas as $line) {
|
||||
?>
|
||||
<tr <?php echo $bc[$var]; ?>>
|
||||
<tr class="oddeven">
|
||||
<?php
|
||||
foreach($line as $key => $value) {
|
||||
foreach($fieldlist as $field) {
|
||||
|
|
|
|||
|
|
@ -307,8 +307,6 @@ if ($result)
|
|||
|
||||
print '<tr class="liste_titre"><th colspan="'.$colnb.'">'.$transRecordedType.'</th></tr>';
|
||||
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
|
@ -337,7 +335,7 @@ if ($result)
|
|||
$product_static->label = $objp->label;
|
||||
$product_static->type=$objp->fk_product_type;
|
||||
$product_static->entity = $objp->entity;
|
||||
$product_static->status_batch = $objp->tobatch;
|
||||
$product_static->status_batch = $objp->tobatch;
|
||||
print $product_static->getNomUrl(1,'',16);
|
||||
print "</td>\n";
|
||||
print '<td>'.dol_trunc($objp->label,32).'</td>';
|
||||
|
|
|
|||
|
|
@ -211,12 +211,10 @@ if ($id > 0 || ! empty($ref))
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
$orderstatic->id=$objp->commandeid;
|
||||
|
|
|
|||
|
|
@ -177,7 +177,6 @@ if ($id > 0 || ! empty($ref))
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
|
|
|||
|
|
@ -234,7 +234,6 @@ if ($id > 0 || ! empty($ref))
|
|||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
|
|
|||
|
|
@ -460,7 +460,6 @@ else
|
|||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
|
@ -491,7 +490,7 @@ else
|
|||
$productstatic->label = $objp->produit;
|
||||
$productstatic->type=$objp->type;
|
||||
$productstatic->entity=$objp->entity;
|
||||
$productstatic->status_batch=$objp->tobatch;
|
||||
$productstatic->status_batch=$objp->tobatch;
|
||||
print $productstatic->getNomUrl(1,'stock',16);
|
||||
print '</td>';
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ if ($result)
|
|||
{
|
||||
$entrepot=new Entrepot($db);
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
|
|
|||
|
|
@ -73,14 +73,10 @@ if ($resql)
|
|||
print "<td align=\"right\">".$langs->trans("Amount")."</TD>";
|
||||
print "</TR>\n";
|
||||
|
||||
$var=True;
|
||||
$bc[1]='bgcolor="#f5f5f5"';
|
||||
$bc[0]='bgcolor="#f0f0f0"';
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
if ($objp->public)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -139,7 +139,6 @@ if ($result)
|
|||
print_liste_field_titre("Photo", $_SERVER["PHP_SELF"],"","",$param,'',$sortfield,$sortorder,'public_');
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
|
|
|||
|
|
@ -85,13 +85,11 @@ if ($result)
|
|||
print_liste_field_titre("Contact",$_SERVER["PHP_SELF"],"c.lastname","","",'valign="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre("Action",$_SERVER["PHP_SELF"],"a.titre","","",'valign="center"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><a href=\"card.php?socid=".$obj->socid."\">".$obj->name."</a></td>\n";
|
||||
print "<td>".dolGetFirstLastname($obj->firstname, $obj->lastname)."</td>\n";
|
||||
|
|
|
|||
|
|
@ -253,7 +253,6 @@ if ($id > 0 || ! empty($ref))
|
|||
print_liste_field_titre("EndSubscription",$_SERVER["PHP_SELF"],"d.datefin",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
$i=0;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
{
|
||||
|
|
@ -269,7 +268,6 @@ if ($id > 0 || ! empty($ref))
|
|||
|
||||
$companyname=$objp->company;
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
|
|
|
|||
|
|
@ -87,10 +87,8 @@ print '<td align="center">'.$langs->trans("Required").'</td>';
|
|||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
|
|
|
|||
|
|
@ -91,10 +91,8 @@ print '<td align="center">'.$langs->trans("Required").'</td>';
|
|||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user