change to ensure that purging costs are displayed correctly and that purging is displayed as a work item if there is a cost associated.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@12312 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
jamie.priest
2009-08-19 16:25:07 +00:00
parent 283dcd1e6f
commit 9bf1aea3a8

View File

@@ -452,9 +452,9 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
END get_enquiry_row; END get_enquiry_row;
/* /*
FUNCTION get_quote_row FUNCTION get_quote_row
--The get_quote_row funcdsf sdfsdfsd fsdfsdfsdftion returns an enquiry record for the supplied enquiry id. --The get_quote_row function returns a quote record for the supplied quote id.
%param p_enquiry_id - the id of the enquiry you want to get a record of. %param p_quote_id - the id of the quote you want to get a record of.
%return enquiry row of the supplied enquiry id %return quote row of the supplied quote id
*/ */
FUNCTION get_quote_row(p_quote_id NUMBER) RETURN quotes%ROWTYPE IS FUNCTION get_quote_row(p_quote_id NUMBER) RETURN quotes%ROWTYPE IS
--Quote data --Quote data
@@ -793,8 +793,8 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
--add-on item --add-on item
--Get costs --Get costs
l_add_item_row := get_additional_item(quote_item_rec.adit_code); l_add_item_row := get_additional_item(quote_item_rec.adit_code);
--only show the lifting gears description, not the materials bit --only show the lifting gear/purging description, not the materials bit
IF quote_item_rec.adit_code = 'LIFTING GEAR' THEN IF quote_item_rec.adit_code = 'LIFTING GEAR' or quote_item_rec.adit_code ='PURGING' THEN
p_quote_data.quote_costs(l_counter).cost_description := l_add_item_row.description; 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; p_quote_data.quote_costs(l_counter).cost_price := quote_item_rec.selling_price;
ELSE ELSE
@@ -1120,7 +1120,11 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
--description of works caveat point --description of works caveat point
l_quote_data.caveat_cont_sum_qa(l_csqa_counter) := rec.text; l_quote_data.caveat_cont_sum_qa(l_csqa_counter) := rec.text;
l_csqa_counter := l_csqa_counter + 1; l_csqa_counter := l_csqa_counter + 1;
END CASE; END LOOP; END CASE;
--need to add in the condition to determine if the additional item should be
--displayed or not here(ish)
END LOOP;
--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;
@@ -1476,15 +1480,10 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.setprintfont(p_font plpdf.setprintfont(p_font
,'B' ,'B'
,10); --set bold ,10); --set bold
--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 plpdf.printtext(85
,p_vertical_offset + 114 ,p_vertical_offset + 114
,'<EFBFBD>' || TO_CHAR(p_quote_data.total_cost ,'#' || TO_CHAR(p_quote_data.total_cost
,'FM999999D90')); ,'FM999999D90'));
--end if;
l_ybefore := plpdf.getcurrenty; l_ybefore := plpdf.getcurrenty;
-- CONT_SUM caveat here -- CONT_SUM caveat here
@@ -1517,7 +1516,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
plpdf.printtext(120 plpdf.printtext(120
,l_vertical_offset_for_costs + ,l_vertical_offset_for_costs +
l_cost_line_counter * 4 l_cost_line_counter * 4
,'<EFBFBD>' || TO_CHAR(p_quote_data.quote_costs(l_cost_line_counter) ,'#' || TO_CHAR(p_quote_data.quote_costs(l_cost_line_counter)
.cost_price .cost_price
,'FM999999D90')); ,'FM999999D90'));
l_cost_line_counter := l_cost_line_counter + 1; l_cost_line_counter := l_cost_line_counter + 1;
@@ -1533,7 +1532,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,'Total costs:'); ,'Total costs:');
plpdf.printtext(120 plpdf.printtext(120
,l_cost_totals_offset + 6 ,l_cost_totals_offset + 6
,'<EFBFBD>' || TO_CHAR(p_quote_data.total_cost ,'#' || TO_CHAR(p_quote_data.total_cost
,'FM999999D90')); ,'FM999999D90'));
-- CONT_SUM caveat here -- CONT_SUM caveat here
IF p_quote_data.caveat_cont_sum IS NOT NULL THEN IF p_quote_data.caveat_cont_sum IS NOT NULL THEN
@@ -1639,14 +1638,14 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,'Liquidated Damages (sum per day)(excluding V.A.T):'); ,'Liquidated Damages (sum per day)(excluding V.A.T):');
plpdf.printtext(130 plpdf.printtext(130
,p_vertical_offset + 230 ,p_vertical_offset + 230
,'<EFBFBD>' || TO_CHAR(p_quote_data.liquid_damage_day ,'#' || TO_CHAR(p_quote_data.liquid_damage_day
,'FM999999D90')); ,'FM999999D90'));
plpdf.printtext(p_indent plpdf.printtext(p_indent
,p_vertical_offset + 238 ,p_vertical_offset + 238
,'Liquidated Damages (monetary cap)(excluding V.A.T):'); ,'Liquidated Damages (monetary cap)(excluding V.A.T):');
plpdf.printtext(130 plpdf.printtext(130
,p_vertical_offset + 238 ,p_vertical_offset + 238
,'<EFBFBD>' || TO_CHAR(p_quote_data.liquid_damage_cap ,'#' || TO_CHAR(p_quote_data.liquid_damage_cap
,'FM999999D90')); ,'FM999999D90'));
END build_caveats_page; END build_caveats_page;
@@ -2733,7 +2732,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
,10); --set bold ,10); --set bold
plpdf.printtext(85 plpdf.printtext(85
,p_vertical_offset + 62 ,p_vertical_offset + 62
,'<EFBFBD>' || TO_CHAR(p_quote_data.total_cost ,'#' || TO_CHAR(p_quote_data.total_cost
,'FM999999D90')); ,'FM999999D90'));
plpdf.setcurrenty(66); plpdf.setcurrenty(66);
l_ybefore := plpdf.getcurrenty; l_ybefore := plpdf.getcurrenty;