Skip to content

Commit

Permalink
Fix scrutinizer bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 3, 2018
1 parent a91172b commit 6de2a08
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions htdocs/compta/bank/bankentries_list.php
Expand Up @@ -387,7 +387,7 @@
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';


$options = array();

if ($id > 0 || ! empty($ref))
{
Expand All @@ -398,7 +398,6 @@
// Load bank groups
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php';
$bankcateg = new BankCateg($db);
$options = array();

foreach ($bankcateg->fetchAll() as $bankcategory) {
$options[$bankcategory->id] = $bankcategory->label;
Expand Down Expand Up @@ -531,7 +530,6 @@
$resql = $db->query($sql);
if ($resql)
{
$var=True;
$num = $db->num_rows($resql);

$arrayofselected=is_array($toselect)?$toselect:array();
Expand Down Expand Up @@ -569,14 +567,12 @@
// Form to reconcile
if ($user->rights->banque->consolidate && $action == 'reconcile')
{
// print '<table class="noborder" width="100%">';
// print '<tr '.$bcnd[false].'>';
// print '<td>';
print '<div class="valignmiddle inline-block" style="padding-right: 20px;">';
print '<strong>'.$langs->trans("InputReceiptNumber").'</strong>: ';
print '<input class="flat" id="num_releve" name="num_releve" type="text" value="'.(GETPOST('num_releve')?GETPOST('num_releve'):'').'" size="10">'; // The only default value is value we just entered
print '</div>';
if ($options) {
if (is_array($options) && count($options))
{
print $langs->trans("EventualyAddCategory").': ';
print Form::selectarray('cat', $options, GETPOST('cat'), 1);
}
Expand Down Expand Up @@ -629,7 +625,6 @@
';
}
print '<br><br>';
// print '</td></tr></table>';
}

// Form to add a transaction with no invoice
Expand Down Expand Up @@ -663,7 +658,8 @@
print '<tr>';
print '<td>';
print '<input name="label" class="flat minwidth200" type="text" value="'.GETPOST("label","alpha").'">';
if (is_array($options) && count($options)) {
if (is_array($options) && count($options))
{
print '<br>'.$langs->trans("Rubrique").': ';
print Form::selectarray('cat1', $options, GETPOST('cat1'), 1);
}
Expand Down

0 comments on commit 6de2a08

Please sign in to comment.