diff --git a/include/wawi_bestelldetails.class.php b/include/wawi_bestelldetail.class.php similarity index 100% rename from include/wawi_bestelldetails.class.php rename to include/wawi_bestelldetail.class.php diff --git a/include/wawi_bestellung.class.php b/include/wawi_bestellung.class.php index c1b3f1387..ad423ab58 100644 --- a/include/wawi_bestellung.class.php +++ b/include/wawi_bestellung.class.php @@ -23,7 +23,7 @@ * Klasse WaWi Bestellung */ require_once(dirname(__FILE__).'/basis_db.class.php'); -require_once (dirname(__FILE__).'/wawi_bestelldetails.class.php'); +require_once (dirname(__FILE__).'/wawi_bestelldetail.class.php'); require_once (dirname(__FILE__).'/wawi_aufteilung.class.php'); require_once (dirname(__FILE__).'/organisationseinheit.class.php'); require_once (dirname(__FILE__).'/wawi_kostenstelle.class.php'); @@ -259,6 +259,54 @@ class wawi_bestellung extends basis_db return true; } + /** + * + * Liefert die Daten einer Bestellung + * @param $filter + */ + public function getBestellung($filter) + { + $filter = addslashes($filter); + + $qry = "SELECT * FROM wawi.tbl_bestellung WHERE + bestellung_id::text like '%$filter%' OR + lower(bestell_nr) like lower('%$filter%')"; + + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $bestellung = new wawi_bestellung(); + + $bestellung->bestellung_id = $row->bestellung_id; + $bestellung->kostenstelle_id = $row->kostenstelle_id; + $bestellung->konto_id = $row->konto_id; + $bestellung->firma_id = $row->firma_id; + $bestellung->lieferadresse = $row->lieferadresse; + $bestellung->rechnungsadresse = $row->rechnungsadresse; + $bestellung->freigegeben = $row->freigegeben; + $bestellung->bestell_nr = $row->bestell_nr; + $bestellung->titel = $row->titel; + $bestellung->bemerkung = $row->bemerkung; + $bestellung->liefertermin = $row->liefertermin; + $bestellung->updateamum = $row->updateamum; + $bestellung->updatevon = $row->updatevon; + $bestellung->insertamum = $row->insertamum; + $bestellung->insertvon = $row->insertvon; + $bestellung->ext_id = $row->ext_id; + $bestellung->zahlungstyp_kurzbz = $row->zahlungstyp_kurzbz; + + $this->result[] = $bestellung; + } + return true; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + /** * * Löscht die Bestellung mit der Übergebenen ID diff --git a/include/wawi_kostenstelle.class.php b/include/wawi_kostenstelle.class.php index 5cb19435b..eedc2d3a6 100644 --- a/include/wawi_kostenstelle.class.php +++ b/include/wawi_kostenstelle.class.php @@ -213,19 +213,7 @@ class wawi_kostenstelle extends basis_db $this->errormsg = 'Kurzbezeichnung darf nicht laenger als 32 Zeichen sein.'; return false; } - - if(!is_numeric($this->budget)) - { - if($this->budget == '') - return true; - else - { - $this->errormsg = 'Kein gültiges Budget eingegeben.'; - return false; - } - } - - + $this->errormsg = ''; return true; } @@ -343,6 +331,7 @@ class wawi_kostenstelle extends basis_db $sql_query_upd1.="UPDATE wawi.tbl_aufteilung_default SET kostenstelle_id='$id2' WHERE kostenstelle_id='$id1'; "; $sql_query_upd1.="UPDATE wawi.tbl_konto_kostenstelle SET kostenstelle_id='$id2' WHERE kostenstelle_id='$id1' AND konto_id NOT IN(SELECT konto_id FROM wawi.tbl_konto_kostenstelle WHERE kostenstelle_id='$id2'); "; $sql_query_upd1.="DELETE FROM wawi.tbl_konto_kostenstelle WHERE kostenstelle_id='$id1';"; + $sql_query_upd1.="DELETE FROM wawi.tbl_budget WHERE kostenstelle_id='$id1';"; $sql_query_upd1.="UPDATE wawi.tbl_bestellung SET kostenstelle_id='$id2' WHERE kostenstelle_id='$id1'; "; $sql_query_upd1.="UPDATE system.tbl_benutzerrolle SET kostenstelle_id='$id2' WHERE kostenstelle_id='$id1'; "; diff --git a/skin/jquery.css b/skin/jquery.css index 6c00659da..f2c00aa83 100644 --- a/skin/jquery.css +++ b/skin/jquery.css @@ -21,7 +21,7 @@ in relative units scroll will be broken in firefox */ line-height: 16px; overflow: hidden; } - .ac_loading {background: #ffffff url('indicator.gif') right center no-repeat; } + .ac_loading {background: #ffffff url('images/indicator.gif') right center no-repeat; } .ac_odd {background-color: #eee;} .ac_over {background-color: navy;color: white;font-weight: bold;} .ac_input {border: 1px solid WindowFrame;background-color: #FBFBFB;} diff --git a/wawi/bestellung.php b/wawi/bestellung.php index 3d948604d..03ae97f45 100644 --- a/wawi/bestellung.php +++ b/wawi/bestellung.php @@ -35,7 +35,7 @@ require_once '../include/geschaeftsjahr.class.php'; require_once '../include/wawi_konto.class.php'; require_once '../include/wawi_bestellung.class.php'; require_once '../include/wawi_kostenstelle.class.php'; -require_once '../include/wawi_bestelldetails.class.php'; +require_once '../include/wawi_bestelldetail.class.php'; require_once '../include/wawi_aufteilung.class.php'; require_once '../include/wawi_bestellstatus.class.php'; require_once '../include/wawi_zahlungstyp.class.php'; diff --git a/wawi/kostenstellenuebersicht.php b/wawi/kostenstellenuebersicht.php index 470e0fd34..326662631 100644 --- a/wawi/kostenstellenuebersicht.php +++ b/wawi/kostenstellenuebersicht.php @@ -134,10 +134,6 @@ if(isset($_GET['method'])) echo "