The following lines contain the word 'select', 'insert', 'update' or 'delete':
| selects invoices without payment schedules or |
| invoices with null or 0 value in print lead days |
| part 2 : drivers on due_dates ( Rel 9 ) |
| selects invoices with positive print lead days and |
| payment schedules |
| |
| P_where1 := |
| FROM RA_CUSTOMERS B, |
| RA_TERMS_LINES TL, |
| RA_TERMS T, |
| AR_PAYMENT_SCHEDULES P, |
| RA_CUSTOMER_TRX A, |
| RA_CUST_TRX_TYPES TYPES, |
| AR_LOOKUPS L_TYPES |
| WHERE A.COMPLETE_FLAG = 'Y' |
| AND A.PRINTING_OPTION IN ('PRI', 'REP') |
| AND A.BILL_TO_CUSTOMER_ID = B.CUST_ACCOUNT_ID |
| AND A.CUSTOMER_TRX_ID = P.CUSTOMER_TRX_ID(+) |
| AND A.TERM_ID = TL.TERM_ID |
| AND A.TERM_ID = T.TERM_ID |
| AND A.CUST_TRX_TYPE_ID = TYPES.CUST_TRX_TYPE_ID; |
| (2) Print Selected invoices ( with trx number low and high ) |
| P_choice mandatory varchar2 = 'SEL' |
| P_open_invoice mandatory varchar2 in ( 'Y', 'N' ) |
| P_cust_trx_type_id optional number; |
| (3) Print Selected invoices |
| P_choice mandatory varchar2 = 'SEL' |
| P_open_invoice mandatory varchar2 in ( 'Y', 'N' ) |
| P_cust_trx_type_id optional number; |
select language_code
into p_base_lang
from fnd_languages
where installed_flag = 'B';
select userenv('LANG')
into p_userenv_lang
from dual;
goto sel_selected_inv;
goto sel_selected;
| select new invoices |
+----------------------------------------------------------------------*/
<>
where1 := where1 || cr || 'AND A.PRINTING_PENDING = ''Y''';
| select selected invoices |
+----------------------------------------------------------------------*/
<>
where3 := '';
<>
goto ok_exit;
| select by batch |
+----------------------------------------------------------------------*/
<>
if P_batch_id is not NULL then
where1 := where1 || cr || 'AND A.BATCH_ID = ' || P_batch_id;
| select one invoice |
+----------------------------------------------------------------------*/
<>
if P_customer_trx_id is not NULL then
where1 := where1 || cr || 'AND A.CUSTOMER_TRX_ID = ' || P_customer_trx_id;
| select adjustments |
+----------------------------------------------------------------------*/
<>
table1 := table1 || ', AR_ADJUSTMENTS ADJ' || cr ;
goto sel_selected_inv;