TWYN#73524 Foute selectie in rapporten meer- en minderwerk

svn path=/Customer/trunk/; revision=57344
This commit is contained in:
Sander Schepers
2022-09-20 07:43:39 +00:00
parent 73c62236dc
commit a3e003d6b7

View File

@@ -1058,6 +1058,11 @@ AS
|| ' AND p.bgt_project_key = d.bgt_project_key '
|| ' AND p.ins_discipline_verwijder IS NULL '
|| ' AND p.bgt_project_verwijder IS NULL '
|| ' AND ( ( m.mld_opdr_datumbegin <= to_date(''' || p_datum_tot || ''', ''dd-mm-yyyy'')'
|| ' AND COALESCE(BGT.getGefactureerd(m.mld_opdr_key, 0, null, to_date(''' || p_datum_tot || ''', ''dd-mm-yyyy'')), 0) = 0'
|| ' )'
|| ' OR (COALESCE(BGT.getGefactureerd(m.mld_opdr_key, 0, null, to_date(''' || p_datum_tot || ''', ''dd-mm-yyyy'')), 0) <> 0)'
|| ' )'
|| ' '
|| v_where
|| ' ORDER BY b.prs_leverancier_nr, '