DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_RECORDING_PKG dependencies on JAI_CONSTANTS

Line 72: .user_je_category_name that is populated into GL_INTERFACE as jai_constants.je_category_rg_entry ('Register India')

68:
69: 4 19/03/2005 Vijay Shankar for Bug#4250236(4245089). FileVersion: 115.3
70: .added two new procedure insert_vat_repository_entry and do_vat_accounting, a function get_rgm_attribute_value
71: as part of VAT Impl.
72: .user_je_category_name that is populated into GL_INTERFACE as jai_constants.je_category_rg_entry ('Register India')
73:
74: * This is a Dependant Bug for future Versions of the Object *
75:
76: 5. 08-Jun-2005 File Version 116.2 Object is Modified to refer to New DB Entity names in place of Old DB Entity Names

Line 331: p_accntg_required_flag IN VARCHAR2, -- DEFAULT jai_constants.yes File.Sql.35 by Brathod

327: p_discounted_amount IN OUT NOCOPY NUMBER,
328: p_inv_organization_id IN NUMBER DEFAULT NULL,
329: p_settlement_id IN NUMBER DEFAULT NULL,
330: -- Following all parameters are required for GL Accounting if p_balancing_account_id value is not passed to this procedure call
331: p_accntg_required_flag IN VARCHAR2, -- DEFAULT jai_constants.yes File.Sql.35 by Brathod
332: p_accounting_date IN DATE , -- DEFAULT sysdate File.Sql.35 by Brathod
333: p_balancing_orgn_type IN VARCHAR2 DEFAULT NULL,
334: p_balancing_orgn_id IN NUMBER DEFAULT NULL,
335: p_balancing_location_id IN NUMBER DEFAULT NULL,

Line 338: p_currency_code IN VARCHAR2 , -- DEFAULT jai_constants.func_curr File.Sql.35 by Brathod

334: p_balancing_orgn_id IN NUMBER DEFAULT NULL,
335: p_balancing_location_id IN NUMBER DEFAULT NULL,
336: p_balancing_tax_type IN VARCHAR2 DEFAULT NULL,
337: p_balancing_accnt_name IN VARCHAR2 DEFAULT NULL,
338: p_currency_code IN VARCHAR2 , -- DEFAULT jai_constants.func_curr File.Sql.35 by Brathod
339: p_curr_conv_date IN VARCHAR2 DEFAULT NULL,
340: p_curr_conv_type IN VARCHAR2 DEFAULT NULL,
341: p_curr_conv_rate IN VARCHAR2 DEFAULT NULL,
342: p_trx_amount IN NUMBER DEFAULT NULL, -- recovered/liable service tax amount in foreign currency

Line 412: AND registration_type = jai_constants.regn_type_others

408: FROM JAI_RGM_ORG_REGNS_V
409: WHERE regime_id = p_regime_id
410: AND organization_id = p_organization_id
411: AND organization_type = p_organization_type
412: AND registration_type = jai_constants.regn_type_others
413: AND attribute_Type_code = p_att_type_code; --rchandan for bug#4428980
414:
415: lv_primary_regime_regno JAI_RGM_REGISTRATIONS.ATTRIBUTE_VALUE%TYPE;
416:

Line 482: IF lv_regime_code <> jai_constants.service_regime THEN

478: CLOSE cur_fetch_ou;
479:
480: lv_statement := '1';
481: -- REGIME Validation
482: IF lv_regime_code <> jai_constants.service_regime THEN
483: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath);
484: p_process_flag := jai_constants.expected_error;
485: p_process_message := 'Transactions other than SERVICE regime are not supported';
486: FND_FILE.put_line( FND_FILE.log, p_process_message);

Line 484: p_process_flag := jai_constants.expected_error;

480: lv_statement := '1';
481: -- REGIME Validation
482: IF lv_regime_code <> jai_constants.service_regime THEN
483: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath);
484: p_process_flag := jai_constants.expected_error;
485: p_process_message := 'Transactions other than SERVICE regime are not supported';
486: FND_FILE.put_line( FND_FILE.log, p_process_message);
487: fnd_file.put_line(fnd_file.log,p_process_message);
488: RETURN;

Line 492: p_amount := round(p_amount, jai_constants.service_rgm_rnd_factor);

488: RETURN;
489: END IF;
490:
491: -- Rounding of Service Tax that is hitting repository
492: p_amount := round(p_amount, jai_constants.service_rgm_rnd_factor);
493: p_discounted_amount := round(p_discounted_amount, jai_constants.service_rgm_rnd_factor);
494: IF p_trx_amount = 0 OR p_trx_amount IS NULL THEN
495: ln_trx_amount := NULL;
496: ELSE

Line 493: p_discounted_amount := round(p_discounted_amount, jai_constants.service_rgm_rnd_factor);

489: END IF;
490:
491: -- Rounding of Service Tax that is hitting repository
492: p_amount := round(p_amount, jai_constants.service_rgm_rnd_factor);
493: p_discounted_amount := round(p_discounted_amount, jai_constants.service_rgm_rnd_factor);
494: IF p_trx_amount = 0 OR p_trx_amount IS NULL THEN
495: ln_trx_amount := NULL;
496: ELSE
497: ln_trx_amount := round(p_trx_amount, jai_constants.service_rgm_rnd_factor);

Line 497: ln_trx_amount := round(p_trx_amount, jai_constants.service_rgm_rnd_factor);

493: p_discounted_amount := round(p_discounted_amount, jai_constants.service_rgm_rnd_factor);
494: IF p_trx_amount = 0 OR p_trx_amount IS NULL THEN
495: ln_trx_amount := NULL;
496: ELSE
497: ln_trx_amount := round(p_trx_amount, jai_constants.service_rgm_rnd_factor);
498: END IF;
499:
500: lv_statement := '2';
501: IF p_source IN (jai_constants.source_settle_in, jai_constants.source_settle_out) THEN

Line 501: IF p_source IN (jai_constants.source_settle_in, jai_constants.source_settle_out) THEN

497: ln_trx_amount := round(p_trx_amount, jai_constants.service_rgm_rnd_factor);
498: END IF;
499:
500: lv_statement := '2';
501: IF p_source IN (jai_constants.source_settle_in, jai_constants.source_settle_out) THEN
502: ld_transaction_date := p_transaction_date;
503: lv_codepath := jai_general_pkg.plot_codepath(2.1, lv_codepath);
504:
505: ELSE

Line 520: IF p_source = jai_constants.source_ar THEN

516: lv_statement := '2.1';
517: -- ~~~~~~~~~~~~~~~~~~~~~~~ Start of Repository Entry ~~~~~~~~~~~~~~~~~~~
518: --Added by Wenqiong for Bug 14253668 begin
519: ----------------------------------------------
520: IF p_source = jai_constants.source_ar THEN
521: OPEN check_trx_type(p_source_document_id);
522: FETCH check_trx_type INTO lv_ar_trx_type;
523: CLOSE check_trx_type;
524: END IF;

Line 529: IF p_source = jai_constants.source_ap THEN

525: ----------------------------------------------
526: --Added by Wenqiong for Bug 14253668 end
527:
528: /*Added for POT for CM/DM issue begin*/
529: IF p_source = jai_constants.source_ap THEN
530: if p_source_table_name = 'AP_INVOICE_DISTRIBUTIONS_ALL' then
531: OPEN cur_invoice_type(p_source_document_id);
532: FETCH cur_invoice_type INTO lv_invoice_type;
533: CLOSE cur_invoice_type;

Line 545: IF p_source = jai_constants.source_ap AND lv_invoice_type NOT IN ('DEBIT', 'CREDIT') --Updated for POT for CM/DM issue

541: ----------------------------------------------
542: --Added by Qiong for bug#13456083 end
543: END IF;
544: /*Added for POT for CM/DM issue begin*/
545: IF p_source = jai_constants.source_ap AND lv_invoice_type NOT IN ('DEBIT', 'CREDIT') --Updated for POT for CM/DM issue
546: --Added by Qiong for reverse charge bug#16001407
547: AND p_source_trx_type NOT IN ('REVERSE_PAID_ACCOUNTING','REVERSE_AVOID_ACCOUNTING','REVERSE_APPLY_ACCOUNTING','REVERSE_UNAPPLY_ACCOUNTING')
548: OR ( nvl(lv_ar_trx_type,'#') = jai_constants.ar_invoice_type_cm)--Added by Qiong for reverse charge bug#16001407
549: THEN--Updated for POT for CM/DM issue

Line 548: OR ( nvl(lv_ar_trx_type,'#') = jai_constants.ar_invoice_type_cm)--Added by Qiong for reverse charge bug#16001407

544: /*Added for POT for CM/DM issue begin*/
545: IF p_source = jai_constants.source_ap AND lv_invoice_type NOT IN ('DEBIT', 'CREDIT') --Updated for POT for CM/DM issue
546: --Added by Qiong for reverse charge bug#16001407
547: AND p_source_trx_type NOT IN ('REVERSE_PAID_ACCOUNTING','REVERSE_AVOID_ACCOUNTING','REVERSE_APPLY_ACCOUNTING','REVERSE_UNAPPLY_ACCOUNTING')
548: OR ( nvl(lv_ar_trx_type,'#') = jai_constants.ar_invoice_type_cm)--Added by Qiong for reverse charge bug#16001407
549: THEN--Updated for POT for CM/DM issue
550: lv_statement := '3';
551: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
552: lv_register_entry_type := jai_constants.credit;

Line 552: lv_register_entry_type := jai_constants.credit;

548: OR ( nvl(lv_ar_trx_type,'#') = jai_constants.ar_invoice_type_cm)--Added by Qiong for reverse charge bug#16001407
549: THEN--Updated for POT for CM/DM issue
550: lv_statement := '3';
551: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
552: lv_register_entry_type := jai_constants.credit;
553: lv_account_name := jai_constants.recovery;
554: lv_charge_entry_type := jai_constants.debit;
555: lv_balancing_accnt_name := jai_constants.recovery_interim;
556: lv_balancing_entry_type := jai_constants.credit;

Line 553: lv_account_name := jai_constants.recovery;

549: THEN--Updated for POT for CM/DM issue
550: lv_statement := '3';
551: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
552: lv_register_entry_type := jai_constants.credit;
553: lv_account_name := jai_constants.recovery;
554: lv_charge_entry_type := jai_constants.debit;
555: lv_balancing_accnt_name := jai_constants.recovery_interim;
556: lv_balancing_entry_type := jai_constants.credit;
557: --Added by Qiong for bug14253668 begin

Line 554: lv_charge_entry_type := jai_constants.debit;

550: lv_statement := '3';
551: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
552: lv_register_entry_type := jai_constants.credit;
553: lv_account_name := jai_constants.recovery;
554: lv_charge_entry_type := jai_constants.debit;
555: lv_balancing_accnt_name := jai_constants.recovery_interim;
556: lv_balancing_entry_type := jai_constants.credit;
557: --Added by Qiong for bug14253668 begin
558: IF nvl(lv_ar_trx_type,'#') = jai_constants.ar_invoice_type_cm THEN

Line 555: lv_balancing_accnt_name := jai_constants.recovery_interim;

551: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
552: lv_register_entry_type := jai_constants.credit;
553: lv_account_name := jai_constants.recovery;
554: lv_charge_entry_type := jai_constants.debit;
555: lv_balancing_accnt_name := jai_constants.recovery_interim;
556: lv_balancing_entry_type := jai_constants.credit;
557: --Added by Qiong for bug14253668 begin
558: IF nvl(lv_ar_trx_type,'#') = jai_constants.ar_invoice_type_cm THEN
559: p_amount := abs(p_amount);

Line 556: lv_balancing_entry_type := jai_constants.credit;

552: lv_register_entry_type := jai_constants.credit;
553: lv_account_name := jai_constants.recovery;
554: lv_charge_entry_type := jai_constants.debit;
555: lv_balancing_accnt_name := jai_constants.recovery_interim;
556: lv_balancing_entry_type := jai_constants.credit;
557: --Added by Qiong for bug14253668 begin
558: IF nvl(lv_ar_trx_type,'#') = jai_constants.ar_invoice_type_cm THEN
559: p_amount := abs(p_amount);
560: ln_trx_amount := abs(ln_trx_amount);

Line 558: IF nvl(lv_ar_trx_type,'#') = jai_constants.ar_invoice_type_cm THEN

554: lv_charge_entry_type := jai_constants.debit;
555: lv_balancing_accnt_name := jai_constants.recovery_interim;
556: lv_balancing_entry_type := jai_constants.credit;
557: --Added by Qiong for bug14253668 begin
558: IF nvl(lv_ar_trx_type,'#') = jai_constants.ar_invoice_type_cm THEN
559: p_amount := abs(p_amount);
560: ln_trx_amount := abs(ln_trx_amount);
561: END IF;
562: --Added by Qiong for bug14253668 end

Line 564: ELSIF p_source = jai_constants.source_ar OR lv_invoice_type IN ('DEBIT', 'CREDIT') --Updated for POT for CM/DM issue

560: ln_trx_amount := abs(ln_trx_amount);
561: END IF;
562: --Added by Qiong for bug14253668 end
563:
564: ELSIF p_source = jai_constants.source_ar OR lv_invoice_type IN ('DEBIT', 'CREDIT') --Updated for POT for CM/DM issue
565: AND nvl(lv_ar_trx_type,'#') <> jai_constants.ar_invoice_type_cm --Added by Qiong for reverse charge bug#16001407
566: --Added by Qiong for reverse charge bug#16001407
567: OR p_source_trx_type IN ('REVERSE_PAID_ACCOUNTING','REVERSE_AVOID_ACCOUNTING','REVERSE_APPLY_ACCOUNTING','REVERSE_UNAPPLY_ACCOUNTING') THEN
568: lv_statement := '4';

Line 565: AND nvl(lv_ar_trx_type,'#') <> jai_constants.ar_invoice_type_cm --Added by Qiong for reverse charge bug#16001407

561: END IF;
562: --Added by Qiong for bug14253668 end
563:
564: ELSIF p_source = jai_constants.source_ar OR lv_invoice_type IN ('DEBIT', 'CREDIT') --Updated for POT for CM/DM issue
565: AND nvl(lv_ar_trx_type,'#') <> jai_constants.ar_invoice_type_cm --Added by Qiong for reverse charge bug#16001407
566: --Added by Qiong for reverse charge bug#16001407
567: OR p_source_trx_type IN ('REVERSE_PAID_ACCOUNTING','REVERSE_AVOID_ACCOUNTING','REVERSE_APPLY_ACCOUNTING','REVERSE_UNAPPLY_ACCOUNTING') THEN
568: lv_statement := '4';
569: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);

Line 570: lv_register_entry_type := jai_constants.debit;

566: --Added by Qiong for reverse charge bug#16001407
567: OR p_source_trx_type IN ('REVERSE_PAID_ACCOUNTING','REVERSE_AVOID_ACCOUNTING','REVERSE_APPLY_ACCOUNTING','REVERSE_UNAPPLY_ACCOUNTING') THEN
568: lv_statement := '4';
569: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);
570: lv_register_entry_type := jai_constants.debit;
571: lv_account_name := jai_constants.liability;
572: lv_charge_entry_type := jai_constants.credit;
573: lv_balancing_accnt_name := jai_constants.liability_interim;
574: lv_balancing_entry_type := jai_constants.debit;

Line 571: lv_account_name := jai_constants.liability;

567: OR p_source_trx_type IN ('REVERSE_PAID_ACCOUNTING','REVERSE_AVOID_ACCOUNTING','REVERSE_APPLY_ACCOUNTING','REVERSE_UNAPPLY_ACCOUNTING') THEN
568: lv_statement := '4';
569: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);
570: lv_register_entry_type := jai_constants.debit;
571: lv_account_name := jai_constants.liability;
572: lv_charge_entry_type := jai_constants.credit;
573: lv_balancing_accnt_name := jai_constants.liability_interim;
574: lv_balancing_entry_type := jai_constants.debit;
575:

Line 572: lv_charge_entry_type := jai_constants.credit;

568: lv_statement := '4';
569: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);
570: lv_register_entry_type := jai_constants.debit;
571: lv_account_name := jai_constants.liability;
572: lv_charge_entry_type := jai_constants.credit;
573: lv_balancing_accnt_name := jai_constants.liability_interim;
574: lv_balancing_entry_type := jai_constants.debit;
575:
576: --Updated for POT for CM/DM issue begin

Line 573: lv_balancing_accnt_name := jai_constants.liability_interim;

569: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);
570: lv_register_entry_type := jai_constants.debit;
571: lv_account_name := jai_constants.liability;
572: lv_charge_entry_type := jai_constants.credit;
573: lv_balancing_accnt_name := jai_constants.liability_interim;
574: lv_balancing_entry_type := jai_constants.debit;
575:
576: --Updated for POT for CM/DM issue begin
577: IF lv_invoice_type IN ('DEBIT', 'CREDIT') THEN

Line 574: lv_balancing_entry_type := jai_constants.debit;

570: lv_register_entry_type := jai_constants.debit;
571: lv_account_name := jai_constants.liability;
572: lv_charge_entry_type := jai_constants.credit;
573: lv_balancing_accnt_name := jai_constants.liability_interim;
574: lv_balancing_entry_type := jai_constants.debit;
575:
576: --Updated for POT for CM/DM issue begin
577: IF lv_invoice_type IN ('DEBIT', 'CREDIT') THEN
578: p_amount := abs(p_amount);

Line 582: ELSIF p_source = jai_constants.source_manual_entry THEN

578: p_amount := abs(p_amount);
579: ln_trx_amount := abs(ln_trx_amount);--Added by qiong.liu 2011.09.28
580: END IF;
581: --Updated for POT for CM/DM issue end
582: ELSIF p_source = jai_constants.source_manual_entry THEN
583: /*No need to Set Balancing Account Name as there is no need to derive balancing account because User ENTERs it in MANUAL
584: ENTRY Form*/
585: lv_statement := '5';
586: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath);

Line 588: IF lv_account_name IN (jai_constants.recovery, jai_constants.recovery_interim) THEN

584: ENTRY Form*/
585: lv_statement := '5';
586: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath);
587: lv_account_name := p_account_name;
588: IF lv_account_name IN (jai_constants.recovery, jai_constants.recovery_interim) THEN
589: lv_codepath := jai_general_pkg.plot_codepath(6, lv_codepath);
590: lv_register_entry_type := jai_constants.credit;
591: lv_charge_entry_type := jai_constants.debit;
592: lv_balancing_entry_type := jai_constants.credit;

Line 590: lv_register_entry_type := jai_constants.credit;

586: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath);
587: lv_account_name := p_account_name;
588: IF lv_account_name IN (jai_constants.recovery, jai_constants.recovery_interim) THEN
589: lv_codepath := jai_general_pkg.plot_codepath(6, lv_codepath);
590: lv_register_entry_type := jai_constants.credit;
591: lv_charge_entry_type := jai_constants.debit;
592: lv_balancing_entry_type := jai_constants.credit;
593: ELSIF lv_account_name IN (jai_constants.liability, jai_constants.liability_interim) THEN
594: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);

Line 591: lv_charge_entry_type := jai_constants.debit;

587: lv_account_name := p_account_name;
588: IF lv_account_name IN (jai_constants.recovery, jai_constants.recovery_interim) THEN
589: lv_codepath := jai_general_pkg.plot_codepath(6, lv_codepath);
590: lv_register_entry_type := jai_constants.credit;
591: lv_charge_entry_type := jai_constants.debit;
592: lv_balancing_entry_type := jai_constants.credit;
593: ELSIF lv_account_name IN (jai_constants.liability, jai_constants.liability_interim) THEN
594: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);
595: lv_register_entry_type := jai_constants.debit;

Line 592: lv_balancing_entry_type := jai_constants.credit;

588: IF lv_account_name IN (jai_constants.recovery, jai_constants.recovery_interim) THEN
589: lv_codepath := jai_general_pkg.plot_codepath(6, lv_codepath);
590: lv_register_entry_type := jai_constants.credit;
591: lv_charge_entry_type := jai_constants.debit;
592: lv_balancing_entry_type := jai_constants.credit;
593: ELSIF lv_account_name IN (jai_constants.liability, jai_constants.liability_interim) THEN
594: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);
595: lv_register_entry_type := jai_constants.debit;
596: lv_charge_entry_type := jai_constants.credit;

Line 593: ELSIF lv_account_name IN (jai_constants.liability, jai_constants.liability_interim) THEN

589: lv_codepath := jai_general_pkg.plot_codepath(6, lv_codepath);
590: lv_register_entry_type := jai_constants.credit;
591: lv_charge_entry_type := jai_constants.debit;
592: lv_balancing_entry_type := jai_constants.credit;
593: ELSIF lv_account_name IN (jai_constants.liability, jai_constants.liability_interim) THEN
594: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);
595: lv_register_entry_type := jai_constants.debit;
596: lv_charge_entry_type := jai_constants.credit;
597: lv_balancing_entry_type := jai_constants.debit;

Line 595: lv_register_entry_type := jai_constants.debit;

591: lv_charge_entry_type := jai_constants.debit;
592: lv_balancing_entry_type := jai_constants.credit;
593: ELSIF lv_account_name IN (jai_constants.liability, jai_constants.liability_interim) THEN
594: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);
595: lv_register_entry_type := jai_constants.debit;
596: lv_charge_entry_type := jai_constants.credit;
597: lv_balancing_entry_type := jai_constants.debit;
598: END IF;
599:

Line 596: lv_charge_entry_type := jai_constants.credit;

592: lv_balancing_entry_type := jai_constants.credit;
593: ELSIF lv_account_name IN (jai_constants.liability, jai_constants.liability_interim) THEN
594: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);
595: lv_register_entry_type := jai_constants.debit;
596: lv_charge_entry_type := jai_constants.credit;
597: lv_balancing_entry_type := jai_constants.debit;
598: END IF;
599:
600: /* Incase of Distributions and settlements, we hit only recovery account and decrease/increase

Line 597: lv_balancing_entry_type := jai_constants.debit;

593: ELSIF lv_account_name IN (jai_constants.liability, jai_constants.liability_interim) THEN
594: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);
595: lv_register_entry_type := jai_constants.debit;
596: lv_charge_entry_type := jai_constants.credit;
597: lv_balancing_entry_type := jai_constants.debit;
598: END IF;
599:
600: /* Incase of Distributions and settlements, we hit only recovery account and decrease/increase
601: repository amounts as per _OUT/_IN trxns*/

Line 602: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN

598: END IF;
599:
600: /* Incase of Distributions and settlements, we hit only recovery account and decrease/increase
601: repository amounts as per _OUT/_IN trxns*/
602: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN
603: lv_statement := '6';
604: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath);
605: lv_register_entry_type := jai_constants.debit;
606: /* following is changed as per Shekhars finding. this is because incase of distributions and settlements,

Line 605: lv_register_entry_type := jai_constants.debit;

601: repository amounts as per _OUT/_IN trxns*/
602: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN
603: lv_statement := '6';
604: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath);
605: lv_register_entry_type := jai_constants.debit;
606: /* following is changed as per Shekhars finding. this is because incase of distributions and settlements,
607: we should hit only recovery accounts*/
608: lv_account_name := jai_constants.recovery; -- jai_constants.liability; This is changed as per Shekhars finding
609: lv_charge_entry_type := jai_constants.credit;

Line 608: lv_account_name := jai_constants.recovery; -- jai_constants.liability; This is changed as per Shekhars finding

604: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath);
605: lv_register_entry_type := jai_constants.debit;
606: /* following is changed as per Shekhars finding. this is because incase of distributions and settlements,
607: we should hit only recovery accounts*/
608: lv_account_name := jai_constants.recovery; -- jai_constants.liability; This is changed as per Shekhars finding
609: lv_charge_entry_type := jai_constants.credit;
610: lv_balancing_accnt_name := jai_constants.recovery;
611: lv_balancing_entry_type := jai_constants.debit;
612: -- IF (p_source = jai_constants.source_settle_out) THEN

Line 609: lv_charge_entry_type := jai_constants.credit;

605: lv_register_entry_type := jai_constants.debit;
606: /* following is changed as per Shekhars finding. this is because incase of distributions and settlements,
607: we should hit only recovery accounts*/
608: lv_account_name := jai_constants.recovery; -- jai_constants.liability; This is changed as per Shekhars finding
609: lv_charge_entry_type := jai_constants.credit;
610: lv_balancing_accnt_name := jai_constants.recovery;
611: lv_balancing_entry_type := jai_constants.debit;
612: -- IF (p_source = jai_constants.source_settle_out) THEN
613: -- lv_balancing_accnt_name := jai_constants.liability;

Line 610: lv_balancing_accnt_name := jai_constants.recovery;

606: /* following is changed as per Shekhars finding. this is because incase of distributions and settlements,
607: we should hit only recovery accounts*/
608: lv_account_name := jai_constants.recovery; -- jai_constants.liability; This is changed as per Shekhars finding
609: lv_charge_entry_type := jai_constants.credit;
610: lv_balancing_accnt_name := jai_constants.recovery;
611: lv_balancing_entry_type := jai_constants.debit;
612: -- IF (p_source = jai_constants.source_settle_out) THEN
613: -- lv_balancing_accnt_name := jai_constants.liability;
614: -- END IF; /*Added by nprashar for bug 7525691*/

Line 611: lv_balancing_entry_type := jai_constants.debit;

607: we should hit only recovery accounts*/
608: lv_account_name := jai_constants.recovery; -- jai_constants.liability; This is changed as per Shekhars finding
609: lv_charge_entry_type := jai_constants.credit;
610: lv_balancing_accnt_name := jai_constants.recovery;
611: lv_balancing_entry_type := jai_constants.debit;
612: -- IF (p_source = jai_constants.source_settle_out) THEN
613: -- lv_balancing_accnt_name := jai_constants.liability;
614: -- END IF; /*Added by nprashar for bug 7525691*/
615:

Line 612: -- IF (p_source = jai_constants.source_settle_out) THEN

608: lv_account_name := jai_constants.recovery; -- jai_constants.liability; This is changed as per Shekhars finding
609: lv_charge_entry_type := jai_constants.credit;
610: lv_balancing_accnt_name := jai_constants.recovery;
611: lv_balancing_entry_type := jai_constants.debit;
612: -- IF (p_source = jai_constants.source_settle_out) THEN
613: -- lv_balancing_accnt_name := jai_constants.liability;
614: -- END IF; /*Added by nprashar for bug 7525691*/
615:
616: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN

Line 613: -- lv_balancing_accnt_name := jai_constants.liability;

609: lv_charge_entry_type := jai_constants.credit;
610: lv_balancing_accnt_name := jai_constants.recovery;
611: lv_balancing_entry_type := jai_constants.debit;
612: -- IF (p_source = jai_constants.source_settle_out) THEN
613: -- lv_balancing_accnt_name := jai_constants.liability;
614: -- END IF; /*Added by nprashar for bug 7525691*/
615:
616: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN
617: lv_statement := '7';

Line 616: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN

612: -- IF (p_source = jai_constants.source_settle_out) THEN
613: -- lv_balancing_accnt_name := jai_constants.liability;
614: -- END IF; /*Added by nprashar for bug 7525691*/
615:
616: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN
617: lv_statement := '7';
618: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath);
619: lv_register_entry_type := jai_constants.credit;
620: lv_account_name := jai_constants.recovery;

Line 619: lv_register_entry_type := jai_constants.credit;

615:
616: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN
617: lv_statement := '7';
618: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath);
619: lv_register_entry_type := jai_constants.credit;
620: lv_account_name := jai_constants.recovery;
621: lv_charge_entry_type := jai_constants.debit;
622: lv_balancing_entry_type := jai_constants.credit;
623: lv_balancing_accnt_name := jai_constants.recovery; -- jai_constants.liability;

Line 620: lv_account_name := jai_constants.recovery;

616: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN
617: lv_statement := '7';
618: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath);
619: lv_register_entry_type := jai_constants.credit;
620: lv_account_name := jai_constants.recovery;
621: lv_charge_entry_type := jai_constants.debit;
622: lv_balancing_entry_type := jai_constants.credit;
623: lv_balancing_accnt_name := jai_constants.recovery; -- jai_constants.liability;
624: /*bug 7525691*/

Line 621: lv_charge_entry_type := jai_constants.debit;

617: lv_statement := '7';
618: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath);
619: lv_register_entry_type := jai_constants.credit;
620: lv_account_name := jai_constants.recovery;
621: lv_charge_entry_type := jai_constants.debit;
622: lv_balancing_entry_type := jai_constants.credit;
623: lv_balancing_accnt_name := jai_constants.recovery; -- jai_constants.liability;
624: /*bug 7525691*/
625: IF (p_source = jai_constants.source_settle_in) THEN

Line 622: lv_balancing_entry_type := jai_constants.credit;

618: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath);
619: lv_register_entry_type := jai_constants.credit;
620: lv_account_name := jai_constants.recovery;
621: lv_charge_entry_type := jai_constants.debit;
622: lv_balancing_entry_type := jai_constants.credit;
623: lv_balancing_accnt_name := jai_constants.recovery; -- jai_constants.liability;
624: /*bug 7525691*/
625: IF (p_source = jai_constants.source_settle_in) THEN
626: lv_account_name := jai_constants.liability;

Line 623: lv_balancing_accnt_name := jai_constants.recovery; -- jai_constants.liability;

619: lv_register_entry_type := jai_constants.credit;
620: lv_account_name := jai_constants.recovery;
621: lv_charge_entry_type := jai_constants.debit;
622: lv_balancing_entry_type := jai_constants.credit;
623: lv_balancing_accnt_name := jai_constants.recovery; -- jai_constants.liability;
624: /*bug 7525691*/
625: IF (p_source = jai_constants.source_settle_in) THEN
626: lv_account_name := jai_constants.liability;
627: END IF;

Line 625: IF (p_source = jai_constants.source_settle_in) THEN

621: lv_charge_entry_type := jai_constants.debit;
622: lv_balancing_entry_type := jai_constants.credit;
623: lv_balancing_accnt_name := jai_constants.recovery; -- jai_constants.liability;
624: /*bug 7525691*/
625: IF (p_source = jai_constants.source_settle_in) THEN
626: lv_account_name := jai_constants.liability;
627: END IF;
628: /*end bug 7525691*/
629:

Line 626: lv_account_name := jai_constants.liability;

622: lv_balancing_entry_type := jai_constants.credit;
623: lv_balancing_accnt_name := jai_constants.recovery; -- jai_constants.liability;
624: /*bug 7525691*/
625: IF (p_source = jai_constants.source_settle_in) THEN
626: lv_account_name := jai_constants.liability;
627: END IF;
628: /*end bug 7525691*/
629:
630: --Added by Qiong for reverse charge bug#16001407

Line 631: ELSIF p_source = jai_constants.source_ap AND p_source_trx_type = 'INVOICE_SETTLEMENT' THEN

627: END IF;
628: /*end bug 7525691*/
629:
630: --Added by Qiong for reverse charge bug#16001407
631: ELSIF p_source = jai_constants.source_ap AND p_source_trx_type = 'INVOICE_SETTLEMENT' THEN
632: lv_account_name := jai_constants.recovery;
633: lv_statement := '7.1';
634: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
635: ln_debit := NULL;

Line 632: lv_account_name := jai_constants.recovery;

628: /*end bug 7525691*/
629:
630: --Added by Qiong for reverse charge bug#16001407
631: ELSIF p_source = jai_constants.source_ap AND p_source_trx_type = 'INVOICE_SETTLEMENT' THEN
632: lv_account_name := jai_constants.recovery;
633: lv_statement := '7.1';
634: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
635: ln_debit := NULL;
636: ln_credit := p_amount;

Line 643: IF lv_register_entry_type = jai_constants.debit THEN

639: lv_balancing_accnt_name := 'REVERSE_CHARGE';
640: END IF;
641: --Added by Qiong for reverse charge bug#16001407
642:
643: IF lv_register_entry_type = jai_constants.debit THEN
644: lv_statement := '8';
645: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath);
646: ln_debit := p_amount;
647: ln_credit := NULL;

Line 659: if p_source IN (jai_constants.service_src_distribute_out)

655: ln_trx_debit := null;
656: ln_trx_credit := nvl(ln_trx_amount, p_amount);
657: END IF;
658: --start additions for bug#13593694
659: if p_source IN (jai_constants.service_src_distribute_out)
660: then
661: lv_statement := '8.1';
662: lv_codepath := jai_general_pkg.plot_codepath(10.1, lv_codepath);
663: ln_debit := NULL;

Line 672: IF p_source = jai_constants.source_ap THEN

668: --end additions for bug#13593694
669: --Add by Xiao for POT change, reg bug#12533434 on 28-May-2011, begin
670: --------------------------------------------------------------------------
671: IF p_accrual_basis = 'Y' THEN
672: IF p_source = jai_constants.source_ap THEN
673: IF p_account_name IS NOT NULL THEN --Cancellation
674: lv_account_name := p_account_name;
675: IF p_account_name = jai_constants.recovery THEN
676: lv_statement := '10';

Line 675: IF p_account_name = jai_constants.recovery THEN

671: IF p_accrual_basis = 'Y' THEN
672: IF p_source = jai_constants.source_ap THEN
673: IF p_account_name IS NOT NULL THEN --Cancellation
674: lv_account_name := p_account_name;
675: IF p_account_name = jai_constants.recovery THEN
676: lv_statement := '10';
677: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath);
678: ln_debit := NULL;
679: ln_credit := -p_amount;

Line 682: lv_balancing_accnt_name := jai_constants.recovery_interim;

678: ln_debit := NULL;
679: ln_credit := -p_amount;
680: ln_trx_debit := NULL;
681: ln_trx_credit := nvl(-ln_trx_amount, -p_amount);
682: lv_balancing_accnt_name := jai_constants.recovery_interim;
683: ELSIF p_account_name = jai_constants.liability THEN
684: lv_statement := '11';
685: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath);
686: ln_debit := p_amount;

Line 683: ELSIF p_account_name = jai_constants.liability THEN

679: ln_credit := -p_amount;
680: ln_trx_debit := NULL;
681: ln_trx_credit := nvl(-ln_trx_amount, -p_amount);
682: lv_balancing_accnt_name := jai_constants.recovery_interim;
683: ELSIF p_account_name = jai_constants.liability THEN
684: lv_statement := '11';
685: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath);
686: ln_debit := p_amount;
687: ln_credit := NULL;

Line 690: lv_balancing_accnt_name := jai_constants.liability_interim;

686: ln_debit := p_amount;
687: ln_credit := NULL;
688: ln_trx_debit := nvl(ln_trx_amount, p_amount);
689: ln_trx_credit := NULL;
690: lv_balancing_accnt_name := jai_constants.liability_interim;
691: END IF;
692: END IF;
693: --Add by Xiao for POT Phase III changes, reg bug#12895841 on 1-Aug-2011, begin
694: ----------------------------------------------------------------------------------------------

Line 702: , p_organization_type => jai_constants.service_tax_orgn_type

698: --Changed by Qiong for POT reversal begin
699: ------------------------------------------------------------------
700: lv_account_name := jai_cmn_rgm_processing_pkg.get_reversal_account_name(
701: p_regime_id => p_regime_id
702: , p_organization_type => jai_constants.service_tax_orgn_type
703: , p_organization_id => p_organization_id
704: , p_location_id => p_location_id);
705: --lv_account_name := jai_constants.recovery;
706: lv_statement := '12';

Line 705: --lv_account_name := jai_constants.recovery;

701: p_regime_id => p_regime_id
702: , p_organization_type => jai_constants.service_tax_orgn_type
703: , p_organization_id => p_organization_id
704: , p_location_id => p_location_id);
705: --lv_account_name := jai_constants.recovery;
706: lv_statement := '12';
707: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
708: IF lv_account_name = jai_constants.recovery THEN
709: ln_debit := NULL;

Line 708: IF lv_account_name = jai_constants.recovery THEN

704: , p_location_id => p_location_id);
705: --lv_account_name := jai_constants.recovery;
706: lv_statement := '12';
707: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
708: IF lv_account_name = jai_constants.recovery THEN
709: ln_debit := NULL;
710: ln_credit := -p_amount;
711: ln_trx_debit := NULL;
712: ln_trx_credit := -nvl(ln_trx_amount, p_amount);

Line 713: ELSIF lv_account_name = jai_constants.liability THEN

709: ln_debit := NULL;
710: ln_credit := -p_amount;
711: ln_trx_debit := NULL;
712: ln_trx_credit := -nvl(ln_trx_amount, p_amount);
713: ELSIF lv_account_name = jai_constants.liability THEN
714: ln_debit := p_amount;
715: ln_credit := NULL;
716: ln_trx_debit := nvl(ln_trx_amount, p_amount);
717: ln_trx_credit := NULL;

Line 728: lv_balancing_accnt_name := jai_constants.recovery_interim;

724: -------------------------------------------------------------------
725: --Changed by Qiong for POT reversal End
726: -- code ported from BL12.1.3 by zhiwei.xin on 23-JAN-2013 end.
727:
728: lv_balancing_accnt_name := jai_constants.recovery_interim;
729: ELSIF p_source = 'AP_CLAIM' THEN
730: lv_account_name := jai_constants.recovery;
731: lv_statement := '12';
732: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);

Line 730: lv_account_name := jai_constants.recovery;

726: -- code ported from BL12.1.3 by zhiwei.xin on 23-JAN-2013 end.
727:
728: lv_balancing_accnt_name := jai_constants.recovery_interim;
729: ELSIF p_source = 'AP_CLAIM' THEN
730: lv_account_name := jai_constants.recovery;
731: lv_statement := '12';
732: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
733: ln_debit := NULL;
734: ln_credit := p_amount;

Line 737: lv_balancing_accnt_name := jai_constants.recovery_interim;

733: ln_debit := NULL;
734: ln_credit := p_amount;
735: ln_trx_debit := NULL;
736: ln_trx_credit := nvl(ln_trx_amount, p_amount);
737: lv_balancing_accnt_name := jai_constants.recovery_interim;
738: ELSIF p_source = 'AR_REVERSAL' THEN
739: lv_account_name := jai_constants.liability;
740: lv_statement := '12';
741: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);

Line 739: lv_account_name := jai_constants.liability;

735: ln_trx_debit := NULL;
736: ln_trx_credit := nvl(ln_trx_amount, p_amount);
737: lv_balancing_accnt_name := jai_constants.recovery_interim;
738: ELSIF p_source = 'AR_REVERSAL' THEN
739: lv_account_name := jai_constants.liability;
740: lv_statement := '12';
741: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
742: ln_debit := -p_amount;
743: ln_credit := NULL;

Line 746: lv_balancing_accnt_name := jai_constants.reversal;--should be jai_constants.service_reversed

742: ln_debit := -p_amount;
743: ln_credit := NULL;
744: ln_trx_debit := -nvl(ln_trx_amount, p_amount);
745: ln_trx_credit := NULL;
746: lv_balancing_accnt_name := jai_constants.reversal;--should be jai_constants.service_reversed
747: ELSIF p_source = 'AR_CLAIM' THEN
748: lv_account_name := jai_constants.liability;
749: lv_statement := '12';
750: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);

Line 748: lv_account_name := jai_constants.liability;

744: ln_trx_debit := -nvl(ln_trx_amount, p_amount);
745: ln_trx_credit := NULL;
746: lv_balancing_accnt_name := jai_constants.reversal;--should be jai_constants.service_reversed
747: ELSIF p_source = 'AR_CLAIM' THEN
748: lv_account_name := jai_constants.liability;
749: lv_statement := '12';
750: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
751: ln_debit := p_amount;
752: ln_credit := NULL;

Line 755: lv_balancing_accnt_name := jai_constants.reversal;--should be jai_constants.service_reversed

751: ln_debit := p_amount;
752: ln_credit := NULL;
753: ln_trx_debit := nvl(ln_trx_amount, p_amount);
754: ln_trx_credit := NULL;
755: lv_balancing_accnt_name := jai_constants.reversal;--should be jai_constants.service_reversed
756: ----------------------------------------------------------------------------------------------
757: --Add by Xiao for POT Phase III changes, reg bug#12895841 on 1-Aug-2011, end
758: END IF;
759: END IF;

Line 848: IF p_accntg_required_flag = jai_constants.yes THEN

844:
845: -- ~~~~~~~~~~~~~~~~~~~~~~~ Accounting of Recovered/Liable Service Tax ~~~~~~~~~~~~~~~~~~~~~
846:
847: lv_statement := '11';
848: IF p_accntg_required_flag = jai_constants.yes THEN
849:
850: lv_statement := '15';
851: lv_codepath := jai_general_pkg.plot_codepath(16, lv_codepath);
852: IF ln_charge_account_id IS NULL THEN

Line 854: p_process_flag := jai_constants.expected_error;

850: lv_statement := '15';
851: lv_codepath := jai_general_pkg.plot_codepath(16, lv_codepath);
852: IF ln_charge_account_id IS NULL THEN
853: lv_codepath := jai_general_pkg.plot_codepath(17, lv_codepath);
854: p_process_flag := jai_constants.expected_error;
855: p_process_message := 'Charge Account('||lv_account_name||') not defined for tax type '||p_tax_type;
856: FND_FILE.put_line( FND_FILE.log, p_process_message); fnd_file.put_line(fnd_file.log,p_process_message);
857: GOTO end_of_repository_entry;
858: END IF;

Line 871: p_process_flag := jai_constants.expected_error;

867:
868: lv_statement := '18';
869: IF ln_balancing_account_id IS NULL THEN
870: lv_codepath := jai_general_pkg.plot_codepath(18, lv_codepath);
871: p_process_flag := jai_constants.expected_error;
872: p_process_message := 'Balancing Account('||lv_balancing_accnt_name||') not defined for tax type '||lv_balancing_tax_type;
873: FND_FILE.put_line( FND_FILE.log, p_process_message); fnd_file.put_line(fnd_file.log,p_process_message);
874: GOTO end_of_repository_entry;
875: END IF;

Line 878: IF p_source IN ( jai_constants.source_ap, jai_constants.source_ar) THEN

874: GOTO end_of_repository_entry;
875: END IF;
876:
877: ln_reference_id := p_reference_id;
878: IF p_source IN ( jai_constants.source_ap, jai_constants.source_ar) THEN
879: lv_reference_name := jai_constants.rgm_trx_refs;
880: END IF;
881:
882: lv_statement := '19';

Line 879: lv_reference_name := jai_constants.rgm_trx_refs;

875: END IF;
876:
877: ln_reference_id := p_reference_id;
878: IF p_source IN ( jai_constants.source_ap, jai_constants.source_ar) THEN
879: lv_reference_name := jai_constants.rgm_trx_refs;
880: END IF;
881:
882: lv_statement := '19';
883: -- INITIAL_ENTRY

Line 884: IF lv_charge_entry_type = jai_constants.debit THEN

880: END IF;
881:
882: lv_statement := '19';
883: -- INITIAL_ENTRY
884: IF lv_charge_entry_type = jai_constants.debit THEN
885: lv_codepath := jai_general_pkg.plot_codepath(19, lv_codepath);
886: ln_debit := p_amount;
887: ln_credit := NULL;
888: ln_trx_debit := nvl(ln_trx_amount, p_amount);

Line 917: p_repository_name => jai_constants.repository_name,

913: p_accounted_dr => ln_debit,
914: p_accounting_date => p_accounting_date,
915: p_transaction_date => ld_transaction_date,
916: p_calling_object => p_called_from,
917: p_repository_name => jai_constants.repository_name,
918: p_repository_id => p_repository_id,
919: p_reference_name => lv_reference_name,
920: p_reference_id => ln_reference_id,
921: p_currency_code => p_currency_code,

Line 933: IF p_source = jai_constants.source_ar THEN

929: -- Discount related code needs to be added here
930: lv_statement := '20.1';
931: lv_codepath := jai_general_pkg.plot_codepath(21, lv_codepath);
932:
933: IF p_source = jai_constants.source_ar THEN
934:
935: lv_codepath := jai_general_pkg.plot_codepath(21.1, lv_codepath);
936: jai_ar_rgm_processing_pkg.get_ar_tax_disc_accnt (
937: p_receivable_application_id => p_source_document_id,

Line 948: IF p_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

944: p_process_flag => p_process_flag,
945: p_process_message => p_process_message
946: );
947:
948: IF p_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
949: lv_codepath := jai_general_pkg.plot_codepath(21.2, lv_codepath);
950: -- some problem in the above call
951: RETURN;
952: ELSIF nvl(ln_earned_discount, 0) + nvl(ln_unearned_discount, 0) <> NVL(p_discounted_amount,0) THEN

Line 954: p_process_flag := jai_constants.expected_error;

950: -- some problem in the above call
951: RETURN;
952: ELSIF nvl(ln_earned_discount, 0) + nvl(ln_unearned_discount, 0) <> NVL(p_discounted_amount,0) THEN
953: lv_codepath := jai_general_pkg.plot_codepath(21.3, lv_codepath);
954: p_process_flag := jai_constants.expected_error;
955: p_process_message := 'There is a discrepency in earned + unearned = discounted';
956: RETURN;
957: END IF;
958:

Line 962: IF lv_charge_entry_type = jai_constants.debit THEN

958:
959: --- following will be used for first accounting entry incase of AR Receipt Application
960: IF nvl(ln_earned_discount,0) <> 0 THEN
961: ln_discount_ccid := ln_earned_disc_accnt;
962: IF lv_charge_entry_type = jai_constants.debit THEN
963: lv_codepath := jai_general_pkg.plot_codepath(21.4, lv_codepath);
964: ln_disc_credit := null;
965: ln_disc_debit := ln_earned_discount;
966: ELSE

Line 991: p_process_flag := jai_constants.expected_error;

987: );
988:
989: IF ln_discount_ccid IS NULL THEN
990: lv_codepath := jai_general_pkg.plot_codepath(18, lv_codepath);
991: p_process_flag := jai_constants.expected_error;
992: p_process_message := 'Discount Account is not defined in '||p_source;
993: FND_FILE.put_line( FND_FILE.log, p_process_message); fnd_file.put_line(fnd_file.log,p_process_message);
994: FND_FILE.put_line( FND_FILE.log, ln_org_id);
995: GOTO end_of_repository_entry;

Line 998: IF lv_charge_entry_type = jai_constants.debit THEN

994: FND_FILE.put_line( FND_FILE.log, ln_org_id);
995: GOTO end_of_repository_entry;
996: END IF;
997:
998: IF lv_charge_entry_type = jai_constants.debit THEN
999: ln_disc_credit := null;
1000: ln_disc_debit := p_discounted_amount;
1001: ELSE
1002: ln_disc_debit := null;

Line 1029: p_repository_name => jai_constants.repository_name,

1025: p_accounted_dr => ln_disc_debit * nvl(p_curr_conv_rate, 1),
1026: p_accounting_date => p_accounting_date,
1027: p_transaction_date => ld_transaction_date,
1028: p_calling_object => p_called_from,
1029: p_repository_name => jai_constants.repository_name,
1030: p_repository_id => p_repository_id,
1031: p_reference_name => lv_reference_name,
1032: p_reference_id => ln_reference_id,
1033: p_currency_code => p_currency_code,

Line 1045: IF lv_charge_entry_type = jai_constants.debit THEN

1041: -- following entry will happen only in case of AR Transactions
1042: IF nvl(ln_unearned_discount,0) <> 0 THEN
1043: lv_codepath := jai_general_pkg.plot_codepath(21.7, lv_codepath);
1044: ln_discount_ccid := ln_unearned_disc_accnt;
1045: IF lv_charge_entry_type = jai_constants.debit THEN
1046: ln_disc_credit := null;
1047: ln_disc_debit := ln_unearned_discount;
1048: ELSE
1049: ln_disc_credit := ln_unearned_discount;

Line 1071: p_repository_name => jai_constants.repository_name,

1067: p_accounted_dr => ln_disc_debit * nvl(p_curr_conv_rate, 1),
1068: p_accounting_date => p_accounting_date,
1069: p_transaction_date => ld_transaction_date,
1070: p_calling_object => p_called_from,
1071: p_repository_name => jai_constants.repository_name,
1072: p_repository_id => p_repository_id,
1073: p_reference_name => lv_reference_name,
1074: p_reference_id => ln_reference_id,
1075: p_currency_code => p_currency_code,

Line 1095: IF (p_source NOT IN (jai_constants.source_settle_in, jai_constants.source_settle_out))

1091: 1. Settlement Transactions
1092: 2. Distribution Transactions with distribution type Service->Service
1093: Modified the condition earlier added for distribution to consider distribution type
1094: also - observation from 11i bug 8315191 (R12 bug 8329634 gets fixed due to this)*/
1095: IF (p_source NOT IN (jai_constants.source_settle_in, jai_constants.source_settle_out))
1096: AND (p_source NOT IN (jai_constants.service_src_distribute_out, jai_constants.service_src_distribute_in)
1097: OR nvl(p_distribution_type,'X')<>'S-S')THEN
1098: -- BALANCING_ENTRY
1099: IF lv_balancing_entry_type = jai_constants.debit THEN

Line 1096: AND (p_source NOT IN (jai_constants.service_src_distribute_out, jai_constants.service_src_distribute_in)

1092: 2. Distribution Transactions with distribution type Service->Service
1093: Modified the condition earlier added for distribution to consider distribution type
1094: also - observation from 11i bug 8315191 (R12 bug 8329634 gets fixed due to this)*/
1095: IF (p_source NOT IN (jai_constants.source_settle_in, jai_constants.source_settle_out))
1096: AND (p_source NOT IN (jai_constants.service_src_distribute_out, jai_constants.service_src_distribute_in)
1097: OR nvl(p_distribution_type,'X')<>'S-S')THEN
1098: -- BALANCING_ENTRY
1099: IF lv_balancing_entry_type = jai_constants.debit THEN
1100: lv_codepath := jai_general_pkg.plot_codepath(22, lv_codepath);

Line 1099: IF lv_balancing_entry_type = jai_constants.debit THEN

1095: IF (p_source NOT IN (jai_constants.source_settle_in, jai_constants.source_settle_out))
1096: AND (p_source NOT IN (jai_constants.service_src_distribute_out, jai_constants.service_src_distribute_in)
1097: OR nvl(p_distribution_type,'X')<>'S-S')THEN
1098: -- BALANCING_ENTRY
1099: IF lv_balancing_entry_type = jai_constants.debit THEN
1100: lv_codepath := jai_general_pkg.plot_codepath(22, lv_codepath);
1101: ln_debit := p_amount + (nvl(p_discounted_amount,0) * nvl(p_curr_conv_rate, 1));
1102: -- Added p_curr_conv_rate for Bug 7522584
1103: ln_credit := NULL;

Line 1133: p_repository_name => jai_constants.repository_name,

1129: p_accounted_dr => ln_debit,
1130: p_accounting_date => p_accounting_date,
1131: p_transaction_date => ld_transaction_date,
1132: p_calling_object => p_called_from,
1133: p_repository_name => jai_constants.repository_name,
1134: p_repository_id => p_repository_id,
1135: p_reference_name => lv_reference_name,
1136: p_reference_id => ln_reference_id,
1137: p_currency_code => p_currency_code,

Line 1146: p_process_flag := jai_constants.successful;

1142:
1143: END IF; --bug 7692977
1144: END IF;
1145: lv_statement := '23';
1146: p_process_flag := jai_constants.successful;
1147: p_process_message := 'Successful';
1148:
1149: lv_statement := '24';
1150: <>

Line 1155: p_process_flag := jai_constants.unexpected_error;

1151: lv_codepath := jai_general_pkg.plot_codepath(23, lv_codepath, 'Insert_Repository_entry', 'END');
1152:
1153: EXCEPTION
1154: WHEN OTHERS THEN
1155: p_process_flag := jai_constants.unexpected_error;
1156: p_process_message := 'Repository Error(Stmt:'||lv_statement||') Occured:'||SQLERRM;
1157: lv_codepath := jai_general_pkg.plot_codepath(-999, lv_codepath);
1158: Fnd_file.put_line( fnd_file.log, 'Error in Insert_Repository_entry. Codepath:'||lv_codepath);
1159:

Line 1240: lv_gl_je_category varchar2(30); --File.Sql.35 Cbabu jai_constants.je_category_rg_entry%type;

1236:
1237: lv_regime_code JAI_RGM_DEFINITIONS.regime_code%TYPE;
1238: lv_reference_name VARCHAR2(30);
1239: ln_reference_id NUMBER(15);
1240: lv_gl_je_category varchar2(30); --File.Sql.35 Cbabu jai_constants.je_category_rg_entry%type;
1241: lv_status gl_interface.status%TYPE ; --rchandan for bug#4428980
1242: lv_source_name VARCHAR2(30); -- modified by csahoo for bug#6155839
1243: /*Begin-Added the following by kunkumar for forward porting 5051541 to R12*/
1244:

Line 1334: IF lv_source IN (jai_constants.service_src_distribute_in, jai_constants.service_src_distribute_out,

1330: with different values for different Journal. Hence the following logic of the IF condition is used to derive the
1331: value for reference1 for all the Journals that are part of the Distribution (Service tax or any duty distribution
1332: */
1333:
1334: IF lv_source IN (jai_constants.service_src_distribute_in, jai_constants.service_src_distribute_out,
1335: 'DISTRIBUTE_IN', 'DISTRIBUTE_OUT')
1336: THEN
1337: lv_reference1 := '' ;
1338:

Line 1410: IF p_regime_code = jai_constants.service_regime THEN

1406: END IF;
1407: --Add by Xiao for bug#12598609, end
1408:
1409: /* following condition introduced for VAT Impl. Vijay Shankar for Bug#4250236(4245089) */
1410: IF p_regime_code = jai_constants.service_regime THEN
1411: lv_reference10 := 'Service Tax Accounting for '||p_source||'. Transaction Type:'||nvl(p_source_trx_type,'~~')
1412: || '. ' ||lv_invoice_num_str; --Add by Xiao for bug#12598609
1413: lv_source_name := jai_constants.service_tax_source; -- added by csahoo for bug#6155839
1414: ELSIF p_regime_code = jai_constants.vat_regime THEN

Line 1413: lv_source_name := jai_constants.service_tax_source; -- added by csahoo for bug#6155839

1409: /* following condition introduced for VAT Impl. Vijay Shankar for Bug#4250236(4245089) */
1410: IF p_regime_code = jai_constants.service_regime THEN
1411: lv_reference10 := 'Service Tax Accounting for '||p_source||'. Transaction Type:'||nvl(p_source_trx_type,'~~')
1412: || '. ' ||lv_invoice_num_str; --Add by Xiao for bug#12598609
1413: lv_source_name := jai_constants.service_tax_source; -- added by csahoo for bug#6155839
1414: ELSIF p_regime_code = jai_constants.vat_regime THEN
1415: lv_reference10 := 'VAT Accounting for '||p_source||'. Transaction Type:'||nvl(p_source_trx_type,'~~')
1416: || '. ' ||lv_invoice_num_str; --Add by Xiao for bug#12598609
1417: lv_source_name := jai_constants.vat_source; -- modified by csahoo for bug#6155839

Line 1414: ELSIF p_regime_code = jai_constants.vat_regime THEN

1410: IF p_regime_code = jai_constants.service_regime THEN
1411: lv_reference10 := 'Service Tax Accounting for '||p_source||'. Transaction Type:'||nvl(p_source_trx_type,'~~')
1412: || '. ' ||lv_invoice_num_str; --Add by Xiao for bug#12598609
1413: lv_source_name := jai_constants.service_tax_source; -- added by csahoo for bug#6155839
1414: ELSIF p_regime_code = jai_constants.vat_regime THEN
1415: lv_reference10 := 'VAT Accounting for '||p_source||'. Transaction Type:'||nvl(p_source_trx_type,'~~')
1416: || '. ' ||lv_invoice_num_str; --Add by Xiao for bug#12598609
1417: lv_source_name := jai_constants.vat_source; -- modified by csahoo for bug#6155839
1418: jai_cmn_utils_pkg.print_log('6395039.log', lv_reference10);

Line 1417: lv_source_name := jai_constants.vat_source; -- modified by csahoo for bug#6155839

1413: lv_source_name := jai_constants.service_tax_source; -- added by csahoo for bug#6155839
1414: ELSIF p_regime_code = jai_constants.vat_regime THEN
1415: lv_reference10 := 'VAT Accounting for '||p_source||'. Transaction Type:'||nvl(p_source_trx_type,'~~')
1416: || '. ' ||lv_invoice_num_str; --Add by Xiao for bug#12598609
1417: lv_source_name := jai_constants.vat_source; -- modified by csahoo for bug#6155839
1418: jai_cmn_utils_pkg.print_log('6395039.log', lv_reference10);
1419:
1420: /*Added code for TCS for bug 12641455 by mmurtuza*/
1421: ELSIF p_regime_code = jai_constants.tcs_regime THEN

Line 1421: ELSIF p_regime_code = jai_constants.tcs_regime THEN

1417: lv_source_name := jai_constants.vat_source; -- modified by csahoo for bug#6155839
1418: jai_cmn_utils_pkg.print_log('6395039.log', lv_reference10);
1419:
1420: /*Added code for TCS for bug 12641455 by mmurtuza*/
1421: ELSIF p_regime_code = jai_constants.tcs_regime THEN
1422: /*For bug 12641455. Changed Service Tax to TCS in lv_reference10*/
1423: lv_reference10 := 'TCS Accounting for ' || p_source || '. Transaction Type:' || nvl(p_source_trx_type, '~~') || '. ' || lv_invoice_num_str;
1424: lv_source_name := jai_constants.tcs_source;
1425:

Line 1424: lv_source_name := jai_constants.tcs_source;

1420: /*Added code for TCS for bug 12641455 by mmurtuza*/
1421: ELSIF p_regime_code = jai_constants.tcs_regime THEN
1422: /*For bug 12641455. Changed Service Tax to TCS in lv_reference10*/
1423: lv_reference10 := 'TCS Accounting for ' || p_source || '. Transaction Type:' || nvl(p_source_trx_type, '~~') || '. ' || lv_invoice_num_str;
1424: lv_source_name := jai_constants.tcs_source;
1425:
1426: END IF;
1427:
1428: ld_accounting_date := nvl( trunc(p_accounting_date), trunc(sysdate) );

Line 1468: lv_gl_je_category := jai_constants.je_category_rg_entry;

1464:
1465: jai_cmn_utils_pkg.print_log('6395039.log', 'after call to get_period_name');
1466:
1467: /* following added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
1468: lv_gl_je_category := jai_constants.je_category_rg_entry;
1469: lv_status := 'NEW';--rchandan for bug#4428980
1470: jai_cmn_utils_pkg.print_log('6395039.log', 'before insert inot gl_interface');
1471:
1472: INSERT INTO gl_interface (

Line 1484: lv_reference10, jai_constants.gl_je_source_name, p_calling_object, lv_reference1,

1480: lv_status, ln_sob_id, lv_source_name, lv_gl_je_category,
1481: ld_accounting_date, p_currency_code, sysdate, FND_GLOBAL.user_id,
1482: 'A', ln_entered_cr, ln_entered_dr, ln_accounted_cr, ln_accounted_dr, p_transaction_date,
1483: p_code_combination_id, p_curr_conv_date, p_curr_conv_type, p_curr_conv_rate,
1484: lv_reference10, jai_constants.gl_je_source_name, p_calling_object, lv_reference1,
1485: -- commented lv_organization_code and passed refererence1 ssumaith bug#6664855
1486: --Bug 5051541 kunkumar
1487: p_source_table_name, p_source_document_id, p_repository_name, p_organization_id
1488: );

Line 1620: p_process_flag := jai_constants.successful;

1616: fnd_global.user_id,
1617: fnd_global.login_id
1618: ) RETURNING reference_id INTO p_reference_id;
1619:
1620: p_process_flag := jai_constants.successful;
1621:
1622: EXCEPTION
1623: WHEN OTHERS THEN
1624: p_process_flag := jai_constants.unexpected_error;

Line 1624: p_process_flag := jai_constants.unexpected_error;

1620: p_process_flag := jai_constants.successful;
1621:
1622: EXCEPTION
1623: WHEN OTHERS THEN
1624: p_process_flag := jai_constants.unexpected_error;
1625: p_process_message := 'jai_cmn_rgm_recording_pkg.insert_reference failed with error - '||SQLERRM;
1626: fnd_file.put_line( fnd_file.log, p_process_message);
1627: END insert_reference;
1628:

Line 1643: jai_constants.register_type_a, modvat_rm_account_id,

1639: lv_object_name CONSTANT VARCHAR2(61) := 'jai_cmn_rgm_recording_pkg.get_account';
1640:
1641: CURSOR c_orgn_account(cp_organization_id IN NUMBER, cp_location_id IN NUMBER, cp_register_type IN VARCHAR2) IS
1642: SELECT decode(cp_register_type,
1643: jai_constants.register_type_a, modvat_rm_account_id,
1644: jai_constants.register_type_c, modvat_cg_account_id,
1645: jai_constants.register_type_pla, modvat_pla_account_id
1646: )
1647: FROM JAI_CMN_INVENTORY_ORGS a

Line 1644: jai_constants.register_type_c, modvat_cg_account_id,

1640:
1641: CURSOR c_orgn_account(cp_organization_id IN NUMBER, cp_location_id IN NUMBER, cp_register_type IN VARCHAR2) IS
1642: SELECT decode(cp_register_type,
1643: jai_constants.register_type_a, modvat_rm_account_id,
1644: jai_constants.register_type_c, modvat_cg_account_id,
1645: jai_constants.register_type_pla, modvat_pla_account_id
1646: )
1647: FROM JAI_CMN_INVENTORY_ORGS a
1648: WHERE organization_id = cp_organization_id

Line 1645: jai_constants.register_type_pla, modvat_pla_account_id

1641: CURSOR c_orgn_account(cp_organization_id IN NUMBER, cp_location_id IN NUMBER, cp_register_type IN VARCHAR2) IS
1642: SELECT decode(cp_register_type,
1643: jai_constants.register_type_a, modvat_rm_account_id,
1644: jai_constants.register_type_c, modvat_cg_account_id,
1645: jai_constants.register_type_pla, modvat_pla_account_id
1646: )
1647: FROM JAI_CMN_INVENTORY_ORGS a
1648: WHERE organization_id = cp_organization_id
1649: AND ( (cp_location_id IS NOT NULL AND a.location_id = cp_location_id)

Line 1659: jai_constants.register_type_a, excise_edu_cess_rm_account ,

1655: || Start of Bug#4546114
1656: */
1657: CURSOR c_orgn_cess_account(cp_organization_id IN NUMBER, cp_location_id IN NUMBER, cp_register_type IN VARCHAR2) IS
1658: SELECT decode(cp_register_type,
1659: jai_constants.register_type_a, excise_edu_cess_rm_account ,
1660: jai_constants.register_type_c, excise_edu_cess_cg_account ,
1661: jai_constants.register_type_pla, modvat_pla_account_id
1662: )
1663: FROM JAI_CMN_INVENTORY_ORGS a

Line 1660: jai_constants.register_type_c, excise_edu_cess_cg_account ,

1656: */
1657: CURSOR c_orgn_cess_account(cp_organization_id IN NUMBER, cp_location_id IN NUMBER, cp_register_type IN VARCHAR2) IS
1658: SELECT decode(cp_register_type,
1659: jai_constants.register_type_a, excise_edu_cess_rm_account ,
1660: jai_constants.register_type_c, excise_edu_cess_cg_account ,
1661: jai_constants.register_type_pla, modvat_pla_account_id
1662: )
1663: FROM JAI_CMN_INVENTORY_ORGS a
1664: WHERE organization_id = cp_organization_id

Line 1661: jai_constants.register_type_pla, modvat_pla_account_id

1657: CURSOR c_orgn_cess_account(cp_organization_id IN NUMBER, cp_location_id IN NUMBER, cp_register_type IN VARCHAR2) IS
1658: SELECT decode(cp_register_type,
1659: jai_constants.register_type_a, excise_edu_cess_rm_account ,
1660: jai_constants.register_type_c, excise_edu_cess_cg_account ,
1661: jai_constants.register_type_pla, modvat_pla_account_id
1662: )
1663: FROM JAI_CMN_INVENTORY_ORGS a
1664: WHERE organization_id = cp_organization_id
1665: AND ( (cp_location_id IS NOT NULL AND a.location_id = cp_location_id)

Line 1679: jai_constants.register_type_a, SH_CESS_RM_ACCOUNT ,

1675:
1676:
1677: CURSOR c_orgn_sh_cess_account(cp_organization_id IN NUMBER, cp_location_id IN NUMBER, cp_register_type IN VARCHAR2) IS
1678: SELECT decode(cp_register_type,
1679: jai_constants.register_type_a, SH_CESS_RM_ACCOUNT ,
1680: jai_constants.register_type_c, SH_CESS_CG_ACCOUNT_ID ,
1681: jai_constants.register_type_pla, modvat_pla_account_id
1682: )
1683: FROM JAI_CMN_INVENTORY_ORGS a

Line 1680: jai_constants.register_type_c, SH_CESS_CG_ACCOUNT_ID ,

1676:
1677: CURSOR c_orgn_sh_cess_account(cp_organization_id IN NUMBER, cp_location_id IN NUMBER, cp_register_type IN VARCHAR2) IS
1678: SELECT decode(cp_register_type,
1679: jai_constants.register_type_a, SH_CESS_RM_ACCOUNT ,
1680: jai_constants.register_type_c, SH_CESS_CG_ACCOUNT_ID ,
1681: jai_constants.register_type_pla, modvat_pla_account_id
1682: )
1683: FROM JAI_CMN_INVENTORY_ORGS a
1684: WHERE organization_id = cp_organization_id

Line 1681: jai_constants.register_type_pla, modvat_pla_account_id

1677: CURSOR c_orgn_sh_cess_account(cp_organization_id IN NUMBER, cp_location_id IN NUMBER, cp_register_type IN VARCHAR2) IS
1678: SELECT decode(cp_register_type,
1679: jai_constants.register_type_a, SH_CESS_RM_ACCOUNT ,
1680: jai_constants.register_type_c, SH_CESS_CG_ACCOUNT_ID ,
1681: jai_constants.register_type_pla, modvat_pla_account_id
1682: )
1683: FROM JAI_CMN_INVENTORY_ORGS a
1684: WHERE organization_id = cp_organization_id
1685: AND ( (cp_location_id IS NOT NULL AND a.location_id = cp_location_id)

Line 1697: AND tax_types.registration_type = jai_constants.regn_type_tax_types

1693: cp_tax_type IN VARCHAR2, cp_account_name IN VARCHAR2) IS
1694: SELECT to_number(accnts.attribute_value)
1695: FROM JAI_RGM_REGISTRATIONS tax_types, JAI_RGM_ORG_REGNS_V accnts
1696: WHERE tax_types.regime_id = cp_regime_id
1697: AND tax_types.registration_type = jai_constants.regn_type_tax_types
1698: AND tax_types.attribute_code = cp_tax_type
1699: AND accnts.regime_id = tax_types.regime_id
1700: AND accnts.registration_type = jai_constants.regn_type_accounts
1701: AND accnts.parent_registration_id = tax_types.registration_id

Line 1700: AND accnts.registration_type = jai_constants.regn_type_accounts

1696: WHERE tax_types.regime_id = cp_regime_id
1697: AND tax_types.registration_type = jai_constants.regn_type_tax_types
1698: AND tax_types.attribute_code = cp_tax_type
1699: AND accnts.regime_id = tax_types.regime_id
1700: AND accnts.registration_type = jai_constants.regn_type_accounts
1701: AND accnts.parent_registration_id = tax_types.registration_id
1702: AND accnts.attribute_code = cp_account_name
1703: AND accnts.organization_type = cp_organization_type
1704: AND accnts.organization_id = cp_organization_id

Line 1724: AND tax_types.registration_type = jai_constants.regn_type_tax_types

1720: jai_rgm_parties jrp ,
1721: JAI_RGM_REGISTRATIONS accnts
1722: WHERE tax_types.regime_id = cp_regime_id
1723: AND jrp.regime_id = -accnts.regime_id
1724: AND tax_types.registration_type = jai_constants.regn_type_tax_types
1725: AND tax_types.attribute_code = cp_tax_type
1726: AND accnts.regime_id = tax_types.regime_id
1727: AND accnts.registration_type = jai_constants.regn_type_accounts
1728: AND accnts.parent_registration_id = tax_types.registration_id

Line 1727: AND accnts.registration_type = jai_constants.regn_type_accounts

1723: AND jrp.regime_id = -accnts.regime_id
1724: AND tax_types.registration_type = jai_constants.regn_type_tax_types
1725: AND tax_types.attribute_code = cp_tax_type
1726: AND accnts.regime_id = tax_types.regime_id
1727: AND accnts.registration_type = jai_constants.regn_type_accounts
1728: AND accnts.parent_registration_id = tax_types.registration_id
1729: AND accnts.attribute_code = cp_account_name
1730: AND jrp.organization_type = cp_organization_type
1731: AND jrp.organization_id = cp_organization_id ;

Line 1771: IF lv_regime_code = jai_constants.service_regime

1767: CLOSE c_regime_code;
1768:
1769: /*Bug 9883352 - Service Tax Regime Registration is always on IO and not on OU. Hence commenting the below*/
1770: /*
1771: IF lv_regime_code = jai_constants.service_regime
1772: AND p_location_id IS NULL AND p_organization_type = jai_constants.orgn_type_io
1773: THEN
1774: lv_organization_type := jai_constants.orgn_type_ou;
1775:

Line 1772: AND p_location_id IS NULL AND p_organization_type = jai_constants.orgn_type_io

1768:
1769: /*Bug 9883352 - Service Tax Regime Registration is always on IO and not on OU. Hence commenting the below*/
1770: /*
1771: IF lv_regime_code = jai_constants.service_regime
1772: AND p_location_id IS NULL AND p_organization_type = jai_constants.orgn_type_io
1773: THEN
1774: lv_organization_type := jai_constants.orgn_type_ou;
1775:
1776: OPEN c_operating_unit_of_inv_org(p_organization_id);

Line 1774: lv_organization_type := jai_constants.orgn_type_ou;

1770: /*
1771: IF lv_regime_code = jai_constants.service_regime
1772: AND p_location_id IS NULL AND p_organization_type = jai_constants.orgn_type_io
1773: THEN
1774: lv_organization_type := jai_constants.orgn_type_ou;
1775:
1776: OPEN c_operating_unit_of_inv_org(p_organization_id);
1777: FETCH c_operating_unit_of_inv_org INTO ln_organization_id;
1778: CLOSE c_operating_unit_of_inv_org;

Line 1788: IF lv_regime_code = jai_constants.service_regime

1784: */
1785: /*Bug 9883352 - Assigning Organization Type and ID without the above checks*/
1786: lv_organization_type := p_organization_type;
1787: ln_organization_id := p_organization_id;
1788: IF lv_regime_code = jai_constants.service_regime
1789: AND lv_organization_type = jai_constants.orgn_type_io
1790: THEN
1791: IF upper(p_tax_type) = UPPER(jai_constants.tax_type_excise) THEN /* IF condition added by Ramananda - bug#4546114 */
1792: OPEN c_orgn_account(ln_organization_id, p_location_id, p_account_name);

Line 1789: AND lv_organization_type = jai_constants.orgn_type_io

1785: /*Bug 9883352 - Assigning Organization Type and ID without the above checks*/
1786: lv_organization_type := p_organization_type;
1787: ln_organization_id := p_organization_id;
1788: IF lv_regime_code = jai_constants.service_regime
1789: AND lv_organization_type = jai_constants.orgn_type_io
1790: THEN
1791: IF upper(p_tax_type) = UPPER(jai_constants.tax_type_excise) THEN /* IF condition added by Ramananda - bug#4546114 */
1792: OPEN c_orgn_account(ln_organization_id, p_location_id, p_account_name);
1793: FETCH c_orgn_account INTO ln_code_combination_id;

Line 1791: IF upper(p_tax_type) = UPPER(jai_constants.tax_type_excise) THEN /* IF condition added by Ramananda - bug#4546114 */

1787: ln_organization_id := p_organization_id;
1788: IF lv_regime_code = jai_constants.service_regime
1789: AND lv_organization_type = jai_constants.orgn_type_io
1790: THEN
1791: IF upper(p_tax_type) = UPPER(jai_constants.tax_type_excise) THEN /* IF condition added by Ramananda - bug#4546114 */
1792: OPEN c_orgn_account(ln_organization_id, p_location_id, p_account_name);
1793: FETCH c_orgn_account INTO ln_code_combination_id;
1794: CLOSE c_orgn_account;
1795:

Line 1809: jai_constants.tax_type_exc_edu_cess,

1805: || Following IF condition and the cursor in it added by Ramananda
1806: || Start of Bug#4546114
1807: */
1808: ELSIF upper(p_tax_type) IN (lv_excise_cess ,
1809: jai_constants.tax_type_exc_edu_cess,
1810: jai_constants.tax_type_cvd_edu_cess ,
1811: jai_constants.tax_type_customs_edu_cess
1812: ) THEN
1813:

Line 1810: jai_constants.tax_type_cvd_edu_cess ,

1806: || Start of Bug#4546114
1807: */
1808: ELSIF upper(p_tax_type) IN (lv_excise_cess ,
1809: jai_constants.tax_type_exc_edu_cess,
1810: jai_constants.tax_type_cvd_edu_cess ,
1811: jai_constants.tax_type_customs_edu_cess
1812: ) THEN
1813:
1814: OPEN c_orgn_cess_account(ln_organization_id, p_location_id, p_account_name);

Line 1811: jai_constants.tax_type_customs_edu_cess

1807: */
1808: ELSIF upper(p_tax_type) IN (lv_excise_cess ,
1809: jai_constants.tax_type_exc_edu_cess,
1810: jai_constants.tax_type_cvd_edu_cess ,
1811: jai_constants.tax_type_customs_edu_cess
1812: ) THEN
1813:
1814: OPEN c_orgn_cess_account(ln_organization_id, p_location_id, p_account_name);
1815: FETCH c_orgn_cess_account INTO ln_code_combination_id;

Line 1825: ELSIF upper(p_tax_type) IN (jai_constants.tax_type_sh_exc_edu_cess ,

1821: CLOSE c_orgn_Cess_account;
1822: END IF;
1823: --Date 05/03/2007 by vkaranam for bug#5989740
1824: -- start 5989740
1825: ELSIF upper(p_tax_type) IN (jai_constants.tax_type_sh_exc_edu_cess ,
1826: jai_constants.tax_type_sh_cvd_edu_cess ,
1827: jai_constants.tax_type_sh_customs_edu_Cess
1828: ) THEN
1829:

Line 1826: jai_constants.tax_type_sh_cvd_edu_cess ,

1822: END IF;
1823: --Date 05/03/2007 by vkaranam for bug#5989740
1824: -- start 5989740
1825: ELSIF upper(p_tax_type) IN (jai_constants.tax_type_sh_exc_edu_cess ,
1826: jai_constants.tax_type_sh_cvd_edu_cess ,
1827: jai_constants.tax_type_sh_customs_edu_Cess
1828: ) THEN
1829:
1830: OPEN c_orgn_sh_cess_account(ln_organization_id, p_location_id, p_account_name);

Line 1827: jai_constants.tax_type_sh_customs_edu_Cess

1823: --Date 05/03/2007 by vkaranam for bug#5989740
1824: -- start 5989740
1825: ELSIF upper(p_tax_type) IN (jai_constants.tax_type_sh_exc_edu_cess ,
1826: jai_constants.tax_type_sh_cvd_edu_cess ,
1827: jai_constants.tax_type_sh_customs_edu_Cess
1828: ) THEN
1829:
1830: OPEN c_orgn_sh_cess_account(ln_organization_id, p_location_id, p_account_name);
1831: FETCH c_orgn_sh_cess_account INTO ln_code_combination_id;

Line 1852: ELSIF lv_regime_code = jai_constants.vat_regime

1848: END IF;
1849: /*
1850: || End of Bug#4546114
1851: */
1852: ELSIF lv_regime_code = jai_constants.vat_regime
1853: AND lv_organization_type = jai_constants.orgn_type_io
1854: THEN
1855: OPEN c_orgn_tax_type_account(p_regime_id, lv_organization_type, ln_organization_id,
1856: p_location_id, p_tax_type, p_account_name);

Line 1853: AND lv_organization_type = jai_constants.orgn_type_io

1849: /*
1850: || End of Bug#4546114
1851: */
1852: ELSIF lv_regime_code = jai_constants.vat_regime
1853: AND lv_organization_type = jai_constants.orgn_type_io
1854: THEN
1855: OPEN c_orgn_tax_type_account(p_regime_id, lv_organization_type, ln_organization_id,
1856: p_location_id, p_tax_type, p_account_name);
1857: FETCH c_orgn_tax_type_account INTO ln_code_combination_id;

Line 1861: ELSIF lv_regime_code = jai_constants.tcs_regime THEN

1857: FETCH c_orgn_tax_type_account INTO ln_code_combination_id;
1858: CLOSE c_orgn_tax_type_account;
1859:
1860: /*Added by CSahoo Bug# 5631784*/
1861: ELSIF lv_regime_code = jai_constants.tcs_regime THEN
1862:
1863: OPEN c_orgn_tax_type_account(p_regime_id, lv_organization_type, ln_organization_id,
1864: p_location_id, p_tax_type, p_account_name);
1865: FETCH c_orgn_tax_type_account INTO ln_code_combination_id;

Line 1868: ELSIF lv_organization_type = jai_constants.orgn_type_ou THEN

1864: p_location_id, p_tax_type, p_account_name);
1865: FETCH c_orgn_tax_type_account INTO ln_code_combination_id;
1866: CLOSE c_orgn_tax_type_account;
1867:
1868: ELSIF lv_organization_type = jai_constants.orgn_type_ou THEN
1869:
1870: /* added by ssawant for bug 5879769 */
1871: IF lv_regime_code = jai_constants.service_regime THEN
1872:

Line 1871: IF lv_regime_code = jai_constants.service_regime THEN

1867:
1868: ELSIF lv_organization_type = jai_constants.orgn_type_ou THEN
1869:
1870: /* added by ssawant for bug 5879769 */
1871: IF lv_regime_code = jai_constants.service_regime THEN
1872:
1873: OPEN c_orgn_tax_type_account_ou(p_regime_id, jai_constants.orgn_type_ou, ln_organization_id,
1874: null, p_tax_type, p_account_name);
1875: FETCH c_orgn_tax_type_account_ou INTO ln_code_combination_id;

Line 1873: OPEN c_orgn_tax_type_account_ou(p_regime_id, jai_constants.orgn_type_ou, ln_organization_id,

1869:
1870: /* added by ssawant for bug 5879769 */
1871: IF lv_regime_code = jai_constants.service_regime THEN
1872:
1873: OPEN c_orgn_tax_type_account_ou(p_regime_id, jai_constants.orgn_type_ou, ln_organization_id,
1874: null, p_tax_type, p_account_name);
1875: FETCH c_orgn_tax_type_account_ou INTO ln_code_combination_id;
1876: CLOSE c_orgn_tax_type_account_ou;
1877: ELSE

Line 1878: OPEN c_orgn_tax_type_account(p_regime_id, jai_constants.orgn_type_ou, ln_organization_id,

1874: null, p_tax_type, p_account_name);
1875: FETCH c_orgn_tax_type_account_ou INTO ln_code_combination_id;
1876: CLOSE c_orgn_tax_type_account_ou;
1877: ELSE
1878: OPEN c_orgn_tax_type_account(p_regime_id, jai_constants.orgn_type_ou, ln_organization_id,
1879: null, p_tax_type, p_account_name);
1880: FETCH c_orgn_tax_type_account INTO ln_code_combination_id;
1881: CLOSE c_orgn_tax_type_account;
1882: END IF;

Line 1919: WHERE application_id = jai_constants.gl_application_id

1915: */
1916: CURSOR c_period_dtl(cp_sob_id IN NUMBER, cp_accounting_date IN DATE) IS
1917: SELECT period_name, start_date, end_date, closing_status
1918: FROM gl_period_statuses
1919: WHERE application_id = jai_constants.gl_application_id
1920: AND set_of_books_id = cp_sob_id
1921: AND closing_status IN ('O','F') -- added for bug#7010029
1922: AND cp_accounting_date BETWEEN start_date AND end_date
1923: ORDER BY period_year, period_num; -- added for bug#7010029

Line 1961: WHERE application_id = jai_constants.gl_application_id

1957: ELSE
1958:
1959: FOR period IN ( SELECT period_name, start_date, end_date, closing_status
1960: FROM gl_period_statuses
1961: WHERE application_id = jai_constants.gl_application_id
1962: AND set_of_books_id = ln_sob_id
1963: AND start_date > p_accounting_date
1964: ORDER BY period_year, period_num
1965: )

Line 2013: IF p_source = jai_constants.source_receive THEN

2009: BEGIN
2010:
2011: -- following IF - ELSIF is valid for Organization Type OU w.r.t account_name and entry_type
2012: -- where as for Organization Type IO, it is valid only for entry_type
2013: IF p_source = jai_constants.source_receive THEN
2014: p_account_name := jai_constants.recovery_interim;
2015: p_account_entry_type := jai_constants.debit;
2016:
2017: ELSIF p_source = jai_constants.source_rtv THEN

Line 2014: p_account_name := jai_constants.recovery_interim;

2010:
2011: -- following IF - ELSIF is valid for Organization Type OU w.r.t account_name and entry_type
2012: -- where as for Organization Type IO, it is valid only for entry_type
2013: IF p_source = jai_constants.source_receive THEN
2014: p_account_name := jai_constants.recovery_interim;
2015: p_account_entry_type := jai_constants.debit;
2016:
2017: ELSIF p_source = jai_constants.source_rtv THEN
2018: p_account_name := jai_constants.liability_interim;

Line 2015: p_account_entry_type := jai_constants.debit;

2011: -- following IF - ELSIF is valid for Organization Type OU w.r.t account_name and entry_type
2012: -- where as for Organization Type IO, it is valid only for entry_type
2013: IF p_source = jai_constants.source_receive THEN
2014: p_account_name := jai_constants.recovery_interim;
2015: p_account_entry_type := jai_constants.debit;
2016:
2017: ELSIF p_source = jai_constants.source_rtv THEN
2018: p_account_name := jai_constants.liability_interim;
2019: p_account_entry_type := jai_constants.credit;

Line 2017: ELSIF p_source = jai_constants.source_rtv THEN

2013: IF p_source = jai_constants.source_receive THEN
2014: p_account_name := jai_constants.recovery_interim;
2015: p_account_entry_type := jai_constants.debit;
2016:
2017: ELSIF p_source = jai_constants.source_rtv THEN
2018: p_account_name := jai_constants.liability_interim;
2019: p_account_entry_type := jai_constants.credit;
2020:
2021: ELSIF p_source = jai_constants.source_ap THEN

Line 2018: p_account_name := jai_constants.liability_interim;

2014: p_account_name := jai_constants.recovery_interim;
2015: p_account_entry_type := jai_constants.debit;
2016:
2017: ELSIF p_source = jai_constants.source_rtv THEN
2018: p_account_name := jai_constants.liability_interim;
2019: p_account_entry_type := jai_constants.credit;
2020:
2021: ELSIF p_source = jai_constants.source_ap THEN
2022: p_account_name := jai_constants.recovery;

Line 2019: p_account_entry_type := jai_constants.credit;

2015: p_account_entry_type := jai_constants.debit;
2016:
2017: ELSIF p_source = jai_constants.source_rtv THEN
2018: p_account_name := jai_constants.liability_interim;
2019: p_account_entry_type := jai_constants.credit;
2020:
2021: ELSIF p_source = jai_constants.source_ap THEN
2022: p_account_name := jai_constants.recovery;
2023: p_account_entry_type := jai_constants.debit;

Line 2021: ELSIF p_source = jai_constants.source_ap THEN

2017: ELSIF p_source = jai_constants.source_rtv THEN
2018: p_account_name := jai_constants.liability_interim;
2019: p_account_entry_type := jai_constants.credit;
2020:
2021: ELSIF p_source = jai_constants.source_ap THEN
2022: p_account_name := jai_constants.recovery;
2023: p_account_entry_type := jai_constants.debit;
2024: ELSIF p_source = jai_constants.source_ar THEN
2025: p_account_name := jai_constants.liability;

Line 2022: p_account_name := jai_constants.recovery;

2018: p_account_name := jai_constants.liability_interim;
2019: p_account_entry_type := jai_constants.credit;
2020:
2021: ELSIF p_source = jai_constants.source_ap THEN
2022: p_account_name := jai_constants.recovery;
2023: p_account_entry_type := jai_constants.debit;
2024: ELSIF p_source = jai_constants.source_ar THEN
2025: p_account_name := jai_constants.liability;
2026: p_account_entry_type := jai_constants.credit;

Line 2023: p_account_entry_type := jai_constants.debit;

2019: p_account_entry_type := jai_constants.credit;
2020:
2021: ELSIF p_source = jai_constants.source_ap THEN
2022: p_account_name := jai_constants.recovery;
2023: p_account_entry_type := jai_constants.debit;
2024: ELSIF p_source = jai_constants.source_ar THEN
2025: p_account_name := jai_constants.liability;
2026: p_account_entry_type := jai_constants.credit;
2027:

Line 2024: ELSIF p_source = jai_constants.source_ar THEN

2020:
2021: ELSIF p_source = jai_constants.source_ap THEN
2022: p_account_name := jai_constants.recovery;
2023: p_account_entry_type := jai_constants.debit;
2024: ELSIF p_source = jai_constants.source_ar THEN
2025: p_account_name := jai_constants.liability;
2026: p_account_entry_type := jai_constants.credit;
2027:
2028: ELSIF p_source = jai_constants.source_manual_entry THEN

Line 2025: p_account_name := jai_constants.liability;

2021: ELSIF p_source = jai_constants.source_ap THEN
2022: p_account_name := jai_constants.recovery;
2023: p_account_entry_type := jai_constants.debit;
2024: ELSIF p_source = jai_constants.source_ar THEN
2025: p_account_name := jai_constants.liability;
2026: p_account_entry_type := jai_constants.credit;
2027:
2028: ELSIF p_source = jai_constants.source_manual_entry THEN
2029: --lv_account_name := p_account_name;

Line 2026: p_account_entry_type := jai_constants.credit;

2022: p_account_name := jai_constants.recovery;
2023: p_account_entry_type := jai_constants.debit;
2024: ELSIF p_source = jai_constants.source_ar THEN
2025: p_account_name := jai_constants.liability;
2026: p_account_entry_type := jai_constants.credit;
2027:
2028: ELSIF p_source = jai_constants.source_manual_entry THEN
2029: --lv_account_name := p_account_name;
2030: IF p_src_trx_type IN (jai_constants.recovery, jai_constants.recovery_interim) THEN

Line 2028: ELSIF p_source = jai_constants.source_manual_entry THEN

2024: ELSIF p_source = jai_constants.source_ar THEN
2025: p_account_name := jai_constants.liability;
2026: p_account_entry_type := jai_constants.credit;
2027:
2028: ELSIF p_source = jai_constants.source_manual_entry THEN
2029: --lv_account_name := p_account_name;
2030: IF p_src_trx_type IN (jai_constants.recovery, jai_constants.recovery_interim) THEN
2031: p_account_entry_type := jai_constants.debit;
2032: ELSIF p_src_trx_type IN (jai_constants.liability, jai_constants.liability_interim) THEN

Line 2030: IF p_src_trx_type IN (jai_constants.recovery, jai_constants.recovery_interim) THEN

2026: p_account_entry_type := jai_constants.credit;
2027:
2028: ELSIF p_source = jai_constants.source_manual_entry THEN
2029: --lv_account_name := p_account_name;
2030: IF p_src_trx_type IN (jai_constants.recovery, jai_constants.recovery_interim) THEN
2031: p_account_entry_type := jai_constants.debit;
2032: ELSIF p_src_trx_type IN (jai_constants.liability, jai_constants.liability_interim) THEN
2033: p_account_entry_type := jai_constants.credit;
2034: END IF;

Line 2031: p_account_entry_type := jai_constants.debit;

2027:
2028: ELSIF p_source = jai_constants.source_manual_entry THEN
2029: --lv_account_name := p_account_name;
2030: IF p_src_trx_type IN (jai_constants.recovery, jai_constants.recovery_interim) THEN
2031: p_account_entry_type := jai_constants.debit;
2032: ELSIF p_src_trx_type IN (jai_constants.liability, jai_constants.liability_interim) THEN
2033: p_account_entry_type := jai_constants.credit;
2034: END IF;
2035:

Line 2032: ELSIF p_src_trx_type IN (jai_constants.liability, jai_constants.liability_interim) THEN

2028: ELSIF p_source = jai_constants.source_manual_entry THEN
2029: --lv_account_name := p_account_name;
2030: IF p_src_trx_type IN (jai_constants.recovery, jai_constants.recovery_interim) THEN
2031: p_account_entry_type := jai_constants.debit;
2032: ELSIF p_src_trx_type IN (jai_constants.liability, jai_constants.liability_interim) THEN
2033: p_account_entry_type := jai_constants.credit;
2034: END IF;
2035:
2036: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN

Line 2033: p_account_entry_type := jai_constants.credit;

2029: --lv_account_name := p_account_name;
2030: IF p_src_trx_type IN (jai_constants.recovery, jai_constants.recovery_interim) THEN
2031: p_account_entry_type := jai_constants.debit;
2032: ELSIF p_src_trx_type IN (jai_constants.liability, jai_constants.liability_interim) THEN
2033: p_account_entry_type := jai_constants.credit;
2034: END IF;
2035:
2036: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN
2037: p_account_name := jai_constants.liability;

Line 2036: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN

2032: ELSIF p_src_trx_type IN (jai_constants.liability, jai_constants.liability_interim) THEN
2033: p_account_entry_type := jai_constants.credit;
2034: END IF;
2035:
2036: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN
2037: p_account_name := jai_constants.liability;
2038: p_account_entry_type := jai_constants.credit;
2039:
2040: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN

Line 2037: p_account_name := jai_constants.liability;

2033: p_account_entry_type := jai_constants.credit;
2034: END IF;
2035:
2036: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN
2037: p_account_name := jai_constants.liability;
2038: p_account_entry_type := jai_constants.credit;
2039:
2040: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN
2041: p_account_name := jai_constants.recovery;

Line 2038: p_account_entry_type := jai_constants.credit;

2034: END IF;
2035:
2036: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN
2037: p_account_name := jai_constants.liability;
2038: p_account_entry_type := jai_constants.credit;
2039:
2040: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN
2041: p_account_name := jai_constants.recovery;
2042: p_account_entry_type := jai_constants.debit;

Line 2040: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN

2036: ELSIF p_source IN (jai_constants.service_src_distribute_out, jai_constants.source_settle_out) THEN
2037: p_account_name := jai_constants.liability;
2038: p_account_entry_type := jai_constants.credit;
2039:
2040: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN
2041: p_account_name := jai_constants.recovery;
2042: p_account_entry_type := jai_constants.debit;
2043: END IF;
2044:

Line 2041: p_account_name := jai_constants.recovery;

2037: p_account_name := jai_constants.liability;
2038: p_account_entry_type := jai_constants.credit;
2039:
2040: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN
2041: p_account_name := jai_constants.recovery;
2042: p_account_entry_type := jai_constants.debit;
2043: END IF;
2044:
2045: IF p_organization_type = jai_constants.orgn_type_io THEN

Line 2042: p_account_entry_type := jai_constants.debit;

2038: p_account_entry_type := jai_constants.credit;
2039:
2040: ELSIF p_source IN (jai_constants.service_src_distribute_in, jai_constants.source_settle_in) THEN
2041: p_account_name := jai_constants.recovery;
2042: p_account_entry_type := jai_constants.debit;
2043: END IF;
2044:
2045: IF p_organization_type = jai_constants.orgn_type_io THEN
2046: p_account_name := jai_constants.register_type_a;

Line 2045: IF p_organization_type = jai_constants.orgn_type_io THEN

2041: p_account_name := jai_constants.recovery;
2042: p_account_entry_type := jai_constants.debit;
2043: END IF;
2044:
2045: IF p_organization_type = jai_constants.orgn_type_io THEN
2046: p_account_name := jai_constants.register_type_a;
2047: END IF;
2048:
2049:

Line 2046: p_account_name := jai_constants.register_type_a;

2042: p_account_entry_type := jai_constants.debit;
2043: END IF;
2044:
2045: IF p_organization_type = jai_constants.orgn_type_io THEN
2046: p_account_name := jai_constants.register_type_a;
2047: END IF;
2048:
2049:
2050: /* Added by Ramananda for bug#4407165 */

Line 2083: p_process_flag := jai_constants.successful;

2079: last_updated_by = fnd_global.user_id
2080: WHERE reference_id = p_reference_id;
2081:
2082: lv_statement := '2';
2083: p_process_flag := jai_constants.successful;
2084:
2085: EXCEPTION
2086: WHEN OTHERS THEN
2087: p_process_flag := jai_constants.unexpected_error;

Line 2087: p_process_flag := jai_constants.unexpected_error;

2083: p_process_flag := jai_constants.successful;
2084:
2085: EXCEPTION
2086: WHEN OTHERS THEN
2087: p_process_flag := jai_constants.unexpected_error;
2088: p_process_message := 'jai_cmn_rgm_recording_pkg.update_reference (Stmt'||lv_statement||') Error Occured:'||SQLERRM;
2089: END update_reference;
2090:
2091:

Line 2142: AND registration_type = jai_constants.regn_type_others

2138: WHERE regime_id = cp_regime_id
2139: AND organization_type = cp_orgn_type
2140: AND organization_id = cp_orgn_id
2141: and (cp_location_id is null or location_id = cp_location_id)
2142: AND registration_type = jai_constants.regn_type_others
2143: AND attribute_type_code = p_att_type_code;
2144:
2145: lv_regime_code JAI_RGM_DEFINITIONS.regime_code%TYPE;
2146: ld_transaction_date DATE;

Line 2171: pn_credit_amount := round( pn_credit_amount, jai_constants.vat_rgm_rnd_factor);

2167: CLOSE c_primary_regno;
2168:
2169: lv_statement_id := '4';
2170: /* Rounding */
2171: pn_credit_amount := round( pn_credit_amount, jai_constants.vat_rgm_rnd_factor);
2172: pn_debit_amount := round( pn_debit_amount, jai_constants.vat_rgm_rnd_factor);
2173:
2174: lv_statement_id := '5';
2175: INSERT INTO jai_rgm_trx_records(

Line 2172: pn_debit_amount := round( pn_debit_amount, jai_constants.vat_rgm_rnd_factor);

2168:
2169: lv_statement_id := '4';
2170: /* Rounding */
2171: pn_credit_amount := round( pn_credit_amount, jai_constants.vat_rgm_rnd_factor);
2172: pn_debit_amount := round( pn_debit_amount, jai_constants.vat_rgm_rnd_factor);
2173:
2174: lv_statement_id := '5';
2175: INSERT INTO jai_rgm_trx_records(
2176: repository_id, regime_code, tax_type, source,

Line 2191: jai_constants.func_curr, null, null, pn_credit_amount, pn_debit_amount,

2187: pn_source_id, pv_source_table_name, ld_transaction_date, pn_debit_amount, pn_credit_amount,
2188: null, null, pn_settlement_id, pv_organization_type, --added pn_settlement_id for bug#9350172
2189: pn_organization_id, pn_location_id, pv_account_name, pn_charge_account_id, pn_balancing_account_id,
2190: pn_reference_id, pv_source_trx_type, pn_tax_rate, pn_assessable_value, pn_batch_id,
2191: jai_constants.func_curr, null, null, pn_credit_amount, pn_debit_amount,
2192: sysdate, FND_GLOBAL.user_id, sysdate, FND_GLOBAL.user_id, fnd_global.login_id,
2193: pv_trx_reference_context, pv_trx_reference1, pv_trx_reference2, pv_trx_reference3, pv_trx_reference4, pv_trx_reference5
2194: , pn_inv_organization_id, lv_primary_regime_regno, pv_invoice_no, pd_invoice_date
2195: ) RETURNING repository_id INTO pn_repository_id;

Line 2197: pv_process_flag := jai_constants.successful;

2193: pv_trx_reference_context, pv_trx_reference1, pv_trx_reference2, pv_trx_reference3, pv_trx_reference4, pv_trx_reference5
2194: , pn_inv_organization_id, lv_primary_regime_regno, pv_invoice_no, pd_invoice_date
2195: ) RETURNING repository_id INTO pn_repository_id;
2196:
2197: pv_process_flag := jai_constants.successful;
2198: lv_statement_id := '6';
2199:
2200: EXCEPTION
2201: WHEN OTHERS THEN

Line 2202: pv_process_flag := jai_constants.unexpected_error;

2198: lv_statement_id := '6';
2199:
2200: EXCEPTION
2201: WHEN OTHERS THEN
2202: pv_process_flag := jai_constants.unexpected_error;
2203: pv_process_message := 'insert_vat_repository_entry Error(Stmt:'||lv_statement_id||') Occured:'||SQLERRM;
2204: --lv_codepath := jai_general_pkg.plot_codepath(-999, lv_codepath);
2205: Fnd_file.put_line( fnd_file.log, 'Error in insert_vat_repository_entry. Stmt:'||lv_statement_id);
2206: END insert_vat_repository_entry;

Line 2292: lv_repository_name := jai_constants.repository_name;

2288: lv_source := r_repo_dtl.source;
2289: lv_source_trx_type := r_repo_dtl.source_trx_type;
2290: lv_source_table_name := r_repo_dtl.source_table_name;
2291: ln_source_id := r_repo_dtl.source_document_id;
2292: lv_repository_name := jai_constants.repository_name;
2293: ln_repository_id := pn_repository_id;
2294: END IF;
2295:
2296: lv_statement_id := '4';

Line 2346: p_currency_code => jai_constants.func_curr, --p_currency_code,

2342: p_repository_name => lv_repository_name,
2343: p_repository_id => ln_repository_id,
2344: p_reference_name => null, --lv_reference_name,
2345: p_reference_id => null, --ln_reference_id,
2346: p_currency_code => jai_constants.func_curr, --p_currency_code,
2347: p_curr_conv_date => null, --p_curr_conv_date,
2348: p_curr_conv_type => null, -- p_curr_conv_type,
2349: p_curr_conv_rate => null --p_curr_conv_rate
2350: );

Line 2388: p_currency_code => jai_constants.func_curr, --p_currency_code,

2384: p_repository_name => lv_repository_name,
2385: p_repository_id => ln_repository_id,
2386: p_reference_name => null, --lv_reference_name,
2387: p_reference_id => null, --ln_reference_id,
2388: p_currency_code => jai_constants.func_curr, --p_currency_code,
2389: p_curr_conv_date => null, --p_curr_conv_date,
2390: p_curr_conv_type => null, -- p_curr_conv_type,
2391: p_curr_conv_rate => null --p_curr_conv_rate
2392: );

Line 2396: pv_process_flag := jai_constants.successful;

2392: );
2393:
2394: END IF;
2395:
2396: pv_process_flag := jai_constants.successful;
2397: lv_statement_id := '15';
2398: jai_cmn_utils_pkg.print_log('6395039.log',lv_statement_id);
2399:
2400: EXCEPTION

Line 2402: pv_process_flag := jai_constants.unexpected_error;

2398: jai_cmn_utils_pkg.print_log('6395039.log',lv_statement_id);
2399:
2400: EXCEPTION
2401: WHEN OTHERS THEN
2402: pv_process_flag := jai_constants.unexpected_error;
2403: pv_process_message := 'doVatAccounting Error(Stmt:'||lv_statement_id||') Occured:'||SQLERRM;
2404: --lv_codepath := jai_general_pkg.plot_codepath(-999, lv_codepath);
2405: jai_cmn_utils_pkg.print_log('6395039.log', 'Error in doVatAccounting. Stmt:'||lv_statement_id);
2406: Fnd_file.put_line( fnd_file.log, 'Error in doVatAccounting. Stmt:'||lv_statement_id);

Line 2494: p_currency_code IN VARCHAR2 DEFAULT jai_constants.func_curr,

2490: p_balancing_orgn_id IN NUMBER DEFAULT NULL,
2491: p_balancing_location_id IN NUMBER DEFAULT NULL,
2492: p_balancing_tax_type IN VARCHAR2 DEFAULT NULL,
2493: p_balancing_accnt_name IN VARCHAR2 DEFAULT NULL,
2494: p_currency_code IN VARCHAR2 DEFAULT jai_constants.func_curr,
2495: p_curr_conv_date IN VARCHAR2 DEFAULT NULL,
2496: p_curr_conv_type IN VARCHAR2 DEFAULT NULL,
2497: p_curr_conv_rate IN VARCHAR2 DEFAULT NULL
2498: ) IS

Line 2552: IF lv_regime_code <> jai_constants.service_regime THEN

2548: OPEN cur_fetch_ou(p_balancing_orgn_id);
2549: FETCH cur_fetch_ou INTO ln_bal_org_id;
2550: CLOSE cur_fetch_ou;
2551:
2552: IF lv_regime_code <> jai_constants.service_regime THEN
2553: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath);
2554: p_process_flag := jai_constants.expected_error;
2555: p_process_message := 'Transactions other than SERVICE regime are not supported';
2556: FND_FILE.put_line( fnd_file.log, p_process_message);

Line 2554: p_process_flag := jai_constants.expected_error;

2550: CLOSE cur_fetch_ou;
2551:
2552: IF lv_regime_code <> jai_constants.service_regime THEN
2553: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath);
2554: p_process_flag := jai_constants.expected_error;
2555: p_process_message := 'Transactions other than SERVICE regime are not supported';
2556: FND_FILE.put_line( fnd_file.log, p_process_message);
2557: RETURN;
2558: END IF;

Line 2571: IF p_source = jai_constants.source_ar THEN

2567: ld_transaction_date := p_transaction_date;
2568: lv_codepath := jai_general_pkg.plot_codepath(2.3, lv_codepath);
2569: END IF;
2570: FND_FILE.put_line( fnd_file.log, 'p_source '|| p_source||' p_exc_gain_loss_amt '|| p_exc_gain_loss_amt);
2571: IF p_source = jai_constants.source_ar THEN
2572:
2573: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);
2574:
2575: lv_balancing_accnt_name := jai_constants.liability_interim;

Line 2575: lv_balancing_accnt_name := jai_constants.liability_interim;

2571: IF p_source = jai_constants.source_ar THEN
2572:
2573: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);
2574:
2575: lv_balancing_accnt_name := jai_constants.liability_interim;
2576:
2577: OPEN cur_get_exc_gain_acc_ar(ln_org_id);
2578: FETCH cur_get_exc_gain_acc_ar INTO ln_exc_gain_ccid, ln_exc_loss_ccid;
2579: CLOSE cur_get_exc_gain_acc_ar;

Line 2582: lv_charge_entry_type := jai_constants.debit;

2578: FETCH cur_get_exc_gain_acc_ar INTO ln_exc_gain_ccid, ln_exc_loss_ccid;
2579: CLOSE cur_get_exc_gain_acc_ar;
2580: IF p_exc_gain_loss_amt > 0 THEN
2581: ln_exc_ccid := nvl( ln_exc_gain_ccid, ln_exc_loss_ccid);
2582: lv_charge_entry_type := jai_constants.debit;
2583: lv_balancing_entry_type := jai_constants.credit;
2584:
2585: ELSE
2586: ln_exc_ccid := nvl( ln_exc_loss_ccid, ln_exc_gain_ccid);

Line 2583: lv_balancing_entry_type := jai_constants.credit;

2579: CLOSE cur_get_exc_gain_acc_ar;
2580: IF p_exc_gain_loss_amt > 0 THEN
2581: ln_exc_ccid := nvl( ln_exc_gain_ccid, ln_exc_loss_ccid);
2582: lv_charge_entry_type := jai_constants.debit;
2583: lv_balancing_entry_type := jai_constants.credit;
2584:
2585: ELSE
2586: ln_exc_ccid := nvl( ln_exc_loss_ccid, ln_exc_gain_ccid);
2587: lv_charge_entry_type := jai_constants.credit;

Line 2587: lv_charge_entry_type := jai_constants.credit;

2583: lv_balancing_entry_type := jai_constants.credit;
2584:
2585: ELSE
2586: ln_exc_ccid := nvl( ln_exc_loss_ccid, ln_exc_gain_ccid);
2587: lv_charge_entry_type := jai_constants.credit;
2588: lv_balancing_entry_type := jai_constants.debit;
2589: END IF;
2590: ELSIF p_source = jai_constants.source_ap THEN
2591:

Line 2588: lv_balancing_entry_type := jai_constants.debit;

2584:
2585: ELSE
2586: ln_exc_ccid := nvl( ln_exc_loss_ccid, ln_exc_gain_ccid);
2587: lv_charge_entry_type := jai_constants.credit;
2588: lv_balancing_entry_type := jai_constants.debit;
2589: END IF;
2590: ELSIF p_source = jai_constants.source_ap THEN
2591:
2592: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);

Line 2590: ELSIF p_source = jai_constants.source_ap THEN

2586: ln_exc_ccid := nvl( ln_exc_loss_ccid, ln_exc_gain_ccid);
2587: lv_charge_entry_type := jai_constants.credit;
2588: lv_balancing_entry_type := jai_constants.debit;
2589: END IF;
2590: ELSIF p_source = jai_constants.source_ap THEN
2591:
2592: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
2593:
2594: lv_balancing_accnt_name := jai_constants.recovery_interim;

Line 2594: lv_balancing_accnt_name := jai_constants.recovery_interim;

2590: ELSIF p_source = jai_constants.source_ap THEN
2591:
2592: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
2593:
2594: lv_balancing_accnt_name := jai_constants.recovery_interim;
2595:
2596:
2597: OPEN cur_get_exc_gain_acc_ap(ln_org_id);
2598: FETCH cur_get_exc_gain_acc_ap INTO ln_exc_gain_ccid, ln_exc_loss_ccid;

Line 2602: lv_charge_entry_type := jai_constants.credit;

2598: FETCH cur_get_exc_gain_acc_ap INTO ln_exc_gain_ccid, ln_exc_loss_ccid;
2599: CLOSE cur_get_exc_gain_acc_ap;
2600: IF p_exc_gain_loss_amt > 0 THEN
2601: ln_exc_ccid := nvl( ln_exc_loss_ccid, ln_exc_gain_ccid);
2602: lv_charge_entry_type := jai_constants.credit;
2603: lv_balancing_entry_type := jai_constants.debit;
2604: ELSE
2605: ln_exc_ccid := nvl( ln_exc_gain_ccid, ln_exc_loss_ccid);
2606: lv_charge_entry_type := jai_constants.debit;

Line 2603: lv_balancing_entry_type := jai_constants.debit;

2599: CLOSE cur_get_exc_gain_acc_ap;
2600: IF p_exc_gain_loss_amt > 0 THEN
2601: ln_exc_ccid := nvl( ln_exc_loss_ccid, ln_exc_gain_ccid);
2602: lv_charge_entry_type := jai_constants.credit;
2603: lv_balancing_entry_type := jai_constants.debit;
2604: ELSE
2605: ln_exc_ccid := nvl( ln_exc_gain_ccid, ln_exc_loss_ccid);
2606: lv_charge_entry_type := jai_constants.debit;
2607: lv_balancing_entry_type := jai_constants.credit;

Line 2606: lv_charge_entry_type := jai_constants.debit;

2602: lv_charge_entry_type := jai_constants.credit;
2603: lv_balancing_entry_type := jai_constants.debit;
2604: ELSE
2605: ln_exc_ccid := nvl( ln_exc_gain_ccid, ln_exc_loss_ccid);
2606: lv_charge_entry_type := jai_constants.debit;
2607: lv_balancing_entry_type := jai_constants.credit;
2608: END IF;
2609: END IF;
2610:

Line 2607: lv_balancing_entry_type := jai_constants.credit;

2603: lv_balancing_entry_type := jai_constants.debit;
2604: ELSE
2605: ln_exc_ccid := nvl( ln_exc_gain_ccid, ln_exc_loss_ccid);
2606: lv_charge_entry_type := jai_constants.debit;
2607: lv_balancing_entry_type := jai_constants.credit;
2608: END IF;
2609: END IF;
2610:
2611: FND_FILE.put_line( fnd_file.log, 'ln_exc_ccid '|| ln_exc_ccid ||' lv_charge_entry_type '|| lv_charge_entry_type

Line 2616: p_process_flag := jai_constants.expected_error;

2612: ||' lv_balancing_entry_type '|| lv_balancing_entry_type);
2613:
2614: IF ln_exc_ccid IS NULL THEN
2615: lv_codepath := jai_general_pkg.plot_codepath(21.10, lv_codepath);
2616: p_process_flag := jai_constants.expected_error;
2617: p_process_message := 'Foreign Exchange Gain or Loss Account is not defined in '||p_source;
2618: FND_FILE.put_line( fnd_file.log, p_process_message);
2619: RETURN;
2620: END IF;

Line 2622: IF lv_charge_entry_type = jai_constants.debit THEN

2618: FND_FILE.put_line( fnd_file.log, p_process_message);
2619: RETURN;
2620: END IF;
2621:
2622: IF lv_charge_entry_type = jai_constants.debit THEN
2623: ln_debit_amt := abs(p_exc_gain_loss_amt);
2624: ln_credit_amt := NULL;
2625: ELSE
2626: ln_debit_amt := NULL;

Line 2651: p_repository_name => jai_constants.repository_name,

2647: p_accounted_dr => ln_debit_amt,
2648: p_accounting_date => p_accounting_date,
2649: p_transaction_date => ld_transaction_date,
2650: p_calling_object => p_called_from,
2651: p_repository_name => jai_constants.repository_name,
2652: p_repository_id => p_repository_id,
2653: p_reference_name => jai_constants.rgm_trx_refs,
2654: p_reference_id => p_reference_id,
2655: p_currency_code => p_currency_code,

Line 2653: p_reference_name => jai_constants.rgm_trx_refs,

2649: p_transaction_date => ld_transaction_date,
2650: p_calling_object => p_called_from,
2651: p_repository_name => jai_constants.repository_name,
2652: p_repository_id => p_repository_id,
2653: p_reference_name => jai_constants.rgm_trx_refs,
2654: p_reference_id => p_reference_id,
2655: p_currency_code => p_currency_code,
2656: p_curr_conv_date => p_curr_conv_date,
2657: p_curr_conv_type => p_curr_conv_type,

Line 2672: p_process_flag := jai_constants.expected_error;

2668: );
2669:
2670: IF ln_charge_account_id IS NULL THEN
2671: lv_codepath := jai_general_pkg.plot_codepath(21.10, lv_codepath);
2672: p_process_flag := jai_constants.expected_error;
2673: p_process_message := lv_balancing_accnt_name||' Account is not defined in '||p_source;
2674: FND_FILE.put_line( fnd_file.log, p_process_message);
2675: RETURN;
2676: END IF;

Line 2678: IF lv_charge_entry_type = jai_constants.debit THEN

2674: FND_FILE.put_line( fnd_file.log, p_process_message);
2675: RETURN;
2676: END IF;
2677:
2678: IF lv_charge_entry_type = jai_constants.debit THEN
2679: ln_credit_amt := abs(p_exc_gain_loss_amt);
2680: ln_debit_amt := NULL;
2681: ELSE
2682: ln_credit_amt := NULL;

Line 2703: p_repository_name => jai_constants.repository_name,

2699: p_accounted_dr => ln_debit_amt,
2700: p_accounting_date => p_accounting_date,
2701: p_transaction_date => ld_transaction_date,
2702: p_calling_object => p_called_from,
2703: p_repository_name => jai_constants.repository_name,
2704: p_repository_id => p_repository_id,
2705: p_reference_name => jai_constants.rgm_trx_refs,
2706: p_reference_id => p_reference_id,
2707: p_currency_code => p_currency_code,

Line 2705: p_reference_name => jai_constants.rgm_trx_refs,

2701: p_transaction_date => ld_transaction_date,
2702: p_calling_object => p_called_from,
2703: p_repository_name => jai_constants.repository_name,
2704: p_repository_id => p_repository_id,
2705: p_reference_name => jai_constants.rgm_trx_refs,
2706: p_reference_id => p_reference_id,
2707: p_currency_code => p_currency_code,
2708: p_curr_conv_date => p_curr_conv_date,
2709: p_curr_conv_type => p_curr_conv_type,

Line 2713: p_process_flag := jai_constants.successful;

2709: p_curr_conv_type => p_curr_conv_type,
2710: p_curr_conv_rate => p_curr_conv_rate
2711: );
2712:
2713: p_process_flag := jai_constants.successful;
2714: p_process_message := 'Successful';
2715:
2716: FND_FILE.put_line( fnd_file.log, 'End of jai_rgm_trx_recording_pkg.exc_gain_loss_accounting procedure');
2717: