mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
added: getSearch nach zahlungstyp suchen
This commit is contained in:
@@ -178,7 +178,7 @@ class wawi_bestellung extends basis_db
|
||||
* @param $kostenstelle_id
|
||||
* @param $tag
|
||||
*/
|
||||
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)
|
||||
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)
|
||||
{
|
||||
$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
|
||||
@@ -230,11 +230,16 @@ class wawi_bestellung extends basis_db
|
||||
if($kostenstelle_id!='')
|
||||
$qry.= ' AND kostenstelle_id='.$this->addslashes($kostenstelle_id);
|
||||
|
||||
if($zahlungstyp!='')
|
||||
$qry.= ' AND bestellung.zahlungstyp_kurzbz = '.$this->addslashes($zahlungstyp);
|
||||
|
||||
if($tag!='')
|
||||
$qry.= ' AND (EXISTS (SELECT 1 FROM wawi.tbl_bestellungtag WHERE tag='.$this->addslashes($tag).' AND bestellung_id=bestellung.bestellung_id)
|
||||
OR EXISTS (SELECT 1 FROM wawi.tbl_bestelldetailtag JOIN wawi.tbl_bestelldetail USING(bestelldetail_id) WHERE tag='.$this->addslashes($tag).' AND bestellung_id=bestellung.bestellung_id)
|
||||
)';
|
||||
|
||||
|
||||
|
||||
echo $qry;
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = "Fehler bei der Datenbankabfrage.";
|
||||
|
||||
Reference in New Issue
Block a user