Update contact details for letters and emails following 'Single Mandate' request from NGM.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@58719 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
andrew.hardy
2012-08-20 08:34:23 +00:00
parent 4ed6e01260
commit b161385309
2 changed files with 245 additions and 164 deletions

View File

@@ -863,6 +863,29 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation IS
END al; END al;
PROCEDURE al_contact_details IS
BEGIN
al('The I&C Non Standard Team');
al('National Grid Metering');
IF mip_quotation_document.using_old_address THEN
al('4 Abbotts Lane');
al('Coventry');
al('CV1 4AY');
al(' ');
al('Phone: 02476 286 322');
al('Fax: 02476 286 044');
al('Email: ic.nonstandard1@uk.ngrid.com');
ELSE
al('35 Homer Road');
al('Solihull');
al('B91 3QJ');
al(' ');
al('T+44(0) 121 424 8000');
al('F+44(0) 121 424 8841');
al('Email: IC.Nonstandard1@nationalgrid');
END IF;
END al_contact_details;
PROCEDURE open_body IS PROCEDURE open_body IS
BEGIN BEGIN
pl('open_body:entry'); pl('open_body:entry');
@@ -1126,15 +1149,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
al(' '); al(' ');
al('Regards'); al('Regards');
al(' '); al(' ');
al('The I&C Non Standard Team'); al_contact_details;
al('National Grid Metering');
al('Abbotts Lane');
al('Coventry');
al('CV1 4AY');
al(' ');
al('Phone: 02476 286 322');
al('Fax: 02476 286 044');
al('Email: ic.nonstandard1@uk.ngrid.com');
ELSIF p_email_reason = gc_agent_q_acc_notification THEN ELSIF p_email_reason = gc_agent_q_acc_notification THEN
-- Scenario two: Quotation acceptance notification -- Scenario two: Quotation acceptance notification
l_email_subject := get_system_name || ': Quote Acceptance'; l_email_subject := get_system_name || ': Quote Acceptance';
@@ -1150,15 +1165,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
al(' '); al(' ');
al('Regards'); al('Regards');
al(' '); al(' ');
al('The I&C Non Standard Team'); al_contact_details;
al('National Grid Metering');
al('Abbotts Lane');
al('Coventry');
al('CV1 4AY');
al(' ');
al('Phone: 02476 286 322');
al('Fax: 02476 286 044');
al('Email: ic.nonstandard1@uk.ngrid.com');
ELSIF p_email_reason = gc_agent_mq_req_notification THEN ELSIF p_email_reason = gc_agent_mq_req_notification THEN
-- Scenario three: Manual quote requested -- Scenario three: Manual quote requested
l_email_subject := get_system_name || ': Request for Manual Quote'; l_email_subject := get_system_name || ': Request for Manual Quote';
@@ -1172,15 +1179,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
al(' '); al(' ');
al('Regards'); al('Regards');
al(' '); al(' ');
al('The I&C Non Standard Team'); al_contact_details;
al('National Grid Metering');
al('Abbotts Lane');
al('Coventry');
al('CV1 4AY');
al(' ');
al('Phone: 02476 286 322');
al('Fax: 02476 286 044');
al('Email: ic.nonstandard1@uk.ngrid.com');
ELSIF p_email_reason = gc_agent_mq_avail_notification THEN ELSIF p_email_reason = gc_agent_mq_avail_notification THEN
-- Scenario four: Manual quote produced and ready to view. -- Scenario four: Manual quote produced and ready to view.
l_email_subject := get_system_name || ': Manual Quote Available'; l_email_subject := get_system_name || ': Manual Quote Available';
@@ -1197,15 +1196,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
al(' '); al(' ');
al('Regards'); al('Regards');
al(' '); al(' ');
al('The I&C Non Standard Team'); al_contact_details;
al('National Grid Metering');
al('Abbotts Lane');
al('Coventry');
al('CV1 4AY');
al(' ');
al('Phone: 02476 286 322');
al('Fax: 02476 286 044');
al('Email: ic.nonstandard1@uk.ngrid.com');
END IF; END IF;
close_body; close_body;
@@ -1475,8 +1466,6 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
l_mandatory_checks mip_mandatory.t_mandatory_checks; l_mandatory_checks mip_mandatory.t_mandatory_checks;
l_idx NUMBER; l_idx NUMBER;
BEGIN BEGIN
/*pl('validate enqu_id=' || p_rec.id || ', enty_code=' ||
p_rec.enty_code);*/
DELETE FROM validation_results DELETE FROM validation_results
WHERE enqu_id = p_rec.id; WHERE enqu_id = p_rec.id;
IF NOT IF NOT

View File

@@ -4,6 +4,8 @@ CREATE OR REPLACE PACKAGE mip_quotation_document IS
-- Created : 15/11/2007 11:27:58 -- Created : 15/11/2007 11:27:58
-- Purpose : Handle life-cycle of quotations -- Purpose : Handle life-cycle of quotations
gc_address_change_over_date DATE := TO_DATE('20-aug-2012'
,'dd-mon-yyyy');
-- Public type declarations -- Public type declarations
--type <TypeName> is <Datatype>; --type <TypeName> is <Datatype>;
TYPE caveat_text IS VARRAY(20) OF VARCHAR2(4000); TYPE caveat_text IS VARRAY(20) OF VARCHAR2(4000);
@@ -226,6 +228,8 @@ CREATE OR REPLACE PACKAGE mip_quotation_document IS
FUNCTION generate_quote_pdf(p_quote_id IN NUMBER) RETURN VARCHAR2; FUNCTION generate_quote_pdf(p_quote_id IN NUMBER) RETURN VARCHAR2;
FUNCTION using_old_address RETURN BOOLEAN;
END mip_quotation_document; END mip_quotation_document;
/ /
CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
@@ -235,6 +239,19 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,fontsize NUMBER ,fontsize NUMBER
,fontstyle VARCHAR2(80)); ,fontstyle VARCHAR2(80));
FUNCTION using_old_address RETURN BOOLEAN IS
BEGIN
$IF $$force_new_address $THEN
RETURN FALSE;
$ELSIF
$$force_old_address $THEN
RETURN TRUE;
$END
RETURN SYSDATE < gc_address_change_over_date;
END using_old_address;
PROCEDURE pl(p_in IN VARCHAR2 PROCEDURE pl(p_in IN VARCHAR2
,p_line IN NUMBER DEFAULT NULL) IS ,p_line IN NUMBER DEFAULT NULL) IS
BEGIN BEGIN
@@ -1307,6 +1324,67 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
--phew, lets return all that lovely data we captured then... --phew, lets return all that lovely data we captured then...
RETURN l_quote_data; RETURN l_quote_data;
END get_detailed_quote_data; END get_detailed_quote_data;
PROCEDURE plpdf_contact_header(p_logo_x IN NUMBER
,p_logo_blob BLOB
,p_font IN VARCHAR2) IS
BEGIN
plpdf.putimage('ngmlogo'
,p_logo_blob
,p_logo_x
,10
,52
,18);
plpdf.setprintfont(p_font
,NULL
,7);
IF using_old_address THEN
plpdf.printtext(140
,10
,'4 Abbotts Lane');
plpdf.printtext(140
,13
,'Coventry');
plpdf.printtext(140
,16
,'CV1 4AY');
plpdf.printtext(170
,10
,'T +44 (0) 24 7628 6000');
plpdf.printtext(170
,13
,'F +44 (0) 24 7628 6022');
ELSE
plpdf.printtext(140
,10
,'35 Homer Road');
plpdf.printtext(140
,13
,'Solihull');
plpdf.printtext(140
,16
,'B91 3QJ');
plpdf.printtext(170
,10
,'T+44(0) 121 424 8000');
plpdf.printtext(170
,13
,'F+44(0) 121 424 8841');
END IF;
plpdf.printtext(170
,16
,'www.nationalgrid.com');
-- And Footer stuff
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');
END plpdf_contact_header;
/* /*
PROCEDURE build_covering_letter PROCEDURE build_covering_letter
--This procedure builds the covering letter for the quotation, it writes data --This procedure builds the covering letter for the quotation, it writes data
@@ -1327,6 +1405,67 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,p_watermark_blob BLOB) IS ,p_watermark_blob BLOB) IS
l_note_text VARCHAR2(500); l_note_text VARCHAR2(500);
l_cell_margin NUMBER; l_cell_margin NUMBER;
PROCEDURE plpdf_quotation_contact IS
BEGIN
IF using_old_address THEN
plpdf.printtext(p_indent
,p_vertical_offset + 66
,'Quotation Contact: Non Standard Customer Service Team');
plpdf.printtext(p_indent
,p_vertical_offset + 70
,'Mailbox: ic.nonstandard1@uk.ngrid.com');
plpdf.printtext(p_indent
,p_vertical_offset + 74
,'Hunt Group: 02476 286322');
plpdf.printtext(p_indent
,p_vertical_offset + 78
,'Fax: 02476 286044');
ELSE
plpdf.printtext(p_indent
,p_vertical_offset + 66
,'Quotation Contact: Non Standard Customer Work Orders');
plpdf.printtext(p_indent
,p_vertical_offset + 70
,'Mailbox: IC.Nonstandard1@nationalgrid.com');
plpdf.printtext(p_indent
,p_vertical_offset + 74
,'Hunt Group: 0121 2103953');
plpdf.printtext(p_indent
,p_vertical_offset + 78
,'Fax: 0121 2103614');
END IF;
END plpdf_quotation_contact;
PROCEDURE plpdf_signature IS
BEGIN
plpdf.printtext(p_indent
,p_vertical_offset + 212
,'Yours sincerely');
--put on signature
plpdf.putimage('signature'
,p_signature_blob
,p_indent
,244
,44
,11);
plpdf.printtext(p_indent
,p_vertical_offset + 230
,'Hilary Parry');
IF using_old_address THEN
plpdf.printtext(p_indent
,p_vertical_offset + 234
,'Order Fulfilment Manager');
END IF;
plpdf.printtext(p_indent
,p_vertical_offset + 238
,'Customer Operations');
plpdf.printtext(p_indent
,p_vertical_offset + 242
,'National Grid Metering');
END plpdf_signature;
BEGIN BEGIN
plpdf.newpage; plpdf.newpage;
plpdf.crbookmark(p_txt => 'Covering Letter'); plpdf.crbookmark(p_txt => 'Covering Letter');
@@ -1349,43 +1488,11 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,$$PLSQL_LINE); ,$$PLSQL_LINE);
END IF; END IF;
plpdf.setprintfont(p_font
,NULL
,7);
-- Set header stuff up -- Set header stuff up
plpdf.putimage('ngmlogo'
,p_logo_blob
,p_indent
,10
,52
,18);
plpdf.printtext(140
,10
,'4 Abbotts Lane ');
plpdf.printtext(140
,13
,'Coventry');
plpdf.printtext(140
,16
,'CV1 4AY');
plpdf.printtext(170
,10
,'T +44 (0) 24 7628 6000');
plpdf.printtext(170
,13
,'F +44 (0) 24 7628 6022');
plpdf.printtext(170
,16
,'www.nationalgrid.com');
-- And Footer stuff -- And Footer stuff
plpdf.printtext(50 plpdf_contact_header(p_logo_x => p_indent
,280 ,p_logo_blob => p_logo_blob
,'National Grid Metering is the trading name for National Grid Metering Ltd.'); ,p_font => p_font);
plpdf.printtext(50
,283
,'Registered Office: 1-3 Strand, London, WCZN 5EH. Registered in England and Wales, No. 3705992');
plpdf.setprintfont(p_font plpdf.setprintfont(p_font
,NULL ,NULL
@@ -1414,18 +1521,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,'Date: ' || TO_CHAR(p_quote_data.current_date ,'Date: ' || TO_CHAR(p_quote_data.current_date
,'FMddth Month YYYY')); ,'FMddth Month YYYY'));
plpdf.printtext(p_indent plpdf_quotation_contact;
,p_vertical_offset + 66
,'Quotation Contact: Non Standard Customer Service Team');
plpdf.printtext(p_indent
,p_vertical_offset + 70
,'Mailbox: ic.nonstandard1@uk.ngrid.com');
plpdf.printtext(p_indent
,p_vertical_offset + 74
,'Hunt Group: 02476 286322');
plpdf.printtext(p_indent
,p_vertical_offset + 78
,'Fax: 02476 286044');
-- --
-- start of letter body -- start of letter body
-- --
@@ -1509,28 +1605,8 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.printtext(p_indent plpdf.printtext(p_indent
,p_vertical_offset + 204 ,p_vertical_offset + 204
,'If you have any queries, please contact the team on the number above.'); ,'If you have any queries, please contact the team on the number above.');
plpdf.printtext(p_indent
,p_vertical_offset + 212 plpdf_signature;
,'Yours sincerely');
--put on signature
plpdf.putimage('signature'
,p_signature_blob
,p_indent
,244
,44
,11);
plpdf.printtext(p_indent
,p_vertical_offset + 230
,'Hilary Parry');
plpdf.printtext(p_indent
,p_vertical_offset + 234
,'Order Fulfilment Manager');
plpdf.printtext(p_indent
,p_vertical_offset + 238
,'Customer Operations');
plpdf.printtext(p_indent
,p_vertical_offset + 242
,'National Grid Metering');
plpdf.setcellmargin(l_cell_margin); plpdf.setcellmargin(l_cell_margin);
@@ -1789,6 +1865,24 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,p_description_width => 100 ,p_description_width => 100
,p_cost => p_quote_data.liquid_damage_cap); ,p_cost => p_quote_data.liquid_damage_cap);
END build_caveats_page; END build_caveats_page;
--
-- add contact details to page footers
PROCEDURE plpdf_footer_contact_details(p_x IN NUMBER
,p_y IN NUMBER) IS
BEGIN
IF using_old_address THEN
plpdf.printtext(p_x
,p_y
,'National Grid Metering, 4 Abbotts Lane, Coventry, West Midlands, CV1 4AY Tel 02476 286000 Fax 02476 286022');
ELSE
plpdf.printtext(p_x
,p_y
,'National Grid Metering, 35 Homer Road, Solihull, B91 3QJ T+44(0) 121 424 8000 F+44(0) 121 424 8841');
END IF;
END plpdf_footer_contact_details;
/* /*
PROCEDURE build_drawings_page PROCEDURE build_drawings_page
--This procedure builds the drawings page for the quotation, it writes data --This procedure builds the drawings page for the quotation, it writes data
@@ -1810,6 +1904,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,p_module_blob BLOB ,p_module_blob BLOB
,p_watermark_blob BLOB) IS ,p_watermark_blob BLOB) IS
l_img_props img_props; l_img_props img_props;
BEGIN BEGIN
--Okay here come the pretty pictures, the technical spec for the module, house & base --Okay here come the pretty pictures, the technical spec for the module, house & base
--this will be page 4 for the quotation --this will be page 4 for the quotation
@@ -2260,9 +2355,9 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,p_vertical_offset + 245 ,p_vertical_offset + 245
,'Note: All weights are in kg and all dimensions in mm Module Ref: ' || ,'Note: All weights are in kg and all dimensions in mm Module Ref: ' ||
p_quote_data.module_reference); p_quote_data.module_reference);
plpdf.printtext(p_indent
,p_vertical_offset + 260 plpdf_footer_contact_details(p_indent
,'National Grid Metering, Abbotts Lane, Coventry, West Midlands, CV1 4AY Tel 02476 286000 Fax 02476 286022'); ,p_vertical_offset + 260);
END build_drawings_page; END build_drawings_page;
/* /*
@@ -2279,6 +2374,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,p_indent IN NUMBER ,p_indent IN NUMBER
,p_vertical_offset IN NUMBER ,p_vertical_offset IN NUMBER
,p_watermark_blob BLOB) IS ,p_watermark_blob BLOB) IS
BEGIN BEGIN
--this will be page 5 (part of the technical spec sheet) for the quotation --this will be page 5 (part of the technical spec sheet) for the quotation
plpdf.newpage; plpdf.newpage;
@@ -2744,10 +2840,12 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.setprintfont(p_font plpdf.setprintfont(p_font
,NULL ,NULL
,9); --set to 9 pt ,9); --set to 9 pt
plpdf.printtext(p_indent
,p_vertical_offset + 260 plpdf_footer_contact_details(p_indent
,'National Grid Metering, Abbotts Lane, Coventry, West Midlands, CV1 4AY Tel 02476 286000 Fax 02476 286022'); ,p_vertical_offset + 260);
END build_module_specs_page; END build_module_specs_page;
/* /*
PROCEDURE build_acceptance_page PROCEDURE build_acceptance_page
--This procedure builds the acceptance form page for the quotation, it writes data --This procedure builds the acceptance form page for the quotation, it writes data
@@ -2767,6 +2865,43 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
l_vertical_offset NUMBER := 0; l_vertical_offset NUMBER := 0;
l_ybefore NUMBER := 0; l_ybefore NUMBER := 0;
PROCEDURE plpdf_contact_details IS
BEGIN
IF using_old_address THEN
plpdf.printtext(p_indent
,p_vertical_offset + 30
,'I&C Work Planning Team');
plpdf.printtext(p_indent
,p_vertical_offset + 34
,'National Grid Metering Ltd');
plpdf.printtext(p_indent
,p_vertical_offset + 38
,'Abbott''s Lane');
plpdf.printtext(p_indent
,p_vertical_offset + 42
,'Coventry');
plpdf.printtext(p_indent
,p_vertical_offset + 46
,'CV1 4AY');
ELSE
plpdf.printtext(p_indent
,p_vertical_offset + 30
,'Customer Work Orders');
plpdf.printtext(p_indent
,p_vertical_offset + 34
,'National Grid Metering Ltd');
plpdf.printtext(p_indent
,p_vertical_offset + 38
,'35 Homer Road');
plpdf.printtext(p_indent
,p_vertical_offset + 42
,'Solihull');
plpdf.printtext(p_indent
,p_vertical_offset + 46
,'B91 3QJ');
END IF;
END plpdf_contact_details;
BEGIN BEGIN
---weeeeee last page ---weeeeee last page
plpdf.newpage; plpdf.newpage;
@@ -2784,41 +2919,12 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.setleftmargin(31.7); plpdf.setleftmargin(31.7);
plpdf.setrightmargin(31.7); plpdf.setrightmargin(31.7);
plpdf.settopmargin(25.4); plpdf.settopmargin(25.4);
-- Set header stuff up
plpdf.putimage('ngmlogo' -- Set header and footer contact details
,p_logo_blob plpdf_contact_header(p_logo_x => p_indent
,p_indent ,p_logo_blob => p_logo_blob
,10 ,p_font => p_font);
,52
,18);
plpdf.setprintfont(p_font
,NULL
,7);
plpdf.printtext(140
,10
,'4 Abbotts Lane ');
plpdf.printtext(140
,13
,'Coventry');
plpdf.printtext(140
,16
,'CV1 4AY');
plpdf.printtext(170
,10
,'T +44 (0) 24 7628 6000');
plpdf.printtext(170
,13
,'F +44 (0) 24 7628 6022');
plpdf.printtext(170
,16
,'www.nationalgrid.com');
-- And Footer stuff
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.setprintfont(p_font plpdf.setprintfont(p_font
,NULL ,NULL
,10); -- big text please ,10); -- big text please
@@ -2835,21 +2941,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.printtext(p_indent plpdf.printtext(p_indent
,p_vertical_offset + 26 ,p_vertical_offset + 26
,'F.A.O'); ,'F.A.O');
plpdf.printtext(p_indent plpdf_contact_details;
,p_vertical_offset + 30
,'I&C Work Planning Team');
plpdf.printtext(p_indent
,p_vertical_offset + 34
,'National Grid Metering Ltd');
plpdf.printtext(p_indent
,p_vertical_offset + 38
,'Abbott''s Lane');
plpdf.printtext(p_indent
,p_vertical_offset + 42
,'Coventry');
plpdf.printtext(p_indent
,p_vertical_offset + 46
,'CV1 4AY');
plpdf.setprintfont(p_font plpdf.setprintfont(p_font
,'B' ,'B'
,10); --set bold ,10); --set bold