Modules/mip_helper_special_cases.pck - correction to rule OM-4
Modules/mip_quotation.pck - add prty_id and owner_prty_id to quote status procedures to record the relevant roles. Add debug routine 'pl' to write a log file of processing. Tidy-up email wording. Modules/mip_regions.pck - convert given postcode to uppercase before processing. Modules/mip_virus_check.pck - started work on the virus checking module. So far, just have the ability to write a document to the filesystem. Added new directory, 'WEBMIP_VIRUS' to store these files in. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3381 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -81,22 +81,23 @@ CREATE OR REPLACE PACKAGE BODY mip_regions IS
|
||||
FUNCTION valid_postcode_format(p_postcode IN VARCHAR2) RETURN BOOLEAN IS
|
||||
l_return BOOLEAN := TRUE;
|
||||
l_postcode_format VARCHAR2(8);
|
||||
l_postcode VARCHAR2(80) := upper(p_postcode);
|
||||
BEGIN
|
||||
|
||||
IF p_postcode = 'GIR 0AA' THEN
|
||||
IF l_postcode = 'GIR 0AA' THEN
|
||||
l_return := TRUE;
|
||||
ELSIF length(p_postcode) NOT IN (6
|
||||
ELSIF length(l_postcode) NOT IN (6
|
||||
,7
|
||||
,8) THEN
|
||||
l_return := FALSE;
|
||||
ELSE
|
||||
l_postcode_format := reformat_postcode_string(p_postcode);
|
||||
l_postcode_format := reformat_postcode_string(l_postcode);
|
||||
|
||||
IF l_postcode_format IS NULL THEN
|
||||
l_return := FALSE;
|
||||
ELSE
|
||||
IF instr('QVX'
|
||||
,substr(p_postcode
|
||||
,substr(l_postcode
|
||||
,1
|
||||
,1)) > 0 THEN
|
||||
l_return := FALSE;
|
||||
@@ -104,7 +105,7 @@ CREATE OR REPLACE PACKAGE BODY mip_regions IS
|
||||
,2
|
||||
,1) = 'A'
|
||||
AND instr('IJZ'
|
||||
,substr(p_postcode
|
||||
,substr(l_postcode
|
||||
,2
|
||||
,1)) > 0 THEN
|
||||
l_return := FALSE;
|
||||
@@ -112,7 +113,7 @@ CREATE OR REPLACE PACKAGE BODY mip_regions IS
|
||||
,3
|
||||
,1) = 'A'
|
||||
AND instr('ABCDEFGHJKSTUW'
|
||||
,substr(p_postcode
|
||||
,substr(l_postcode
|
||||
,3
|
||||
,1)) = 0 THEN
|
||||
l_return := FALSE;
|
||||
@@ -120,7 +121,7 @@ CREATE OR REPLACE PACKAGE BODY mip_regions IS
|
||||
,4
|
||||
,1) = 'A'
|
||||
AND instr('ABCDEFGHJKSTUW'
|
||||
,substr(p_postcode
|
||||
,substr(l_postcode
|
||||
,4
|
||||
,1)) = 0 THEN
|
||||
l_return := FALSE;
|
||||
@@ -132,7 +133,7 @@ CREATE OR REPLACE PACKAGE BODY mip_regions IS
|
||||
,l_idx
|
||||
,1) = 'A'
|
||||
AND instr('CIKMOV'
|
||||
,substr(p_postcode
|
||||
,substr(l_postcode
|
||||
,l_idx
|
||||
,1)) > 0 THEN
|
||||
l_return := FALSE;
|
||||
@@ -153,6 +154,7 @@ CREATE OR REPLACE PACKAGE BODY mip_regions IS
|
||||
FUNCTION get_region_for_postcode(p_postcode IN VARCHAR2)
|
||||
RETURN postcodes.regi_code%TYPE IS
|
||||
l_regi_code postcodes.regi_code%TYPE;
|
||||
l_postcode VARCHAR2(80) := upper(p_postcode);
|
||||
BEGIN
|
||||
SELECT regi_code
|
||||
INTO l_regi_code
|
||||
@@ -160,14 +162,14 @@ CREATE OR REPLACE PACKAGE BODY mip_regions IS
|
||||
,outcode
|
||||
,incode
|
||||
,decode(outcode || ' ' || incode
|
||||
,p_postcode
|
||||
,l_postcode
|
||||
,1
|
||||
,999) AS accuracy
|
||||
FROM postcodes t
|
||||
WHERE (outcode || ' ' || incode = p_postcode)
|
||||
OR (outcode = substr(p_postcode
|
||||
WHERE (outcode || ' ' || incode = l_postcode)
|
||||
OR (outcode = substr(l_postcode
|
||||
,1
|
||||
,instr(p_postcode
|
||||
,instr(l_postcode
|
||||
,' ') - 1) AND incode IS NULL)
|
||||
ORDER BY 4)
|
||||
WHERE rownum < 2;
|
||||
|
||||
Reference in New Issue
Block a user