Fix for #498(SC7001) part 2. ensured that the data logger caveat only appears if the job is Std removal, Removal or adversarial and the user has stated 'yes' there is an existing data logger on the enquiry form.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@4795 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
PriestJ
2008-04-15 10:22:37 +00:00
parent 96ef45a770
commit 1b7a772e37

View File

@@ -1444,6 +1444,8 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
l_indent number := 31.7; l_indent number := 31.7;
l_vertical_offset number := 30; l_vertical_offset number := 30;
l_font varchar2(40) := 'Arial'; --arial not daz l_font varchar2(40) := 'Arial'; --arial not daz
l_quote_row quotes%ROWTYPE;
l_enqu_row enquiries%ROWTYPE;
CURSOR c_get_logo(cp_logo varchar2) IS CURSOR c_get_logo(cp_logo varchar2) IS
SELECT blob_content SELECT blob_content
FROM wwv_flow_files FROM wwv_flow_files
@@ -1456,10 +1458,6 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
SELECT blob_content SELECT blob_content
FROM wwv_flow_files FROM wwv_flow_files
WHERE filename = cp_watermark; WHERE filename = cp_watermark;
CURSOR c_get_enty(cp_quid varchar2) IS
SELECT enty_code
FROM quote_items
WHERE qute_id = cp_quid and quit_type = 'LQI' ;
begin begin
IF NOT c_get_logo%ISOPEN THEN IF NOT c_get_logo%ISOPEN THEN
@@ -1480,12 +1478,10 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
FETCH c_get_watermark FETCH c_get_watermark
INTO l_watermark_blob; INTO l_watermark_blob;
CLOSE c_get_watermark; CLOSE c_get_watermark;
IF NOT c_get_enty%ISOPEN THEN
OPEN c_get_enty(p_quote_id); l_quote_row := get_quote_row(p_quote_id);
END IF; l_enqu_row := get_enquiry_row(l_quote_row.enqu_id);
FETCH c_get_enty l_enty_code := l_enqu_row.enty_code;
INTO l_enty_code;
CLOSE c_get_enty;
--get the quote diagrams --get the quote diagrams
l_base_blob := get_drawing(p_quote_data.base_diagram); l_base_blob := get_drawing(p_quote_data.base_diagram);
@@ -1496,7 +1492,8 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
--build the pages for the quote --build the pages for the quote
build_covering_letter(p_quote_data,l_font,l_indent,l_vertical_offset,l_logo_blob, l_signature_blob, l_watermark_blob);--1 build_covering_letter(p_quote_data,l_font,l_indent,l_vertical_offset,l_logo_blob, l_signature_blob, l_watermark_blob);--1
build_costs_page(p_quote_data,l_font,l_indent,l_vertical_offset,l_watermark_blob); --2 build_costs_page(p_quote_data,l_font,l_indent,l_vertical_offset,l_watermark_blob); --2
if l_enty_code = 'REMOVE' or l_enty_code = 'STD REMOVE' or l_enty_code = 'ADVERSARIAL' then --only display the data logger caveat if the user has selected it
if (l_enty_code = 'REMOVE' or l_enty_code = 'STD REMOVE' or l_enty_code = 'ADVERSARIAL') and l_enqu_row.existing_logger = 'YES' then
build_caveats_page(p_quote_data,l_font,l_indent,l_vertical_offset,l_watermark_blob, true); --3 build_caveats_page(p_quote_data,l_font,l_indent,l_vertical_offset,l_watermark_blob, true); --3
else else
build_caveats_page(p_quote_data,l_font,l_indent,l_vertical_offset,l_watermark_blob, false); --3 build_caveats_page(p_quote_data,l_font,l_indent,l_vertical_offset,l_watermark_blob, false); --3