added: getSearch() bestellungen ohne freigabe können gesucht werden

This commit is contained in:
Karl Burkhart
2011-02-17 14:44:48 +00:00
parent 363c7d0da6
commit 10eed8190f
+4 -1
View File
@@ -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.";