Skip to content

Commit

Permalink
Fix: Error management
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 1, 2011
1 parent 608ad7c commit 500d60f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions htdocs/compta/facture/class/facture.class.php
Expand Up @@ -44,6 +44,7 @@ class Facture extends CommonObject
{
var $db;
var $error;
var $errors=array();
var $element='facture';
var $table_element='facture';
var $table_element_line = 'facturedet';
Expand Down Expand Up @@ -464,6 +465,11 @@ function createFromCurrent($user,$invertdetail=0)
dol_syslog("Facture::createFromCurrent invertdetail=".$invertdetail." socid=".$this->socid." nboflines=".sizeof($facture->lines));

$facid = $facture->create($user);
if ($facid <= 0)
{
$this->error=$facture->error;
$this->errors=$facture->errors;
}

return $facid;
}
Expand Down

0 comments on commit 500d60f

Please sign in to comment.