Better error messages
This commit is contained in:
parent
8674867db2
commit
5715f44fe6
@ -849,7 +849,7 @@ class BonPrelevement extends CommonObject
|
|||||||
if ($soc->fetch($fact->socid) >= 0)
|
if ($soc->fetch($fact->socid) >= 0)
|
||||||
{
|
{
|
||||||
$bac = new CompanyBankAccount($this->db);
|
$bac = new CompanyBankAccount($this->db);
|
||||||
$bac->fetch(0,$soc->id);
|
$bac->fetch(0, $soc->id);
|
||||||
|
|
||||||
if ($bac->verif() >= 1)
|
if ($bac->verif() >= 1)
|
||||||
//if (true)
|
//if (true)
|
||||||
@ -862,7 +862,8 @@ class BonPrelevement extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog(__METHOD__."::Check RIB Error on default bank number RIB/IBAN for thirdparty reported by verif() ".$fact->socid." ".$soc->name, LOG_ERR);
|
dol_syslog(__METHOD__."::Check RIB Error on default bank number RIB/IBAN for thirdparty reported by verif() ".$fact->socid." ".$soc->name, LOG_ERR);
|
||||||
$this->invoice_in_error[$fac[0]]="Error on default bank number RIB/IBAN for invoice ".$fact->getNomUrl(0)." for thirdparty (reported by function verif) ".$soc->getNomUrl(0);
|
$this->invoice_in_error[$fac[0]]="Error on default bank number RIB/IBAN for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
|
||||||
|
$this->thirdparty_in_error[$soc->id]="Error on default bank number RIB/IBAN for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -889,6 +890,14 @@ class BonPrelevement extends CommonObject
|
|||||||
//print $out."\n";
|
//print $out."\n";
|
||||||
dol_syslog($out);
|
dol_syslog($out);
|
||||||
|
|
||||||
|
// Return warning
|
||||||
|
$i=0;
|
||||||
|
foreach ($this->thirdparty_in_error as $key => $val)
|
||||||
|
{
|
||||||
|
if ($i < 10) setEventMessages($val, null, 'warnings');
|
||||||
|
else setEventMessages('More error were discarded...', null, 'warnings');
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
if (count($factures_prev) > 0)
|
if (count($factures_prev) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -192,7 +192,9 @@ if ($resql)
|
|||||||
|
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$var = True;
|
require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
|
||||||
|
$bac = new CompanyBankAccount($db);
|
||||||
|
|
||||||
while ($i < $num && $i < 20)
|
while ($i < $num && $i < 20)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -211,6 +213,8 @@ if ($resql)
|
|||||||
// RIB
|
// RIB
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $thirdpartystatic->display_rib();
|
print $thirdpartystatic->display_rib();
|
||||||
|
$bac->fetch(0, $obj->id);
|
||||||
|
if ($bac->verif() <= 0) print img_warning('Error on default bank number RIB/IBAN');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// RUM
|
// RUM
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user