Fixed bug in drawing_exists function it never returned a value if the drawing wasn't found, now returns false. Added null checks on the update association so that the where clause has a chance of working

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3311 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
PriestJ
2008-01-21 11:45:25 +00:00
parent 564c5ef063
commit 6bd8f2d96c

View File

@@ -51,6 +51,8 @@ create or replace package body MIP_FILES as
CLOSE c_file_exists;
if l_file_exists is not null and l_file_exists>0 then
return true;
else
return false;
end if;
end drawing_file_exists;
/*
@@ -83,7 +85,7 @@ create or replace package body MIP_FILES as
returning id into l_doc_id;
--set up a role for the document
update document_roles set docu_id = l_doc_id
where drwg_code = p_drwg_code or qute_id = p_qute_id or enqu_id = p_enqu_id;
where drwg_code = nvl(p_drwg_code,'') or qute_id = nvl(p_qute_id,0) or enqu_id = nvl(p_enqu_id,0);
--if it works then return true
return true;
end update_file_association;