Initial changes to mip_quotation.pck and mip_bulk_load.pck to support PhaseII purging requirements.

New attributes added to Schema/ext_cost.pdc,  Data/BulkLoad/BULK_LOAD.xls (as exported through Data/BulkLoad/MATERIAL_COSTS.csv).

Changes to views V_AICO.vw and V_QUOTE_DETAILS.vw to recognize the new attributes and to stop PURGING being excluded from details.


git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@12526 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
andrew.hardy
2009-09-04 16:29:42 +00:00
parent d96fb6925c
commit c621cd7b24
8 changed files with 1303 additions and 856 deletions

View File

@@ -5,21 +5,27 @@ SELECT id
,cost_price
,delivery_cost
,regi_code
,enty_code
,mety_code
,mesc_code
,valid_from AS effective_from
,least(nvl(valid_to
,to_date('2099'
,TO_DATE('2099'
,'yyyy'))
,nvl(next_valid_from
,to_date('2099'
,TO_DATE('2099'
,'yyyy'))) AS effective_to
FROM (SELECT id
FROM (SELECT id
,adit_code
,selling_price
,cost_price
,delivery_cost
,regi_code
,enty_code
,mety_code
,mesc_code
,valid_from
,valid_to
,lead(valid_from) over(PARTITION BY cost.adit_code, regi_code ORDER BY valid_from) AS next_valid_from
FROM costs cost
WHERE cost_type = 'AICO');
,lead(valid_from) over(PARTITION BY adit_code, regi_code, enty_code, mety_code, mesc_code ORDER BY valid_from) AS next_valid_from
FROM costs cost
WHERE cost_type = 'AICO');

View File

@@ -39,7 +39,7 @@ SELECT enquiry_id
,quotes q
WHERE t.qute_id = q.id
AND NOT (quit_type = 'AQI' AND
adit_code IN ('LIFTING GEAR', 'PURGING'))
adit_code IN ('LIFTING GEAR'))
ORDER BY enqu_id
,quote_id
,t.id) all_quote_items
@@ -58,5 +58,5 @@ COMMENT ON COLUMN v_quote_details.qmax IS 'The meter module''s Q max.';
COMMENT ON COLUMN v_quote_details.qmin IS 'The meter module''s Q min.';
COMMENT ON COLUMN v_quote_details.inlet_orientation IS 'The orientation of the meter inlet.';
COMMENT ON COLUMN v_quote_details.outlet_orientation IS 'The orientatino of the meter outlet.';
COMMENT ON COLUMN v_quote_details.total_cost IS 'The total cost of the quote. This figure excludes any lifting gear or purging.';
COMMENT ON COLUMN v_quote_details.total_cost IS 'The total cost of the quote. This figure excludes any lifting gear.';
/

View File

@@ -64,7 +64,10 @@ create table ext_material_costs
modu_code varchar2(240),
hou_code varchar2(240),
bas_code varchar2(240),
adit_code varchar2(240)
adit_code varchar2(240),
mety_code varchar2(240),
mesc_code varchar2(240),
enty_code varchar2(240)
)
ORGANIZATION EXTERNAL
( type oracle_loader
@@ -85,7 +88,10 @@ access parameters
modu_code,
hou_code,
bas_code,
adit_code
adit_code,
mety_code,
mesc_code,
enty_code
)
)
location ('MATERIAL_COSTS.csv')