diff --git a/include/wawi_bestellstatus.class.php b/include/wawi_bestellstatus.class.php index 1f85d9200..dce0d7e11 100644 --- a/include/wawi_bestellstatus.class.php +++ b/include/wawi_bestellstatus.class.php @@ -170,4 +170,44 @@ class wawi_bestellstatus extends basis_db return false; } } + + /** + * + * Setzt den Status einer Bestellung auf Bestellt + */ + public function setBestellung() + { + $qry = "INSERT INTO wawi.tbl_bestellung_bestellstatus (bestellung_id, bestellstatus_kurzbz, uid, oe_kurzbz, datum, insertvon, insertamum, updatevon, updateamum) + VALUES + (".($this->bestellung_id).", 'Bestellung',".$this->addslashes($this->uid).", ".$this->addslashes($this->oe_kurzbz).", '".($this->datum)."', + ".$this->addslashes($this->insertvon).", ".$this->addslashes($this->insertamum).", ".$this->addslashes($this->updatevon).", ".$this->addslashes($this->updateamum).");"; + + if(!$this->db_query($qry)) + { + $this->errormsg ="Fehler bei der Abfrage aufgetreten."; + return false; + } + + return true; + } + + /** + * + * Enter description here ... + */ + public function setStorno() + { + $qry = "INSERT INTO wawi.tbl_bestellung_bestellstatus (bestellung_id, bestellstatus_kurzbz, uid, oe_kurzbz, datum, insertvon, insertamum, updatevon, updateamum) + VALUES + (".($this->bestellung_id).", 'Storno',".$this->addslashes($this->uid).", ".$this->addslashes($this->oe_kurzbz).", '".($this->datum)."', + ".$this->addslashes($this->insertvon).", ".$this->addslashes($this->insertamum).", ".$this->addslashes($this->updatevon).", ".$this->addslashes($this->updateamum).");"; + + if(!$this->db_query($qry)) + { + $this->errormsg ="Fehler bei der Abfrage aufgetreten."; + return false; + } + + return true; + } } \ No newline at end of file diff --git a/include/wawi_bestellung.class.php b/include/wawi_bestellung.class.php index c7646878c..04858ae41 100644 --- a/include/wawi_bestellung.class.php +++ b/include/wawi_bestellung.class.php @@ -481,6 +481,7 @@ class wawi_bestellung extends basis_db updatevon ='.$this->addslashes($this->udpatevon).', ext_id = '.$this->addslashes($this->ext_id).' WHERE bestellung_id = '.$this->bestellung_id.';'; } + echo $qry; if($this->db_query($qry)) { if($this->new)