Merge pull request #7924 from hregis/6.0_bug2
Fix: Avoid warning "A non-numeric value encountered"
This commit is contained in:
commit
5f71165020
@ -46,14 +46,14 @@ $confirm=GETPOST('confirm', 'alpha');
|
|||||||
// Security check
|
// Security check
|
||||||
$fieldname = (! empty($ref)?'ref':'rowid');
|
$fieldname = (! empty($ref)?'ref':'rowid');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'cheque', $id, 'bordereau_cheque','','',$fieldname);
|
$result = restrictedArea($user, 'cheque', $id, 'bordereau_cheque','','fk_user_author',$fieldname);
|
||||||
|
|
||||||
$sortfield=GETPOST('sortfield', 'alpha');
|
$sortfield=GETPOST('sortfield', 'alpha');
|
||||||
$sortorder=GETPOST('sortorder', 'alpha');
|
$sortorder=GETPOST('sortorder', 'alpha');
|
||||||
$page=GETPOST('page', 'int');
|
$page=GETPOST('page', 'int');
|
||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="b.dateo,b.rowid";
|
if (! $sortfield) $sortfield="b.dateo,b.rowid";
|
||||||
if ($page < 0) { $page = 0 ; }
|
if (empty($page) || $page == -1) { $page = 0; }
|
||||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$offset = $limit * $page ;
|
$offset = $limit * $page ;
|
||||||
|
|
||||||
@ -490,53 +490,55 @@ if ($action == 'new')
|
|||||||
|
|
||||||
if (count($lines[$bid]))
|
if (count($lines[$bid]))
|
||||||
{
|
{
|
||||||
foreach ($lines[$bid] as $lid => $value)
|
foreach ($lines[$bid] as $lid => $value)
|
||||||
{
|
{
|
||||||
$account_id = $bid;
|
//$account_id = $bid; FIXME not used
|
||||||
if (! isset($accounts[$bid]))
|
|
||||||
$accounts[$bid]=0;
|
|
||||||
$accounts[$bid] += 1;
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
// FIXME $accounts[$bid] is a label !
|
||||||
print '<td>'.dol_print_date($value["date"],'day').'</td>';
|
/*if (! isset($accounts[$bid]))
|
||||||
print '<td>'.$value["numero"]."</td>\n";
|
$accounts[$bid]=0;
|
||||||
print '<td>'.$value["emetteur"]."</td>\n";
|
$accounts[$bid] += 1;*/
|
||||||
print '<td>'.$value["banque"]."</td>\n";
|
|
||||||
print '<td align="right">'.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).'</td>';
|
|
||||||
|
|
||||||
// Link to payment
|
print '<tr class="oddeven">';
|
||||||
print '<td align="center">';
|
print '<td>'.dol_print_date($value["date"],'day').'</td>';
|
||||||
$paymentstatic->id=$value["paymentid"];
|
print '<td>'.$value["numero"]."</td>\n";
|
||||||
$paymentstatic->ref=$value["paymentid"];
|
print '<td>'.$value["emetteur"]."</td>\n";
|
||||||
if ($paymentstatic->id)
|
print '<td>'.$value["banque"]."</td>\n";
|
||||||
{
|
print '<td align="right">'.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).'</td>';
|
||||||
print $paymentstatic->getNomUrl(1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print ' ';
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
// Link to bank transaction
|
|
||||||
print '<td align="center">';
|
|
||||||
$accountlinestatic->rowid=$value["id"];
|
|
||||||
if ($accountlinestatic->rowid)
|
|
||||||
{
|
|
||||||
print $accountlinestatic->getNomUrl(1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print ' ';
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print '<td align="center">';
|
// Link to payment
|
||||||
print '<input id="'.$value["id"].'" class="flat checkforremise_'.$bid.'" checked type="checkbox" name="toRemise[]" value="'.$value["id"].'">';
|
print '<td align="center">';
|
||||||
print '</td>' ;
|
$paymentstatic->id=$value["paymentid"];
|
||||||
print '</tr>';
|
$paymentstatic->ref=$value["paymentid"];
|
||||||
|
if ($paymentstatic->id)
|
||||||
|
{
|
||||||
|
print $paymentstatic->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print ' ';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
// Link to bank transaction
|
||||||
|
print '<td align="center">';
|
||||||
|
$accountlinestatic->rowid=$value["id"];
|
||||||
|
if ($accountlinestatic->rowid)
|
||||||
|
{
|
||||||
|
print $accountlinestatic->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print ' ';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
$i++;
|
print '<td align="center">';
|
||||||
}
|
print '<input id="'.$value["id"].'" class="flat checkforremise_'.$bid.'" checked type="checkbox" name="toRemise[]" value="'.$value["id"].'">';
|
||||||
|
print '</td>' ;
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -688,10 +690,12 @@ else
|
|||||||
{
|
{
|
||||||
while ($objp = $db->fetch_object($resql))
|
while ($objp = $db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$account_id = $objp->bid;
|
//$account_id = $objp->bid; FIXME not used
|
||||||
if (! isset($accounts[$objp->bid]))
|
|
||||||
|
// FIXME $accounts[$objp->bid] is a label
|
||||||
|
/*if (! isset($accounts[$objp->bid]))
|
||||||
$accounts[$objp->bid]=0;
|
$accounts[$objp->bid]=0;
|
||||||
$accounts[$objp->bid] += 1;
|
$accounts[$objp->bid] += 1;*/
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td align="center">'.$i.'</td>';
|
print '<td align="center">'.$i.'</td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user