Fix for #495(SCM003/SC3017) set the quote reference on the quotation document to display the enquiry id instead of the quote id.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@4766 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
PriestJ
2008-04-10 12:46:21 +00:00
parent e6c930c935
commit e63a58d1be

View File

@@ -19,7 +19,8 @@ CREATE OR REPLACE PACKAGE mip_quotation_document IS
type caveats is varray(20) of varchar2(2000); type caveats is varray(20) of varchar2(2000);
type dimensions is varray(10) of number; type dimensions is varray(10) of number;
type quote_data is record type quote_data is record
(quote_ref NUMBER, (enquiry_ref NUMBER,
quote_ref NUMBER,
transaction_ref VARCHAR2(80), transaction_ref VARCHAR2(80),
mprn number(30), mprn number(30),
supplier_address address := address(null,null,null,null,null,null,null), supplier_address address := address(null,null,null,null,null,null,null),
@@ -738,7 +739,8 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
l_agent_first_name := l_party_row.first_name; l_agent_first_name := l_party_row.first_name;
l_agent_last_name := l_party_row.last_name; l_agent_last_name := l_party_row.last_name;
l_quote_data.enquiry_ref := l_enquiry_id;
l_quote_data.quote_ref := l_quote_row.id; l_quote_data.quote_ref := l_quote_row.id;
l_quote_data.transaction_ref := l_enqu_row.transaction_reference; l_quote_data.transaction_ref := l_enqu_row.transaction_reference;
l_quote_data.mprn := l_enqu_row.mprn; l_quote_data.mprn := l_enqu_row.mprn;
@@ -831,7 +833,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.PrintText(50,280,'National Grid Metering is the trading name for National Grid Metering Ltd.'); plpdf.PrintText(50,280,'National Grid Metering is the trading name for National Grid Metering Ltd.');
plpdf.PrintText(50,283,'Registered Office: 1-3 Strand, London, WCZN 5EH. Registered in England and Wales, No. 3705992'); plpdf.PrintText(50,283,'Registered Office: 1-3 Strand, London, WCZN 5EH. Registered in England and Wales, No. 3705992');
plpdf.SetPrintFont(p_font,null,10); -- set back to 10 pt plpdf.SetPrintFont(p_font,null,10); -- set back to 10 pt
plpdf.PrintText(p_indent,p_vertical_offset+10,'National Grid Metering''s Ref: '|| to_char(p_quote_data.quote_ref)); plpdf.PrintText(p_indent,p_vertical_offset+10,'National Grid Metering''s Ref: '|| to_char(p_quote_data.enquiry_ref));
plpdf.PrintText(p_indent,p_vertical_offset+14,'Customer Reference: '|| p_quote_data.transaction_ref); plpdf.PrintText(p_indent,p_vertical_offset+14,'Customer Reference: '|| p_quote_data.transaction_ref);
plpdf.PrintText(p_indent,p_vertical_offset+18,'MPRN: '|| to_char(p_quote_data.mprn)); plpdf.PrintText(p_indent,p_vertical_offset+18,'MPRN: '|| to_char(p_quote_data.mprn));
--print supplier address with no blank lines --print supplier address with no blank lines
@@ -925,7 +927,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.SetPrintFont(p_font,'B',10); --set bold plpdf.SetPrintFont(p_font,'B',10); --set bold
plpdf.PrintText(p_indent,p_vertical_offset+10,'QUOTATION'); plpdf.PrintText(p_indent,p_vertical_offset+10,'QUOTATION');
plpdf.SetPrintFont(p_font,null,10); --unset bold plpdf.SetPrintFont(p_font,null,10); --unset bold
plpdf.PrintText(p_indent,p_vertical_offset+18,'National Grid Metering''s Ref: '|| to_char(p_quote_data.quote_ref)); plpdf.PrintText(p_indent,p_vertical_offset+18,'National Grid Metering''s Ref: '|| to_char(p_quote_data.enquiry_ref));
plpdf.PrintText(p_indent,p_vertical_offset+22,'Customer Reference: '|| p_quote_data.transaction_ref); plpdf.PrintText(p_indent,p_vertical_offset+22,'Customer Reference: '|| p_quote_data.transaction_ref);
plpdf.PrintText(p_indent,p_vertical_offset+26,'MPRN: '|| to_char(p_quote_data.mprn)); plpdf.PrintText(p_indent,p_vertical_offset+26,'MPRN: '|| to_char(p_quote_data.mprn));
plpdf.PrintText(p_indent,p_vertical_offset+30,'Date: '||p_quote_data.current_date); plpdf.PrintText(p_indent,p_vertical_offset+30,'Date: '||p_quote_data.current_date);
@@ -1076,7 +1078,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.SetRightMargin(31.7); plpdf.SetRightMargin(31.7);
plpdf.SetTopMargin(25.4); plpdf.SetTopMargin(25.4);
plpdf.SetPrintFont(p_font,'B',18); --set bold and 18pt plpdf.SetPrintFont(p_font,'B',18); --set bold and 18pt
plpdf.PrintText(p_indent,p_vertical_offset,'Technical Specification for '||p_quote_data.quote_ref); plpdf.PrintText(p_indent,p_vertical_offset,'Technical Specification for '||p_quote_data.enquiry_ref);
plpdf.SetPrintFont(p_font,'B',10); --set back to 10pt plpdf.SetPrintFont(p_font,'B',10); --set back to 10pt
plpdf.PrintText(p_indent,p_vertical_offset+6,'Re: '||rtrim(ltrim(p_quote_data.site_address(1)||', '||p_quote_data.site_address(2)||', '||p_quote_data.site_address(3)||', '||p_quote_data.site_address(4)||', '||p_quote_data.site_address(5)||', '||p_quote_data.site_address(6)||', '||p_quote_data.site_address(7),', '),', ')); --site address --Base Details plpdf.PrintText(p_indent,p_vertical_offset+6,'Re: '||rtrim(ltrim(p_quote_data.site_address(1)||', '||p_quote_data.site_address(2)||', '||p_quote_data.site_address(3)||', '||p_quote_data.site_address(4)||', '||p_quote_data.site_address(5)||', '||p_quote_data.site_address(6)||', '||p_quote_data.site_address(7),', '),', ')); --site address --Base Details
--Base Details --Base Details
@@ -1186,7 +1188,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.SetRightMargin(31.7); plpdf.SetRightMargin(31.7);
plpdf.SetTopMargin(25.4); plpdf.SetTopMargin(25.4);
plpdf.SetPrintFont(p_font,'B',18); --set bold and 18pt plpdf.SetPrintFont(p_font,'B',18); --set bold and 18pt
plpdf.PrintText(p_indent,p_vertical_offset,'Technical Specification for '||p_quote_data.quote_ref); plpdf.PrintText(p_indent,p_vertical_offset,'Technical Specification for '||p_quote_data.enquiry_ref);
plpdf.SetPrintFont(p_font,'B',10); --set back to 10pt plpdf.SetPrintFont(p_font,'B',10); --set back to 10pt
plpdf.PrintText(p_indent,p_vertical_offset+6,'Re: '||rtrim(ltrim(p_quote_data.site_address(1)||', '||p_quote_data.site_address(2)||', '||p_quote_data.site_address(3)||', '||p_quote_data.site_address(4)||', '||p_quote_data.site_address(5)||', '||p_quote_data.site_address(6)||', '||p_quote_data.site_address(7),', '),', ')); --site address plpdf.PrintText(p_indent,p_vertical_offset+6,'Re: '||rtrim(ltrim(p_quote_data.site_address(1)||', '||p_quote_data.site_address(2)||', '||p_quote_data.site_address(3)||', '||p_quote_data.site_address(4)||', '||p_quote_data.site_address(5)||', '||p_quote_data.site_address(6)||', '||p_quote_data.site_address(7),', '),', ')); --site address
plpdf.SetPrintFont(p_font,null,10); --set back to plain plpdf.SetPrintFont(p_font,null,10); --set back to plain
@@ -1320,7 +1322,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.PrintText(50,280,'National Grid Metering is the trading name for National Grid Metering Ltd.'); plpdf.PrintText(50,280,'National Grid Metering is the trading name for National Grid Metering Ltd.');
plpdf.PrintText(50,283,'Registered Office: 1-3 Strand, London, WCZN 5EH. Registered in England and Wales, No. 3705992'); plpdf.PrintText(50,283,'Registered Office: 1-3 Strand, London, WCZN 5EH. Registered in England and Wales, No. 3705992');
plpdf.SetPrintFont(p_font,null,10); -- big text please plpdf.SetPrintFont(p_font,null,10); -- big text please
plpdf.PrintText(p_indent,p_vertical_offset+10,'National Grid Metering''s Ref: '|| to_char(p_quote_data.quote_ref)); plpdf.PrintText(p_indent,p_vertical_offset+10,'National Grid Metering''s Ref: '|| to_char(p_quote_data.enquiry_ref));
plpdf.PrintText(p_indent,p_vertical_offset+14,'Customer Reference: '|| p_quote_data.transaction_ref); plpdf.PrintText(p_indent,p_vertical_offset+14,'Customer Reference: '|| p_quote_data.transaction_ref);
plpdf.PrintText(p_indent,p_vertical_offset+18,'MPRN: '|| to_char(p_quote_data.mprn)); plpdf.PrintText(p_indent,p_vertical_offset+18,'MPRN: '|| to_char(p_quote_data.mprn));
plpdf.PrintText(p_indent,p_vertical_offset+26,'F.A.O'); plpdf.PrintText(p_indent,p_vertical_offset+26,'F.A.O');