From 512c987dc5a6017a1e306b27e213c3eea9be4270 Mon Sep 17 00:00:00 2001 From: Maykel Geerdink Date: Tue, 25 Jan 2022 15:28:04 +0000 Subject: [PATCH] VBGO#70402 Het UDR rapport bes_v_udr_bestelling geeft geen resultaat zonder kostenplaats. svn path=/Database/trunk/; revision=54676 --- BES/BES_VIE.SRC | 100 ++++++++++++++++++++++++------------------------ PRS/PRS_VIE.SRC | 8 ++-- RES/RES_VIE.SRC | 23 ++++++++--- 3 files changed, 71 insertions(+), 60 deletions(-) diff --git a/BES/BES_VIE.SRC b/BES/BES_VIE.SRC index 793ed63b..54ba8d41 100644 --- a/BES/BES_VIE.SRC +++ b/BES/BES_VIE.SRC @@ -27,21 +27,21 @@ AS */ CREATE_VIEW(bes_bestellingstatuses, 0) AS -SELECT fac_code2label_code bes_bestellingstatuses_key, - COALESCE (fac_locale_xsl_cust, fac_locale_xsl_tekst) bes_bestellingstatuses_omschr - FROM fac_locale_xsl fl, fac_code2label fs - WHERE fl.fac_locale_xsl_label = fac_code2label_label - AND fac_code2label_domein = 'bestelling' - AND fac_locale_xsl_lang = lcl.getuserlanguage (); +SELECT fac_code2label_code bes_bestellingstatuses_key, + COALESCE (fac_locale_xsl_cust, fac_locale_xsl_tekst) bes_bestellingstatuses_omschr + FROM fac_locale_xsl fl, fac_code2label fs + WHERE fl.fac_locale_xsl_label = fac_code2label_label + AND fac_code2label_domein = 'bestelling' + AND fac_locale_xsl_lang = lcl.getuserlanguage (); CREATE_VIEW(bes_bestelopdrstatuses, 0) AS -SELECT fac_code2label_code bes_bestelopdrstatuses_key, - COALESCE (fac_locale_xsl_cust, fac_locale_xsl_tekst) bes_bestelopdrstatuses_omschr - FROM fac_locale_xsl fl, fac_code2label fs - WHERE fl.fac_locale_xsl_label = fac_code2label_label - AND fac_code2label_domein = 'bestelopdr' - AND fac_locale_xsl_lang = lcl.getuserlanguage (); +SELECT fac_code2label_code bes_bestelopdrstatuses_key, + COALESCE (fac_locale_xsl_cust, fac_locale_xsl_tekst) bes_bestelopdrstatuses_omschr + FROM fac_locale_xsl fl, fac_code2label fs + WHERE fl.fac_locale_xsl_label = fac_code2label_label + AND fac_code2label_domein = 'bestelopdr' + AND fac_locale_xsl_lang = lcl.getuserlanguage (); CREATE_VIEW(bes_v_qvw_algemeen, 0) (bes_bestelling_key, bestelaanvraagnr, @@ -175,7 +175,7 @@ AS ins_tab_discipline d, alg_locatie l WHERE b.prs_perslid_key = p.prs_perslid_key - AND b.prs_kostenplaats_key = k.prs_kostenplaats_key + AND b.prs_kostenplaats_key = k.prs_kostenplaats_key(+) AND p.prs_afdeling_key = a.prs_afdeling_key AND b.mld_adres_key_lev = ma.mld_adres_key AND wp2.prs_perslid_key(+) = p.prs_perslid_key @@ -207,15 +207,15 @@ AS fac_locale de, fac_locale fr, bqa - WHERE bqa.ins_discipline_key = en.fac_locale_kolomkeyval(+) - AND en.fac_locale_kolomnaam(+) = 'INS_DISCIPLINE_OMSCHRIJVING' - AND en.fac_locale_lang(+) = 'EN' - AND bqa.ins_discipline_key = de.fac_locale_kolomkeyval(+) - AND de.fac_locale_kolomnaam(+) = 'INS_DISCIPLINE_OMSCHRIJVING' - AND de.fac_locale_lang(+) = 'DE' - AND bqa.ins_discipline_key = fr.fac_locale_kolomkeyval(+) - AND fr.fac_locale_kolomnaam(+) = 'INS_DISCIPLINE_OMSCHRIJVING' - AND fr.fac_locale_lang(+) = 'FR' + WHERE bqa.ins_discipline_key = en.fac_locale_kolomkeyval(+) + AND en.fac_locale_kolomnaam(+) = 'INS_DISCIPLINE_OMSCHRIJVING' + AND en.fac_locale_lang(+) = 'EN' + AND bqa.ins_discipline_key = de.fac_locale_kolomkeyval(+) + AND de.fac_locale_kolomnaam(+) = 'INS_DISCIPLINE_OMSCHRIJVING' + AND de.fac_locale_lang(+) = 'DE' + AND bqa.ins_discipline_key = fr.fac_locale_kolomkeyval(+) + AND fr.fac_locale_kolomnaam(+) = 'INS_DISCIPLINE_OMSCHRIJVING' + AND fr.fac_locale_lang(+) = 'FR' UNION ALL SELECT DISTINCT bqa.bes_srtgroep_key, 'BES_SRTGROEP_OMSCHRIJVING', @@ -227,15 +227,15 @@ AS fac_locale de, fac_locale fr, bqa - WHERE bqa.bes_srtgroep_key = en.fac_locale_kolomkeyval(+) - AND en.fac_locale_kolomnaam(+) = 'BES_SRTGROEP_OMSCHRIJVING' - AND en.fac_locale_lang(+) = 'EN' - AND bqa.bes_srtgroep_key = de.fac_locale_kolomkeyval(+) - AND de.fac_locale_kolomnaam(+) = 'BES_SRTGROEP_OMSCHRIJVING' - AND de.fac_locale_lang(+) = 'DE' - AND bqa.bes_srtgroep_key = fr.fac_locale_kolomkeyval(+) - AND fr.fac_locale_kolomnaam(+) = 'BES_SRTGROEP_OMSCHRIJVING' - AND fr.fac_locale_lang(+) = 'FR' + WHERE bqa.bes_srtgroep_key = en.fac_locale_kolomkeyval(+) + AND en.fac_locale_kolomnaam(+) = 'BES_SRTGROEP_OMSCHRIJVING' + AND en.fac_locale_lang(+) = 'EN' + AND bqa.bes_srtgroep_key = de.fac_locale_kolomkeyval(+) + AND de.fac_locale_kolomnaam(+) = 'BES_SRTGROEP_OMSCHRIJVING' + AND de.fac_locale_lang(+) = 'DE' + AND bqa.bes_srtgroep_key = fr.fac_locale_kolomkeyval(+) + AND fr.fac_locale_kolomnaam(+) = 'BES_SRTGROEP_OMSCHRIJVING' + AND fr.fac_locale_lang(+) = 'FR' UNION ALL SELECT DISTINCT bqa.bes_srtdeel_key, 'BES_SRTDEEL_OMSCHRIJVING', @@ -247,15 +247,15 @@ AS fac_locale de, fac_locale fr, bqa - WHERE bqa.bes_srtdeel_key = en.fac_locale_kolomkeyval(+) - AND en.fac_locale_kolomnaam(+) = 'BES_SRTDEEL_OMSCHRIJVING' - AND en.fac_locale_lang(+) = 'EN' - AND bqa.bes_srtdeel_key = de.fac_locale_kolomkeyval(+) - AND de.fac_locale_kolomnaam(+) = 'BES_SRTDEEL_OMSCHRIJVING' - AND de.fac_locale_lang(+) = 'DE' - AND bqa.bes_srtdeel_key = fr.fac_locale_kolomkeyval(+) - AND fr.fac_locale_kolomnaam(+) = 'BES_SRTDEEL_OMSCHRIJVING' - AND fr.fac_locale_lang(+) = 'FR'; + WHERE bqa.bes_srtdeel_key = en.fac_locale_kolomkeyval(+) + AND en.fac_locale_kolomnaam(+) = 'BES_SRTDEEL_OMSCHRIJVING' + AND en.fac_locale_lang(+) = 'EN' + AND bqa.bes_srtdeel_key = de.fac_locale_kolomkeyval(+) + AND de.fac_locale_kolomnaam(+) = 'BES_SRTDEEL_OMSCHRIJVING' + AND de.fac_locale_lang(+) = 'DE' + AND bqa.bes_srtdeel_key = fr.fac_locale_kolomkeyval(+) + AND fr.fac_locale_kolomnaam(+) = 'BES_SRTDEEL_OMSCHRIJVING' + AND fr.fac_locale_lang(+) = 'FR'; -- Vooralsnog placeholders, moeten aangepast worden CREATE_VIEW(bes_v_api_bestellingen, 1) AS SELECT * from bes_bestelling; @@ -447,16 +447,16 @@ AS bes_srtdeel sd, bes_srtgroep sg, ins_tab_discipline d - WHERE b.prs_perslid_key = p.prs_perslid_key - AND b.prs_kostenplaats_key = k.prs_kostenplaats_key - AND p.prs_afdeling_key = a.prs_afdeling_key - AND b.mld_adres_key_lev = ma.mld_adres_key - AND b.bes_bestelling_key = bi.bes_bestelling_key - AND bi.bes_bestelopdr_item_key = boi.bes_bestelopdr_item_key(+) - AND boi.bes_bestelopdr_key = bo.bes_bestelopdr_key(+) - AND bi.bes_srtdeel_key = sd.bes_srtdeel_key - AND sd.bes_srtgroep_key = sg.bes_srtgroep_key - AND sg.ins_discipline_key = d.ins_discipline_key); + WHERE b.prs_perslid_key = p.prs_perslid_key + AND b.prs_kostenplaats_key = k.prs_kostenplaats_key(+) + AND p.prs_afdeling_key = a.prs_afdeling_key + AND b.mld_adres_key_lev = ma.mld_adres_key + AND b.bes_bestelling_key = bi.bes_bestelling_key + AND bi.bes_bestelopdr_item_key = boi.bes_bestelopdr_item_key(+) + AND boi.bes_bestelopdr_key = bo.bes_bestelopdr_key(+) + AND bi.bes_srtdeel_key = sd.bes_srtdeel_key + AND sd.bes_srtgroep_key = sg.bes_srtgroep_key + AND sg.ins_discipline_key = d.ins_discipline_key); CREATE_VIEW(bes_v_allsrtinstallatie, 0) ( diff --git a/PRS/PRS_VIE.SRC b/PRS/PRS_VIE.SRC index ba259680..c7f4cbbf 100644 --- a/PRS/PRS_VIE.SRC +++ b/PRS/PRS_VIE.SRC @@ -99,13 +99,13 @@ CREATE_VIEW (prs_v_perslid_print,0) AS ,PRS_SP.prs_srtperslid_omschrijving ,k.prs_kostenplaats_nr AS prs_afdeling_kostenplaats ,k.prs_kostenplaats_nr - FROM prs_v_aanwezigperslid PRS_P - ,prs_afdeling PRS_A + FROM prs_v_aanwezigperslid PRS_P + ,prs_afdeling PRS_A ,prs_srtperslid PRS_SP ,prs_kostenplaats k - WHERE PRS_P.prs_afdeling_key = PRS_A.prs_afdeling_key + WHERE PRS_P.prs_afdeling_key = PRS_A.prs_afdeling_key AND PRS_SP.prs_srtperslid_key(+) = PRS_P.prs_srtperslid_key - AND PRS_A.prs_kostenplaats_key=k.prs_kostenplaats_key; + AND PRS_A.prs_kostenplaats_key = k.prs_kostenplaats_key(+); CREATE_VIEW(prs_v_perslid_fullnames, 0) AS SELECT prs_perslid_key, diff --git a/RES/RES_VIE.SRC b/RES/RES_VIE.SRC index 573a1b0c..b5e1be99 100644 --- a/RES/RES_VIE.SRC +++ b/RES/RES_VIE.SRC @@ -209,12 +209,23 @@ WHERE / CREATE_VIEW(res_v_reserveringruimte_geg, 0) AS - SELECT rr.res_reservering_key, rr2.res_rsv_ruimte_opmerking, - rr2.res_rsv_ruimte_omschrijving, k.prs_kostenplaats_nr res_rsv_ruimte_ordernr, rr2.res_rsv_ruimte_telefoon, - rr2.res_rsv_ruimte_aanmaak, rr2.res_rsv_ruimte_verwijder, rr2.res_rsv_ruimte_contact_key, - rr2.res_rsv_ruimte_host_key, rr.res_ruimte_key, rr.alg_ruimte_key, k.prs_kostenplaats_nr - FROM res_v_rsv_ruimte_2_alg_ruimte rr, prs_kostenplaats k, res_rsv_ruimte rr2 - WHERE k.prs_kostenplaats_key = rr2.prs_kostenplaats_key AND rr2.res_rsv_ruimte_key = rr.res_rsv_ruimte_key; + SELECT rr.res_reservering_key, + rr2.res_rsv_ruimte_opmerking, + rr2.res_rsv_ruimte_omschrijving, + k.prs_kostenplaats_nr res_rsv_ruimte_ordernr, + rr2.res_rsv_ruimte_telefoon, + rr2.res_rsv_ruimte_aanmaak, + rr2.res_rsv_ruimte_verwijder, + rr2.res_rsv_ruimte_contact_key, + rr2.res_rsv_ruimte_host_key, + rr.res_ruimte_key, + rr.alg_ruimte_key, + k.prs_kostenplaats_nr + FROM res_v_rsv_ruimte_2_alg_ruimte rr, + prs_kostenplaats k, + res_rsv_ruimte rr2 + WHERE k.prs_kostenplaats_key(+) = rr2.prs_kostenplaats_key + AND rr2.res_rsv_ruimte_key = rr.res_rsv_ruimte_key; CREATE_VIEW(res_v_ruimte_opstel_gegevens,0) AS SELECT RES_RO.res_ruimte_opstel_key,