diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index a1af5aa5897..06467ac3855 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3422,6 +3422,7 @@ class Commande extends CommonOrder $sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").","; $sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").","; $sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").","; + $sql .= " fk_warehouse=".($this->warehouse_id > 0 ? $this->warehouse_id : "null").","; $sql .= " import_key=".(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null"); $sql .= " WHERE rowid=".((int) $this->id); diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index fda0c0a4cec..d032ce057bc 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -631,6 +631,7 @@ class Reception extends CommonObject if ($qty == 0 || ($qty < 0 && !getDolGlobalInt('RECEPTION_ALLOW_NEGATIVE_QTY'))) { continue; } + dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid); //var_dump($this->lines[$i]); @@ -1748,7 +1749,8 @@ class Reception extends CommonObject if ($qty <= 0) { continue; } - dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); + + dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid); $mouvS = new MouvementStock($this->db); $mouvS->origin = &$this; @@ -1905,7 +1907,6 @@ class Reception extends CommonObject if ($qty <= 0) { continue; } - dol_syslog(get_class($this)."::reopen reception movement index ".$i." ed.rowid=".$obj->rowid); //var_dump($this->lines[$i]); @@ -2038,6 +2039,10 @@ class Reception extends CommonObject $qty = $obj->qty; + if ($qty <= 0) { + continue; + } + dol_syslog(get_class($this)."::reopen reception movement index ".$i." ed.rowid=".$obj->rowid); //var_dump($this->lines[$i]);