mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-12 15:04:04 +00:00
Suche nach Inventarnummer eingefügt
wenn nach Inventarnummer oder Bestellnummer gesucht wird werden alle anderen Parameter ignoriert
This commit is contained in:
@@ -184,20 +184,22 @@ class wawi_bestellung extends basis_db
|
||||
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
|
||||
$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, betriebsmittel.inventarnummer
|
||||
FROM
|
||||
wawi.tbl_bestellung bestellung
|
||||
LEFT JOIN wawi.tbl_bestellung_bestellstatus status USING (bestellung_id)
|
||||
LEFT JOIN wawi.tbl_kostenstelle kostenstelle USING (kostenstelle_id)
|
||||
LEFT JOIN wawi.tbl_bestellungtag bestelltag USING (bestellung_id)
|
||||
LEFT JOIN wawi.tbl_bestelldetail detail USING (bestellung_id)
|
||||
|
||||
LEFT JOIN wawi.tbl_betriebsmittel betriebsmittel USING(bestellung_id)
|
||||
LEFT JOIN public.tbl_organisationseinheit orgaeinheit ON (orgaeinheit.oe_kurzbz = kostenstelle.oe_kurzbz)
|
||||
WHERE 1=1 ";
|
||||
|
||||
// Bestellnummer und Inventarnummer werden durchsucht
|
||||
if ($bestellnr != '')
|
||||
$qry.= " AND UPPER(bestellung.bestell_nr) LIKE UPPER('%".addslashes($bestellnr)."%')";
|
||||
|
||||
$qry.= " AND (UPPER(bestellung.bestell_nr) LIKE UPPER('%".addslashes($bestellnr)."%') OR UPPER(betriebsmittel.inventarnummer) LIKE UPPER('%".addslashes($bestellnr)."%'))";
|
||||
else
|
||||
{
|
||||
if ($titel != '')
|
||||
$qry.= " AND UPPER(bestellung.titel) LIKE UPPER('%".addslashes($titel)."%')";
|
||||
|
||||
@@ -251,6 +253,7 @@ class wawi_bestellung extends basis_db
|
||||
|
||||
if($ohneFreigabe)
|
||||
$qry.=" AND bestellung.freigegeben = 'false'";
|
||||
}
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
|
||||
+1
-1
@@ -487,7 +487,7 @@ if($aktion == 'suche')
|
||||
echo "<input type='hidden' name='method' value='suche'/>";
|
||||
echo "<table border =0>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>Bestellnummer</td>\n";
|
||||
echo "<td>Bestell.- Inventarnummer</td>\n";
|
||||
echo "<td><input type = 'text' size ='32' maxlength = '16' name = 'bestellnr'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user