Ensure that only 'current' modules and meters are selected (mip_quotation.pck).

Where valid from is null in new meters, set the valid from to the start of the day on which they are loaded (mip_bulk_load.pck).


git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3927 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
hardya
2008-03-10 17:29:43 +00:00
parent 73ecb20b38
commit eee0364f94
2 changed files with 11 additions and 5 deletions

View File

@@ -2148,10 +2148,10 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
cout_assert.istrue(NOT (l_required_mesc_code IS NULL AND
l_required_qmax IS NULL)
,p_message => 'Either required_mesc_code is null OR required_qmax is null');
,p_message => 'EITHER required_mesc_code must be null OR required_qmax must be null');
cout_assert.istrue(NOT (l_required_mesc_code IS NOT NULL AND
l_required_qmax IS NOT NULL)
,p_message => 'Either required_mesc_code is null OR required_qmax is null');
,p_message => 'EITHER required_mesc_code must be null OR required_qmax must be null');
FOR l_rec_module IN (SELECT modu.code AS modu_code
,modu.selling_price AS modu_selling_price
@@ -2236,14 +2236,20 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
WHERE accuracy <= 1) cost
WHERE modu.code = cost.modu_code(+)
AND modu.inlet_cnor_code = cnor_i.code
AND modu.outlet_cnor_code = cnor_o.code) modu
AND modu.outlet_cnor_code = cnor_o.code
AND SYSDATE BETWEEN modu.valid_from AND
nvl(modu.valid_to
,SYSDATE)) modu
,(SELECT metr.code
,metr.qmax
,metr.qmin
,metr.qnom
,metr.mety_code
,metr.mesc_code
FROM meters metr) metr
FROM meters metr
WHERE SYSDATE BETWEEN metr.valid_from AND
nvl(metr.valid_to
,SYSDATE)) metr
WHERE modu.svcp_code = p_enqu.required_svcp_code
AND modu.outlet_pressure =
p_enqu.required_metering_pressure