Changes made for BulkLoad information provided by Gareth on 5th March (new bas_dwg/102M.jpg, csv exports)
New package mip_debug_constants.pks to be used to store compilation constants for debugging purposes (packages to use pl from mip_debug). mip_quotation.pck modified to support exchanges based on being provided with an existing model rather than meter size. Changes to the DATAITEM_ROLES.csv to support this new field, impact on mandatory rules captured by mip_helper_special_cases.pck git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3900 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -33,18 +33,13 @@ END mip_files;
|
||||
/
|
||||
CREATE OR REPLACE PACKAGE BODY mip_files AS
|
||||
|
||||
PROCEDURE pl(p_in VARCHAR2) IS
|
||||
l_fh utl_file.file_type;
|
||||
PROCEDURE pl(p_in VARCHAR2, p_line NUMBER DEFAULT NULL) IS
|
||||
BEGIN
|
||||
dbms_application_info.set_module('MIP_FILES'
|
||||
,p_in);
|
||||
l_fh := utl_file.fopen(location => 'WEBMIP_BULK_LOAD'
|
||||
,filename => 'MIP_FILES.txt'
|
||||
,open_mode => 'A');
|
||||
utl_file.put_line(l_fh
|
||||
,to_char(SYSDATE
|
||||
,'DD/MM/YYYY HH24:MI:SS') || ',' || p_in);
|
||||
utl_file.fclose(l_fh);
|
||||
NULL;
|
||||
-- $IF $$DEBUGGING OR mip_debug_constants.debugging OR mip_debug_constants.files
|
||||
-- $THEN
|
||||
mip_debug.pl(p_unit => $$PLSQL_UNIT,p_in => p_in, p_line => p_line);
|
||||
-- $END
|
||||
END pl;
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
create or replace package mip_debug_constants is
|
||||
CREATE OR REPLACE PACKAGE mip_debug_constants IS
|
||||
|
||||
-- Author : HARDYA
|
||||
-- Created : 06/03/2008 09:04:54
|
||||
-- Purpose : Constants used for conditional compilation of debug functions
|
||||
|
||||
|
||||
|
||||
-- Public constant declarations
|
||||
debugging CONSTANT BOOLEAN := TRUE;
|
||||
bulk_load CONSTANT BOOLEAN := TRUE;
|
||||
quotation CONSTANT BOOLEAN := TRUE;
|
||||
files CONSTANT BOOLEAN := TRUE;
|
||||
|
||||
end mip_debug_constants;
|
||||
END mip_debug_constants;
|
||||
/
|
||||
|
||||
@@ -14,7 +14,7 @@ CREATE OR REPLACE PACKAGE BODY mip_helper_special_cases IS
|
||||
PROCEDURE table_enquiries(p_rec IN enquiries%ROWTYPE
|
||||
,p_mandatory_checks IN OUT mip_mandatory.t_mandatory_checks) IS
|
||||
BEGIN
|
||||
-- OM-1
|
||||
-- O-M1
|
||||
IF p_rec.install_building IS NULL
|
||||
AND p_rec.install_sub_building IS NULL THEN
|
||||
mip_mandatory.add_error(p_mandatory_checks => p_mandatory_checks
|
||||
@@ -25,18 +25,18 @@ CREATE OR REPLACE PACKAGE BODY mip_helper_special_cases IS
|
||||
,p_error_message => 'At least one of Building or Sub-Building must be completed.');
|
||||
END IF;
|
||||
|
||||
-- OM-2
|
||||
IF p_rec.enty_code IN ('STD INSTALL', 'STD EXCHANGE')
|
||||
AND (p_rec.required_mesc_code IS NULL AND p_rec.qmax IS NULL) THEN
|
||||
mip_mandatory.add_error(p_mandatory_checks => p_mandatory_checks
|
||||
,p_field_name => 'QMAX'
|
||||
,p_error_message => 'At least one of Qmax or Meter Size must be completed.');
|
||||
mip_mandatory.add_error(p_mandatory_checks => p_mandatory_checks
|
||||
,p_field_name => 'REQUIRED_MESC_CODE'
|
||||
,p_error_message => 'At least one of Qmax or Meter Size must be completed.');
|
||||
-- O-M2
|
||||
IF p_rec.enty_code IN ('STD INSTALL', 'STD EXCHANGE') THEN
|
||||
IF p_rec.required_mesc_code = 'OTHER' THEN
|
||||
IF p_rec.qmax IS NULL THEN
|
||||
mip_mandatory.add_error(p_mandatory_checks => p_mandatory_checks
|
||||
,p_field_name => 'QMAX'
|
||||
,p_error_message => 'At least one of Qmax or Meter Size must be completed.');
|
||||
END IF;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
-- OM-3
|
||||
-- O-M3
|
||||
IF p_rec.enty_code IN
|
||||
('INSTALL', 'OFMAT', 'REMOVE', 'ADVERSARIAL', 'ALTERATION',
|
||||
'CHANGE CAPACITY', 'ADDON', 'OTHER')
|
||||
@@ -51,11 +51,9 @@ CREATE OR REPLACE PACKAGE BODY mip_helper_special_cases IS
|
||||
,p_error_message => 'Required IP Details must be completed when a Service Pressure of ''IP'' is requested.');
|
||||
END IF;
|
||||
|
||||
-- OM-4
|
||||
IF p_rec.enty_code IN
|
||||
('INSTALL', 'STD INSTALL')
|
||||
AND
|
||||
(p_rec.mprn IS NULL AND p_rec.mprn_alt IS NULL) THEN
|
||||
-- O-M4
|
||||
IF p_rec.enty_code IN ('INSTALL', 'STD INSTALL')
|
||||
AND (p_rec.mprn IS NULL AND p_rec.mprn_alt IS NULL) THEN
|
||||
mip_mandatory.add_error(p_mandatory_checks => p_mandatory_checks
|
||||
,p_field_name => 'MPRN'
|
||||
,p_error_message => 'Either MPRN or Additional Information must be completed.');
|
||||
@@ -64,12 +62,25 @@ CREATE OR REPLACE PACKAGE BODY mip_helper_special_cases IS
|
||||
,p_error_message => 'Either MPRN or Additional Information must be completed.');
|
||||
END IF;
|
||||
|
||||
-- OM-5
|
||||
-- Tripartite Agreement and AMR -- this is a specific example of the Tripartite and addons
|
||||
-- This is handled through the mip_tripartite.addon functionality
|
||||
-- O-M5
|
||||
-- Tripartite Agreement and AMR -- this is a specific example of the Tripartite and addons
|
||||
-- This is handled through the mip_tripartite.addon functionality
|
||||
|
||||
-- O-M6
|
||||
IF p_rec.enty_code IN ('OFMAT', 'EXCHANGE', 'STD EXCHANGE', 'REMOVE',
|
||||
'STD REMOVE', 'ADVERSARIAL', 'CHANGE CAPACITY')
|
||||
AND p_rec.existing_metr_code = 'OTHER'
|
||||
AND (p_rec.existing_mesc_code IS NULL OR
|
||||
p_rec.existing_mety_code IS NULL) THEN
|
||||
mip_mandatory.add_error(p_mandatory_checks => p_mandatory_checks
|
||||
,p_field_name => 'EXISTING_MESC_CODE'
|
||||
,p_error_message => 'Either Existing Meter Model OR Existing Meter Size and Meter Type information must be completed.');
|
||||
mip_mandatory.add_error(p_mandatory_checks => p_mandatory_checks
|
||||
,p_field_name => 'EXISTING_METY_CODE'
|
||||
,p_error_message => 'Either Existing Meter Model OR Existing Meter Size and Meter Type information must be completed.');
|
||||
END IF;
|
||||
|
||||
END table_enquiries;
|
||||
|
||||
BEGIN
|
||||
-- Initialization
|
||||
NULL;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user