The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT previous_customer_trx_line_id,
inventory_item_id,
memo_line_id,
extended_amount,
default_ussgl_transaction_code
INTO l_inv_prev_ctl_id,
l_inventory_item_id,
l_memo_line_id,
l_line_extended_amount,
l_line_ussgl_code
FROM ra_customer_trx_lines
WHERE customer_trx_id = p_ct_id
AND customer_trx_line_id = p_line_ctl_id;
SELECT ctl_inv.ctl_line_line_number,
ctl_inv.ctl_line_extended_amount,
ctl_inv.customer_trx_line_id,
ctl_inv.lgd_code_combination_id,
ctl_inv.extended_amount,
ctl_inv.ctl_frt_balance
INTO l_inv_line_number,
l_inv_line_extended_amount,
l_inv_frt_ctl_id,
l_inv_frt_ccid,
l_inv_frt_amount,
l_inv_frt_uncr_amount
FROM RA_CUSTOMER_TRX_LINES_FRT_V ctl_inv
WHERE ctl_inv.customer_trx_id = p_prev_ct_id
AND nvl(ctl_inv.link_to_cust_trx_line_id, -10)
= nvl(l_inv_prev_ctl_id, -10);
select ctl.warehouse_id
into l_warehouse_id
from ra_customer_trx_lines ctl
where ctl.customer_trx_line_id = l_inv_prev_ctl_id;
SELECT unit_std_price
INTO l_amount
FROM ar_memo_lines
WHERE memo_line_id = l_memo_line_id;
SELECT decode(count(*),
0, null,
decode(max(link_to_cust_trx_line_id),
null, 'H',
'L'))
INTO l_frt_type
FROM ra_customer_trx_lines ctl
WHERE ctl.customer_trx_id = p_customer_trx_id
AND ctl.line_type = 'FREIGHT';
| delete_frt_lines |
| |
| DESCRIPTION |
| Procedure to delete all freight lines for a transaction |
| |
| SCOPE - PRIVATE |
| |
| EXETERNAL PROCEDURES/FUNCTIONS ACCESSED |
| arp_util.debug |
| |
| ARGUMENTS : IN: |
| p_form_name |
| p_form_version |
| p_trx_class |
| p_complete_flag |
| p_open_rec_flag |
| p_customer_trx_id |
| OUT: |
| None |
| IN/ OUT: |
| None |
| |
| RETURNS : NONE |
| |
| NOTES |
| |
| MODIFICATION HISTORY |
| 12-JUL-95 Subash Chadalavada Created |
| |
+===========================================================================*/
PROCEDURE delete_frt_lines(
p_form_name IN varchar2,
p_form_version IN number,
p_trx_class IN ra_cust_trx_types.type%type,
p_complete_flag IN varchar2,
p_open_rec_flag IN varchar2,
p_customer_trx_id IN ra_customer_trx.customer_trx_id%type)
IS
CURSOR frt_lines(p_ct_id ra_customer_trx.customer_trx_id%type) IS
SELECT customer_trx_line_id
FROM ra_customer_trx_lines
WHERE customer_trx_id = p_ct_id
AND line_type = 'FREIGHT';
arp_util.debug('get_default_fob: ' || 'arp_process_freight_util.delete_frt_lines()+');
| call the delete handler for each of the freight lines |
+--------------------------------------------------------*/
FOR frt_line_rec IN frt_lines(p_customer_trx_id) LOOP
arp_process_freight.delete_freight(
p_form_name,
p_form_version,
p_trx_class,
p_complete_flag,
p_open_rec_flag,
p_customer_trx_id,
frt_line_rec.customer_trx_line_id);
arp_util.debug('get_default_fob: ' || 'arp_process_freight_util.delete_frt_lines()-');
arp_util.debug('get_default_fob: ' || 'EXCEPTION : arp_process_freight_util.delete_frt_lines');
END delete_frt_lines;
| Procedure to select the default fob_point.
| |
| SCOPE - PRIVATE |
| |
| EXETERNAL PROCEDURES/FUNCTIONS ACCESSED |
| arp_util.debug |
| |
| ARGUMENTS : IN: |
| p_form_name |
| p_form_version |
| p_trx_class |
| p_complete_flag |
| p_open_rec_flag |
| p_customer_trx_id |
| OUT: |
| None |
| IN/ OUT: |
| None |
| |
| RETURNS : NONE |
| |
| NOTES |
| Use the following hierarchy to default fob:
| 1) From Ship to site use
| 2) From bill to site use
| 3) From ship to customer
| 4) From bill to customer
| |
| MODIFICATION HISTORY |
| 9/4/1996 Harri Kaukovuo Created
+===========================================================================*/
PROCEDURE get_default_fob(
pn_SHIP_TO_SITE_USE_ID IN NUMBER
, pn_BILL_TO_SITE_USE_ID IN NUMBER
, pn_SHIP_TO_CUSTOMER_ID IN NUMBER
, pn_BILL_TO_CUSTOMER_ID IN NUMBER
, pc_fob_point OUT NOCOPY VARCHAR2
, pc_fob_point_name OUT NOCOPY VARCHAR2) IS
lc_fob_point ar_lookups.lookup_code%TYPE;
SELECT l.LOOKUP_CODE
, l.MEANING
INTO
lc_fob_point
, lc_fob_point_name
FROM AR_LOOKUPS L
, HZ_CUST_SITE_USES site_uses
WHERE site_uses.SITE_USE_ID = pn_SHIP_TO_SITE_USE_ID
AND L.LOOKUP_TYPE = 'FOB'
AND L.LOOKUP_CODE = site_uses.FOB_POINT
AND L.ENABLED_FLAG = 'Y'
AND TRUNC(SYSDATE) BETWEEN L.START_DATE_ACTIVE
AND NVL(L.END_DATE_ACTIVE, TRUNC(SYSDATE));
SELECT l.LOOKUP_CODE
, l.MEANING
INTO
lc_fob_point
, lc_fob_point_name
FROM AR_LOOKUPS L
, HZ_CUST_SITE_USES site_uses
WHERE site_uses.SITE_USE_ID = pn_BILL_TO_SITE_USE_ID
AND L.LOOKUP_TYPE = 'FOB'
AND L.LOOKUP_CODE = site_uses.FOB_POINT
AND L.ENABLED_FLAG = 'Y'
AND TRUNC(SYSDATE) BETWEEN L.START_DATE_ACTIVE
AND NVL(L.END_DATE_ACTIVE, TRUNC(SYSDATE));
SELECT l.LOOKUP_CODE
, l.MEANING
INTO
lc_fob_point
, lc_fob_point_name
FROM AR_LOOKUPS L
, hz_cust_accounts cust_acct
WHERE cust_acct.cust_account_id = pn_SHIP_TO_CUSTOMER_ID
AND L.LOOKUP_TYPE = 'FOB'
AND L.LOOKUP_CODE = cust_acct.FOB_POINT
AND L.ENABLED_FLAG = 'Y'
AND TRUNC(SYSDATE) BETWEEN L.START_DATE_ACTIVE
AND NVL(L.END_DATE_ACTIVE, TRUNC(SYSDATE));
SELECT l.LOOKUP_CODE
, l.MEANING
INTO
lc_fob_point
, lc_fob_point_name
FROM AR_LOOKUPS L
, hz_cust_accounts cust_acct
WHERE cust_acct.cust_account_id= pn_BILL_TO_CUSTOMER_ID
AND L.LOOKUP_TYPE = 'FOB'
AND L.LOOKUP_CODE = cust_acct.FOB_POINT
AND L.ENABLED_FLAG = 'Y'
AND TRUNC(SYSDATE) BETWEEN L.START_DATE_ACTIVE
AND NVL(L.END_DATE_ACTIVE, TRUNC(SYSDATE));