Skip to content

Commit

Permalink
Fix: Unit test regression
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 8, 2013
1 parent 2685c47 commit 89619ca
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions htdocs/fourn/class/fournisseur.commande.class.php
Expand Up @@ -922,10 +922,9 @@ function create($user, $notrigger=0)

$error=0;
$now=dol_now();
if(!$this->source)
{
$this->source = 0;
}

// Clean parameters
if (empty($this->source)) $this->source = 0;

/* On positionne en mode brouillon la commande */
$this->brouillon = 1;
Expand Down Expand Up @@ -959,8 +958,8 @@ function create($user, $notrigger=0)
$sql.= ", 0";
$sql.= ", " . $this->source;
$sql.= ", '".$conf->global->COMMANDE_SUPPLIER_ADDON_PDF."'";
$sql.= ", ".$this->mode_reglement_id;
$sql.= ", ".$this->cond_reglement_id;
$sql.= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : 'null');
$sql.= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : 'null');
$sql.= ")";

dol_syslog(get_class($this)."::create sql=".$sql);
Expand Down Expand Up @@ -1084,7 +1083,7 @@ function createFromClone()
$this->user_valid = '';
$this->date_creation = '';
$this->date_validation = '';
$this->ref_supplier = '';
$this->ref_supplier = '';

// Create clone
$result=$this->create($user);
Expand Down

0 comments on commit 89619ca

Please sign in to comment.