From 10eed8190fa25e93915246af7334411b7caba546 Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Thu, 17 Feb 2011 14:44:48 +0000 Subject: [PATCH] =?UTF-8?q?added:=20getSearch()=20bestellungen=20ohne=20fr?= =?UTF-8?q?eigabe=20k=C3=B6nnen=20gesucht=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/wawi_bestellung.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/wawi_bestellung.class.php b/include/wawi_bestellung.class.php index 3fac890ae..49ec288e5 100644 --- a/include/wawi_bestellung.class.php +++ b/include/wawi_bestellung.class.php @@ -181,7 +181,7 @@ class wawi_bestellung extends basis_db * @param $tagNotExists * @param $bestellposition */ - public function getAllSearch($bestellnr, $titel, $evon, $ebis, $bvon, $bbis, $firma_id, $oe_kurzbz, $konto_id, $mitarbeiter_uid, $rechnung, $filter_firma, $kostenstelle_id=null, $tag=null, $zahlungstyp=null, $tagNotExists=false, $bestellposition=null) + public function getAllSearch($bestellnr, $titel, $evon, $ebis, $bvon, $bbis, $firma_id, $oe_kurzbz, $konto_id, $mitarbeiter_uid, $rechnung, $filter_firma, $kostenstelle_id=null, $tag=null, $zahlungstyp=null, $tagNotExists=false, $bestellposition=null,$ohneFreigabe=false) { $first = true; $qry = "SELECT distinct on (bestellung.bestellung_id) *, bestellung.updateamum as update, bestellung.updatevon as update_von, bestellung.insertamum as insert, bestellung.insertvon as insert_von @@ -249,6 +249,9 @@ class wawi_bestellung extends basis_db if($bestellposition!='') $qry.=" AND EXISTS (SELECT 1 FROM wawi.tbl_bestelldetail where UPPER(beschreibung) LIKE UPPER('%".addslashes($bestellposition)."%') AND bestellung_id=bestellung.bestellung_id)"; + if($ohneFreigabe) + $qry.=" AND bestellung.freigegeben = 'false'"; + if(!$this->db_query($qry)) { $this->errormsg = "Fehler bei der Datenbankabfrage.";