DBA Data[Home] [Help]

APPS.JAI_AR_MATCH_TAX_PKG dependencies on RA_CUST_TRX_LINE_GL_DIST_ALL

Line 490: in the RA_CUSTOIMER_TRX_LINES_ALL and RA_CUST_TRX_LINE_GL_DIST_ALL will be impacted

486: India Localization taxes and charges are inserted into RA_CUSTOIMER_TRX_LINES_ALL and
487: RA_CUST_LINES_GL_DIST_ALL, as Tax and Freight lines.Since India Localization directly updates
488: the above-mentioned tables, the accounting happens through the base AR accounting itself.
489: In R12, since the AR accounting will be handled through SLA IL tax lines that are inserted
490: in the RA_CUSTOIMER_TRX_LINES_ALL and RA_CUST_TRX_LINE_GL_DIST_ALL will be impacted
491: Fix:
492: IL should ensure the following while inserting into RA_CUST_LINES_GL_DIST_ALL table:
493: 1. The tax and freight lines that are inserted should be inserted before the associated base item lines
494: are posted to GL. This should be achieved by checking the Posting_Status by IL.

Line 548: procedure insert_trx_line_gl_dist to get stamped in the table ra_cust_trx_line_gl_dist_all

544: Fix: Modified the code in the process_from_order_line. added the cursor cur_event_id
545: to get the event id. This cursor would get called only in case of a credit memo having
546: accounting rules defined. This would provide the event id of the REC account class.
547: The tax entries also need to be latched to this event id. so passed this event id to the
548: procedure insert_trx_line_gl_dist to get stamped in the table ra_cust_trx_line_gl_dist_all
549: table.
550: 19 06-FEB-2009 JMEENA for bug#8232976
551: Created cursor c_get_context and to get the interface_header_context of the invoice and checked if it is PROJECT INVOICE.
552:

Line 1005: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all,

1001: END process_batch;
1002:
1003: ------------------------------------------------ ---------------------------------------
1004: --=========================================================================================--
1005: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all,
1006: --ar_receivable_applications_all
1007: --=========================================================================================--
1008:
1009: PROCEDURE maintain_mrc( p_customer_trx_id IN ra_customer_trx_all.customer_trx_id%TYPE,

Line 1016: ln_gl_dist_id ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE;

1012: p_process_status OUT NOCOPY VARCHAR2,
1013: p_process_message OUT NOCOPY VARCHAR2)
1014: IS
1015: lv_imported_trx VARCHAR2(10) := 'IMPORTED';
1016: ln_gl_dist_id ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE;
1017: lv_account_class_rec VARCHAR2(10) := 'REC';
1018:
1019:
1020: CURSOR c_proc_exists(cp_object_name user_procedures.object_name%type,

Line 1033: --get the cust_trx_line_gl_dist_id for the REC row from ra_cust_trx_line_gl_dist_all

1029: SELECT payment_schedule_id
1030: FROM ar_payment_schedules_all
1031: WHERE customer_trx_id = cp_customer_trx_id;
1032:
1033: --get the cust_trx_line_gl_dist_id for the REC row from ra_cust_trx_line_gl_dist_all
1034: CURSOR cur_gl_dist(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
1035: IS
1036: SELECT cust_trx_line_gl_dist_id
1037: FROM ra_cust_trx_line_gl_dist_all

Line 1037: FROM ra_cust_trx_line_gl_dist_all

1033: --get the cust_trx_line_gl_dist_id for the REC row from ra_cust_trx_line_gl_dist_all
1034: CURSOR cur_gl_dist(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
1035: IS
1036: SELECT cust_trx_line_gl_dist_id
1037: FROM ra_cust_trx_line_gl_dist_all
1038: WHERE customer_trx_id = cp_customer_trx_id
1039: AND account_class = lv_account_class_rec --'REC'
1040: AND latest_rec_flag = jai_constants.yes; --'Y';
1041:

Line 1052: --get the cust_trx_line_gl_dist_id for the REC row from ra_cust_trx_line_gl_dist_all

1048: BEGIN
1049: p_process_status := jai_constants.successful;
1050: p_process_message := NULL;
1051:
1052: --get the cust_trx_line_gl_dist_id for the REC row from ra_cust_trx_line_gl_dist_all
1053: open cur_gl_dist(p_customer_trx_id);
1054: fetch cur_gl_dist into ln_gl_dist_id;
1055: close cur_gl_dist;
1056:

Line 1065: --Update the mrc data for ra_cust_trx_line_gl_dist_all

1061: OPEN c_proc_exists(lv_object_name, lv_procedure_name) ;
1062: FETCH c_proc_exists INTO ln_exists ;
1063: CLOSE c_proc_exists ;
1064: IF ln_exists = 1 THEN
1065: --Update the mrc data for ra_cust_trx_line_gl_dist_all
1066: --This is done, irrespective of whether the transaction_type is CM or Invoice
1067: /* Commented for bug# 5219225
1068: ar_mrc_engine.maintain_mrc_data(
1069: p_event_mode => 'UPDATE',

Line 1412: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,

1408: p_process_status := jai_constants.unexpected_error;
1409: p_process_message := SUBSTR(SQLERRM,1,300);
1410: END maintain_schedules;
1411:
1412: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
1413: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
1414: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
1415: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,

Line 1413: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,

1409: p_process_message := SUBSTR(SQLERRM,1,300);
1410: END maintain_schedules;
1411:
1412: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
1413: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
1414: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
1415: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,

Line 1414: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,

1410: END maintain_schedules;
1411:
1412: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
1413: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
1414: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
1415: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,

Line 1415: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,

1411:
1412: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
1413: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
1414: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
1415: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,

Line 1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,

1412: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
1413: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
1414: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
1415: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,

Line 1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,

1413: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
1414: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
1415: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,

Line 1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,

1414: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
1415: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,

Line 1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,

1415: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,

Line 1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,

1416: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,

Line 1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,

1417: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,

Line 1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,

1418: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,

Line 1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,

1419: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
1427: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,

Line 1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,

1420: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
1427: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
1428: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,

Line 1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,

1421: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
1427: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
1428: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
1429: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,

Line 1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,

1422: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
1427: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
1428: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
1429: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
1430: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,

Line 1427: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,

1423: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
1427: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
1428: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
1429: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
1430: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,
1431: p_seq_id OUT NOCOPY NUMBER,

Line 1428: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,

1424: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
1427: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
1428: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
1429: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
1430: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,
1431: p_seq_id OUT NOCOPY NUMBER,
1432: p_process_status OUT NOCOPY VARCHAR2,

Line 1429: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,

1425: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
1427: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
1428: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
1429: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
1430: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,
1431: p_seq_id OUT NOCOPY NUMBER,
1432: p_process_status OUT NOCOPY VARCHAR2,
1433: p_process_message OUT NOCOPY VARCHAR2,

Line 1430: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,

1426: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
1427: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
1428: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
1429: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
1430: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,
1431: p_seq_id OUT NOCOPY NUMBER,
1432: p_process_status OUT NOCOPY VARCHAR2,
1433: p_process_message OUT NOCOPY VARCHAR2,
1434: p_event_id IN NUMBER DEFAULT NULL) --added for bug#7645588

Line 1454: ln_cust_trx_line_gl_dist_id ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE;

1450: lv_procedure_name user_procedures.procedure_name%type ;
1451: ln_exists NUMBER := 0 ;
1452: lv_sqlstmt VARCHAR2(2000);
1453:
1454: ln_cust_trx_line_gl_dist_id ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE;
1455: BEGIN
1456: p_process_status := jai_constants.successful;
1457: p_process_message := NULL;
1458:

Line 1466: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL(account_class,

1462: CLOSE cur_gl_seq;
1463:
1464:
1465:
1466: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL(account_class,
1467: account_set_flag,
1468: acctd_amount,
1469: amount,
1470: code_combination_id,

Line 1659: --get the sum of amount, acctd_amount and max of acctd_amount from ra_cust_trx_line_gl_dist_all for cp_customer_trx_id

1655: lv_sqlstmt VARCHAR2(2000) ;
1656: lv_account_class_tax VARCHAR2(10) := 'TAX';
1657: lv_account_class_freight VARCHAR2(10) := 'FREIGHT';
1658:
1659: --get the sum of amount, acctd_amount and max of acctd_amount from ra_cust_trx_line_gl_dist_all for cp_customer_trx_id
1660: --and account_class in ('TAX','FREIGHT')
1661: CURSOR cur_total_amt_gl_dist( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
1662: IS
1663: SELECT NVL(SUM(amount),0) amount,

Line 1666: FROM ra_cust_trx_line_gl_dist_all

1662: IS
1663: SELECT NVL(SUM(amount),0) amount,
1664: NVL(SUM(acctd_amount),0) acctd_amount,
1665: MAX(acctd_amount) max_acctd_amount
1666: FROM ra_cust_trx_line_gl_dist_all
1667: WHERE customer_trx_id = cp_customer_trx_id
1668: AND account_class IN (lv_account_class_tax,lv_account_class_freight);
1669:
1670: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id

Line 1702: --delete the mrc data from ra_cust_trx_line_gl_dist_all

1698: OPEN c_proc_exists(lv_object_name, lv_procedure_name) ;
1699: FETCH c_proc_exists INTO ln_exists ;
1700: CLOSE c_proc_exists ;
1701: IF ln_exists = 1 THEN
1702: --delete the mrc data from ra_cust_trx_line_gl_dist_all
1703: FOR rec_mrc IN
1704: ( SELECT cust_trx_line_gl_dist_id
1705: FROM ra_cust_trx_line_gl_dist_all
1706: WHERE customer_trx_id = p_customer_trx_id

Line 1705: FROM ra_cust_trx_line_gl_dist_all

1701: IF ln_exists = 1 THEN
1702: --delete the mrc data from ra_cust_trx_line_gl_dist_all
1703: FOR rec_mrc IN
1704: ( SELECT cust_trx_line_gl_dist_id
1705: FROM ra_cust_trx_line_gl_dist_all
1706: WHERE customer_trx_id = p_customer_trx_id
1707: AND account_class IN ('TAX','FREIGHT')
1708: AND customer_trx_line_id IN
1709: (SELECT customer_trx_line_id

Line 1731: --delete the data from ra_cust_trx_line_gl_dist_all

1727: END LOOP;
1728: END IF ;
1729: /* Ramananda for bug#5219225. END */
1730:
1731: --delete the data from ra_cust_trx_line_gl_dist_all
1732: DELETE ra_cust_trx_line_gl_dist_all
1733: WHERE customer_trx_id = p_customer_trx_id
1734: AND account_class IN ('TAX','FREIGHT')
1735: AND customer_trx_line_id IN

Line 1732: DELETE ra_cust_trx_line_gl_dist_all

1728: END IF ;
1729: /* Ramananda for bug#5219225. END */
1730:
1731: --delete the data from ra_cust_trx_line_gl_dist_all
1732: DELETE ra_cust_trx_line_gl_dist_all
1733: WHERE customer_trx_id = p_customer_trx_id
1734: AND account_class IN ('TAX','FREIGHT')
1735: AND customer_trx_line_id IN
1736: (SELECT customer_trx_line_id

Line 1772: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;

1768: lv_account_class_tax VARCHAR2(10) := 'TAX';
1769: lv_account_class_freight VARCHAR2(10) := 'FREIGHT';
1770: lv_loc_tax_code VARCHAR2(20) := 'Localization';
1771: lv_line_type_line VARCHAR2(10) := 'LINE';
1772: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;
1773: lv_account_class_rec VARCHAR2(10) := 'REC';
1774: l_xla_event arp_xla_events.xla_events_type;
1775: ln_gl_seq Number;
1776: imported_trx VARCHAR2(10) := 'IMPORTED';

Line 1825: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS

1821: AND line_type = cp_line_type;
1822:
1823:
1824:
1825: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
1826: SELECT gl_posted_date
1827: from RA_CUST_TRX_LINE_GL_DIST_ALL
1828: where customer_trx_line_id = p_customer_trx_line_id
1829: and account_class = 'REC'

Line 1827: from RA_CUST_TRX_LINE_GL_DIST_ALL

1823:
1824:
1825: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
1826: SELECT gl_posted_date
1827: from RA_CUST_TRX_LINE_GL_DIST_ALL
1828: where customer_trx_line_id = p_customer_trx_line_id
1829: and account_class = 'REC'
1830: and latest_rec_flag = 'Y';
1831:

Line 1847: --get the sum of amount, acctd_amount and max of acctd_amount from ra_cust_trx_line_gl_dist_all for cp_customer_trx_id

1843: FROM user_procedures
1844: WHERE object_name = cp_object_name
1845: AND procedure_name = cp_procedure_name ;
1846:
1847: --get the sum of amount, acctd_amount and max of acctd_amount from ra_cust_trx_line_gl_dist_all for cp_customer_trx_id
1848: --and account_class in ('TAX','FREIGHT')
1849:
1850: CURSOR cur_total_amt_gl_dist( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
1851: IS

Line 1855: FROM ra_cust_trx_line_gl_dist_all

1851: IS
1852: SELECT NVL(SUM(amount),0) amount,
1853: NVL(SUM(acctd_amount),0) acctd_amount,
1854: MAX(acctd_amount) max_acctd_amount
1855: FROM ra_cust_trx_line_gl_dist_all
1856: WHERE customer_trx_id = cp_customer_trx_id
1857: AND account_class IN (lv_account_class_tax,lv_account_class_freight);
1858:
1859: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id

Line 1879: --get the data from ra_cust_trx_line_gl_dist_all for customer_trx_id and account_class = 'REC'

1875: and NVL(inclusive_tax_flag,'N') = 'N'))
1876: ORDER BY link_to_cust_trx_line_id,
1877: customer_trx_line_id;
1878:
1879: --get the data from ra_cust_trx_line_gl_dist_all for customer_trx_id and account_class = 'REC'
1880: --CURSOR cur_gl_date(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE) --Comment by Chong.Lei for POT code port
1881: -- Added by Chong.Lei for POT code port begin
1882: CURSOR cur_gl_date(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE
1883: , cp_customer_trx_line_id ra_customer_trx_lines_all.customer_trx_line_id%TYPE)--Add by Xiao for POT change, reg bug#12533434

Line 1887: FROM ra_cust_trx_line_gl_dist_all

1883: , cp_customer_trx_line_id ra_customer_trx_lines_all.customer_trx_line_id%TYPE)--Add by Xiao for POT change, reg bug#12533434
1884: -- Added by Chong.Lei for POT code port end
1885: IS
1886: SELECT gl_date
1887: FROM ra_cust_trx_line_gl_dist_all
1888: WHERE customer_trx_id = cp_customer_trx_id
1889: --Commented by Chong.Lei for POT code port begin
1890: /*
1891: AND account_class = 'REC'

Line 1978: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo

1974: WHERE term_id = cp_term_id
1975: AND sequence_num = cp_sequence_num;
1976:
1977:
1978: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
1979: CURSOR cur_tot_amt_for_cms(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE,
1980: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)
1981: IS
1982: SELECT NVL(SUM(amount),0) amount

Line 1980: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)

1976:
1977:
1978: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
1979: CURSOR cur_tot_amt_for_cms(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE,
1980: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)
1981: IS
1982: SELECT NVL(SUM(amount),0) amount
1983: FROM ra_cust_trx_line_gl_dist_all
1984: WHERE customer_trx_id IN

Line 1983: FROM ra_cust_trx_line_gl_dist_all

1979: CURSOR cur_tot_amt_for_cms(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE,
1980: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)
1981: IS
1982: SELECT NVL(SUM(amount),0) amount
1983: FROM ra_cust_trx_line_gl_dist_all
1984: WHERE customer_trx_id IN
1985: (
1986: SELECT customer_trx_id
1987: FROM ar_receivable_applications_all

Line 2058: FROM ra_cust_trx_line_gl_dist_all

2054: --added the cursor for bug#7645588
2055: CURSOR cur_event_id (cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
2056: IS
2057: SELECT event_id
2058: FROM ra_cust_trx_line_gl_dist_all
2059: WHERE customer_trx_id = cp_customer_trx_id
2060: AND account_class = 'REC'
2061: AND latest_rec_flag = 'Y'
2062: AND account_set_flag = 'N' ;

Line 2147: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;

2143:
2144: ln_previous_customer_trx_id ra_customer_trx_lines_all.previous_customer_trx_id%TYPE;
2145: ln_inv_curr_conv_rate ra_customer_trx_all.exchange_rate%TYPE;
2146: ln_cm_curr_conv_rate ra_customer_trx_all.exchange_rate%TYPE;
2147: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;
2148: ln_vat_tax_id ar_vat_tax_all.vat_tax_id%TYPE;
2149: lv_amount_includes_tax_flag ar_vat_tax_all.amount_includes_tax_flag%TYPE;
2150: lv_account_Set_flag ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE;
2151: ln_precision fnd_currencies.precision%TYPE;

Line 2150: lv_account_Set_flag ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE;

2146: ln_cm_curr_conv_rate ra_customer_trx_all.exchange_rate%TYPE;
2147: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;
2148: ln_vat_tax_id ar_vat_tax_all.vat_tax_id%TYPE;
2149: lv_amount_includes_tax_flag ar_vat_tax_all.amount_includes_tax_flag%TYPE;
2150: lv_account_Set_flag ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE;
2151: ln_precision fnd_currencies.precision%TYPE;
2152: ln_accounting_rule_id NUMBER;
2153: ln_old_amount NUMBER;
2154: ln_taxable_amount NUMBER;

Line 2257: --This procedure deletes the data from ra_cust_trx_line_gl_dist_all, ra_customer_trx_lines_all

2253: IF p_debug = 'Y' THEN
2254: fnd_file.put_line(FND_FILE.LOG, 'Before delete_trx_data');
2255: END IF;
2256:
2257: --This procedure deletes the data from ra_cust_trx_line_gl_dist_all, ra_customer_trx_lines_all
2258: --Also deletes the MRC data from ra_cust_trx_line_gl_dist
2259: delete_trx_data(p_customer_trx_id => p_customer_trx_id,
2260: p_process_status => lv_process_status,
2261: p_process_message => lv_process_message);

Line 2275: --get the data from ra_cust_trx_line_gl_dist_all for customer_trx_id and account_class = 'REC'

2271: END IF;
2272:
2273: --Commented by Chong.Lei for POT code port begin
2274: /*
2275: --get the data from ra_cust_trx_line_gl_dist_all for customer_trx_id and account_class = 'REC'
2276: OPEN cur_gl_date(p_customer_trx_id);
2277: FETCH cur_gl_date INTO ld_gl_date;
2278: CLOSE cur_gl_date;
2279: */

Line 2336: --get the data from ra_cust_trx_line_gl_dist_all for customer_trx_id and account_class = 'REV'

2332:
2333: -- Added by Chong.Lei for POT code port begin
2334: --Add by Xiao for POT change, reg bug#12533434 on 10-May-2011, begin
2335: ------------------------------------------------------------------------------------
2336: --get the data from ra_cust_trx_line_gl_dist_all for customer_trx_id and account_class = 'REV'
2337: OPEN cur_gl_date(p_customer_trx_id, rec_temp.link_to_cust_trx_line_id);
2338: FETCH cur_gl_date INTO ld_gl_date;
2339: CLOSE cur_gl_date;
2340: ------------------------------------------------------------------------------------

Line 2419: --This procedure inserts the data into ra_cust_trx_line_gl_dist_all

2415: fnd_file.put_line(FND_FILE.LOG, 'In loop cur_temp_lines_insert - before insert_trx_line_gl_dist');
2416: END IF;
2417:
2418:
2419: --This procedure inserts the data into ra_cust_trx_line_gl_dist_all
2420: insert_trx_line_gl_dist(p_account_class => rec_temp.line_type,
2421: p_account_set_flag => lv_account_set_flag,
2422: p_acctd_amount => ROUND(rec_temp.acctd_amount, ln_precision),
2423: p_amount => rec_temp.amount,

Line 2493: --get the sum of amount, acctd_amount and max of acctd_amount from ra_cust_trx_line_gl_dist_all for cp_customer_trx_id

2489: ln_taxable_amount; --this variable is not being used
2490: CLOSE cur_total_amt_trx_lines;
2491:
2492:
2493: --get the sum of amount, acctd_amount and max of acctd_amount from ra_cust_trx_line_gl_dist_all for cp_customer_trx_id
2494: --and account_class in ('TAX','FREIGHT')
2495: OPEN cur_total_amt_gl_dist(p_customer_trx_id);
2496: FETCH cur_total_amt_gl_dist INTO ln_tax_amt,
2497: ln_tax_acctd_amount,

Line 2512: UPDATE ra_cust_trx_line_gl_dist_all

2508:
2509: /* Modified for bug#5495711
2510: || acctd_amount = ROUND( (ln_old_acctd_amount + ln_tax_acctd_amount + ln_diff_tax_frt), ln_precision)
2511: */
2512: UPDATE ra_cust_trx_line_gl_dist_all
2513: SET amount = ln_old_amount + ln_tax_amt,
2514: acctd_amount = ROUND( (ln_old_acctd_amount + ln_tax_acctd_amount ), ln_precision)
2515: WHERE customer_trx_id = p_customer_trx_id
2516: AND account_class = lv_account_class_rec --'REC'

Line 2719: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo

2715: OPEN cur_term_details(rec_inv_payment_schedule.term_id);
2716: FETCH cur_term_details INTO rec_term_details;
2717: CLOSE cur_term_details;
2718:
2719: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
2720: OPEN cur_tot_amt_for_cms(ln_previous_customer_trx_id,
2721: lv_account_class_tax);
2722: FETCH cur_tot_amt_for_cms INTO ln_tax_amt_cms;
2723: CLOSE cur_tot_amt_for_cms;

Line 2725: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo

2721: lv_account_class_tax);
2722: FETCH cur_tot_amt_for_cms INTO ln_tax_amt_cms;
2723: CLOSE cur_tot_amt_for_cms;
2724:
2725: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
2726: OPEN cur_tot_amt_for_cms(ln_previous_customer_trx_id,
2727: lv_account_class_freight);
2728: FETCH cur_tot_amt_for_cms INTO ln_frt_amt_cms;
2729: CLOSE cur_tot_amt_for_cms;

Line 3159: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all, ar_receivable_applications_all

3155: END LOOP; --End cursor rec_payment
3156: END IF;
3157:
3158:
3159: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all, ar_receivable_applications_all
3160: maintain_mrc( p_customer_trx_id => p_customer_trx_id,
3161: p_previous_cust_trx_id => ln_previous_customer_trx_id,
3162: p_called_from => 7/13/2007,
3163: p_process_status => lv_process_status,

Line 3270: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS

3266: order by CUSTOMER_TRX_LINE_ID;
3267:
3268:
3269: /* Added by Ramananda for bug#4468353 due to SLA uptake by AR */
3270: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
3271: SELECT gl_posted_date
3272: from RA_CUST_TRX_LINE_GL_DIST_ALL
3273: where customer_trx_line_id = p_customer_trx_line_id
3274: and account_class = 'REC'

Line 3272: from RA_CUST_TRX_LINE_GL_DIST_ALL

3268:
3269: /* Added by Ramananda for bug#4468353 due to SLA uptake by AR */
3270: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
3271: SELECT gl_posted_date
3272: from RA_CUST_TRX_LINE_GL_DIST_ALL
3273: where customer_trx_line_id = p_customer_trx_line_id
3274: and account_class = 'REC'
3275: and latest_rec_flag = 'Y';
3276:

Line 3277: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;

3273: where customer_trx_line_id = p_customer_trx_line_id
3274: and account_class = 'REC'
3275: and latest_rec_flag = 'Y';
3276:
3277: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;
3278: /*Bug 11936630*/
3279: CURSOR GL_DATE_CUR IS
3280: SELECT DISTINCT gl_date
3281: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

Line 3281: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

3277: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;
3278: /*Bug 11936630*/
3279: CURSOR GL_DATE_CUR IS
3280: SELECT DISTINCT gl_date
3281: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
3282: WHERE CUSTOMER_TRX_LINE_ID IN (SELECT LINK_TO_CUST_TRX_LINE_ID FROM JAI_AR_TRX_INS_LINES_T jatilt
3283: WHERE customer_trx_id = P_CUSTOMER_TRX_ID
3284: AND EXISTS (select '1'
3285: from JAI_AR_TRX_TAX_LINES jattl

Line 3316: FROM RA_CUST_TRX_LINE_GL_DIST_ALL A, RA_CUSTOMER_TRX_LINES_ALL B, JAI_AR_TRX_INS_LINES_T C

3312: and NVL(inclusive_tax_flag,'N') = 'N'));
3313: /*Bug 11936630*/
3314: CURSOR PREVIOUS_AMOUNT_CUR IS
3315: SELECT A.AMOUNT , A.ACCTD_AMOUNT
3316: FROM RA_CUST_TRX_LINE_GL_DIST_ALL A, RA_CUSTOMER_TRX_LINES_ALL B, JAI_AR_TRX_INS_LINES_T C
3317: WHERE A.CUSTOMER_TRX_LINE_ID = B.CUSTOMER_TRX_LINE_ID
3318: AND B.LINK_TO_CUST_TRX_LINE_ID = C.LINK_TO_CUST_TRX_LINE_ID
3319: AND C.CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID
3320: AND A.ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class)

Line 3483: from ra_cust_trx_line_gl_dist_all

3479: -- declaration for mrc starts here bug # 3326394
3480:
3481: cursor c_gl_dist_cur is
3482: select cust_trx_line_gl_dist_id
3483: from ra_cust_trx_line_gl_dist_all
3484: where customer_trx_id = p_customer_trx_id
3485: and account_class = lv_acc_class_rec --rchandan for bug#4428980
3486: and latest_rec_flag = 'Y';
3487:

Line 3523: FROM ra_cust_trx_line_gl_dist_all

3519: CURSOR cur_total_amt_gl_dist( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
3520: IS
3521: SELECT NVL(SUM(amount),0) amount,
3522: NVL(SUM(acctd_amount),0) acctd_amount
3523: FROM ra_cust_trx_line_gl_dist_all
3524: WHERE customer_trx_id = cp_customer_trx_id
3525: AND account_class IN (lv_account_class_tax,lv_account_class_freight);
3526:
3527:

Line 3572: tables ra_customer_trx_lines_all ,ra_cust_trx_line_gl_dist_all.

3568: 3 2002/03/22 RPK : for BUG#2285636
3569:
3570: Code modified to rollback the entire transactions if a transaction
3571: is failed.That is, the tax lines will be inserted all or none in the
3572: tables ra_customer_trx_lines_all ,ra_cust_trx_line_gl_dist_all.
3573: Also,whenever any record got errored out,then the corresponding invoice
3574: taxes will not be processed to the base table itself and that record will
3575: be updated to 'R'(column error_flag).
3576:

Line 3762: UPDATE ra_cust_trx_line_gl_dist_all

3758:
3759: /* Modified for bug#5495711
3760: || acctd_amount = ROUND( (ln_old_acctd_amount + ln_tax_acctd_amount + ln_diff_tax_frt), ln_precision)
3761: */
3762: UPDATE ra_cust_trx_line_gl_dist_all
3763: SET amount = ln_old_amount + ln_tax_amt,
3764: acctd_amount = ROUND( ( ln_old_amount *ln_exchange_rate + ln_tax_acctd_amount ), ln_precision)
3765: WHERE customer_trx_id = p_customer_trx_id
3766: AND account_class = lv_account_class_rec --'REC'

Line 3773: SELECT NVL(SUM(AMOUNT),0) INTO V_sum_amt FROM RA_CUST_TRX_LINE_GL_DIST_ALL WHERE

3769: end if;
3770: --end addtiions for bug#9177024
3771:
3772:
3773: SELECT NVL(SUM(AMOUNT),0) INTO V_sum_amt FROM RA_CUST_TRX_LINE_GL_DIST_ALL WHERE
3774: ACCOUNT_CLASS = lv_acc_class_rev AND CUSTOMER_TRX_ID=P_CUSTOMER_TRX_ID; --added on 22-Mar-2002 to get the revenue amount for the invoice
3775: v_sql_num :=10;
3776:
3777: OPEN COUNT_CUR;

Line 3799: -- column in the ra_cust_trx_line_gl_dist_all table. -- bug # 2784431

3795:
3796: -- the following select statement commented and using the next one instead
3797: -- because this is wrong.We need to compare the ra_customer_trx_lines_all table
3798: -- with the link_to_cust_trx_line_id column instead of based on the customer_trx_line_id
3799: -- column in the ra_cust_trx_line_gl_dist_all table. -- bug # 2784431
3800:
3801: /*
3802: SELECT COUNT(Customer_trx_line_id) INTO v_rec_ctr FROM ra_cust_trx_line_gl_dist_all
3803: WHERE customer_trx_line_id = P_LINK_LINE_ID

Line 3802: SELECT COUNT(Customer_trx_line_id) INTO v_rec_ctr FROM ra_cust_trx_line_gl_dist_all

3798: -- with the link_to_cust_trx_line_id column instead of based on the customer_trx_line_id
3799: -- column in the ra_cust_trx_line_gl_dist_all table. -- bug # 2784431
3800:
3801: /*
3802: SELECT COUNT(Customer_trx_line_id) INTO v_rec_ctr FROM ra_cust_trx_line_gl_dist_all
3803: WHERE customer_trx_line_id = P_LINK_LINE_ID
3804: AND Account_class IN ('TAX','FREIGHT'); --Added on 09-Apr-2002 For the BUG#2303830
3805: */
3806:

Line 3817: DELETE RA_CUST_TRX_LINE_GL_DIST_ALL

3813: IF v_rec_ctr > 0 THEN --Added on 09-Apr-2002 for the BUG#2303830
3814:
3815: v_sql_num :=14;
3816:
3817: DELETE RA_CUST_TRX_LINE_GL_DIST_ALL
3818: WHERE CUSTOMER_TRX_LINE_ID IN (SELECT CUSTOMER_TRX_LINE_ID
3819: FROM RA_CUSTOMER_TRX_LINES_ALL
3820: WHERE LINK_TO_CUST_TRX_LINE_ID = LINK_REC.LINK_TO_CUST_TRX_LINE_ID)
3821: AND ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class); --rchandan for bug#4428980

Line 3828: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

3824:
3825: for mrc_rec in
3826: (
3827: SELECT CUST_TRX_LINE_GL_DIST_ID
3828: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
3829: WHERE CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID
3830: AND ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class) --rchandan for bug#4428980
3831: AND CUSTOMER_TRX_LINE_ID
3832: IN

Line 3856: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

3852: WHERE CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID
3853: AND CUST_TRX_LINE_GL_DIST_ID IN
3854: (
3855: SELECT CUST_TRX_LINE_GL_DIST_ID
3856: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
3857: WHERE CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID
3858: AND ACCOUNT_CLASS IN ('TAX','FREIGHT')
3859: AND CUSTOMER_TRX_LINE_ID
3860: IN

Line 4021: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL(account_class,

4017: 'N',
4018: v_vat_tax_id);
4019: v_sql_num :=24;
4020:
4021: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL(account_class,
4022: account_set_flag,
4023: acctd_amount,
4024: amount,
4025: code_combination_id,

Line 4101: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL

4097: LAST_UPDATE_LOGIN = TEMP_REC.LAST_UPDATE_LOGIN
4098: WHERE CUSTOMER_TRX_LINE_ID = TEMP_REC.CUSTOMER_TRX_LINE_ID;
4099: v_sql_num :=26;
4100:
4101: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL
4102: SET ACCTD_AMOUNT = TEMP_REC.ACCTD_AMOUNT,
4103: AMOUNT = TEMP_REC.EXTENDED_AMOUNT,
4104: LAST_UPDATE_DATE = TEMP_REC.LAST_UPDATE_DATE,
4105: LAST_UPDATED_BY = TEMP_REC.LAST_UPDATED_BY,

Line 4130: From RA_CUST_TRX_LINE_GL_DIST_ALL

4126:
4127: v_sql_num :=28;
4128:
4129: Select SUM(amount),SUM(acctd_amount) into v_old_amount,v_old_acctd_amount --Added this stmt for the above stmt
4130: From RA_CUST_TRX_LINE_GL_DIST_ALL
4131: Where customer_trx_id = P_CUSTOMER_TRX_ID
4132: AND ACCOUNT_CLASS = lv_acc_class_rev; --rchandan for bug#4428980
4133: v_sql_num :=29;
4134:

Line 4136: From RA_CUST_TRX_LINE_GL_DIST_ALL

4132: AND ACCOUNT_CLASS = lv_acc_class_rev; --rchandan for bug#4428980
4133: v_sql_num :=29;
4134:
4135: Select SUM(amount) INTO v_tax_amt
4136: From RA_CUST_TRX_LINE_GL_DIST_ALL
4137: Where customer_trx_id = P_CUSTOMER_TRX_ID
4138: AND ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class); --rchandan for bug#4428980
4139: v_sql_num :=30;
4140:

Line 4141: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL

4137: Where customer_trx_id = P_CUSTOMER_TRX_ID
4138: AND ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class); --rchandan for bug#4428980
4139: v_sql_num :=30;
4140:
4141: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL
4142: SET AMOUNT = NVL(v_old_amount,0) + NVL(v_tax_amt,0),
4143: ACCTD_AMOUNT = NVL(v_old_acctd_amount,0) + NVL(v_tax_amt,0)
4144: WHERE CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID AND
4145: ACCOUNT_CLASS = lv_acc_class_rec; --rchandan for bug#4428980

Line 4266: FROM ra_cust_trx_line_gl_dist_all

4262: ELSIF v_return_reference_type_code in ('Invoice India','Sales Order India')
4263: and v_credit_invoice_line_id IS NOT NULL THEN
4264:
4265: Select sum(amount) INTO v_tax_amount1
4266: FROM ra_cust_trx_line_gl_dist_all
4267: Where customer_trx_id = p_customer_trx_id
4268: And Account_class = lv_tax_const; --rchandan for bug#4428980
4269:
4270: Select sum(amount) INTO v_freight_amount1

Line 4271: FROM ra_cust_trx_line_gl_dist_all

4267: Where customer_trx_id = p_customer_trx_id
4268: And Account_class = lv_tax_const; --rchandan for bug#4428980
4269:
4270: Select sum(amount) INTO v_freight_amount1
4271: FROM ra_cust_trx_line_gl_dist_all
4272: Where customer_trx_id = p_customer_trx_id
4273: And Account_class = lv_freight_acc_class; --rchandan for bug#4428980
4274:
4275: SELECT SUM(AMOUNT) INTO v_tot_amount

Line 4276: FROM ra_cust_trx_line_gl_dist_all

4272: Where customer_trx_id = p_customer_trx_id
4273: And Account_class = lv_freight_acc_class; --rchandan for bug#4428980
4274:
4275: SELECT SUM(AMOUNT) INTO v_tot_amount
4276: FROM ra_cust_trx_line_gl_dist_all
4277: WHERE customer_trx_id = p_customer_trx_id
4278: AND account_class = lv_acc_class_rec; --rchandan for bug#4428980
4279:
4280:

Line 4572: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

4568: --Added by Chong.Lei for POT code port begin
4569: ------------------------------------------------------------------------------------
4570: --Modified by Xiao for POT changes, reg bug#12533434
4571: SELECT gl_date
4572: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
4573: WHERE customer_trx_id = pn_customer_trx_id
4574: AND account_class = 'REV'
4575: AND ROWNUM = 1;
4576: --Modified by Xiao for POT changes, reg bug#12533434

Line 4668: ln_set_of_books_id ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE;

4664: ln_inv_org_id jai_ar_trxs.organization_id%TYPE;
4665: ln_inv_loc_id jai_ar_trxs.location_id%TYPE; --11652823
4666: lv_inv_org_code mtl_parameters.organization_code%TYPE;
4667: ln_rec_account_id ra_cust_trx_types_all.gl_id_rec%TYPE;
4668: ln_set_of_books_id ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE;
4669: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;
4670: ln_tax_account_id NUMBER;
4671: ln_total_inclu_tax_amt NUMBER;
4672: exception_error EXCEPTION;

Line 4669: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;

4665: ln_inv_loc_id jai_ar_trxs.location_id%TYPE; --11652823
4666: lv_inv_org_code mtl_parameters.organization_code%TYPE;
4667: ln_rec_account_id ra_cust_trx_types_all.gl_id_rec%TYPE;
4668: ln_set_of_books_id ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE;
4669: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;
4670: ln_tax_account_id NUMBER;
4671: ln_total_inclu_tax_amt NUMBER;
4672: exception_error EXCEPTION;
4673:

Line 4705: from ra_cust_trx_line_gl_dist_all

4701:
4702: /*start additions by vkaranam for bug#9461197*/
4703: cursor c_rev_acc is
4704: select code_combination_id
4705: from ra_cust_trx_line_gl_dist_all
4706: where customer_trx_id = pn_customer_trx_id
4707: and account_class = lv_acc_class_rev;
4708:
4709:

Line 4984: FROM ra_cust_trx_line_gl_dist_all

4980: , gl_date
4981: INTO
4982: ln_set_of_books_id
4983: , ld_gl_date
4984: FROM ra_cust_trx_line_gl_dist_all
4985: WHERE customer_trx_id = pn_customer_trx_id
4986: AND rownum = 1;
4987:
4988: EXCEPTION