From 7c1ad73fa7b7d7858270f6afebf1459804dd577e Mon Sep 17 00:00:00 2001 From: PriestJ Date: Thu, 12 Jun 2008 15:15:21 +0000 Subject: [PATCH] Fix for #514 Implemented AH's suggested code, this seems to have fixed the issue. The correct qmax value is now passed for Removal, OFMAT and alteration jobs git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@5280 248e525c-4dfb-0310-94bc-949c084e9493 --- Modules/mip_quotation.pck | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Modules/mip_quotation.pck b/Modules/mip_quotation.pck index 8f1a73f..3cb8b71 100644 --- a/Modules/mip_quotation.pck +++ b/Modules/mip_quotation.pck @@ -1142,7 +1142,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.'); al(' '); al('Enquiry reference number: ' || p_enqu_id); al(' '); - al('Thank you for accepting National Grid Metering’s quotation using the Online I&C Quotations System. We will acknowledge your acceptance and provide you with a planning letter within the agreed timescales for the work type involved. '); + al('Thank you for accepting National Grid Metering¿s quotation using the Online I&C Quotations System. We will acknowledge your acceptance and provide you with a planning letter within the agreed timescales for the work type involved. '); al(' '); al('Please use the Enquiry reference number at the top of this email on any future correspondence relating to this request.'); al(' '); @@ -2923,6 +2923,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.'); l_labour_costs t_rec_additional_costs; l_quote_document VARCHAR2(240); l_additional_costs t_rec_additional_costs; + l_required_qmax NUMBER; l_existing_rec_metr_details t_rec_metr_details; BEGIN pl('produce_labour_only_quotes:entry:' || p_enqu.id || ':' || @@ -2972,11 +2973,19 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.'); ,p_internal_or_external => gc_internal_reason); END IF; - + --over-ride the enquiry qmax if an existing meter is specified as + --we can get the real qmax value (off the module) + IF l_existing_rec_metr_details.mesc_code IS NOT NULL + AND l_existing_rec_metr_details.mesc_code <> 'OTHER' THEN + l_required_qmax := get_qmax_from_mesc(l_existing_rec_metr_details.mesc_code); + ELSE + l_required_qmax := p_enqu.qmax; + END IF; + l_lead_time := get_lead_time(p_enty_code => p_enqu.enty_code ,p_mety_code => l_existing_rec_metr_details.mety_code ,p_svcp_code => p_enqu.required_svcp_code - ,p_qmax => p_enqu.qmax); + ,p_qmax => l_required_qmax); IF l_lead_time IS NULL THEN l_this_is_automatic_quote := FALSE; add_quote_reason(p_enqu.id