checkBestellung -> freigegeben aber nicht bestellt filter hinzugefügt

This commit is contained in:
Karl Burkhart
2011-09-26 11:42:57 +00:00
parent 4e447f62c4
commit 5eff1d338e
+2 -2
View File
@@ -903,8 +903,8 @@ class wawi_bestellung extends basis_db
left join wawi.tbl_bestellung_bestellstatus as s using (bestellung_id)
where
b.bestellung_id not in
(SELECT bestellung_id FROM wawi.tbl_bestellung_bestellstatus where bestellung_id=b.bestellung_id AND bestellstatus_kurzbz ='Bestellung') and bestellstatus_kurzbz = ('Abgeschickt')
and b.bestellung_id = b.bestellung_id and b.insertamum < CURRENT_DATE - '".$min." week'::interval AND b.insertamum > CURRENT_DATE - '".$max." week'::interval
(SELECT bestellung_id FROM wawi.tbl_bestellung_bestellstatus where bestellung_id=b.bestellung_id AND bestellstatus_kurzbz ='Bestellung') and (bestellstatus_kurzbz = ('Abgeschickt') OR bestellstatus_kurzbz = ('Freigegeben'))
and b.bestellung_id = b.bestellung_id and b.insertamum <= CURRENT_DATE - '".$min." week'::interval AND b.insertamum > CURRENT_DATE - '".$max." week'::interval
)
order by bestellung_id";