Fix PHP 7.2
This commit is contained in:
parent
7d553f58f5
commit
f7b663379a
@ -223,7 +223,7 @@ if ($action=="dl" && $numref > 0)
|
||||
$payment = new Paiement($db);
|
||||
$payment->fetch($val['url_id']);
|
||||
$arraybill = $payment->getBillsArray();
|
||||
if (count($arraybill) > 0)
|
||||
if (is_array($arraybill) && count($arraybill) > 0)
|
||||
{
|
||||
foreach ($arraybill as $billid)
|
||||
{
|
||||
@ -260,7 +260,7 @@ if ($action=="dl" && $numref > 0)
|
||||
$payment = new PaiementFourn($db);
|
||||
$payment->fetch($val['url_id']);
|
||||
$arraybill = $payment->getBillsArray();
|
||||
if (count($arraybill) > 0)
|
||||
if (is_array($arraybill) && count($arraybill) > 0)
|
||||
{
|
||||
foreach ($arraybill as $billid)
|
||||
{
|
||||
|
||||
@ -1052,7 +1052,7 @@ class Paiement extends CommonObject
|
||||
if ($mode == 'withlistofinvoices')
|
||||
{
|
||||
$arraybill = $this->getBillsArray();
|
||||
if (count($arraybill) > 0)
|
||||
if (is_array($arraybill) && count($arraybill) > 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$facturestatic=new Facture($this->db);
|
||||
|
||||
@ -262,7 +262,7 @@ if ($resql)
|
||||
$totalbefore = $total;
|
||||
$total = $total + $objp->amount;
|
||||
|
||||
|
||||
|
||||
|
||||
// Date operation
|
||||
$dateop=$db->jdate($objp->do);
|
||||
@ -289,22 +289,28 @@ if ($resql)
|
||||
{
|
||||
$paymentstatic->fetch($links[$key]['url_id']);
|
||||
$tmparray=$paymentstatic->getBillsArray('');
|
||||
foreach($tmparray as $key => $val)
|
||||
if (is_array($tmparray))
|
||||
{
|
||||
$invoicestatic->fetch($val);
|
||||
if ($accountelem) $accountelem.= ', ';
|
||||
$accountelem.=$invoicestatic->ref;
|
||||
foreach($tmparray as $key => $val)
|
||||
{
|
||||
$invoicestatic->fetch($val);
|
||||
if ($accountelem) $accountelem.= ', ';
|
||||
$accountelem.=$invoicestatic->ref;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($links[$key]['type']=='payment_supplier')
|
||||
{
|
||||
$paymentsupplierstatic->fetch($links[$key]['url_id']);
|
||||
$tmparray=$paymentsupplierstatic->getBillsArray('');
|
||||
foreach($tmparray as $key => $val)
|
||||
if (is_array($tmparray))
|
||||
{
|
||||
$invoicesupplierstatic->fetch($val);
|
||||
if ($accountelem) $accountelem.= ', ';
|
||||
$accountelem.=$invoicesupplierstatic->ref;
|
||||
foreach($tmparray as $key => $val)
|
||||
{
|
||||
$invoicesupplierstatic->fetch($val);
|
||||
if ($accountelem) $accountelem.= ', ';
|
||||
$accountelem.=$invoicesupplierstatic->ref;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($links[$key]['type']=='payment_sc')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user