The following lines contain the word 'select', 'insert', 'update' or 'delete':
C_MATURITY_DATE_UPDATED CONSTANT VARCHAR2(30) := 'MATURITY_DATE_UPDATED';
C_SELECTED_REMITTANCE CONSTANT VARCHAR2(30) := 'SELECTED_REMITTANCE';
C_DESELECTED_REMITTANCE CONSTANT VARCHAR2(30) := 'DESELECTED_REMITTANCE';
C_SELECT_REMIT CONSTANT VARCHAR2(30) := 'SELECT_REMIT';
C_DESELECT_REMIT CONSTANT VARCHAR2(30) := 'DESELECT_REMIT';
C_DELETE CONSTANT VARCHAR2(30) := 'DELETE';
select_remit_flag VARCHAR2(1),
deselect_remit_flag VARCHAR2(1),
approve_remit_flag VARCHAR2(1),
hold_flag VARCHAR2(1),
unhold_flag VARCHAR2(1),
recall_flag VARCHAR2(1),
eliminate_flag VARCHAR2(1),
uneliminate_flag VARCHAR2(1),
unpaid_flag VARCHAR2(1),
protest_flag VARCHAR2(1),
endorse_flag VARCHAR2(1),
restate_flag VARCHAR2(1),
exchange_flag VARCHAR2(1),
delete_flag VARCHAR2(1));
select trx_number,drawee_id,drawee_site_use_id,org_id,payment_trxn_extension_id,
substr(created_from ,1,8)
into l_trx_number,l_drawee_id,l_drawee_site_use_id,l_org_id,l_payment_trxn_extension_id,
l_created_from
from ra_customer_trx
where customer_trx_id = p_customer_trx_id;
Select instr_assignment_id
Into l_instr_id
from ra_customer_Trx_lines brlines,
ra_customer_trx ct,
iby_trxn_extensions_v iby
where ct.customer_trx_id = brlines.br_ref_customer_trx_id
and ct.payment_trxn_extension_id = iby.trxn_extension_id
and brlines.customer_trx_id = p_customer_trx_id
and rownum = 1;
update ra_customer_trx
set payment_trxn_extension_id = l_payment_trxn_extension_id
where customer_trx_id = p_customer_trx_id;
p_select_remit_flag => C_ACTION_REC.select_remit_flag,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag,
p_hold_flag => C_ACTION_REC.hold_flag,
p_unhold_flag => C_ACTION_REC.unhold_flag,
p_recall_flag => C_ACTION_REC.recall_flag,
p_eliminate_flag => C_ACTION_REC.eliminate_flag,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag,
p_unpaid_flag => C_ACTION_REC.unpaid_flag,
p_protest_flag => C_ACTION_REC.protest_flag,
p_endorse_flag => C_ACTION_REC.endorse_flag,
p_restate_flag => C_ACTION_REC.restate_flag,
p_exchange_flag => C_ACTION_REC.exchange_flag,
p_delete_flag => C_ACTION_REC.delete_flag);
| Update the Complete Flag in the BR Header |
+------------------------------------------------*/
l_trx_rec.complete_flag := 'Y';
ARP_PROCESS_BR_HEADER.update_header (l_trx_rec, l_trx_rec.customer_trx_id);
| Insertion in Transaction History Table |
+------------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
| Update the Complete Flag in the BR Header |
+------------------------------------------------*/
l_trx_rec.complete_flag := 'N';
ARP_PROCESS_BR_HEADER.update_header ( l_trx_rec ,
l_trx_rec.customer_trx_id);
| Insertion in Transaction History Table |
+------------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
| Delete the BR Payment Schedule |
+------------------------------------------------*/
IF (l_acceptance_flag = 'N')
THEN
-- Bug 2057740:
-- Commenting out NOCOPY and calling delete_f_Ct_id instead because
-- there is already a routine to delete ps by cust_trx_id.
-- no need to call another routine to find the ps id first.
-- AR_BILLS_CREATION_LIB_PVT.Get_Payment_Schedule_Id (
-- p_customer_trx_id, l_ps_id);
arp_ps_pkg.delete_f_ct_id(p_customer_trx_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
| Insertion in Transaction History Table |
+------------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
| Update the Payment Schedule of the BR |
+-----------------------------------------------*/
AR_BILLS_CREATION_LIB_PVT.Get_Payment_Schedule_Id (p_customer_trx_id, l_ps_rec.payment_schedule_id);
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (l_ps_rec.payment_schedule_id, 'USER' , p_customer_trx_id);
| Update the Hold Flag in the BR Header |
+-----------------------------------------------*/
l_trx_rec.br_on_hold_flag := 'Y';
ARP_PROCESS_BR_HEADER.update_header (l_trx_rec, l_trx_rec.customer_trx_id);
| Insert a Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec, l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
| Updates the Payment Schedule of the BR |
+-----------------------------------------------*/
AR_BILLS_CREATION_LIB_PVT.Get_Payment_Schedule_Id (p_customer_trx_id, l_ps_rec.payment_schedule_id);
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (l_ps_rec.payment_schedule_id, NULL, NULL);
| Update the Hold Flag in the BR Header |
+-----------------------------------------------*/
l_trx_rec.br_on_hold_flag := 'N';
ARP_PROCESS_BR_HEADER.update_header (l_trx_rec, l_trx_rec.customer_trx_id);
| Insert a Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec, l_trh_rec.transaction_history_id);
| Select_BR_remit |
| |
| DESCRIPTION |
| Selects a BR for remittance |
| |
+==============================================================================*/
PROCEDURE Select_BR_Remit (
-- ***** Input parameters *****
p_batch_id IN NUMBER ,
p_ps_id IN NUMBER ,
-- ***** Output parameters *****
p_status OUT NOCOPY VARCHAR2 )
IS
l_batch_rec ar_batches%ROWTYPE;
arp_util.debug('AR_BILLS_MAINTAIN_PUB.Select_BR_Remit ()+');
SAVEPOINT Select_BR_Remit_PVT;
l_action := C_SELECT_REMIT;
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
IF (C_ACTION_REC.select_remit_flag <> 'Y')
THEN
IF PG_DEBUG in ('Y', 'C') THEN
arp_util.debug( '>>>>>>>>>> The action ' || l_action || ' is not allowed on the BR ' || l_ps_rec.customer_trx_id);
FND_MESSAGE.set_name ( 'AR', 'AR_BR_CANNOT_SELECT_REMIT' );
| Updates the Payment Schedule of the BR |
+-----------------------------------------------*/
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (p_ps_id, 'REMITTANCE' , p_batch_id);
| Insert a Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec, l_trh_rec.transaction_history_id);
arp_util.debug('AR_BILLS_MAINTAIN_PUB.Select_BR_Remit ()-');
arp_util.debug('EXCEPTION OTHERS: AR_BILLS_MAINTAIN_PUB.Select_BR_Remit');
ROLLBACK TO Select_BR_Remit_PVT;
END Select_BR_Remit;
| DeSelect_BR_remit |
| |
| DESCRIPTION |
| DeSelects a BR out NOCOPY of a remittance batch |
| |
+==============================================================================*/
PROCEDURE DeSelect_BR_Remit (
-- ***** Input parameters *****
p_ps_id IN NUMBER ,
-- ***** Output parameters *****
p_status OUT NOCOPY VARCHAR2 )
IS
l_trh_rec ar_transaction_history%ROWTYPE;
arp_util.debug('AR_BILLS_MAINTAIN_PUB.DeSelect_BR_Remit ()+');
SAVEPOINT DeSelect_BR_Remit_PVT;
l_action := C_DESELECT_REMIT;
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
IF (C_ACTION_REC.deselect_remit_flag <> 'Y')
THEN
IF PG_DEBUG in ('Y', 'C') THEN
arp_util.debug( '>>>>>>>>>> The action ' || l_action || ' is not allowed on the BR ' || l_ps_rec.customer_trx_id);
FND_MESSAGE.set_name ( 'AR', 'AR_BR_CANNOT_DESELECT_REMIT' );
| Updates the Payment Schedule of the BR |
+-----------------------------------------------*/
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (p_ps_id, NULL, NULL);
| Insert a Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec, l_trh_rec.transaction_history_id);
arp_util.debug('AR_BILLS_MAINTAIN_PUB.DeSelect_BR_Remit ()-');
arp_util.debug('EXCEPTION OTHERS: AR_BILLS_MAINTAIN_PUB.DeSelect_BR_Remit');
ROLLBACK TO DeSelect_BR_Remit_PVT;
END DeSelect_BR_Remit;
| Cancels the selection of a BR in a remittance batch |
| Removes the history record related to the selection |
| |
+==============================================================================*/
PROCEDURE Cancel_BR_Remit (
-- ***** Input parameters *****
p_ps_id IN NUMBER )
IS
l_trh_rec ar_transaction_history%ROWTYPE;
l_action := C_DESELECT_REMIT;
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
IF (C_ACTION_REC.deselect_remit_flag <> 'Y')
THEN
IF PG_DEBUG in ('Y', 'C') THEN
arp_util.debug('Cancel_BR_Remit: ' || '>>>>>>>>>> The action ' || l_action || ' is not allowed on the BR ' || l_ps_rec.customer_trx_id);
FND_MESSAGE.set_name ( 'AR', 'AR_BR_CANNOT_DESELECT_REMIT' );
| Updates the Payment Schedule of the BR |
+-----------------------------------------------*/
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (p_ps_id, NULL, NULL);
| Deletes the current Transaction History Record |
| (Status Selected Remittance) |
+-------------------------------------------------------*/
l_trh_id := l_trh_rec.prv_trx_history_id;
ARP_PROC_TRANSACTION_HISTORY.delete_transaction_history (l_trh_rec.transaction_history_id);
| Updates the previous Transaction History Record |
+-------------------------------------------------------*/
ARP_TRANSACTION_HISTORY_PKG.set_to_dummy(l_trh_rec);
| Set the flag to be updated |
+----------------------------*/
l_trh_rec.current_record_flag := 'Y';
ARP_PROC_TRANSACTION_HISTORY.update_transaction_history (l_trh_rec, l_trh_id);
arp_util.debug('Cancel_BR_Remit: ' || 'AR_BILLS_MAINTAIN_PUB.DeSelect_BR_Remit ()-');
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (p_ps_id, NULL , NULL);
| Insert the First Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
ARP_PROCESS_BR_HEADER.update_header ( l_trx_rec ,
l_trx_rec.customer_trx_id);
| Insert the Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
| Insert the Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
arp_ps_pkg.update_p (l_ps_rec, l_ps_rec.payment_schedule_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
ARP_PROCESS_BR_HEADER.update_header (l_trx_rec, l_trx_rec.customer_trx_id);
| Insert the Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec, l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
| Updates the Payment Schedule of the BR |
| with the Adjustment Information |
+-----------------------------------------------*/
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (l_ps_rec.payment_schedule_id, 'ADJUSTMENT', new_adj_id);
| Insert the first Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec, l_trh_rec.transaction_history_id);
| Insert the Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec, l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
| Insert the Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec, l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
ARP_PROCESS_BR_HEADER.update_header ( l_trx_rec ,
l_trx_rec.customer_trx_id);
| Insert the Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (l_ps_rec.payment_schedule_id, NULL , NULL);
| Insert the Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
ARP_PROCESS_BR_HEADER.update_header ( l_trx_rec, l_trx_rec.customer_trx_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (l_ps_rec.payment_schedule_id, NULL , NULL);
| Insert the Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (l_ps_rec.payment_schedule_id, 'REMITTANCE' , l_trx_rec.remittance_batch_id);
SELECT receivables_trx_id
INTO l_receivables_trx_id
FROM ar_adjustments
WHERE adjustment_id = l_adj_id;
| Updates the Payment Schedule of the BR |
| with the Adjustment Information |
+-----------------------------------------------*/
AR_BILLS_MAINTAIN_LIB_PVT.update_reserved_columns (l_ps_rec.payment_schedule_id, 'ADJUSTMENT', l_new_adj_id);
| Insert the Transaction History Record |
+-----------------------------------------------*/
-- Fetch the new status and new event of the BR
AR_BILLS_MAINTAIN_STATUS_PUB.New_Status_Event (
p_trx_rec => l_trx_rec ,
p_action => l_action ,
p_new_status => l_trh_rec.status,
p_new_event => l_trh_rec.event );
arp_proc_transaction_history.insert_transaction_history (l_trh_rec ,
l_trh_rec.transaction_history_id);
p_select_remit_flag => C_ACTION_REC.select_remit_flag ,
p_deselect_remit_flag => C_ACTION_REC.deselect_remit_flag,
p_approve_remit_flag => C_ACTION_REC.approve_remit_flag ,
p_hold_flag => C_ACTION_REC.hold_flag ,
p_unhold_flag => C_ACTION_REC.unhold_flag ,
p_recall_flag => C_ACTION_REC.recall_flag ,
p_eliminate_flag => C_ACTION_REC.eliminate_flag ,
p_uneliminate_flag => C_ACTION_REC.uneliminate_flag ,
p_unpaid_flag => C_ACTION_REC.unpaid_flag ,
p_protest_flag => C_ACTION_REC.protest_flag ,
p_endorse_flag => C_ACTION_REC.endorse_flag ,
p_restate_flag => C_ACTION_REC.restate_flag ,
p_exchange_flag => C_ACTION_REC.exchange_flag ,
p_delete_flag => C_ACTION_REC.delete_flag );
| Update the event of the new BR created |
+------------------------------------------------*/
l_trh_rec.customer_trx_id := p_new_customer_trx_id;
ARP_PROC_TRANSACTION_HISTORY.update_transaction_history (l_trh_rec,
l_trh_rec.transaction_history_id);