fix for ticket #365, the code was trying to get the supplier address changed this to the agent address, also the code was never going to get an address as the call to get the address occurred before we got the supplier/agent ids, so it was always passing a null as the supplier/agent id.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3944 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
PriestJ
2008-03-11 15:04:22 +00:00
parent 1324eee4d3
commit a40b896dd5

View File

@@ -675,17 +675,19 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation_document IS
l_enquiry_id := l_quote_row.enqu_id;
l_enqu_row := get_enquiry_row(l_enquiry_id);
--get the latest supplier address
--get current supplier and agent ids for enquiry
l_supplier_id := mip_enquiry.get_enquiry_role(l_enqu_row.id,'ENQ SUPP');
l_agent_id := mip_enquiry.get_enquiry_role(l_enqu_row.id,'ENQ OWN');
--get the latest agent address
IF NOT c_get_address%ISOPEN THEN
OPEN c_get_address(l_supplier_id,'OFFICE');
OPEN c_get_address(l_agent_id,'OFFICE');
END IF;
FETCH c_get_address
INTO l_addr_row;
CLOSE c_get_address;
--get current supplier and agent ids for enquiry
l_supplier_id := mip_enquiry.get_enquiry_role(l_enqu_row.id,'ENQ SUPP');
l_agent_id := mip_enquiry.get_enquiry_role(l_enqu_row.id,'ENQ OWN');
--supplier
IF NOT c_get_party%ISOPEN THEN
OPEN c_get_party(l_supplier_id);