The following lines contain the word 'select', 'insert', 'update' or 'delete':
| arp_cr_history_pkg.update_p - Updates CRH table bank charges info |
| arp_cash_receipts_pkg.update_p- Updates CR table with remittance bank |
| account, customer bank account and |
| override_remit_account_flag |
| arp_ps_pkg.update_p - Updates maturity date in PS table. |
| arp_util.debug |
| |
| ARGUMENTS : IN: |
| p_cr_id - Cash receipt ID |
| p_ps_id - Payment Schedule ID |
| p_crh_id - Cash receipt History ID |
| p_selected_remittance_batch_id - This field indicates if a |
| receipt has been selected to belong to a remittance |
| batch. If the field is not NULL, then the field points |
| to the remittance batch, the receipt belongs to, else |
| the field is NULL. |
| p_remittance_bank_account_id - Remittance bank account id |
| of the receipt. |
| p_override_remit_account_flag - override_remit_account_flag|
| of the receipt. |
| p_customer_bank_account_id - Custome bank account ID of the|
| receipt. |
| p_bank_charges- Bank charges, to update CRH row |
| p_maturity_date - Maturity date to update DUE_DATE in PS |
| p_module_name - Name of module that called this proc. |
| p_module_version - Version of the module that called |
| this procedure |
| OUT: |
| p_batch_applied_status - currenct batch aplied status if |
| conc. req was started. |
| p_request_id - Request id of conc. request. |
| |
| RETURNS : NONE |
| |
| NOTES |
| |
| MODIFICATION HISTORY - Created by Ganesh Vaidee - 10/05/95 |
| 11/20/1995 - The procedure now calls the conc. request to start |
| approval or formatting of a batch if need be |
| depending on the p_call_conc_req flag |
| 07/11/1996 OSTEINME Changed code to store bank charges in |
| factor_discount_amount of ar_cash_receipts |
| table instead of cash_receipt_history table. |
| (bug 376326) |
| |
+===========================================================================*/
PROCEDURE add_or_rm_remit_rec_to_batch (
p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
p_ps_id IN ar_payment_schedules.payment_schedule_id%TYPE,
p_crh_id IN ar_cash_receipt_history.cash_receipt_history_id%TYPE,
p_selected_remittance_batch_id IN
ar_cash_receipts.selected_remittance_batch_id%TYPE,
p_remittance_bank_account_id IN
ar_cash_receipts.remit_bank_acct_use_id%type,
p_override_remit_account_flag IN
ar_cash_receipts.override_remit_account_flag%TYPE,
p_customer_bank_account_id IN
ar_cash_receipts.customer_bank_account_id%TYPE,
p_bank_charges IN
ar_cash_receipt_history.factor_discount_amount%TYPE,
p_maturity_date IN
ar_payment_schedules.due_date%TYPE,
p_batch_id IN NUMBER,
p_control_count IN NUMBER,
p_control_amount IN NUMBER,
p_module_name IN VARCHAR2,
p_module_version IN VARCHAR2 ) IS
--
l_cr_rec ar_cash_receipts%ROWTYPE;
arp_standard.debug('val_args_add_or_rm_remit_rec: ' || 'selected_remittance_batch_id = '||
to_char( p_selected_remittance_batch_id ) );
l_cr_rec.selected_remittance_batch_id := p_selected_remittance_batch_id;
arp_cash_receipts_pkg.update_p( l_cr_rec );
updates the crh record of a confirmed receipt, instead of
updating the actual cr record. Instead, I've added the update
of the cr.factor_discount_amount column above. OSTEINME, 7/11/96
--
-- Update CRH table with bank charges
--
arp_cr_history_pkg.set_to_dummy( l_crh_rec );
arp_cr_history_pkg.update_p( l_crh_rec, l_crh_rec.cash_receipt_history_id );
Payment Schedule should be updated only for CASH receipts
--------------------------------------------------------------------*/
IF (p_ps_id IS NOT NULL)
THEN
arp_ps_pkg.set_to_dummy( l_ps_rec );
arp_ps_pkg.update_p( l_ps_rec, l_ps_rec.payment_schedule_id );
select nvl(control_amount,0), nvl(control_count,0)
into l_actual_amount_total,l_actual_count_total
from ar_batches
where batch_id = p_batch_id;
arp_cr_batches_pkg.update_p( l_batch_rec, l_batch_rec.batch_id );
SELECT type INTO cr_type FROM ar_cash_receipts WHERE cash_receipt_id = p_cr_id;
arp_standard.debug('Selecting org_id from ar_system_parameters and p_batch_id : '||p_batch_id);
SELECT org_id
INTO l_org_id
FROM ar_system_parameters;
arp_cr_batches_pkg.update_p( l_bat_rec, l_bat_rec.batch_id );
arp_standard.debug('Selecting org_id from ar_system_parameters and p_batch_id : '||p_batch_id);
SELECT org_id
INTO l_org_id
FROM ar_system_parameters;
arp_cr_batches_pkg.update_p( l_bat_rec, l_bat_rec.batch_id );
arp_standard.debug('Selecting org_id from ar_system_parameters and p_batch_id : '||p_batch_id);
SELECT org_id
INTO l_org_id
FROM ar_system_parameters;
arp_cr_batches_pkg.update_p( l_bat_rec, l_bat_rec.batch_id );
arp_standard.debug('Selecting org_id from ar_system_parameters and p_batch_id : '||p_batch_id);
SELECT org_id
INTO l_org_id
FROM ar_system_parameters;
arp_cr_batches_pkg.update_p( l_bat_rec, l_bat_rec.batch_id );
| arp_ct_pkg.update_p - Updates paying_customer_id and |
| p_customer_bank_account_id in RA_CUSTOMER_TRX |
| arp_ps_pkg.update_p - Updates selected_for_receipt_batch_id in PS tab.|
| arp_util.debug |
| |
| ARGUMENTS : IN: |
| p_ct_id - Customer Trx ID |
| p_ps_id - Payment Schedule ID |
| p_selected_for_rec_batch_id - This field indicates if an |
| invoice has been selected to be paid by a receipt e |
| belonging to an automatic batch. Note: This field is |
| used to update the PS table and the RA_CUSTOMER_TRX |
| table. |
| p_paying_customer_id - Paying customer of the invoice. |
| p_customer_bank_account_id - Custome bank account ID of the|
| invoice. |
| p_module_version - Version of the module that called |
| this procedure |
| OUT: |
| p_batch_applied_status - currenct batch aplied status if |
| conc. req was started. |
| p_request_id - Request id of conc. request. |
| |
| RETURNS : NONE |
| |
| NOTES |
| |
| MODIFICATION HISTORY - Created by Ganesh Vaidee - 10/05/95 |
| 11/20/1995 - The procedure now calls the conc. request to start |
| approval or formatting of a batch if need be |
| depending on the p_call_conc_req flag |
| |
+===========================================================================*/
PROCEDURE add_or_rm_txn_from_auto_batch(
p_ct_id IN ra_customer_trx.customer_trx_id%TYPE,
p_ps_id IN ar_payment_schedules.payment_schedule_id%TYPE,
p_selected_for_rec_batch_id IN
ar_payment_schedules.selected_for_receipt_batch_id%TYPE,
p_paying_customer_id IN ra_customer_trx.paying_customer_id%TYPE,
p_customer_bank_account_id IN
ra_customer_trx.customer_bank_account_id%TYPE,
p_module_name IN VARCHAR2,
p_module_version IN VARCHAR2 ) IS
l_ct_rec ra_customer_trx%ROWTYPE;
arp_standard.debug('add_or_rm_txn_from_auto_batch: ' || 'p_selected_for_rec_batch_id = '||
to_char( p_selected_for_rec_batch_id ) );
arp_ct_pkg.update_p( l_ct_rec, l_ct_rec.customer_trx_id );
l_ps_rec.selected_for_receipt_batch_id := p_selected_for_rec_batch_id;
arp_ps_pkg.update_p( l_ps_rec, l_ps_rec.payment_schedule_id );
select rm.name rm_name, b.batch_date batch_date
from ar_receipt_methods rm,
ar_batches b
where b.batch_id = p_batch_id
AND rm.receipt_method_id = b.receipt_method_id;