DBA Data[Home] [Help]

APPS.JAI_AR_MATCH_TAX_PKG dependencies on RA_CUST_TRX_LINE_GL_DIST_ALL

Line 164: in the RA_CUSTOIMER_TRX_LINES_ALL and RA_CUST_TRX_LINE_GL_DIST_ALL will be impacted

160: India Localization taxes and charges are inserted into RA_CUSTOIMER_TRX_LINES_ALL and
161: RA_CUST_LINES_GL_DIST_ALL, as Tax and Freight lines.Since India Localization directly updates
162: the above-mentioned tables, the accounting happens through the base AR accounting itself.
163: In R12, since the AR accounting will be handled through SLA IL tax lines that are inserted
164: in the RA_CUSTOIMER_TRX_LINES_ALL and RA_CUST_TRX_LINE_GL_DIST_ALL will be impacted
165: Fix:
166: IL should ensure the following while inserting into RA_CUST_LINES_GL_DIST_ALL table:
167: 1. The tax and freight lines that are inserted should be inserted before the associated base item lines
168: are posted to GL. This should be achieved by checking the Posting_Status by IL.

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

218: Fix: Modified the code in the process_from_order_line. added the cursor cur_event_id
219: to get the event id. This cursor would get called only in case of a credit memo having
220: accounting rules defined. This would provide the event id of the REC account class.
221: The tax entries also need to be latched to this event id. so passed this event id to the
222: procedure insert_trx_line_gl_dist to get stamped in the table ra_cust_trx_line_gl_dist_all
223: table.
224: 19 06-FEB-2009 JMEENA for bug#8232976
225: Created cursor c_get_context and to get the interface_header_context of the invoice and checked if it is PROJECT INVOICE.
226: Future Dependencies For the release Of this Object:-

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

439: END process_batch;
440:
441: ------------------------------------------------ ---------------------------------------
442: --=========================================================================================--
443: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all,
444: --ar_receivable_applications_all
445: --=========================================================================================--
446:
447: PROCEDURE maintain_mrc( p_customer_trx_id IN ra_customer_trx_all.customer_trx_id%TYPE,

Line 454: ln_gl_dist_id ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE;

450: p_process_status OUT NOCOPY VARCHAR2,
451: p_process_message OUT NOCOPY VARCHAR2)
452: IS
453: lv_imported_trx VARCHAR2(10) := 'IMPORTED';
454: ln_gl_dist_id ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE;
455: lv_account_class_rec VARCHAR2(10) := 'REC';
456:
457:
458: CURSOR c_proc_exists(cp_object_name user_procedures.object_name%type,

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

467: SELECT payment_schedule_id
468: FROM ar_payment_schedules_all
469: WHERE customer_trx_id = cp_customer_trx_id;
470:
471: --get the cust_trx_line_gl_dist_id for the REC row from ra_cust_trx_line_gl_dist_all
472: CURSOR cur_gl_dist(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
473: IS
474: SELECT cust_trx_line_gl_dist_id
475: FROM ra_cust_trx_line_gl_dist_all

Line 475: FROM ra_cust_trx_line_gl_dist_all

471: --get the cust_trx_line_gl_dist_id for the REC row from ra_cust_trx_line_gl_dist_all
472: CURSOR cur_gl_dist(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
473: IS
474: SELECT cust_trx_line_gl_dist_id
475: FROM ra_cust_trx_line_gl_dist_all
476: WHERE customer_trx_id = cp_customer_trx_id
477: AND account_class = lv_account_class_rec --'REC'
478: AND latest_rec_flag = jai_constants.yes; --'Y';
479:

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

486: BEGIN
487: p_process_status := jai_constants.successful;
488: p_process_message := NULL;
489:
490: --get the cust_trx_line_gl_dist_id for the REC row from ra_cust_trx_line_gl_dist_all
491: open cur_gl_dist(p_customer_trx_id);
492: fetch cur_gl_dist into ln_gl_dist_id;
493: close cur_gl_dist;
494:

Line 503: --Update the mrc data for ra_cust_trx_line_gl_dist_all

499: OPEN c_proc_exists(lv_object_name, lv_procedure_name) ;
500: FETCH c_proc_exists INTO ln_exists ;
501: CLOSE c_proc_exists ;
502: IF ln_exists = 1 THEN
503: --Update the mrc data for ra_cust_trx_line_gl_dist_all
504: --This is done, irrespective of whether the transaction_type is CM or Invoice
505: /* Commented for bug# 5219225
506: ar_mrc_engine.maintain_mrc_data(
507: p_event_mode => 'UPDATE',

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

846: p_process_status := jai_constants.unexpected_error;
847: p_process_message := SUBSTR(SQLERRM,1,300);
848: END maintain_schedules;
849:
850: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
851: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
852: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
853: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,

Line 851: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,

847: p_process_message := SUBSTR(SQLERRM,1,300);
848: END maintain_schedules;
849:
850: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
851: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
852: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
853: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,

Line 852: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,

848: END maintain_schedules;
849:
850: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
851: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
852: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
853: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,

Line 853: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,

849:
850: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
851: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
852: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
853: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,

Line 854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,

850: PROCEDURE insert_trx_line_gl_dist(p_account_class IN ra_cust_trx_line_gl_dist_all.account_class%TYPE,
851: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
852: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
853: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,

Line 855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,

851: p_account_set_flag IN ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE,
852: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
853: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,

Line 856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,

852: p_acctd_amount IN ra_cust_trx_line_gl_dist_all.acctd_amount%TYPE,
853: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,

Line 857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,

853: p_amount IN ra_cust_trx_line_gl_dist_all.amount%TYPE,
854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,

Line 858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,

854: p_code_combination_id IN ra_cust_trx_line_gl_dist_all.code_combination_id%TYPE,
855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,

Line 859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,

855: p_cust_trx_line_gl_dist_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE,
856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,

Line 860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,

856: p_cust_trx_line_salesrep_id IN ra_cust_trx_line_gl_dist_all.cust_trx_line_salesrep_id%TYPE,
857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,

Line 861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,

857: p_customer_trx_id IN ra_cust_trx_line_gl_dist_all.customer_trx_id%TYPE,
858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
865: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,

Line 862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,

858: p_customer_trx_line_id IN ra_cust_trx_line_gl_dist_all.customer_trx_line_id%TYPE,
859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
865: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
866: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,

Line 863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,

859: p_gl_date IN ra_cust_trx_line_gl_dist_all.gl_date%TYPE,
860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
865: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
866: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
867: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,

Line 864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,

860: p_last_update_date IN ra_cust_trx_line_gl_dist_all.last_update_date%TYPE,
861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
865: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
866: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
867: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
868: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,

Line 865: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,

861: p_last_updated_by IN ra_cust_trx_line_gl_dist_all.last_updated_by%TYPE,
862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
865: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
866: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
867: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
868: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,
869: p_seq_id OUT NOCOPY NUMBER,

Line 866: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,

862: p_creation_date IN ra_cust_trx_line_gl_dist_all.creation_date%TYPE,
863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
865: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
866: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
867: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
868: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,
869: p_seq_id OUT NOCOPY NUMBER,
870: p_process_status OUT NOCOPY VARCHAR2,

Line 867: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,

863: p_created_by IN ra_cust_trx_line_gl_dist_all.created_by%TYPE,
864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
865: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
866: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
867: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
868: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,
869: p_seq_id OUT NOCOPY NUMBER,
870: p_process_status OUT NOCOPY VARCHAR2,
871: p_process_message OUT NOCOPY VARCHAR2,

Line 868: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,

864: p_last_update_login IN ra_cust_trx_line_gl_dist_all.last_update_login%TYPE,
865: p_org_id IN ra_cust_trx_line_gl_dist_all.org_id%TYPE,
866: p_percent IN ra_cust_trx_line_gl_dist_all.percent%TYPE,
867: p_posting_control_id IN ra_cust_trx_line_gl_dist_all.posting_control_id%TYPE,
868: p_set_of_books_id IN ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE,
869: p_seq_id OUT NOCOPY NUMBER,
870: p_process_status OUT NOCOPY VARCHAR2,
871: p_process_message OUT NOCOPY VARCHAR2,
872: p_event_id IN NUMBER DEFAULT NULL) --added for bug#7645588

Line 892: ln_cust_trx_line_gl_dist_id ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE;

888: lv_procedure_name user_procedures.procedure_name%type ;
889: ln_exists NUMBER := 0 ;
890: lv_sqlstmt VARCHAR2(2000);
891:
892: ln_cust_trx_line_gl_dist_id ra_cust_trx_line_gl_dist_all.cust_trx_line_gl_dist_id%TYPE;
893: BEGIN
894: p_process_status := jai_constants.successful;
895: p_process_message := NULL;
896:

Line 904: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL(account_class,

900: CLOSE cur_gl_seq;
901:
902:
903:
904: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL(account_class,
905: account_set_flag,
906: acctd_amount,
907: amount,
908: code_combination_id,

Line 1058: --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

1054: lv_sqlstmt VARCHAR2(2000) ;
1055: lv_account_class_tax VARCHAR2(10) := 'TAX';
1056: lv_account_class_freight VARCHAR2(10) := 'FREIGHT';
1057:
1058: --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
1059: --and account_class in ('TAX','FREIGHT')
1060: CURSOR cur_total_amt_gl_dist( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
1061: IS
1062: SELECT NVL(SUM(amount),0) amount,

Line 1065: FROM ra_cust_trx_line_gl_dist_all

1061: IS
1062: SELECT NVL(SUM(amount),0) amount,
1063: NVL(SUM(acctd_amount),0) acctd_amount,
1064: MAX(acctd_amount) max_acctd_amount
1065: FROM ra_cust_trx_line_gl_dist_all
1066: WHERE customer_trx_id = cp_customer_trx_id
1067: AND account_class IN (lv_account_class_tax,lv_account_class_freight);
1068:
1069: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id

Line 1101: --delete the mrc data from ra_cust_trx_line_gl_dist_all

1097: OPEN c_proc_exists(lv_object_name, lv_procedure_name) ;
1098: FETCH c_proc_exists INTO ln_exists ;
1099: CLOSE c_proc_exists ;
1100: IF ln_exists = 1 THEN
1101: --delete the mrc data from ra_cust_trx_line_gl_dist_all
1102: FOR rec_mrc IN
1103: ( SELECT cust_trx_line_gl_dist_id
1104: FROM ra_cust_trx_line_gl_dist_all
1105: WHERE customer_trx_id = p_customer_trx_id

Line 1104: FROM ra_cust_trx_line_gl_dist_all

1100: IF ln_exists = 1 THEN
1101: --delete the mrc data from ra_cust_trx_line_gl_dist_all
1102: FOR rec_mrc IN
1103: ( SELECT cust_trx_line_gl_dist_id
1104: FROM ra_cust_trx_line_gl_dist_all
1105: WHERE customer_trx_id = p_customer_trx_id
1106: AND account_class IN ('TAX','FREIGHT')
1107: AND customer_trx_line_id IN
1108: (SELECT customer_trx_line_id

Line 1130: --delete the data from ra_cust_trx_line_gl_dist_all

1126: END LOOP;
1127: END IF ;
1128: /* Ramananda for bug#5219225. END */
1129:
1130: --delete the data from ra_cust_trx_line_gl_dist_all
1131: DELETE ra_cust_trx_line_gl_dist_all
1132: WHERE customer_trx_id = p_customer_trx_id
1133: AND account_class IN ('TAX','FREIGHT')
1134: AND customer_trx_line_id IN

Line 1131: DELETE ra_cust_trx_line_gl_dist_all

1127: END IF ;
1128: /* Ramananda for bug#5219225. END */
1129:
1130: --delete the data from ra_cust_trx_line_gl_dist_all
1131: DELETE ra_cust_trx_line_gl_dist_all
1132: WHERE customer_trx_id = p_customer_trx_id
1133: AND account_class IN ('TAX','FREIGHT')
1134: AND customer_trx_line_id IN
1135: (SELECT customer_trx_line_id

Line 1171: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;

1167: lv_account_class_tax VARCHAR2(10) := 'TAX';
1168: lv_account_class_freight VARCHAR2(10) := 'FREIGHT';
1169: lv_loc_tax_code VARCHAR2(20) := 'Localization';
1170: lv_line_type_line VARCHAR2(10) := 'LINE';
1171: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;
1172: lv_account_class_rec VARCHAR2(10) := 'REC';
1173: l_xla_event arp_xla_events.xla_events_type;
1174: ln_gl_seq Number;
1175: imported_trx VARCHAR2(10) := 'IMPORTED';

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

1220: AND line_type = cp_line_type;
1221:
1222:
1223:
1224: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
1225: SELECT gl_posted_date
1226: from RA_CUST_TRX_LINE_GL_DIST_ALL
1227: where customer_trx_line_id = p_customer_trx_line_id
1228: and account_class = 'REC'

Line 1226: from RA_CUST_TRX_LINE_GL_DIST_ALL

1222:
1223:
1224: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
1225: SELECT gl_posted_date
1226: from RA_CUST_TRX_LINE_GL_DIST_ALL
1227: where customer_trx_line_id = p_customer_trx_line_id
1228: and account_class = 'REC'
1229: and latest_rec_flag = 'Y';
1230:

Line 1246: --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

1242: FROM user_procedures
1243: WHERE object_name = cp_object_name
1244: AND procedure_name = cp_procedure_name ;
1245:
1246: --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
1247: --and account_class in ('TAX','FREIGHT')
1248:
1249: CURSOR cur_total_amt_gl_dist( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
1250: IS

Line 1254: FROM ra_cust_trx_line_gl_dist_all

1250: IS
1251: SELECT NVL(SUM(amount),0) amount,
1252: NVL(SUM(acctd_amount),0) acctd_amount,
1253: MAX(acctd_amount) max_acctd_amount
1254: FROM ra_cust_trx_line_gl_dist_all
1255: WHERE customer_trx_id = cp_customer_trx_id
1256: AND account_class IN (lv_account_class_tax,lv_account_class_freight);
1257:
1258: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id

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

1265: AND link_to_cust_trx_line_id = NVL(cp_link_to_cust_trx_line_id, link_to_cust_trx_line_id)
1266: ORDER BY link_to_cust_trx_line_id,
1267: customer_trx_line_id;
1268:
1269: --get the data from ra_cust_trx_line_gl_dist_all for customer_trx_id and account_class = 'REC'
1270: CURSOR cur_gl_date(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
1271: IS
1272: SELECT gl_date
1273: FROM ra_cust_trx_line_gl_dist_all

Line 1273: FROM ra_cust_trx_line_gl_dist_all

1269: --get the data from ra_cust_trx_line_gl_dist_all for customer_trx_id and account_class = 'REC'
1270: CURSOR cur_gl_date(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
1271: IS
1272: SELECT gl_date
1273: FROM ra_cust_trx_line_gl_dist_all
1274: WHERE customer_trx_id = cp_customer_trx_id
1275: AND account_class = 'REC'
1276: AND latest_rec_flag = 'Y';
1277:

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

1352: WHERE term_id = cp_term_id
1353: AND sequence_num = cp_sequence_num;
1354:
1355:
1356: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
1357: CURSOR cur_tot_amt_for_cms(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE,
1358: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)
1359: IS
1360: SELECT NVL(SUM(amount),0) amount

Line 1358: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)

1354:
1355:
1356: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
1357: CURSOR cur_tot_amt_for_cms(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE,
1358: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)
1359: IS
1360: SELECT NVL(SUM(amount),0) amount
1361: FROM ra_cust_trx_line_gl_dist_all
1362: WHERE customer_trx_id IN

Line 1361: FROM ra_cust_trx_line_gl_dist_all

1357: CURSOR cur_tot_amt_for_cms(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE,
1358: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)
1359: IS
1360: SELECT NVL(SUM(amount),0) amount
1361: FROM ra_cust_trx_line_gl_dist_all
1362: WHERE customer_trx_id IN
1363: (
1364: SELECT customer_trx_id
1365: FROM ar_receivable_applications_all

Line 1436: FROM ra_cust_trx_line_gl_dist_all

1432: --added the cursor for bug#7645588
1433: CURSOR cur_event_id (cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE)
1434: IS
1435: SELECT event_id
1436: FROM ra_cust_trx_line_gl_dist_all
1437: WHERE customer_trx_id = cp_customer_trx_id
1438: AND account_class = 'REC'
1439: AND latest_rec_flag = 'Y'
1440: AND account_set_flag = 'N' ;

Line 1466: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;

1462:
1463: ln_previous_customer_trx_id ra_customer_trx_lines_all.previous_customer_trx_id%TYPE;
1464: ln_inv_curr_conv_rate ra_customer_trx_all.exchange_rate%TYPE;
1465: ln_cm_curr_conv_rate ra_customer_trx_all.exchange_rate%TYPE;
1466: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;
1467: ln_vat_tax_id ar_vat_tax_all.vat_tax_id%TYPE;
1468: lv_amount_includes_tax_flag ar_vat_tax_all.amount_includes_tax_flag%TYPE;
1469: lv_account_Set_flag ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE;
1470: ln_precision fnd_currencies.precision%TYPE;

Line 1469: lv_account_Set_flag ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE;

1465: ln_cm_curr_conv_rate ra_customer_trx_all.exchange_rate%TYPE;
1466: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;
1467: ln_vat_tax_id ar_vat_tax_all.vat_tax_id%TYPE;
1468: lv_amount_includes_tax_flag ar_vat_tax_all.amount_includes_tax_flag%TYPE;
1469: lv_account_Set_flag ra_cust_trx_line_gl_dist_all.account_set_flag%TYPE;
1470: ln_precision fnd_currencies.precision%TYPE;
1471: ln_accounting_rule_id NUMBER;
1472: ln_old_amount NUMBER;
1473: ln_taxable_amount NUMBER;

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

1566: IF p_debug = 'Y' THEN
1567: fnd_file.put_line(FND_FILE.LOG, 'Before delete_trx_data');
1568: END IF;
1569:
1570: --This procedure deletes the data from ra_cust_trx_line_gl_dist_all, ra_customer_trx_lines_all
1571: --Also deletes the MRC data from ra_cust_trx_line_gl_dist
1572: delete_trx_data(p_customer_trx_id => p_customer_trx_id,
1573: p_process_status => lv_process_status,
1574: p_process_message => lv_process_message);

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

1582: p_process_message := lv_process_message;
1583: goto EXIT_POINT;
1584: END IF;
1585:
1586: --get the data from ra_cust_trx_line_gl_dist_all for customer_trx_id and account_class = 'REC'
1587: OPEN cur_gl_date(p_customer_trx_id);
1588: FETCH cur_gl_date INTO ld_gl_date;
1589: CLOSE cur_gl_date;
1590:

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

1711: fnd_file.put_line(FND_FILE.LOG, 'In loop cur_temp_lines_insert - before insert_trx_line_gl_dist');
1712: END IF;
1713:
1714:
1715: --This procedure inserts the data into ra_cust_trx_line_gl_dist_all
1716: insert_trx_line_gl_dist(p_account_class => rec_temp.line_type,
1717: p_account_set_flag => lv_account_set_flag,
1718: p_acctd_amount => ROUND(rec_temp.acctd_amount, ln_precision),
1719: p_amount => rec_temp.amount,

Line 1787: --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

1783: ln_taxable_amount; --this variable is not being used
1784: CLOSE cur_total_amt_trx_lines;
1785:
1786:
1787: --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
1788: --and account_class in ('TAX','FREIGHT')
1789: OPEN cur_total_amt_gl_dist(p_customer_trx_id);
1790: FETCH cur_total_amt_gl_dist INTO ln_tax_amt,
1791: ln_tax_acctd_amount,

Line 1806: UPDATE ra_cust_trx_line_gl_dist_all

1802:
1803: /* Modified for bug#5495711
1804: || acctd_amount = ROUND( (ln_old_acctd_amount + ln_tax_acctd_amount + ln_diff_tax_frt), ln_precision)
1805: */
1806: UPDATE ra_cust_trx_line_gl_dist_all
1807: SET amount = ln_old_amount + ln_tax_amt,
1808: acctd_amount = ROUND( (ln_old_acctd_amount + ln_tax_acctd_amount ), ln_precision)
1809: WHERE customer_trx_id = p_customer_trx_id
1810: AND account_class = lv_account_class_rec --'REC'

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

1907: OPEN cur_term_details(rec_inv_payment_schedule.term_id);
1908: FETCH cur_term_details INTO rec_term_details;
1909: CLOSE cur_term_details;
1910:
1911: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
1912: OPEN cur_tot_amt_for_cms(ln_previous_customer_trx_id,
1913: lv_account_class_tax);
1914: FETCH cur_tot_amt_for_cms INTO ln_tax_amt_cms;
1915: CLOSE cur_tot_amt_for_cms;

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

1913: lv_account_class_tax);
1914: FETCH cur_tot_amt_for_cms INTO ln_tax_amt_cms;
1915: CLOSE cur_tot_amt_for_cms;
1916:
1917: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
1918: OPEN cur_tot_amt_for_cms(ln_previous_customer_trx_id,
1919: lv_account_class_freight);
1920: FETCH cur_tot_amt_for_cms INTO ln_frt_amt_cms;
1921: CLOSE cur_tot_amt_for_cms;

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

2288: END LOOP; --End cursor rec_payment
2289: END IF;
2290:
2291:
2292: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all, ar_receivable_applications_all
2293: maintain_mrc( p_customer_trx_id => p_customer_trx_id,
2294: p_previous_cust_trx_id => ln_previous_customer_trx_id,
2295: p_called_from => 7/13/2007,
2296: p_process_status => lv_process_status,

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

2380: order by CUSTOMER_TRX_LINE_ID;
2381:
2382:
2383: /* Added by Ramananda for bug#4468353 due to SLA uptake by AR */
2384: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
2385: SELECT gl_posted_date
2386: from RA_CUST_TRX_LINE_GL_DIST_ALL
2387: where customer_trx_line_id = p_customer_trx_line_id
2388: and account_class = 'REC'

Line 2386: from RA_CUST_TRX_LINE_GL_DIST_ALL

2382:
2383: /* Added by Ramananda for bug#4468353 due to SLA uptake by AR */
2384: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
2385: SELECT gl_posted_date
2386: from RA_CUST_TRX_LINE_GL_DIST_ALL
2387: where customer_trx_line_id = p_customer_trx_line_id
2388: and account_class = 'REC'
2389: and latest_rec_flag = 'Y';
2390:

Line 2391: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;

2387: where customer_trx_line_id = p_customer_trx_line_id
2388: and account_class = 'REC'
2389: and latest_rec_flag = 'Y';
2390:
2391: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;
2392:
2393: CURSOR GL_DATE_CUR IS
2394: SELECT DISTINCT gl_date
2395: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

Line 2395: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

2391: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type ;
2392:
2393: CURSOR GL_DATE_CUR IS
2394: SELECT DISTINCT gl_date
2395: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
2396: WHERE CUSTOMER_TRX_LINE_ID IN (SELECT LINK_TO_CUST_TRX_LINE_ID FROM JAI_AR_TRX_INS_LINES_T
2397: WHERE customer_trx_id = P_CUSTOMER_TRX_ID);
2398:
2399:

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

2410: WHERE customer_trx_id = P_CUSTOMER_TRX_ID AND LINK_TO_CUST_TRX_LINE_ID = p_link_line_id;
2411:
2412: CURSOR PREVIOUS_AMOUNT_CUR IS
2413: SELECT A.AMOUNT , A.ACCTD_AMOUNT
2414: FROM RA_CUST_TRX_LINE_GL_DIST_ALL A, RA_CUSTOMER_TRX_LINES_ALL B, JAI_AR_TRX_INS_LINES_T C
2415: WHERE A.CUSTOMER_TRX_LINE_ID = B.CUSTOMER_TRX_LINE_ID
2416: AND B.LINK_TO_CUST_TRX_LINE_ID = C.LINK_TO_CUST_TRX_LINE_ID
2417: AND C.CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID
2418: AND A.ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class)

Line 2559: from ra_cust_trx_line_gl_dist_all

2555: -- declaration for mrc starts here bug # 3326394
2556:
2557: cursor c_gl_dist_cur is
2558: select cust_trx_line_gl_dist_id
2559: from ra_cust_trx_line_gl_dist_all
2560: where customer_trx_id = p_customer_trx_id
2561: and account_class = lv_acc_class_rec --rchandan for bug#4428980
2562: and latest_rec_flag = 'Y';
2563:

Line 2588: tables ra_customer_trx_lines_all ,ra_cust_trx_line_gl_dist_all.

2584: 3 2002/03/22 RPK : for BUG#2285636
2585:
2586: Code modified to rollback the entire transactions if a transaction
2587: is failed.That is, the tax lines will be inserted all or none in the
2588: tables ra_customer_trx_lines_all ,ra_cust_trx_line_gl_dist_all.
2589: Also,whenever any record got errored out,then the corresponding invoice
2590: taxes will not be processed to the base table itself and that record will
2591: be updated to 'R'(column error_flag).
2592:

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

2708: fnd_file.put_line(FND_FILE.LOG, 'ERROR IN PROCESSING ..... ' || SQLERRM);
2709: END; --End block of RMA processing
2710: v_sql_num :=9;
2711:
2712: SELECT NVL(SUM(AMOUNT),0) INTO V_sum_amt FROM RA_CUST_TRX_LINE_GL_DIST_ALL WHERE
2713: 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
2714: v_sql_num :=10;
2715:
2716: OPEN COUNT_CUR;

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

2734:
2735: -- the following select statement commented and using the next one instead
2736: -- because this is wrong.We need to compare the ra_customer_trx_lines_all table
2737: -- with the link_to_cust_trx_line_id column instead of based on the customer_trx_line_id
2738: -- column in the ra_cust_trx_line_gl_dist_all table. -- bug # 2784431
2739:
2740: /*
2741: SELECT COUNT(Customer_trx_line_id) INTO v_rec_ctr FROM ra_cust_trx_line_gl_dist_all
2742: WHERE customer_trx_line_id = P_LINK_LINE_ID

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

2737: -- with the link_to_cust_trx_line_id column instead of based on the customer_trx_line_id
2738: -- column in the ra_cust_trx_line_gl_dist_all table. -- bug # 2784431
2739:
2740: /*
2741: SELECT COUNT(Customer_trx_line_id) INTO v_rec_ctr FROM ra_cust_trx_line_gl_dist_all
2742: WHERE customer_trx_line_id = P_LINK_LINE_ID
2743: AND Account_class IN ('TAX','FREIGHT'); --Added on 09-Apr-2002 For the BUG#2303830
2744: */
2745:

Line 2756: DELETE RA_CUST_TRX_LINE_GL_DIST_ALL

2752: IF v_rec_ctr > 0 THEN --Added on 09-Apr-2002 for the BUG#2303830
2753:
2754: v_sql_num :=14;
2755:
2756: DELETE RA_CUST_TRX_LINE_GL_DIST_ALL
2757: WHERE CUSTOMER_TRX_LINE_ID IN (SELECT CUSTOMER_TRX_LINE_ID
2758: FROM RA_CUSTOMER_TRX_LINES_ALL
2759: WHERE LINK_TO_CUST_TRX_LINE_ID = LINK_REC.LINK_TO_CUST_TRX_LINE_ID)
2760: AND ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class); --rchandan for bug#4428980

Line 2767: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

2763:
2764: for mrc_rec in
2765: (
2766: SELECT CUST_TRX_LINE_GL_DIST_ID
2767: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
2768: WHERE CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID
2769: AND ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class) --rchandan for bug#4428980
2770: AND CUSTOMER_TRX_LINE_ID
2771: IN

Line 2795: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

2791: WHERE CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID
2792: AND CUST_TRX_LINE_GL_DIST_ID IN
2793: (
2794: SELECT CUST_TRX_LINE_GL_DIST_ID
2795: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
2796: WHERE CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID
2797: AND ACCOUNT_CLASS IN ('TAX','FREIGHT')
2798: AND CUSTOMER_TRX_LINE_ID
2799: IN

Line 2947: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL(account_class,

2943: 'N',
2944: v_vat_tax_id);
2945: v_sql_num :=24;
2946:
2947: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL(account_class,
2948: account_set_flag,
2949: acctd_amount,
2950: amount,
2951: code_combination_id,

Line 3027: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL

3023: LAST_UPDATE_LOGIN = TEMP_REC.LAST_UPDATE_LOGIN
3024: WHERE CUSTOMER_TRX_LINE_ID = TEMP_REC.CUSTOMER_TRX_LINE_ID;
3025: v_sql_num :=26;
3026:
3027: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL
3028: SET ACCTD_AMOUNT = TEMP_REC.ACCTD_AMOUNT,
3029: AMOUNT = TEMP_REC.EXTENDED_AMOUNT,
3030: LAST_UPDATE_DATE = TEMP_REC.LAST_UPDATE_DATE,
3031: LAST_UPDATED_BY = TEMP_REC.LAST_UPDATED_BY,

Line 3056: From RA_CUST_TRX_LINE_GL_DIST_ALL

3052:
3053: v_sql_num :=28;
3054:
3055: Select SUM(amount),SUM(acctd_amount) into v_old_amount,v_old_acctd_amount --Added this stmt for the above stmt
3056: From RA_CUST_TRX_LINE_GL_DIST_ALL
3057: Where customer_trx_id = P_CUSTOMER_TRX_ID
3058: AND ACCOUNT_CLASS = lv_acc_class_rev; --rchandan for bug#4428980
3059: v_sql_num :=29;
3060:

Line 3062: From RA_CUST_TRX_LINE_GL_DIST_ALL

3058: AND ACCOUNT_CLASS = lv_acc_class_rev; --rchandan for bug#4428980
3059: v_sql_num :=29;
3060:
3061: Select SUM(amount) INTO v_tax_amt
3062: From RA_CUST_TRX_LINE_GL_DIST_ALL
3063: Where customer_trx_id = P_CUSTOMER_TRX_ID
3064: AND ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class); --rchandan for bug#4428980
3065: v_sql_num :=30;
3066:

Line 3067: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL

3063: Where customer_trx_id = P_CUSTOMER_TRX_ID
3064: AND ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class); --rchandan for bug#4428980
3065: v_sql_num :=30;
3066:
3067: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL
3068: SET AMOUNT = NVL(v_old_amount,0) + NVL(v_tax_amt,0),
3069: ACCTD_AMOUNT = NVL(v_old_acctd_amount,0) + NVL(v_tax_amt,0)
3070: WHERE CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID AND
3071: ACCOUNT_CLASS = lv_acc_class_rec; --rchandan for bug#4428980

Line 3190: FROM ra_cust_trx_line_gl_dist_all

3186: ELSIF v_return_reference_type_code in ('Invoice India','Sales Order India')
3187: and v_credit_invoice_line_id IS NOT NULL THEN
3188:
3189: Select sum(amount) INTO v_tax_amount1
3190: FROM ra_cust_trx_line_gl_dist_all
3191: Where customer_trx_id = p_customer_trx_id
3192: And Account_class = lv_tax_const; --rchandan for bug#4428980
3193:
3194: Select sum(amount) INTO v_freight_amount1

Line 3195: FROM ra_cust_trx_line_gl_dist_all

3191: Where customer_trx_id = p_customer_trx_id
3192: And Account_class = lv_tax_const; --rchandan for bug#4428980
3193:
3194: Select sum(amount) INTO v_freight_amount1
3195: FROM ra_cust_trx_line_gl_dist_all
3196: Where customer_trx_id = p_customer_trx_id
3197: And Account_class = lv_freight_acc_class; --rchandan for bug#4428980
3198:
3199: SELECT SUM(AMOUNT) INTO v_tot_amount

Line 3200: FROM ra_cust_trx_line_gl_dist_all

3196: Where customer_trx_id = p_customer_trx_id
3197: And Account_class = lv_freight_acc_class; --rchandan for bug#4428980
3198:
3199: SELECT SUM(AMOUNT) INTO v_tot_amount
3200: FROM ra_cust_trx_line_gl_dist_all
3201: WHERE customer_trx_id = p_customer_trx_id
3202: AND account_class = lv_acc_class_rec; --rchandan for bug#4428980
3203:
3204:

Line 3480: ln_set_of_books_id ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE;

3476: lv_currency_code jai_ar_trxs.invoice_currency_code%TYPE;
3477: ln_inv_org_id jai_ar_trxs.organization_id%TYPE;
3478: lv_inv_org_code mtl_parameters.organization_code%TYPE;
3479: ln_rec_account_id ra_cust_trx_types_all.gl_id_rec%TYPE;
3480: ln_set_of_books_id ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE;
3481: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;
3482: ln_tax_account_id NUMBER;
3483: ln_total_inclu_tax_amt NUMBER;
3484: exception_error EXCEPTION;

Line 3481: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;

3477: ln_inv_org_id jai_ar_trxs.organization_id%TYPE;
3478: lv_inv_org_code mtl_parameters.organization_code%TYPE;
3479: ln_rec_account_id ra_cust_trx_types_all.gl_id_rec%TYPE;
3480: ln_set_of_books_id ra_cust_trx_line_gl_dist_all.set_of_books_id%TYPE;
3481: ld_gl_date ra_cust_trx_line_gl_dist_all.gl_date%TYPE;
3482: ln_tax_account_id NUMBER;
3483: ln_total_inclu_tax_amt NUMBER;
3484: exception_error EXCEPTION;
3485:

Line 3577: FROM ra_cust_trx_line_gl_dist_all

3573: , gl_date
3574: INTO
3575: ln_set_of_books_id
3576: , ld_gl_date
3577: FROM ra_cust_trx_line_gl_dist_all
3578: WHERE customer_trx_id = pn_customer_trx_id
3579: AND rownum = 1;
3580:
3581: EXCEPTION