Fix for #465(SC2012,SC3004,SC3020,SC3008) screens. Have added a condition for each of the references to 'Excluding lifting gear' on the quote. Now if there is Lifting gear item in the quote items then the 'excluding lifting gear' will appear. If there is no lifting gear item in the quote items then the 'excluding lifting gear' caveats will not be displayed on the quote.
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@4749 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -65,7 +65,8 @@ CREATE OR REPLACE PACKAGE mip_quotation_document IS
|
||||
meter_reference varchar(80),
|
||||
caveat_cont_sum_qa caveat_text:= caveat_text(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null),
|
||||
mety_code varchar(80),
|
||||
svcpt_code varchar(10)
|
||||
svcpt_code varchar(10),
|
||||
show_lifting_gear boolean
|
||||
);
|
||||
|
||||
FUNCTION generate_quote_pdf(p_quote_id in number) RETURN VARCHAR2;
|
||||
@@ -468,6 +469,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
|
||||
--cycle through the quote items picking up each item to store in the
|
||||
--p_quote_data record
|
||||
l_counter := 0;
|
||||
p_quote_data.show_lifting_gear := false; --ensure by default we don't show the lifting gear caveat
|
||||
FOR quote_item_rec IN c_get_quote_item(p_quoteid) LOOP
|
||||
--get the meter type, pressure and job type so we can
|
||||
--determine whether to display the lifting gear cost line or not
|
||||
@@ -513,19 +515,18 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
|
||||
p_quote_data.house_diagram := l_housing_row.drwg_code;
|
||||
|
||||
when 'AQI' then --add-on item
|
||||
--If we get time add an if statement round this that checks if the
|
||||
--Additional Item is lifting gear that it only appears for
|
||||
--LP Diaphgram install/std install jobs
|
||||
--Get costs
|
||||
l_add_item_row := get_additional_item(quote_item_rec.adit_code);
|
||||
--AH now has a routine that sets the lifting gear or not so some code
|
||||
--that duplicated that process has now been changed.
|
||||
--Added code to check if lifing gear appears then set a flag to indicate
|
||||
--that the lifing gear caveats should be displayed or not.
|
||||
if quote_item_rec.adit_code = 'LIFTING GEAR' then
|
||||
if l_service_pressure = 'LP' and l_meter_type = 'DIAPHRAGM' and (l_enqu_type = 'INSTALL' or l_enqu_type = 'STD INSTALL') then
|
||||
null;
|
||||
else
|
||||
p_quote_data.quote_costs(l_counter).cost_description := l_add_item_row.description;
|
||||
p_quote_data.quote_costs(l_counter).cost_price := quote_item_rec.selling_price;
|
||||
end if;
|
||||
p_quote_data.show_lifting_gear := true;
|
||||
p_quote_data.quote_costs(l_counter).cost_description := l_add_item_row.description;
|
||||
p_quote_data.quote_costs(l_counter).cost_price := quote_item_rec.selling_price;
|
||||
else
|
||||
p_quote_data.show_lifting_gear := false;
|
||||
p_quote_data.quote_costs(l_counter).cost_description := l_add_item_row.description||' Materials cost';
|
||||
p_quote_data.quote_costs(l_counter).cost_price := quote_item_rec.selling_price;
|
||||
end if;
|
||||
@@ -953,7 +954,12 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
|
||||
plpdf.SetPrintFont(p_font,null,10); --unset bold
|
||||
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')||' excluding lifting gear if required.');
|
||||
--only show the lifing gear caveat if we give a price for lifting gear
|
||||
if p_quote_data.show_lifting_gear = true then
|
||||
plpdf.PrintText(85,p_vertical_offset+114,'<27>'||to_char(p_quote_data.total_cost,'FM999999D90')||' excluding lifting gear if required.');
|
||||
else
|
||||
plpdf.PrintText(85,p_vertical_offset+114,'<27>'||to_char(p_quote_data.total_cost,'FM999999D90'));
|
||||
end if;
|
||||
l_ybefore := plpdf.GetCurrentY;
|
||||
-- CONT_SUM caveat here
|
||||
if p_quote_data.caveat_cont_sum is not null then
|
||||
@@ -974,7 +980,12 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
|
||||
l_cost_totals_offset := l_vertical_offset_for_costs+l_cost_line_counter*4;
|
||||
plpdf.DrawLine(p_indent,l_cost_totals_offset+2,185,l_cost_totals_offset+2);
|
||||
plpdf.PrintText(p_indent,l_cost_totals_offset+6,'Total costs:');
|
||||
plpdf.PrintText(120,l_cost_totals_offset+6,'<27>'||to_char(p_quote_data.total_cost,'FM999999D90')||' excluding lifting gear if required');
|
||||
--only show the lifing gear caveat if we give a price for lifting gear
|
||||
if p_quote_data.show_lifting_gear = true then
|
||||
plpdf.PrintText(120,l_cost_totals_offset+6,'<27>'||to_char(p_quote_data.total_cost,'FM999999D90')||' excluding lifting gear if required');
|
||||
else
|
||||
plpdf.PrintText(120,l_cost_totals_offset+6,'<27>'||to_char(p_quote_data.total_cost,'FM999999D90'));
|
||||
end if;
|
||||
end build_costs_page;
|
||||
/*
|
||||
PROCEDURE build_caveats_page
|
||||
@@ -1322,7 +1333,12 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
|
||||
plpdf.SetPrintFont(p_font,null,10); --unset bold
|
||||
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.');
|
||||
--only show the lifing gear caveat if we give a price for lifting gear
|
||||
if p_quote_data.show_lifting_gear = true then
|
||||
plpdf.PrintText(85,p_vertical_offset+62,'<27>'||p_quote_data.total_cost||' excluding lifting gear if required.');
|
||||
else
|
||||
plpdf.PrintText(85,p_vertical_offset+62,'<27>'||p_quote_data.total_cost);
|
||||
end if;
|
||||
plpdf.SetCurrentY(66);
|
||||
l_ybefore := plpdf.GetCurrentY;
|
||||
-- CONT_SUM_QA caveat here
|
||||
|
||||
Reference in New Issue
Block a user