987: IF(p_dest_type_code_tbl(i) = 'SHOP FLOOR') then
988: BEGIN
989: select entity_type
990: into l_wip_entity_type
991: from wip_entities
992: where wip_entity_id = p_wip_entity_id_tbl(i) ;
993: exception
994: when others then
995: null;
1170: WHERE (p_po_encumberance_flag = 'Y' AND
1171: (p_dest_type_code_tbl(i) <> 'SHOP FLOOR' AND p_distribution_type_tbl(i) <> 'PREPAYMENT') AND
1172: -- PDOI for Complex PO Project
1173: (p_dest_type_code_tbl(i) <> 'SHOP FLOOR' OR (p_dest_type_code_tbl(i) = 'SHOP FLOOR'
1174: AND (SELECT entity_type from wip_entities where wip_entity_id = p_wip_entity_id_tbl(i)) = 6)) /* Encumbrance Project */
1175: AND p_budget_account_id_tbl(i) IS NULL)
1176: OR ( p_budget_account_id_tbl(i) IS NOT NULL
1177: AND NOT EXISTS(
1178: SELECT NULL