From c436af29578b4302e3732a3bcca33a061d5b522a Mon Sep 17 00:00:00 2001 From: PriestJ Date: Wed, 16 Jan 2008 17:43:29 +0000 Subject: [PATCH] fixed code so that addons is not displayed on the pdf if there are none and made work items not display any unecessary blank lines, and made sure that existing meter details are shown for removal type jobs git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3280 248e525c-4dfb-0310-94bc-949c084e9493 --- Modules/mip_quotation_document.pck | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Modules/mip_quotation_document.pck b/Modules/mip_quotation_document.pck index 4d1473d..60aad79 100644 --- a/Modules/mip_quotation_document.pck +++ b/Modules/mip_quotation_document.pck @@ -611,7 +611,9 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS l_works(2) := 'Service Pressure: '|| l_service_pressure; -- --add up all the addons and format the string - l_works(4) := 'Add-Ons: '|| ltrim(l_addons, ','); + if l_addons is not null then + l_works(4) := 'Add-Ons: '|| ltrim(l_addons, ','); + end if; p_quote_data.quote_works := l_works; --get caveats @@ -879,11 +881,13 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS plpdf.SetPrintFont(p_font,'U',10); --set underline plpdf.PrintText(p_indent,p_vertical_offset+48,'Full Description of Works to be carried out by National Grid Metering:'); plpdf.SetPrintFont(p_font,'B',10); --set bold - l_works_counter := 1; - while p_quote_data.quote_works(l_works_counter) is not null - loop - plpdf.PrintText(p_indent,l_vertical_offset_for_works+(l_works_counter*4), p_quote_data.quote_works(l_works_counter)); - l_works_counter := l_works_counter +1; + l_works_counter := p_quote_data.quote_works.first; + loop + exit when l_works_counter is null; + if p_quote_data.quote_works(l_works_counter) is not null then + plpdf.PrintText(p_indent,l_vertical_offset_for_works+(l_works_counter*4), p_quote_data.quote_works(l_works_counter)); + l_works_counter := p_quote_data.quote_works.next(l_works_counter); + end if; end loop; -- DESC_WORK caveat here if p_quote_data.caveat_desc_works is not null then