APGR#55356 -- Bestellingen naar Palette nu per bestelopdracht
svn path=/Customer/trunk/; revision=46281
This commit is contained in:
@@ -1863,9 +1863,7 @@ SELECT
|
||||
bo.bes_bestelopdr_id bestelopdrnummer,
|
||||
TO_CHAR (bo.bes_bestelopdr_datum, 'YYYY-MM-DD') besteldatum,
|
||||
pk.prs_kostenplaats_nr,
|
||||
(SELECT bes_bestellingstatuses_omschr
|
||||
FROM bes_bestellingstatuses bs
|
||||
WHERE bs.bes_bestellingstatuses_key = b.bes_bestelling_status)
|
||||
bs.bes_bestelopdrstatuses_omschr
|
||||
status,
|
||||
(SELECT prs_perslid_naam_full
|
||||
FROM prs_v_perslid_fullnames_all pf
|
||||
@@ -1888,6 +1886,7 @@ SELECT
|
||||
FROM bes_bestelling b,
|
||||
bes_bestelling_item bi,
|
||||
bes_bestelopdr_item boi,
|
||||
bes_bestelopdrstatuses bs,
|
||||
bes_bestelopdr bo,
|
||||
bes_srtdeel bs,
|
||||
prs_bedrijf pb,
|
||||
@@ -1901,11 +1900,12 @@ SELECT
|
||||
AND bi.bes_bestelopdr_item_key = boi.bes_bestelopdr_item_key
|
||||
AND boi.bes_bestelopdr_key = bo.bes_bestelopdr_key
|
||||
AND bo.bes_bestelopdr_key IS NOT NULL
|
||||
AND bo.bes_bestelopdr_status = bs.bes_bestelopdrstatuses_key
|
||||
AND bo.prs_bedrijf_key = pb.prs_bedrijf_key
|
||||
AND bi.bes_srtdeel_key = bs.bes_srtdeel_key
|
||||
AND b.prs_kostenplaats_key = pk.prs_kostenplaats_key
|
||||
AND b.mld_adres_key_lev = ma.mld_adres_key
|
||||
AND b.bes_bestelling_status = 6
|
||||
AND bo.bes_bestelopdr_status = 6
|
||||
AND bo.bes_bestelopdr_key = track.key
|
||||
AND TRUNC (track.datum) = TRUNC (SYSDATE - 1)
|
||||
ORDER BY bo.bes_bestelopdr_id, boi.bes_bestelopdr_item_posnr;
|
||||
|
||||
Reference in New Issue
Block a user