Fix for #372 caveat text no longer overwrites.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3973 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
PriestJ
2008-03-12 16:57:04 +00:00
parent b39dbcacb6
commit e836cfd1d6

View File

@@ -79,8 +79,9 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
%param p_caveats - an array of caveat paragraphs to print
%param p_vertical_offset - how far down the page we start printing
%param p_line_spacing - the line spacing to use, defaults to 4
%param p_line_breaks - the number or line breaks between caveat texts
*/
procedure print_caveats(p_caveats in caveat_text, p_vertical_offset in number, p_line_spacing in number :=4) is
procedure print_caveats(p_caveats in caveat_text, p_vertical_offset in number, p_line_spacing in number :=4, p_line_breaks in number := 2) is
l_caveats_counter number;
l_cell_margin number;
begin
@@ -94,8 +95,10 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
while p_caveats(l_caveats_counter) is not null
loop
plpdf.PrintFlowingText(p_line_spacing, p_caveats(l_caveats_counter));
plpdf.LineBreak;
plpdf.LineBreak;
for l_index in 1 .. p_line_breaks
loop
plpdf.LineBreak;
end loop;
l_caveats_counter := l_caveats_counter +1;
end loop;
@@ -878,6 +881,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
l_vertical_offset_for_costs number := p_vertical_offset+126;
l_works_counter number;
l_vertical_offset_for_works number := p_vertical_offset+52;
l_ybefore number := 0; --used to adjust the vertical offest after contract sum caveat
l_cost_totals_offset number; --used to position the cost totals after the cost line items
l_caveat_desc_works_offset number; --used to position caveat_desc_works as running calculation in
--function parameter causes error on pdf
@@ -917,7 +921,6 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
if p_quote_data.caveat_desc_works is not null then
-- print_caveats(p_quote_data.caveat_desc_works, l_vertical_offset_for_works+(l_works_counter*4));
print_caveats(p_quote_data.caveat_desc_works, l_caveat_desc_works_offset+1);
end if;
plpdf.SetPrintFont(p_font,null,10); --unset bold
plpdf.PrintText(p_indent,p_vertical_offset+106, 'Indicative Lead Time from Acceptance to Physical Commencement: ');
@@ -927,13 +930,16 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.PrintText(p_indent,p_vertical_offset+114,'Contract sum (excluding V.A.T): ');
plpdf.SetPrintFont(p_font,'B',10); --set bold
plpdf.PrintText(85,p_vertical_offset+114,'<27>'||to_char(p_quote_data.total_cost,'FM999999D90'));
l_ybefore := plpdf.GetCurrentY;
-- CONT_SUM caveat here
if p_quote_data.caveat_cont_sum is not null then
print_caveats(p_quote_data.caveat_cont_sum, p_vertical_offset+118);
print_caveats(p_quote_data.caveat_cont_sum, p_vertical_offset+118,4,1);
end if;
l_vertical_offset_for_costs := l_vertical_offset_for_costs+(plpdf.GetCurrentY-l_ybefore);
plpdf.SetPrintFont(p_font,null,10); --unset bold
plpdf.PrintText(p_indent,p_vertical_offset+122,'Analysis of Costs (all costs exclude V.A.T)');
plpdf.PrintText(p_indent,plpdf.GetCurrentY+4,'Analysis of Costs (all costs exclude V.A.T)');
plpdf.SetPrintFont(p_font,'B',10); --set bold
l_cost_line_counter:=1;
while p_quote_data.quote_costs(l_cost_line_counter).cost_description is not null
loop
@@ -1251,6 +1257,9 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
%param p_logo_blob - the logo(image) to display at the top of the page
*/
PROCEDURE build_acceptance_page(p_quote_data in quote_data, p_font in varchar2, p_indent in number, p_vertical_offset in number,p_logo_blob blob,p_watermark_blob blob) is
l_vertical_offset number := 0;
l_ybefore number := 0;
begin
---weeeeee last page
plpdf.NewPage;
@@ -1290,37 +1299,40 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.PrintText(p_indent,p_vertical_offset+62,'Contract sum (excluding V.A.T): ');
plpdf.SetPrintFont(p_font,'B',10); --set bold
plpdf.PrintText(85,p_vertical_offset+62,'<27>'||p_quote_data.total_cost||' excluding lifting gear if required.');
plpdf.SetCurrentY(66);
l_ybefore := plpdf.GetCurrentY;
-- CONT_SUM_QA caveat here
if p_quote_data.caveat_cont_sum_qa is not null then
print_caveats(p_quote_data.caveat_cont_sum_qa, p_vertical_offset+66);
print_caveats(p_quote_data.caveat_cont_sum_qa, p_vertical_offset+66,4,1);
end if;
l_vertical_offset := l_vertical_offset+(plpdf.GetCurrentY-l_ybefore);
plpdf.SetPrintFont(p_font,null,10); --unset bold
plpdf.PrintText(p_indent,p_vertical_offset+74,'* I confirm on behalf of my Company that I accept the above referenced quotation for the conduct');
plpdf.PrintText(p_indent,p_vertical_offset+78,'of works as detailed therein, and here by certify on behalf of my Company that no additional');
plpdf.PrintText(p_indent,p_vertical_offset+82,'terms and conditions (other than those set out in the quotation) are required.');
plpdf.PrintText(p_indent,p_vertical_offset+90,'OR');
plpdf.PrintText(p_indent,p_vertical_offset+98,'* I confirm on behalf of my Company that the above referenced quotation for the conduct or works');
plpdf.PrintText(p_indent,p_vertical_offset+102,'as detailed therein is acceptable to my Company provided that (in addition to the conditions set');
plpdf.PrintText(p_indent,p_vertical_offset+106,'out in the quotation [if any]) the General Conditions of Contract for Transactional Meter Works');
plpdf.PrintText(p_indent,p_vertical_offset+110,'Not Exceeding 7 Bar in respect of the works are modified by the incorporation of the terms and');
plpdf.PrintText(p_indent,p_vertical_offset+114,'conditions annexed hereto.');
plpdf.PrintText(p_indent,p_vertical_offset+122,'(* Delete as appropriate)');
plpdf.PrintText(p_indent,p_vertical_offset+130,'Save as set out above, I confirm that my Company agrees to be bound in connection with the');
plpdf.PrintText(p_indent,p_vertical_offset+134,'works by the General Conditions of Contract for Transactional Meter Works Not');
plpdf.PrintText(p_indent,p_vertical_offset+138,'Exceeding 7 Bar (as ammended by the quotation).');
plpdf.PrintText(p_indent,p_vertical_offset+146,'Commencement');
plpdf.PrintText(p_indent,p_vertical_offset+154,'Permission to organise directly with site contact');
plpdf.PrintText(p_indent+120,p_vertical_offset+154,'Yes / No');
plpdf.PrintText(p_indent,p_vertical_offset+162,'Earliest date site ready for work to commence');
plpdf.PrintText(p_indent+120,p_vertical_offset+162,'___/___/___');
plpdf.PrintText(p_indent,p_vertical_offset+170,'Anticipated date gas required on site');
plpdf.PrintText(p_indent+120,p_vertical_offset+170,'___/___/___');
plpdf.PrintText(p_indent,p_vertical_offset+178,'Signed on behalf of the Company');
plpdf.PrintText(p_indent,p_vertical_offset+186,'Name:________________________________');
plpdf.PrintText(p_indent+85,p_vertical_offset+186,'Position:____________________________');
plpdf.PrintText(p_indent,p_vertical_offset+194,'Company:_____________________________');
plpdf.PrintText(p_indent+85,p_vertical_offset+194,'Date:_______________________________');
plpdf.PrintText(p_indent,p_vertical_offset+202,'Signature:_____________________________________________________________________');
plpdf.PrintText(p_indent,l_vertical_offset+74,'* I confirm on behalf of my Company that I accept the above referenced quotation for the conduct');
plpdf.PrintText(p_indent,l_vertical_offset+78,'of works as detailed therein, and here by certify on behalf of my Company that no additional');
plpdf.PrintText(p_indent,l_vertical_offset+82,'terms and conditions (other than those set out in the quotation) are required.');
plpdf.PrintText(p_indent,l_vertical_offset+90,'OR');
plpdf.PrintText(p_indent,l_vertical_offset+98,'* I confirm on behalf of my Company that the above referenced quotation for the conduct or works');
plpdf.PrintText(p_indent,l_vertical_offset+102,'as detailed therein is acceptable to my Company provided that (in addition to the conditions set');
plpdf.PrintText(p_indent,l_vertical_offset+106,'out in the quotation [if any]) the General Conditions of Contract for Transactional Meter Works');
plpdf.PrintText(p_indent,l_vertical_offset+110,'Not Exceeding 7 Bar in respect of the works are modified by the incorporation of the terms and');
plpdf.PrintText(p_indent,l_vertical_offset+114,'conditions annexed hereto.');
plpdf.PrintText(p_indent,l_vertical_offset+122,'(* Delete as appropriate)');
plpdf.PrintText(p_indent,l_vertical_offset+130,'Save as set out above, I confirm that my Company agrees to be bound in connection with the');
plpdf.PrintText(p_indent,l_vertical_offset+134,'works by the General Conditions of Contract for Transactional Meter Works Not');
plpdf.PrintText(p_indent,l_vertical_offset+138,'Exceeding 7 Bar (as ammended by the quotation).');
plpdf.PrintText(p_indent,l_vertical_offset+146,'Commencement');
plpdf.PrintText(p_indent,l_vertical_offset+154,'Permission to organise directly with site contact');
plpdf.PrintText(p_indent+120,l_vertical_offset+154,'Yes / No');
plpdf.PrintText(p_indent,l_vertical_offset+162,'Earliest date site ready for work to commence');
plpdf.PrintText(p_indent+120,l_vertical_offset+162,'___/___/___');
plpdf.PrintText(p_indent,l_vertical_offset+170,'Anticipated date gas required on site');
plpdf.PrintText(p_indent+120,l_vertical_offset+170,'___/___/___');
plpdf.PrintText(p_indent,l_vertical_offset+178,'Signed on behalf of the Company');
plpdf.PrintText(p_indent,l_vertical_offset+186,'Name:________________________________');
plpdf.PrintText(p_indent+85,l_vertical_offset+186,'Position:____________________________');
plpdf.PrintText(p_indent,l_vertical_offset+194,'Company:_____________________________');
plpdf.PrintText(p_indent+85,l_vertical_offset+194,'Date:_______________________________');
plpdf.PrintText(p_indent,l_vertical_offset+202,'Signature:_____________________________________________________________________');
end build_acceptance_page;
/*