Fix: [ bug #1177 ] Error on create domiciliation

This commit is contained in:
Laurent Destailleur 2013-12-14 15:40:43 +01:00
parent 4248431dc9
commit dc1ccbfae8
2 changed files with 9 additions and 3 deletions

View File

@ -2914,13 +2914,15 @@ class Facture extends CommonInvoice
$sql .= ",'".$bac->code_guichet."'";
$sql .= ",'".$bac->number."'";
$sql .= ",'".$bac->cle_rib."')";
if ( $this->db->query($sql))
dol_syslog(get_class($this)."::demande_prelevement sql=".$sql);
if ($this->db->query($sql))
{
return 1;
}
else
{
$this->error=$this->db->error();
{
$this->error=$this->db->lasterror();
dol_syslog(get_class($this).'::demandeprelevement Erreur');
return -1;
}

View File

@ -243,6 +243,10 @@ class FactureTest extends PHPUnit_Framework_TestCase
print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n";
$this->assertNotEquals($localobject->date_creation, '');
$result=$localobject->demande_prelevement($user);
print __METHOD__." result=".$result."\n";
$this->assertLessThan($result, 0);
return $localobject->id;
}