887: ELSIF ( p_entity = 'BATCH_SOURCE_NAME' )
888: THEN
889: SELECT batch_source_id
890: INTO l_selected_id
891: FROM ra_batch_sources
892: WHERE name = p_value and
893: nvl(status, 'A') = 'A' and (batch_source_type = 'INV');
894: ELSIF ( p_entity = 'TERM_NAME' )
895: THEN
1382: p_salesrep_name IN VARCHAR2 DEFAULT NULL,
1383: x_term_id IN OUT NOCOPY NUMBER ,
1384: p_term_name IN VARCHAR2 DEFAULT NULL,
1385: x_batch_source_id IN OUT NOCOPY NUMBER,
1386: p_batch_source_name IN ra_batch_sources.name%type,
1387: x_cust_trx_type_id IN OUT NOCOPY NUMBER,
1388: p_cust_trx_type IN varchar2,
1389: x_bill_to_customer_id IN OUT NOCOPY NUMBER,
1390: x_bill_to_customer_site_use_id IN OUT NOCOPY hz_cust_site_uses.site_use_id%TYPE,
1622:
1623: begin
1624: /* SELECT batch_source_id
1625: INTO x_batch_source_id
1626: FROM ra_batch_sources
1627: WHERE name = p_batch_source_name and
1628: batch_source_id not in (11,12) and
1629: nvl(status,'A')= 'A' and (batch_source_type = 'INV');*/
1630: SELECT batch_source_id
1628: batch_source_id not in (11,12) and
1629: nvl(status,'A')= 'A' and (batch_source_type = 'INV');*/
1630: SELECT batch_source_id
1631: INTO x_batch_source_id
1632: FROM ra_batch_sources bs
1633: WHERE name = p_batch_source_name and
1634: batch_source_id not in (11,12) and
1635: nvl(status,'A')= 'A' and (batch_source_type = 'INV') and
1636: (( p_deposit_number is not null and
1661:
1662: begin
1663: /* SELECT batch_source_id
1664: INTO l_dummy
1665: FROM ra_batch_sources
1666: WHERE batch_source_id = x_batch_source_id and
1667: batch_source_id not in (11,12) and
1668: nvl(status,'A')= 'A' and (batch_source_type = 'INV');*/
1669: SELECT batch_source_id
1667: batch_source_id not in (11,12) and
1668: nvl(status,'A')= 'A' and (batch_source_type = 'INV');*/
1669: SELECT batch_source_id
1670: INTO l_dummy
1671: FROM ra_batch_sources bs
1672: WHERE batch_source_id = x_batch_source_id and
1673: batch_source_id not in (11,12) and
1674: nvl(status,'A')= 'A' and (batch_source_type = 'INV') and
1675: (( p_deposit_number is not null and