DBA Data[Home] [Help]

APPS.JAI_AR_RGM_PROCESSING_PKG dependencies on FND_FILE

Line 328: fnd_file.put_line(fnd_file.LOG,'********************* 1 START OF PROCEDURE jai_ar_rgm_processing_pkg.GET_AR_TAX_DISC_ACCNT *********************');

324: ln_total_rec_disc_amt JAI_RGM_TRX_REFS.DISCOUNTED_AMOUNT%TYPE ;
325:
326: BEGIN
327:
328: fnd_file.put_line(fnd_file.LOG,'********************* 1 START OF PROCEDURE jai_ar_rgm_processing_pkg.GET_AR_TAX_DISC_ACCNT *********************');
329:
330: /*
331: || Variable Intialization
332: */

Line 336: fnd_file.put_line(fnd_file.LOG,' 2 Variables Initialised ');

332: */
333: p_process_flag := jai_constants.successful ;
334: p_process_message := null ;
335:
336: fnd_file.put_line(fnd_file.LOG,' 2 Variables Initialised ');
337:
338: IF p_total_disc_amount IS NULL THEN
339: p_process_flag := jai_constants.expected_error;
340: p_process_message := 'Service Tax Discounted cannot be NULL ';

Line 341: fnd_file.put_line(fnd_file.LOG,' 3 EXPECTED ERROR - Service Tax Discounted amount cannot be NULL ');

337:
338: IF p_total_disc_amount IS NULL THEN
339: p_process_flag := jai_constants.expected_error;
340: p_process_message := 'Service Tax Discounted cannot be NULL ';
341: fnd_file.put_line(fnd_file.LOG,' 3 EXPECTED ERROR - Service Tax Discounted amount cannot be NULL ');
342: return;
343: END IF;
344:
345: /*

Line 354: fnd_file.put_line(fnd_file.LOG,' 4 EXPECTED ERROR -Receivable Application record with the receivable_application_id -> '||p_receivable_application_id ||' not found ');

350: IF CUR_GET_RECEIVABLE_APP%NOTFOUND THEN
351: CLOSE cur_get_receivable_app;
352: p_process_flag := jai_constants.expected_error;
353: p_process_message := 'Receivable Application record with the receivable_application_id -> '||p_receivable_application_id ||' not found ';
354: fnd_file.put_line(fnd_file.LOG,' 4 EXPECTED ERROR -Receivable Application record with the receivable_application_id -> '||p_receivable_application_id ||' not found ');
355: return;
356: END IF;
357:
358: /*

Line 377: fnd_file.put_line(fnd_file.LOG,' 5 value of p_tax_ediscounted -> '|| p_tax_ediscounted

373:
374: /*
375: || End of 4193633
376: */
377: fnd_file.put_line(fnd_file.LOG,' 5 value of p_tax_ediscounted -> '|| p_tax_ediscounted
378: ||', p_tax_uediscounted -> ' || p_tax_uediscounted
379: ||', ln_total_rec_disc_amt -> '|| ln_total_rec_disc_amt
380: ||', rec_cur_get_receivable_app.tax_ediscounted -> '||rec_cur_get_receivable_app.tax_ediscounted
381: ||', rec_cur_get_receivable_app.tax_uediscounted -> '||rec_cur_get_receivable_app.tax_uediscounted

Line 398: fnd_file.put_line(fnd_file.LOG,' 6 EXPECTED ERROR - Earned Discount Account Setup not found in ar_receivables_trx_all ');

394: CLOSE cur_get_receivable_app;
395: CLOSE cur_get_disc_ccid;
396: p_process_flag := jai_constants.expected_error ;
397: p_process_message := 'Earned Discount Account Setup not found in ar_receivables_trx_all ';
398: fnd_file.put_line(fnd_file.LOG,' 6 EXPECTED ERROR - Earned Discount Account Setup not found in ar_receivables_trx_all ');
399: return;
400: END IF;
401: p_earned_disc_ccid := rec_cur_get_disc_ccid.code_combination_id ;
402: CLOSE cur_get_disc_ccid;

Line 405: fnd_file.put_line(fnd_file.LOG,' 6 Earned Discount Account code combination id is '||rec_cur_get_disc_ccid.code_combination_id);

401: p_earned_disc_ccid := rec_cur_get_disc_ccid.code_combination_id ;
402: CLOSE cur_get_disc_ccid;
403: END IF;
404:
405: fnd_file.put_line(fnd_file.LOG,' 6 Earned Discount Account code combination id is '||rec_cur_get_disc_ccid.code_combination_id);
406: /*
407: || Get the code combination id for the Unearned Discount Account
408: */
409: IF rec_cur_get_receivable_app.tax_uediscounted <> 0 THEN

Line 419: fnd_file.put_line(fnd_file.LOG,' 8 EXPECTED ERROR - UnEarned Discount Account Setup not found in ar_receivables_trx_all ');

415: CLOSE cur_get_receivable_app;
416: CLOSE cur_get_disc_ccid;
417: p_process_flag := jai_constants.expected_error ;
418: p_process_message := 'UnEarned Discount Account Setup not found in ar_receivables_trx_all ';
419: fnd_file.put_line(fnd_file.LOG,' 8 EXPECTED ERROR - UnEarned Discount Account Setup not found in ar_receivables_trx_all ');
420: return;
421: END IF;
422: p_unearned_disc_ccid := rec_cur_get_disc_ccid.code_combination_id ;
423: CLOSE cur_get_disc_ccid;

Line 426: fnd_file.put_line(fnd_file.LOG,' 9 Unearned Account CCID is -> '||rec_cur_get_disc_ccid.code_combination_id);

422: p_unearned_disc_ccid := rec_cur_get_disc_ccid.code_combination_id ;
423: CLOSE cur_get_disc_ccid;
424:
425: END IF;
426: fnd_file.put_line(fnd_file.LOG,' 9 Unearned Account CCID is -> '||rec_cur_get_disc_ccid.code_combination_id);
427: CLOSE cur_get_receivable_app;
428: fnd_file.put_line(fnd_file.LOG,' 10 Value of out variables p_tax_ediscounted ->' || p_tax_ediscounted
429: ||', p_earned_disc_ccid ->' || p_earned_disc_ccid
430: ||', p_tax_uediscounted ->' || p_tax_uediscounted

Line 428: fnd_file.put_line(fnd_file.LOG,' 10 Value of out variables p_tax_ediscounted ->' || p_tax_ediscounted

424:
425: END IF;
426: fnd_file.put_line(fnd_file.LOG,' 9 Unearned Account CCID is -> '||rec_cur_get_disc_ccid.code_combination_id);
427: CLOSE cur_get_receivable_app;
428: fnd_file.put_line(fnd_file.LOG,' 10 Value of out variables p_tax_ediscounted ->' || p_tax_ediscounted
429: ||', p_earned_disc_ccid ->' || p_earned_disc_ccid
430: ||', p_tax_uediscounted ->' || p_tax_uediscounted
431: ||', p_unearned_disc_ccid ->' || p_unearned_disc_ccid
432: ||', p_process_flag ->' || p_process_flag

Line 435: fnd_file.put_line(fnd_file.LOG,'********************* 10 END OF PROCEDURE jai_ar_rgm_processing_pkg.GET_AR_TAX_DISC_ACCNT *********************');

431: ||', p_unearned_disc_ccid ->' || p_unearned_disc_ccid
432: ||', p_process_flag ->' || p_process_flag
433: ||', p_process_message ->' || p_process_message
434: );
435: fnd_file.put_line(fnd_file.LOG,'********************* 10 END OF PROCEDURE jai_ar_rgm_processing_pkg.GET_AR_TAX_DISC_ACCNT *********************');
436:
437: EXCEPTION
438: WHEN OTHERS THEN
439: p_process_flag := jai_constants.unexpected_error ;

Line 549: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_ar_rgm_processing_pkg.populate_inv_cm_references' );

545: ||Based on the input parameters get invoice details
546: ||for which localization has corresponding service tax
547: ******/
548:
549: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_ar_rgm_processing_pkg.populate_inv_cm_references' );
550:
551: fnd_file.put_line(fnd_file.LOG,'p_org_id:'||p_org_id );
552: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );
553:

Line 551: fnd_file.put_line(fnd_file.LOG,'p_org_id:'||p_org_id );

547: ******/
548:
549: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_ar_rgm_processing_pkg.populate_inv_cm_references' );
550:
551: fnd_file.put_line(fnd_file.LOG,'p_org_id:'||p_org_id );
552: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );
553:
554: /*
555: || Variable Initialization

Line 552: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );

548:
549: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_ar_rgm_processing_pkg.populate_inv_cm_references' );
550:
551: fnd_file.put_line(fnd_file.LOG,'p_org_id:'||p_org_id );
552: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );
553:
554: /*
555: || Variable Initialization
556: */

Line 574: fnd_file.put_line(fnd_file.LOG,'2 processing record, customer_trx_id '||rec_c_fetch_inv_cm_rec.customer_trx_id

570: cp_sh_service_edu_cess => upper(jai_constants.tax_type_sh_service_edu_cess) --Added by Bgowrava for forward porting bug#5989740
571: )
572: LOOP
573:
574: fnd_file.put_line(fnd_file.LOG,'2 processing record, customer_trx_id '||rec_c_fetch_inv_cm_rec.customer_trx_id
575: ||', invoice line id '||rec_c_fetch_inv_cm_rec.link_to_cust_trx_line_id
576: ||', tax line id '||rec_c_fetch_inv_cm_rec.customer_trx_line_id
577: ||', tax_id '|| rec_c_fetch_inv_cm_rec.tax_id
578: ||', tax rate '||rec_c_fetch_inv_cm_rec.tax_rate

Line 590: fnd_file.put_line(fnd_file.LOG,'3 before call to procedure jai_cmn_rgm_recording_pkg.insert_reference ');

586: /****
587: ||insert the invoices and credit memo's into the jai_rgm_trx_refs
588: ||using the procedure jai_cmn_rgm_recording_pkg.insert_reference
589: *****/
590: fnd_file.put_line(fnd_file.LOG,'3 before call to procedure jai_cmn_rgm_recording_pkg.insert_reference ');
591:
592: savepoint before_ref_inv_cm;
593:
594: jai_cmn_rgm_recording_pkg.insert_reference (

Line 624: fnd_file.put_line(fnd_file.LOG,'4 returned from procedure jai_cmn_rgm_recording_pkg.insert_reference, lv_process_flag - '||lv_process_flag

620: p_process_flag => lv_process_flag ,
621: p_process_message => lv_process_message
622: );
623:
624: fnd_file.put_line(fnd_file.LOG,'4 returned from procedure jai_cmn_rgm_recording_pkg.insert_reference, lv_process_flag - '||lv_process_flag
625: ||'lv_process_message - '||lv_process_message);
626:
627:
628: IF lv_process_flag = jai_constants.expected_error OR

Line 637: fnd_file.put_line( fnd_file.log, '5 error in call to jai_cmn_rgm_recording_pkg.insert_reference - lv_process_flag '||lv_process_flag

633: ||1. Rollback to save point
634: ||2. Set out variables p_process_flag and p_process_message accordingly
635: */
636: ROLLBACK to before_ref_inv_cm;
637: fnd_file.put_line( fnd_file.log, '5 error in call to jai_cmn_rgm_recording_pkg.insert_reference - lv_process_flag '||lv_process_flag
638: ||', lv_process_message'||lv_process_message);
639: p_process_flag := lv_process_flag ;
640: p_process_message := lv_process_message ;
641: END IF;

Line 644: fnd_file.put_line(fnd_file.LOG,'6 inserted record in jai_rgm_trx_refs with reference_id '||ln_reference_id );

640: p_process_message := lv_process_message ;
641: END IF;
642:
643: ln_invoices_processed := ln_invoices_processed + 1;
644: fnd_file.put_line(fnd_file.LOG,'6 inserted record in jai_rgm_trx_refs with reference_id '||ln_reference_id );
645:
646: END LOOP;
647:
648: fnd_file.put_line(fnd_file.LOG,'5 End of procedure : jai_rgm_process_ar.populate_inv_cm_references, number of invoices/CM processed '||ln_invoices_processed );

Line 648: fnd_file.put_line(fnd_file.LOG,'5 End of procedure : jai_rgm_process_ar.populate_inv_cm_references, number of invoices/CM processed '||ln_invoices_processed );

644: fnd_file.put_line(fnd_file.LOG,'6 inserted record in jai_rgm_trx_refs with reference_id '||ln_reference_id );
645:
646: END LOOP;
647:
648: fnd_file.put_line(fnd_file.LOG,'5 End of procedure : jai_rgm_process_ar.populate_inv_cm_references, number of invoices/CM processed '||ln_invoices_processed );
649:
650: EXCEPTION
651: WHEN OTHERS THEN
652:

Line 775: fnd_file.put_line(fnd_file.LOG,'delete_non_existant_cm p_org_id:'||p_org_id );

771:
772: p_process_flag := lv_process_flag ;
773: p_process_message := lv_process_message ;
774:
775: fnd_file.put_line(fnd_file.LOG,'delete_non_existant_cm p_org_id:'||p_org_id );
776: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );
777:
778: /*
779: || Source type would indicate CREDIT MEMO REVERSAL

Line 776: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );

772: p_process_flag := lv_process_flag ;
773: p_process_message := lv_process_message ;
774:
775: fnd_file.put_line(fnd_file.LOG,'delete_non_existant_cm p_org_id:'||p_org_id );
776: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );
777:
778: /*
779: || Source type would indicate CREDIT MEMO REVERSAL
780: */

Line 793: fnd_file.put_line(fnd_file.LOG,' ********************1 PROCESSING REC_C_GET_INCOMPLETED_CM.CM_CUSTOMER_TRX_ID -> '||rec_c_get_incompleted_cm.cm_customer_trx_id

789:
790: /*########################################################################################################
791: || SET SAVE POINT POINT FOR EACH CM_CUSTOMER_TRX_ID RECORD
792: ########################################################################################################*/
793: fnd_file.put_line(fnd_file.LOG,' ********************1 PROCESSING REC_C_GET_INCOMPLETED_CM.CM_CUSTOMER_TRX_ID -> '||rec_c_get_incompleted_cm.cm_customer_trx_id
794: ||' ******************** ');
795:
796:
797: /*

Line 824: fnd_file.put_line(fnd_file.LOG,' 3 Passing CM-CM-REV record, for the CM-CM-APP with rec_c_get_cm_cm_app_rec.cm_customer_trx_id -> '||rec_c_get_cm_cm_app_rec.attribute2

820:
821: /*
822: || Insert a record into the repository corresponding to the 'CM-CM-REV'
823: */
824: fnd_file.put_line(fnd_file.LOG,' 3 Passing CM-CM-REV record, for the CM-CM-APP with rec_c_get_cm_cm_app_rec.cm_customer_trx_id -> '||rec_c_get_cm_cm_app_rec.attribute2
825: ||' and reference_id -> '||rec_c_get_cm_cm_app_rec.reference_id
826: ||',repository_id -> '|| rec_c_get_cm_cm_app_rec.repository_id);
827:
828:

Line 832: fnd_file.put_line(fnd_file.LOG,' 3.1 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry original amount -> '||nvl(rec_c_get_cm_cm_app_rec.debit_amount,rec_c_get_cm_cm_app_rec.credit_amount)

828:
829:
830: ln_amount := nvl(rec_c_get_cm_cm_app_rec.debit_amount,rec_c_get_cm_cm_app_rec.credit_amount) * (-1);
831:
832: fnd_file.put_line(fnd_file.LOG,' 3.1 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry original amount -> '||nvl(rec_c_get_cm_cm_app_rec.debit_amount,rec_c_get_cm_cm_app_rec.credit_amount)
833: ||', reversal entry amount -> '||ln_amount );
834:
835: /*csahoo for bug#5879769...start*/
836:

Line 852: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);

848: p_process_message => lv_process_message
849: );
850:
851: IF lv_process_flag <> jai_constants.successful THEN
852: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
853: return;
854: END IF;
855:
856: /*csahoo for bug#5879769...end*/

Line 897: fnd_file.put_line(fnd_file.LOG,' 4 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );

893: p_attribute2 => rec_c_get_incompleted_cm.cm_customer_trx_id
894: , p_accntg_required_flag => jai_constants.yes --File.Sql.35 Cbabu
895: );
896:
897: fnd_file.put_line(fnd_file.LOG,' 4 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
898:
899:
900: IF lv_process_flag = jai_constants.expected_error OR
901: lv_process_flag = jai_constants.unexpected_error

Line 912: fnd_file.put_line( fnd_file.log, '5 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag

908: ||4. Exit from the loop
909: */
910: ln_err_cm_customer_trx_id := rec_c_get_incompleted_cm.cm_customer_trx_id;
911: ROLLBACK to roll_to_last_cm;
912: fnd_file.put_line( fnd_file.log, '5 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag
913: ||', lv_process_message'||lv_process_message ||'cm_customer_trx_id - '||ln_err_cm_customer_trx_id);
914: p_process_flag := lv_process_flag ;
915: p_process_message := lv_process_message ;
916: EXIT;

Line 929: fnd_file.put_line(fnd_file.LOG,' 6 before call to jai_cmn_rgm_recording_pkg.update_reference for updating CM reference to 0-> '||rec_c_get_incompleted_cm.cm_customer_trx_id

925: || Update the Credit Reference and set Recovered Amount to 0 as this credit memo has been incompleted
926: ########################################################################################################*/
927: FOR rec_cur_upd_cm_ref IN cur_upd_cm_ref (cp_cm_customer_trx_id => rec_c_get_incompleted_cm.cm_customer_trx_id)
928: LOOP
929: fnd_file.put_line(fnd_file.LOG,' 6 before call to jai_cmn_rgm_recording_pkg.update_reference for updating CM reference to 0-> '||rec_c_get_incompleted_cm.cm_customer_trx_id
930: ||', reference_id -> '||rec_cur_upd_cm_ref.reference_id );
931:
932: jai_cmn_rgm_recording_pkg.update_reference (
933: p_source => p_source ,

Line 948: fnd_file.put_line( fnd_file.log, '7 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag

944: || Set out variables p_process_flag and p_process_message accordingly
945: */
946: ln_err_cm_customer_trx_id := rec_c_get_incompleted_cm.cm_customer_trx_id;
947: ROLLBACK to roll_to_last_cm;
948: fnd_file.put_line( fnd_file.log, '7 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag
949: ||', lv_process_message'||lv_process_message);
950: p_process_flag := lv_process_flag ;
951: p_process_message := lv_process_message ;
952: END IF;

Line 954: fnd_file.put_line(fnd_file.LOG,' 8 Returned from jai_cmn_rgm_recording_pkg.update_reference after updating CM reference' );

950: p_process_flag := lv_process_flag ;
951: p_process_message := lv_process_message ;
952: END IF;
953:
954: fnd_file.put_line(fnd_file.LOG,' 8 Returned from jai_cmn_rgm_recording_pkg.update_reference after updating CM reference' );
955: END LOOP;
956:
957: END IF; /* End if of ln_err_cm_customer_trx_id <> rec_c_get_incompleted_cm.cm_customer_trx_id*/
958:

Line 971: fnd_file.put_line(fnd_file.LOG,' 9 Passing CM-INV-REV record, for the CM-INV-APP with rec_c_get_cm_inv_app_rec.inv_customer_trx_id -> '||rec_c_get_cm_inv_app_rec.attribute1

967: FOR rec_c_get_cm_inv_app_rec IN c_get_cm_inv_app_rec ( cp_cm_customer_trx_id => rec_c_get_incompleted_cm.cm_customer_trx_id,
968: cp_attribute_context => 'CM-INV-APP' )
969: LOOP
970:
971: fnd_file.put_line(fnd_file.LOG,' 9 Passing CM-INV-REV record, for the CM-INV-APP with rec_c_get_cm_inv_app_rec.inv_customer_trx_id -> '||rec_c_get_cm_inv_app_rec.attribute1
972: ||', rec_c_get_cm_inv_app_rec.cm_customer_trx_id -> '||rec_c_get_cm_inv_app_rec.attribute2
973: ||' reference_id -> '||rec_c_get_cm_inv_app_rec.reference_id
974: ||', repository_id -> '|| rec_c_get_cm_inv_app_rec.repository_id);
975:

Line 979: fnd_file.put_line(fnd_file.LOG,' 9.1 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry ' );

975:
976: /*
977: || Insert a record into the repository corresponding to the 'CM-CM-REV'
978: */
979: fnd_file.put_line(fnd_file.LOG,' 9.1 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
980:
981: ln_amount := nvl(rec_c_get_cm_inv_app_rec.debit_amount,rec_c_get_cm_inv_app_rec.credit_amount) * (-1);
982:
983: fnd_file.put_line(fnd_file.LOG,' 10 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry original amount -> '||nvl(rec_c_get_cm_inv_app_rec.debit_amount,rec_c_get_cm_inv_app_rec.credit_amount)

Line 983: fnd_file.put_line(fnd_file.LOG,' 10 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry original amount -> '||nvl(rec_c_get_cm_inv_app_rec.debit_amount,rec_c_get_cm_inv_app_rec.credit_amount)

979: fnd_file.put_line(fnd_file.LOG,' 9.1 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
980:
981: ln_amount := nvl(rec_c_get_cm_inv_app_rec.debit_amount,rec_c_get_cm_inv_app_rec.credit_amount) * (-1);
982:
983: fnd_file.put_line(fnd_file.LOG,' 10 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry original amount -> '||nvl(rec_c_get_cm_inv_app_rec.debit_amount,rec_c_get_cm_inv_app_rec.credit_amount)
984: ||', reversal entry amount -> '||ln_amount );
985:
986: /*csahoo for bug#5879769...start*/
987:

Line 1003: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);

999: p_process_message => lv_process_message
1000: );
1001:
1002: IF lv_process_flag <> jai_constants.successful THEN
1003: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
1004: return;
1005: END IF;
1006:
1007: /*csahoo for bug#5879769...end*/

Line 1049: fnd_file.put_line(fnd_file.LOG,' 10.1 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );

1045: p_attribute2 => rec_c_get_cm_inv_app_rec.attribute2
1046: , p_accntg_required_flag => jai_constants.yes --File.Sql.35 Cbabu
1047: );
1048:
1049: fnd_file.put_line(fnd_file.LOG,' 10.1 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
1050:
1051:
1052: IF lv_process_flag = jai_constants.expected_error OR
1053: lv_process_flag = jai_constants.unexpected_error

Line 1062: fnd_file.put_line( fnd_file.log, '11 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag

1058: ||2. Set out variables p_process_flag and p_process_message accordingly
1059: */
1060: ln_err_cm_customer_trx_id := rec_c_get_incompleted_cm.cm_customer_trx_id;
1061: ROLLBACK to roll_to_last_cm;
1062: fnd_file.put_line( fnd_file.log, '11 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag
1063: ||', lv_process_message'||lv_process_message);
1064: p_process_flag := lv_process_flag ;
1065: p_process_message := lv_process_message ;
1066: EXIT;

Line 1074: fnd_file.put_line(fnd_file.LOG,' 12 before call to jai_cmn_rgm_recording_pkg.update_reference for updating INV reference_id - '||rec_c_get_cm_inv_app_rec.reference_id

1070: /*########################################################################################################
1071: || Update the Recovered Amount of the Invoice Reference against the CM application
1072: ########################################################################################################*/
1073:
1074: fnd_file.put_line(fnd_file.LOG,' 12 before call to jai_cmn_rgm_recording_pkg.update_reference for updating INV reference_id - '||rec_c_get_cm_inv_app_rec.reference_id
1075: ||', amount to be adjusted from recovered_Amount -> '||nvl(rec_c_get_cm_inv_app_rec.debit_amount,rec_c_get_cm_inv_app_rec.credit_amount) * (-1)
1076: );
1077:
1078:

Line 1095: fnd_file.put_line( fnd_file.log, '13 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag

1091: || Set out variables p_process_flag and p_process_message accordingly
1092: */
1093: ln_err_cm_customer_trx_id := rec_c_get_incompleted_cm.cm_customer_trx_id;
1094: ROLLBACK to roll_to_last_cm;
1095: fnd_file.put_line( fnd_file.log, '13 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag
1096: ||', lv_process_message'||lv_process_message);
1097: p_process_flag := lv_process_flag ;
1098: p_process_message := lv_process_message ;
1099: EXIT;

Line 1102: fnd_file.put_line(fnd_file.LOG,' 14 Returned from jai_cmn_rgm_recording_pkg.update_reference after updating invoice reference' );

1098: p_process_message := lv_process_message ;
1099: EXIT;
1100: END IF;
1101:
1102: fnd_file.put_line(fnd_file.LOG,' 14 Returned from jai_cmn_rgm_recording_pkg.update_reference after updating invoice reference' );
1103:
1104: END LOOP; /* End of 'CM-INV-APP record processing for an CM application against an invoice' */
1105:
1106: END IF; /* End if of ln_err_cm_customer_trx_id <> rec_c_get_incompleted_cm.cm_customer_trx_id*/

Line 1112: fnd_file.put_line(fnd_file.LOG,' 15 ******************** END of one CM processing ******************** ');

1108: /*
1109: || Reset the savepoint to the previous cm_customer_trx_id
1110: ln_set_save_point := rec_c_get_incompleted_cm.cm_customer_trx_id;
1111: */
1112: fnd_file.put_line(fnd_file.LOG,' 15 ******************** END of one CM processing ******************** ');
1113: END LOOP; /* End of CM reference processing */
1114:
1115:
1116: /* Added by Ramananda for bug#4407165 */

Line 1370: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_rgm_process_ar.populate_cm_app' );

1366: invoice_id = cp_cm_customer_trx_id ;
1367:
1368: BEGIN
1369:
1370: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_rgm_process_ar.populate_cm_app' );
1371: fnd_file.put_line(fnd_file.LOG,'p_org_id:'||p_org_id );
1372: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );
1373:
1374: p_process_flag := jai_constants.successful ;

Line 1371: fnd_file.put_line(fnd_file.LOG,'p_org_id:'||p_org_id );

1367:
1368: BEGIN
1369:
1370: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_rgm_process_ar.populate_cm_app' );
1371: fnd_file.put_line(fnd_file.LOG,'p_org_id:'||p_org_id );
1372: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );
1373:
1374: p_process_flag := jai_constants.successful ;
1375: p_process_message := null ;

Line 1372: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );

1368: BEGIN
1369:
1370: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_rgm_process_ar.populate_cm_app' );
1371: fnd_file.put_line(fnd_file.LOG,'p_org_id:'||p_org_id );
1372: fnd_file.put_line(fnd_file.LOG,'p_organization_id:'||p_organization_id );
1373:
1374: p_process_flag := jai_constants.successful ;
1375: p_process_message := null ;
1376:

Line 1386: fnd_file.put_line(fnd_file.LOG,'2 processing credit memo with receivable_application_id as '||rec_c_get_cm_rec_app.receivable_application_id

1382: lv_type:= 'INV';
1383: FOR rec_c_get_cm_rec_app IN c_get_cm_rec_app ( cp_source_ar => p_source )
1384: LOOP
1385:
1386: fnd_file.put_line(fnd_file.LOG,'2 processing credit memo with receivable_application_id as '||rec_c_get_cm_rec_app.receivable_application_id
1387: ||'against invoice with customer_trx_id '||rec_c_get_cm_rec_app.inv_customer_trx_id );
1388:
1389: /*########################################################################################################
1390: || INITIALIZING THE VARIABLES

Line 1406: fnd_file.put_line(fnd_file.LOG,'3 Variables initialized' );

1402: lv_process_message := null ;
1403:
1404: ln_inclusive_total_amt := null ; --added by walton for inclusive tax 29-Nov-07
1405:
1406: fnd_file.put_line(fnd_file.LOG,'3 Variables initialized' );
1407:
1408: /*########################################################################################################
1409: || SET A SAVEPOINT FOR EACH NEW CREDIT MEMO RECEIVABLE APPLICATION
1410: ########################################################################################################*/

Line 1449: fnd_file.put_line(fnd_file.LOG,'5 start of determine application source type');

1445:
1446: ln_total_tax_applied := rec_c_get_cm_rec_app.cm_app_tax_amt + (rec_c_get_cm_rec_app.cm_app_line_amt/ln_line_total_amt) * ln_inclusive_total_amt;
1447: ------------------------------------------------------------------------------------------------------
1448:
1449: fnd_file.put_line(fnd_file.LOG,'5 start of determine application source type');
1450:
1451: /*
1452: || If the CM tax amount is +ve then it is CREDIT MEMO REVERSAL/UNAPPLICATION
1453: || IF the CM tax receipt amount is -ve then it is CREDIT MEMO APPLICATION

Line 1473: fnd_file.put_line(fnd_file.LOG,'7 credit memo type is lv_source_trx_type-> '||lv_source_trx_type);

1469: lv_source_trx_type := jai_constants.trx_type_cm_app ;
1470:
1471: END IF;
1472:
1473: fnd_file.put_line(fnd_file.LOG,'7 credit memo type is lv_source_trx_type-> '||lv_source_trx_type);
1474:
1475:
1476: IF ln_sign_of_credit_memo <> 0 THEN
1477: /*########################################################################################################

Line 1486: fnd_file.put_line(fnd_file.LOG,'4 start of invoice reference tax line, rec_c_get_refinvrec_for_upd.reference_id -> '|| rec_c_get_refinvrec_for_upd.reference_id );

1482: cp_inv_customer_trx_id => rec_c_get_cm_rec_app.inv_customer_trx_id
1483: )
1484: LOOP
1485:
1486: fnd_file.put_line(fnd_file.LOG,'4 start of invoice reference tax line, rec_c_get_refinvrec_for_upd.reference_id -> '|| rec_c_get_refinvrec_for_upd.reference_id );
1487:
1488:
1489: /*########################################################################################################
1490: || Calculation of the Service Tax Component of Credit Memo Tax Amount which needs to be considered

Line 1493: fnd_file.put_line(fnd_file.LOG,'8 Start of Credit Memo Service Tax Component calculation');

1489: /*########################################################################################################
1490: || Calculation of the Service Tax Component of Credit Memo Tax Amount which needs to be considered
1491: ########################################################################################################*/
1492:
1493: fnd_file.put_line(fnd_file.LOG,'8 Start of Credit Memo Service Tax Component calculation');
1494:
1495: ln_eff_cm_tax_amount := (abs(ln_total_tax_applied)/ln_inv_tot_tax_amt) * rec_c_get_refinvrec_for_upd.recoverable_amount; --modified by walton for inclusive tax 29-Nov-07
1496:
1497: fnd_file.put_line(fnd_file.LOG,'9 rec_c_get_cm_rec_app.cm_app_tax_amt effective -> '||rec_c_get_cm_rec_app.cm_app_tax_amt

Line 1497: fnd_file.put_line(fnd_file.LOG,'9 rec_c_get_cm_rec_app.cm_app_tax_amt effective -> '||rec_c_get_cm_rec_app.cm_app_tax_amt

1493: fnd_file.put_line(fnd_file.LOG,'8 Start of Credit Memo Service Tax Component calculation');
1494:
1495: ln_eff_cm_tax_amount := (abs(ln_total_tax_applied)/ln_inv_tot_tax_amt) * rec_c_get_refinvrec_for_upd.recoverable_amount; --modified by walton for inclusive tax 29-Nov-07
1496:
1497: fnd_file.put_line(fnd_file.LOG,'9 rec_c_get_cm_rec_app.cm_app_tax_amt effective -> '||rec_c_get_cm_rec_app.cm_app_tax_amt
1498: ||', ln_inv_tot_tax_amt -> '||ln_inv_tot_tax_amt
1499: ||', rec_c_get_refinvrec_for_upd.recoverable_amount -> '||rec_c_get_refinvrec_for_upd.recoverable_amount
1500: ||', cash receipt tax amount is ln_eff_cm_tax_amount -> '||ln_eff_cm_tax_amount
1501: ||', rec_c_get_refinvrec_for_upd.recovered_amount -> '||rec_c_get_refinvrec_for_upd.recovered_amount);

Line 1516: fnd_file.put_line(fnd_file.LOG,'10 rec_c_get_refinvrec_for_upd.recovered_amount + ln_eff_cm_tax_amount -> rec_c_get_refinvrec_for_upd.recoverable_amount hence ln_eff_cm_tax_amount '||ln_eff_cm_tax_amount);

1512: || IF yes then set Credit Memo amount = recoverable amount - recovered amount
1513: || so that the recovered amount never exceeds the recoverable amount
1514: */
1515: ln_eff_cm_tax_amount := (rec_c_get_refinvrec_for_upd.recoverable_amount - rec_c_get_refinvrec_for_upd.recovered_amount) ;
1516: fnd_file.put_line(fnd_file.LOG,'10 rec_c_get_refinvrec_for_upd.recovered_amount + ln_eff_cm_tax_amount -> rec_c_get_refinvrec_for_upd.recoverable_amount hence ln_eff_cm_tax_amount '||ln_eff_cm_tax_amount);
1517: END IF;
1518:
1519:
1520: /*########################################################################################################

Line 1528: fnd_file.put_line(fnd_file.LOG,' 14 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry ' );

1524: || Make an entry into the repository with the apportioned Credit Memo Tax amount to be applied against a reference invoice
1525: */
1526: /* ln_amount := abs(ln_eff_cm_tax_amount) * ln_sign_of_credit_memo ; */
1527: ln_amount := abs(ln_eff_cm_tax_amount) ;
1528: fnd_file.put_line(fnd_file.LOG,' 14 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
1529:
1530: /*csahoo for bug#5879769...start*/
1531:
1532: ln_organization_id := NULL;

Line 1547: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);

1543: p_process_message => lv_process_message
1544: );
1545:
1546: IF lv_process_flag <> jai_constants.successful THEN
1547: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
1548: return;
1549: END IF;
1550:
1551: /*csahoo for bug#5879769...end*/

Line 1592: fnd_file.put_line(fnd_file.LOG,' 15 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );

1588: p_attribute2 => rec_c_get_cm_rec_app.cm_customer_trx_id
1589: , p_accntg_required_flag => jai_constants.yes --File.Sql.35 Cbabu
1590: );
1591:
1592: fnd_file.put_line(fnd_file.LOG,' 15 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
1593:
1594:
1595: IF lv_process_flag = jai_constants.expected_error OR
1596: lv_process_flag = jai_constants.unexpected_error

Line 1605: fnd_file.put_line( fnd_file.log, '16 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag

1601: ||2. Set out variables p_process_flag and p_process_message accordingly
1602: */
1603: ln_receivable_application_id := rec_c_get_cm_rec_app.receivable_application_id ;
1604: ROLLBACK to roll_to_cm_app;
1605: fnd_file.put_line( fnd_file.log, '16 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag
1606: ||', lv_process_message'||lv_process_message);
1607: p_process_flag := lv_process_flag ;
1608: p_process_message := lv_process_message ;
1609: EXIT;

Line 1617: fnd_file.put_line(fnd_file.LOG,' 11 before call to jai_cmn_rgm_recording_pkg.update_reference for updating invoice reference' );

1613: /*########################################################################################################
1614: || Update the Invoice Reference Recovered Amount with the effective Credit Memo tax amount
1615: ########################################################################################################*/
1616:
1617: fnd_file.put_line(fnd_file.LOG,' 11 before call to jai_cmn_rgm_recording_pkg.update_reference for updating invoice reference' );
1618:
1619: jai_cmn_rgm_recording_pkg.update_reference (
1620: p_source => p_source ,
1621: p_reference_id => rec_c_get_refinvrec_for_upd.reference_id ,

Line 1637: fnd_file.put_line( fnd_file.log, '12 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag

1633: ln_receivable_application_id := rec_c_get_cm_rec_app.receivable_application_id ;
1634: ROLLBACK to roll_to_cm_app;
1635: p_process_flag := lv_process_flag ;
1636: p_process_message := lv_process_message ;
1637: fnd_file.put_line( fnd_file.log, '12 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag
1638: ||', lv_process_message'||lv_process_message);
1639:
1640: EXIT;
1641: END IF;

Line 1644: fnd_file.put_line(fnd_file.LOG,' 13 Returned from jai_cmn_rgm_recording_pkg.update_reference after updating invoice reference' );

1640: EXIT;
1641: END IF;
1642:
1643:
1644: fnd_file.put_line(fnd_file.LOG,' 13 Returned from jai_cmn_rgm_recording_pkg.update_reference after updating invoice reference' );
1645:
1646: /*
1647: || Get the sum of the effective cm tax amount applied across all the reference invoice lines
1648: */

Line 1651: fnd_file.put_line( fnd_file.log, '17 value of ln_eff_cm_tottax_amt is - '||ln_eff_cm_tottax_amt );

1647: || Get the sum of the effective cm tax amount applied across all the reference invoice lines
1648: */
1649: ln_eff_cm_tottax_amt := nvl(abs(ln_eff_cm_tottax_amt),0) + abs(ln_eff_cm_tax_amount);
1650:
1651: fnd_file.put_line( fnd_file.log, '17 value of ln_eff_cm_tottax_amt is - '||ln_eff_cm_tottax_amt );
1652: END LOOP; -- End of Invoice Reference line processing
1653:
1654:
1655:

Line 1676: fnd_file.put_line(fnd_file.LOG,'18 Total Effective CM recoverable amount ln_tot_effcm_rb_amt - ' || ln_tot_effcm_rb_amt

1672: || Get the ratio in which the CM needs to be apportioned
1673: */
1674: ln_cm_ref_ratio := abs(ln_eff_cm_tottax_amt)/abs(ln_tot_effcm_rb_amt);
1675:
1676: fnd_file.put_line(fnd_file.LOG,'18 Total Effective CM recoverable amount ln_tot_effcm_rb_amt - ' || ln_tot_effcm_rb_amt
1677: ||', actual total cm apportioned amoungst ln_eff_cm_tottax_amt - '|| ln_eff_cm_tottax_amt
1678: ||', cm eff ratio ln_cm_ref_ratio - '||ln_cm_ref_ratio
1679: );
1680:

Line 1695: fnd_file.put_line(fnd_file.LOG,'19 Processing Credit memo reference tax line, rec_c_get_refcmrec_for_upd.reference_id -> '|| rec_c_get_refcmrec_for_upd.reference_id );

1691: || Initialize the variable ln_cm_ref_upd
1692: */
1693: ln_cm_ref_upd := null;
1694:
1695: fnd_file.put_line(fnd_file.LOG,'19 Processing Credit memo reference tax line, rec_c_get_refcmrec_for_upd.reference_id -> '|| rec_c_get_refcmrec_for_upd.reference_id );
1696:
1697: /*
1698: || Calculate the value of ln_cm_ref_upd
1699: */

Line 1726: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);

1722: p_process_message => lv_process_message
1723: );
1724:
1725: IF lv_process_flag <> jai_constants.successful THEN
1726: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
1727: return;
1728: END IF;
1729:
1730: /*csahoo for bug#5879769...end*/

Line 1732: fnd_file.put_line(fnd_file.LOG,' 23 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry ' );

1728: END IF;
1729:
1730: /*csahoo for bug#5879769...end*/
1731:
1732: fnd_file.put_line(fnd_file.LOG,' 23 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
1733: lv_attribute_context := 'CM-CM-APP';--rchandan for bug#4428980
1734: jai_cmn_rgm_recording_pkg.insert_repository_entry (
1735: p_repository_id => ln_repository_id ,
1736: p_regime_id => p_regime_id ,

Line 1771: fnd_file.put_line(fnd_file.LOG,' 24 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );

1767: p_attribute2 => rec_c_get_cm_rec_app.cm_customer_trx_id
1768: , p_accntg_required_flag => jai_constants.yes --File.Sql.35 Cbabu
1769: );
1770:
1771: fnd_file.put_line(fnd_file.LOG,' 24 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
1772:
1773:
1774: IF lv_process_flag = jai_constants.expected_error OR
1775: lv_process_flag = jai_constants.unexpected_error

Line 1783: fnd_file.put_line( fnd_file.log, '25 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag

1779: ||1. Rollback to save point
1780: ||2. Set out variables p_process_flag and p_process_message accordingly
1781: */
1782: ROLLBACK to roll_to_cm_app;
1783: fnd_file.put_line( fnd_file.log, '25 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag
1784: ||', lv_process_message'||lv_process_message);
1785: p_process_flag := lv_process_flag ;
1786: p_process_message := lv_process_message ;
1787: EXIT;

Line 1791: fnd_file.put_line(fnd_file.LOG,' 20 before call to jai_cmn_rgm_recording_pkg.update_reference for credit memo references '

1787: EXIT;
1788: END IF;
1789:
1790:
1791: fnd_file.put_line(fnd_file.LOG,' 20 before call to jai_cmn_rgm_recording_pkg.update_reference for credit memo references '
1792: ||' ,abs(rec_c_get_refcmrec_for_upd.recoverable_amount) -> '||abs(rec_c_get_refcmrec_for_upd.recoverable_amount)
1793: ||' ,recovered amount i.e ln_cm_ref_upd -> '||ln_cm_ref_upd
1794: );
1795:

Line 1807: fnd_file.put_line(fnd_file.LOG,' 21 Returned from jai_cmn_rgm_recording_pkg.update_reference for credit memo references' );

1803: p_recovered_amount => ln_cm_ref_upd ,
1804: p_process_flag => lv_process_flag ,
1805: p_process_message => lv_process_message
1806: );
1807: fnd_file.put_line(fnd_file.LOG,' 21 Returned from jai_cmn_rgm_recording_pkg.update_reference for credit memo references' );
1808:
1809: IF lv_process_flag = jai_constants.expected_error OR
1810: lv_process_flag = jai_constants.unexpected_error
1811: THEN

Line 1818: fnd_file.put_line( fnd_file.log, '22 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag

1814: ||1. Rollback to save point
1815: ||2. Set out variables p_process_flag and p_process_message accordingly
1816: */
1817: ROLLBACK to roll_to_cm_app;
1818: fnd_file.put_line( fnd_file.log, '22 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag
1819: ||', lv_process_message'||lv_process_message);
1820: p_process_flag := lv_process_flag ;
1821: p_process_message := lv_process_message ;
1822: EXIT;

Line 1831: fnd_file.put_line(fnd_file.LOG,' 26 Finished processing the receivable' );

1827:
1828: END IF; /* End if of sign of credit memo*/
1829:
1830: ln_uncommitted_transactions := ln_uncommitted_transactions + 1;
1831: fnd_file.put_line(fnd_file.LOG,' 26 Finished processing the receivable' );
1832:
1833: IF ln_uncommitted_transactions >= 500 THEN
1834: commit;
1835: ln_uncommitted_transactions := 0;

Line 1841: fnd_file.put_line(fnd_file.LOG,' 27 In exception section of jai_ar_rgm_processing_pkg.populate_cm_app' );

1837: END LOOP; -- End of receivables fetch loop
1838:
1839: EXCEPTION
1840: WHEN OTHERS THEN
1841: fnd_file.put_line(fnd_file.LOG,' 27 In exception section of jai_ar_rgm_processing_pkg.populate_cm_app' );
1842: p_process_flag := jai_constants.unexpected_error;
1843: p_process_message := 'Unexpected error occured while processing jai_ar_rgm_processing_pkg.populate_cm_app'||SQLERRM ;
1844: END populate_cm_app;
1845:

Line 2024: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_rgm_process_ar.populate_receipt_records' );

2020:
2021:
2022: BEGIN
2023:
2024: fnd_file.put_line(fnd_file.LOG,'1 Entering procedure : jai_rgm_process_ar.populate_receipt_records' );
2025:
2026: /*
2027: ||Initialize the variables
2028: */

Line 2039: fnd_file.put_line(fnd_file.LOG,'2 processing cash receipt with receivable_application_id as '||rec_c_get_rec_app.receivable_application_id

2035: *****/
2036: FOR rec_c_get_rec_app IN c_get_rec_app ( cp_source_ar => p_source )
2037: LOOP
2038:
2039: fnd_file.put_line(fnd_file.LOG,'2 processing cash receipt with receivable_application_id as '||rec_c_get_rec_app.receivable_application_id
2040: ||'against invoice with customer_trx_id '||rec_c_get_rec_app.customer_trx_id );
2041:
2042: /*########################################################################################################
2043: || Initializing the variables

Line 2055: fnd_file.put_line(fnd_file.LOG,'3 Variables initialized' );

2051: lv_process_message := null ;
2052:
2053: ln_inclusive_total_amt := null ; --added by walton for inclusive tax 29-Nov-07
2054:
2055: fnd_file.put_line(fnd_file.LOG,'3 Variables initialized' );
2056:
2057: SAVEPOINT roll_to_last_receivable;
2058:
2059: OPEN cur_get_inv_tottax_amt (cp_inv_customer_trx_id => rec_c_get_rec_app.customer_trx_id);

Line 2084: fnd_file.put_line(fnd_file.LOG,'4 start of invoice reference tax line , rec_c_get_refrec_for_upd.reference_id -> '|| rec_c_get_refrec_for_upd.reference_id );

2080: cp_customer_trx_id => rec_c_get_rec_app.customer_trx_id
2081: )
2082: LOOP
2083:
2084: fnd_file.put_line(fnd_file.LOG,'4 start of invoice reference tax line , rec_c_get_refrec_for_upd.reference_id -> '|| rec_c_get_refrec_for_upd.reference_id );
2085: lv_attribute_context := NULL;
2086: /*########################################################################################################
2087: || Determine the receipt Application Type (Receipt Application, Receipt Reversal)
2088: ########################################################################################################*/

Line 2089: fnd_file.put_line(fnd_file.LOG,'5 start of determine application source type');

2085: lv_attribute_context := NULL;
2086: /*########################################################################################################
2087: || Determine the receipt Application Type (Receipt Application, Receipt Reversal)
2088: ########################################################################################################*/
2089: fnd_file.put_line(fnd_file.LOG,'5 start of determine application source type');
2090:
2091: /*
2092: || If the cash receipt tax amount is -ve then it is RECEIPT REVERSAL/UNAPPLICATION
2093: || IF the cash receipt tax receipt amount is +ve then it is RECEIPT APPLICATION

Line 2116: fnd_file.put_line(fnd_file.LOG,'6 cash receipt has sign = 0 i.e tax applied amount = 0 hence exit ');

2112: ELSE
2113: /*
2114: || cash receipt amount is zero hence exit current loop and process next receipt application
2115: */
2116: fnd_file.put_line(fnd_file.LOG,'6 cash receipt has sign = 0 i.e tax applied amount = 0 hence exit ');
2117: exit;
2118: END IF;
2119:
2120: fnd_file.put_line(fnd_file.LOG,'7 cash receipt is lv_source_trx_type->'||lv_source_trx_type);

Line 2120: fnd_file.put_line(fnd_file.LOG,'7 cash receipt is lv_source_trx_type->'||lv_source_trx_type);

2116: fnd_file.put_line(fnd_file.LOG,'6 cash receipt has sign = 0 i.e tax applied amount = 0 hence exit ');
2117: exit;
2118: END IF;
2119:
2120: fnd_file.put_line(fnd_file.LOG,'7 cash receipt is lv_source_trx_type->'||lv_source_trx_type);
2121:
2122: /*########################################################################################################
2123: || Calculation of the Service Tax Component of Cash Receipt Tax Amount which needs to be considered
2124: ########################################################################################################*/

Line 2126: fnd_file.put_line(fnd_file.LOG,'8 Start of Cash Receipt Service Tax Component calculation, ln_inv_tot_tax_amt'||ln_inv_tot_tax_amt);

2122: /*########################################################################################################
2123: || Calculation of the Service Tax Component of Cash Receipt Tax Amount which needs to be considered
2124: ########################################################################################################*/
2125:
2126: fnd_file.put_line(fnd_file.LOG,'8 Start of Cash Receipt Service Tax Component calculation, ln_inv_tot_tax_amt'||ln_inv_tot_tax_amt);
2127:
2128: ln_eff_cr_tax_amount := (ln_total_tax_applied/ln_inv_tot_tax_amt ) * rec_c_get_refrec_for_upd.recoverable_amount ; --modified by walton for inclusive tax 29-Nov-07
2129:
2130:

Line 2139: fnd_file.put_line(fnd_file.LOG,'10 rec_c_get_refrec_for_upd.recovered_amount + ln_eff_cr_tax_amount < 0 , ln_eff_cr_tax_amount '||ln_eff_cr_tax_amount);

2135: || so that the net recovered amount equals zero.
2136: */
2137: ln_eff_cr_tax_amount := rec_c_get_refrec_for_upd.recovered_amount * rec_c_get_rec_app.sign_of_cash_receipt;
2138:
2139: fnd_file.put_line(fnd_file.LOG,'10 rec_c_get_refrec_for_upd.recovered_amount + ln_eff_cr_tax_amount < 0 , ln_eff_cr_tax_amount '||ln_eff_cr_tax_amount);
2140:
2141:
2142: ELSIF rec_c_get_refrec_for_upd.recovered_amount + ln_eff_cr_tax_amount > rec_c_get_refrec_for_upd.recoverable_amount THEN
2143: /*

Line 2150: fnd_file.put_line(fnd_file.LOG,'11 rec_c_get_refrec_for_upd.recovered_amount + ln_eff_cr_tax_amount > rec_c_get_refrec_for_upd.recoverable_amount hence ln_eff_cr_tax_amount '||ln_eff_cr_tax_amount);

2146: || IF yes then set cash receipt amount = recoverable amount - recovered amount
2147: || so that the recovered amount never exceeds the recoverable amount
2148: */
2149: ln_eff_cr_tax_amount := rec_c_get_refrec_for_upd.recoverable_amount - rec_c_get_refrec_for_upd.recovered_amount ;
2150: fnd_file.put_line(fnd_file.LOG,'11 rec_c_get_refrec_for_upd.recovered_amount + ln_eff_cr_tax_amount > rec_c_get_refrec_for_upd.recoverable_amount hence ln_eff_cr_tax_amount '||ln_eff_cr_tax_amount);
2151: END IF;
2152:
2153:
2154: /*########################################################################################################

Line 2160: fnd_file.put_line(fnd_file.LOG,'9 rec_c_get_rec_app.cr_tax_disc_amt effective ->'||rec_c_get_rec_app.cr_tax_disc_amt

2156: ########################################################################################################*/
2157:
2158: ln_eff_cr_disc_amount := (rec_c_get_rec_app.cr_tax_disc_amt/ln_inv_tot_tax_amt) * rec_c_get_refrec_for_upd.recoverable_amount ;
2159:
2160: fnd_file.put_line(fnd_file.LOG,'9 rec_c_get_rec_app.cr_tax_disc_amt effective ->'||rec_c_get_rec_app.cr_tax_disc_amt
2161: ||', ln_inv_tot_tax_amt ->'||ln_inv_tot_tax_amt
2162: ||', rec_c_get_refrec_for_upd.recoverable_amount ->'||rec_c_get_refrec_for_upd.recoverable_amount
2163: ||', cash receipt tax amount is ln_eff_cr_tax_amount ->'||ln_eff_cr_tax_amount
2164: ||', rec_c_get_refrec_for_upd.recovered_amount ->'||rec_c_get_refrec_for_upd.recovered_amount);

Line 2176: fnd_file.put_line(fnd_file.LOG,'10 effective recovered amount > effective recoverable amount hence, ln_eff_cr_disc_amount '||ln_eff_cr_disc_amount);

2172: || Keeping this condition in mind , the discounted amount should get adjusted
2173: */
2174: ln_eff_cr_disc_amount := nvl(rec_c_get_refrec_for_upd.recoverable_amount,0) - (nvl(rec_c_get_refrec_for_upd.recovered_amount,0) + nvl(ln_eff_cr_tax_amount,0) );
2175:
2176: fnd_file.put_line(fnd_file.LOG,'10 effective recovered amount > effective recoverable amount hence, ln_eff_cr_disc_amount '||ln_eff_cr_disc_amount);
2177:
2178: ELSIF rec_c_get_refrec_for_upd.discounted_amount + ln_eff_cr_disc_amount < 0 THEN
2179: /*
2180: || -ve discounted amount

Line 2185: fnd_file.put_line(fnd_file.LOG,'10 rec_c_get_refrec_for_upd.discounted_amount + ln_eff_cr_disc_amount < 0 , ln_eff_cr_tax_amount '||ln_eff_cr_tax_amount);

2181: || The total discounted amount cannot be lesser than 0
2182: */
2183: ln_eff_cr_disc_amount := rec_c_get_refrec_for_upd.discounted_amount * rec_c_get_rec_app.sign_of_cr_disc;
2184:
2185: fnd_file.put_line(fnd_file.LOG,'10 rec_c_get_refrec_for_upd.discounted_amount + ln_eff_cr_disc_amount < 0 , ln_eff_cr_tax_amount '||ln_eff_cr_tax_amount);
2186:
2187: END IF;
2188:
2189: /*########################################################################################################

Line 2213: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);

2209: p_process_message => lv_process_message
2210: );
2211:
2212: IF lv_process_flag <> jai_constants.successful THEN
2213: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
2214: return;
2215: END IF;
2216:
2217: /*csahoo for bug#5879769...end*/

Line 2220: fnd_file.put_line(fnd_file.LOG,' 14 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry ' );

2216:
2217: /*csahoo for bug#5879769...end*/
2218:
2219:
2220: fnd_file.put_line(fnd_file.LOG,' 14 before call to jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
2221:
2222: jai_cmn_rgm_recording_pkg.insert_repository_entry (
2223: p_repository_id => ln_repository_id ,
2224: p_regime_id => p_regime_id ,

Line 2260: fnd_file.put_line(fnd_file.LOG,' 15 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );

2256: p_attribute2 => rec_c_get_rec_app.cash_receipt_id
2257: , p_accntg_required_flag => jai_constants.yes --File.Sql.35 Cbabu
2258: );
2259:
2260: fnd_file.put_line(fnd_file.LOG,' 15 Returned from jai_cmn_rgm_recording_pkg.insert_repository_entry ' );
2261:
2262:
2263: IF lv_process_flag = jai_constants.expected_error OR
2264: lv_process_flag = jai_constants.unexpected_error

Line 2275: fnd_file.put_line( fnd_file.log, '16 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag

2271: ln_receivable_application_id := rec_c_get_rec_app.receivable_application_id;
2272: ROLLBACK to roll_to_last_receivable;
2273: p_process_flag := lv_process_flag ;
2274: p_process_message := lv_process_message ;
2275: fnd_file.put_line( fnd_file.log, '16 error in call to jai_cmn_rgm_recording_pkg.insert_repository_entry - lv_process_flag '||lv_process_flag
2276: ||', lv_process_message'||lv_process_message);
2277: EXIT;
2278: END IF;
2279:

Line 2285: fnd_file.put_line(fnd_file.LOG,' 12 before call to jai_cmn_rgm_recording_pkg.update_reference ' );

2281: /*########################################################################################################
2282: || update the effective cash receipt tax amount into the reference table
2283: ########################################################################################################*/
2284:
2285: fnd_file.put_line(fnd_file.LOG,' 12 before call to jai_cmn_rgm_recording_pkg.update_reference ' );
2286:
2287: savepoint before_ref_upd;
2288: jai_cmn_rgm_recording_pkg.update_reference (
2289: p_source => p_source ,

Line 2309: fnd_file.put_line( fnd_file.log, '12.1 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag

2305: ln_receivable_application_id := rec_c_get_rec_app.receivable_application_id;
2306: ROLLBACK to roll_to_last_receivable;
2307: p_process_flag := lv_process_flag ;
2308: p_process_message := lv_process_message ;
2309: fnd_file.put_line( fnd_file.log, '12.1 error in call to jai_cmn_rgm_recording_pkg.update_reference - lv_process_flag '||lv_process_flag
2310: ||', lv_process_message'||lv_process_message);
2311:
2312: EXIT;
2313: END IF;

Line 2315: fnd_file.put_line(fnd_file.LOG,' 13 Returned from jai_cmn_rgm_recording_pkg.update_reference ' );

2311:
2312: EXIT;
2313: END IF;
2314:
2315: fnd_file.put_line(fnd_file.LOG,' 13 Returned from jai_cmn_rgm_recording_pkg.update_reference ' );
2316:
2317: END LOOP;
2318:
2319: ln_uncommitted_transactions := ln_uncommitted_transactions + 1;

Line 2320: fnd_file.put_line(fnd_file.LOG,' 17 Finished processing the cash receipt ' );

2316:
2317: END LOOP;
2318:
2319: ln_uncommitted_transactions := ln_uncommitted_transactions + 1;
2320: fnd_file.put_line(fnd_file.LOG,' 17 Finished processing the cash receipt ' );
2321:
2322: IF ln_uncommitted_transactions >= 50 THEN
2323: commit;
2324: ln_uncommitted_transactions := 0;

Line 2357: fnd_file.put_line(fnd_file.LOG,'############################## 1 START OF PROCEDURE TO jai_ar_rgm_processing_pkg.PROCESS_RECORDS ############################## ');

2353: lv_process_message VARCHAR2(1996) ;
2354: lv_organization_id jai_rgm_parties.organization_id%type;
2355: BEGIN
2356:
2357: fnd_file.put_line(fnd_file.LOG,'############################## 1 START OF PROCEDURE TO jai_ar_rgm_processing_pkg.PROCESS_RECORDS ############################## ');
2358:
2359: /*########################################################################################################
2360: || VARIABLES INITIALIZATION
2361: ########################################################################################################*/

Line 2371: fnd_file.put_line(fnd_file.LOG,'2 i/p is p_regime_id ->'||p_regime_id

2367:
2368: p_process_flag := lv_process_flag ;
2369: p_process_message := lv_process_message ;
2370:
2371: fnd_file.put_line(fnd_file.LOG,'2 i/p is p_regime_id ->'||p_regime_id
2372: ||', p_regime_id ->'||p_regime_id
2373: ||', p_organization_type ->'||p_organization_type
2374: ||', p_from_date ->'||p_from_date
2375: ||', p_to_date ->'||p_to_date

Line 2385: fnd_file.put_line(fnd_file.LOG,'############################## 3 BEFORE CALL TO jai_ar_rgm_processing_pkg.POPULATE_INV_CM_REFERENCES ##############################');

2381: /*########################################################################################################
2382: || PROCESS AR INVOICE AND CREDIT MEMO'S FOR REFERENCE ENTRIES
2383: ########################################################################################################*/
2384:
2385: fnd_file.put_line(fnd_file.LOG,'############################## 3 BEFORE CALL TO jai_ar_rgm_processing_pkg.POPULATE_INV_CM_REFERENCES ##############################');
2386:
2387: populate_inv_cm_references ( p_regime_id => p_regime_id ,
2388: p_organization_type => p_organization_type ,
2389: p_organization_id => p_organization_id ,/*5879769*/

Line 2409: fnd_file.put_line( fnd_file.log, '4 ERROR IN CALL TO jai_ar_rgm_processing_pkg.POPULATE_INV_CM_REFERENCES - lv_process_flag '||lv_process_flag

2405: || As Returned status is an error hence:-
2406: || Set out variables p_process_flag and p_process_message accordingly
2407: */
2408:
2409: fnd_file.put_line( fnd_file.log, '4 ERROR IN CALL TO jai_ar_rgm_processing_pkg.POPULATE_INV_CM_REFERENCES - lv_process_flag '||lv_process_flag
2410: ||', lv_process_message'||lv_process_message);
2411: p_process_flag := lv_process_flag ;
2412: p_process_message := lv_process_message ;
2413: END IF;

Line 2415: fnd_file.put_line(fnd_file.LOG,'############################## 5 RETURNED FROM jai_ar_rgm_processing_pkg.POPULATE_INV_CM_REFERENCES'||'lv_process_flag - '||lv_process_flag||

2411: p_process_flag := lv_process_flag ;
2412: p_process_message := lv_process_message ;
2413: END IF;
2414:
2415: fnd_file.put_line(fnd_file.LOG,'############################## 5 RETURNED FROM jai_ar_rgm_processing_pkg.POPULATE_INV_CM_REFERENCES'||'lv_process_flag - '||lv_process_flag||
2416: ' lv_process_message- '||lv_process_message||'############################## ');
2417:
2418:
2419: /*########################################################################################################

Line 2427: fnd_file.put_line(fnd_file.LOG,'############################## 6 BEFORE CALL TO jai_ar_rgm_processing_pkg.DELETE_NON_EXISTANT_CM ############################## ');

2423: /*
2424: || Reverse all those AR Credit Memo's which have been incompleted/incompleted
2425: || and deleted from base ar tables
2426: */
2427: fnd_file.put_line(fnd_file.LOG,'############################## 6 BEFORE CALL TO jai_ar_rgm_processing_pkg.DELETE_NON_EXISTANT_CM ############################## ');
2428:
2429: delete_non_existant_cm ( p_regime_id => p_regime_id ,
2430: p_organization_type => p_organization_type ,
2431: p_organization_id => p_organization_id ,/*5879769*/

Line 2449: fnd_file.put_line( fnd_file.log, '7 ERROR IN CALL TO jai_ar_rgm_processing_pkg.DELETE_NON_EXISTANT_CM - lv_process_flag '||lv_process_flag

2445: || As Returned status is an error hence:-
2446: || Set out variables p_process_flag and p_process_message accordingly
2447: */
2448:
2449: fnd_file.put_line( fnd_file.log, '7 ERROR IN CALL TO jai_ar_rgm_processing_pkg.DELETE_NON_EXISTANT_CM - lv_process_flag '||lv_process_flag
2450: ||', lv_process_message'||lv_process_message);
2451: p_process_flag := lv_process_flag ;
2452: p_process_message := lv_process_message ;
2453: END IF;

Line 2456: fnd_file.put_line(fnd_file.LOG,'############################## 8 RETURNED FROM jai_ar_rgm_processing_pkg.DELETE_NON_EXISTANT_CM'||'lv_process_flag - '||lv_process_flag||

2452: p_process_message := lv_process_message ;
2453: END IF;
2454:
2455:
2456: fnd_file.put_line(fnd_file.LOG,'############################## 8 RETURNED FROM jai_ar_rgm_processing_pkg.DELETE_NON_EXISTANT_CM'||'lv_process_flag - '||lv_process_flag||
2457: ' lv_process_message- '||lv_process_message||'############################## ');
2458:
2459:
2460: /*########################################################################################################

Line 2465: fnd_file.put_line(fnd_file.LOG,'############################## 9 BEFORE CALL TO jai_ar_rgm_processing_pkg.POPULATE_CM_APP ############################## ');

2461: || PROCESS AR CREDIT MEMO APPLICATIONS AGAINST INVOICES
2462: ########################################################################################################*/
2463:
2464:
2465: fnd_file.put_line(fnd_file.LOG,'############################## 9 BEFORE CALL TO jai_ar_rgm_processing_pkg.POPULATE_CM_APP ############################## ');
2466:
2467: populate_cm_app ( p_regime_id => p_regime_id ,
2468: p_organization_type => p_organization_type ,
2469: p_organization_id => p_organization_id ,/*5879769*/

Line 2487: fnd_file.put_line( fnd_file.log, '10 error in call to jai_ar_rgm_processing_pkg.populate_cm_app - lv_process_flag '||lv_process_flag

2483: /*
2484: || As Returned status is an error hence:-
2485: || Set out variables p_process_flag and p_process_message accordingly
2486: */
2487: fnd_file.put_line( fnd_file.log, '10 error in call to jai_ar_rgm_processing_pkg.populate_cm_app - lv_process_flag '||lv_process_flag
2488: ||', lv_process_message'||lv_process_message);
2489: p_process_flag := lv_process_flag ;
2490: p_process_message := lv_process_message ;
2491: END IF;

Line 2494: fnd_file.put_line(fnd_file.LOG,'############################## 11 RETURNED FROM CALL TO jai_ar_rgm_processing_pkg.POPULATE_CM_APP '||'lv_process_flag - '||lv_process_flag||

2490: p_process_message := lv_process_message ;
2491: END IF;
2492:
2493:
2494: fnd_file.put_line(fnd_file.LOG,'############################## 11 RETURNED FROM CALL TO jai_ar_rgm_processing_pkg.POPULATE_CM_APP '||'lv_process_flag - '||lv_process_flag||
2495: ' lv_process_message- '||lv_process_message||'##############################');
2496:
2497:
2498: /*########################################################################################################

Line 2503: fnd_file.put_line(fnd_file.LOG,'############################## 12 BEFORE CALL TO jai_ar_rgm_processing_pkg.POPULATE_RECEIPT_RECORDS ##############################');

2499: || PROCESS AR CASH RECEIPT APPLICATIONS AGAINST INVOICES
2500: ########################################################################################################*/
2501:
2502:
2503: fnd_file.put_line(fnd_file.LOG,'############################## 12 BEFORE CALL TO jai_ar_rgm_processing_pkg.POPULATE_RECEIPT_RECORDS ##############################');
2504:
2505: populate_receipt_records ( p_regime_id => p_regime_id ,
2506: p_organization_type => p_organization_type ,
2507: p_organization_id => p_organization_id ,/*5879769*/

Line 2524: fnd_file.put_line( fnd_file.log, '13 ERROR IN CALL TO jai_ar_rgm_processing_pkg.POPULATE_RECEIPT_RECORDS - lv_process_flag '||lv_process_flag

2520: /*
2521: || As Returned status is an error hence:-
2522: || Set out variables p_process_flag and p_process_message accordingly
2523: */
2524: fnd_file.put_line( fnd_file.log, '13 ERROR IN CALL TO jai_ar_rgm_processing_pkg.POPULATE_RECEIPT_RECORDS - lv_process_flag '||lv_process_flag
2525: ||', lv_process_message'||lv_process_message);
2526: p_process_flag := lv_process_flag ;
2527: p_process_message := lv_process_message ;
2528: END IF;

Line 2530: fnd_file.put_line(fnd_file.LOG,'##############################14 RETURNED FROM jai_ar_rgm_processing_pkg.POPULATE_RECEIPT_RECORDS'||'lv_process_flag - '||lv_process_flag||

2526: p_process_flag := lv_process_flag ;
2527: p_process_message := lv_process_message ;
2528: END IF;
2529:
2530: fnd_file.put_line(fnd_file.LOG,'##############################14 RETURNED FROM jai_ar_rgm_processing_pkg.POPULATE_RECEIPT_RECORDS'||'lv_process_flag - '||lv_process_flag||
2531: ' lv_process_message- '||lv_process_message||'##############################');
2532:
2533:
2534: fnd_file.put_line(fnd_file.LOG,'############################## 15 END OF PROCEDURE TO jai_ar_rgm_processing_pkg.PROCESS_RECORDS - ##############################');

Line 2534: fnd_file.put_line(fnd_file.LOG,'############################## 15 END OF PROCEDURE TO jai_ar_rgm_processing_pkg.PROCESS_RECORDS - ##############################');

2530: fnd_file.put_line(fnd_file.LOG,'##############################14 RETURNED FROM jai_ar_rgm_processing_pkg.POPULATE_RECEIPT_RECORDS'||'lv_process_flag - '||lv_process_flag||
2531: ' lv_process_message- '||lv_process_message||'##############################');
2532:
2533:
2534: fnd_file.put_line(fnd_file.LOG,'############################## 15 END OF PROCEDURE TO jai_ar_rgm_processing_pkg.PROCESS_RECORDS - ##############################');
2535:
2536: EXCEPTION
2537: WHEN OTHERS THEN
2538: lv_process_flag := jai_constants.unexpected_error;