DBA Data[Home] [Help]

APPS.JAI_PA_BILLING_PKG dependencies on JAI_CONSTANTS

Line 119: gl_entry.currency_code := jai_constants.func_curr; -- gl_currencies.currency_code%type,

115: gl_entry.tax_type := null; -- varchar2(30),
116: gl_entry.je_source := 'Project Accounting'; -- gl_je_headers.je_source%type,
117: gl_entry.je_category := 'Register Data Entry'; -- gl_je_headers.je_category%type,
118: gl_entry.set_of_books_id := ; -- gl_sets_of_books.set_of_books_id%type,
119: gl_entry.currency_code := jai_constants.func_curr; -- gl_currencies.currency_code%type,
120: gl_entry.currency_conv_rate := null; -- number,
121: gl_entry.currency_conv_date := null; -- date,
122: gl_entry.accounting_date := sysdate; -- date,
123: gl_entry.organization_code := ; -- gl_interface.reference1%TYPE, -- p_params(i).organization_code,

Line 198: jai_constants.gl_je_source_name, -- reference22,

194: null,
195: null,
196: pr_gl_entry.organization_code, -- reference1, p_params(i).organization_code,
197: pr_gl_entry.description, -- reference10, 'India Localization Entry for Interorg-XFER ',
198: jai_constants.gl_je_source_name, -- reference22,
199: pr_gl_entry.called_from, -- reference23, 'jai_mtl_trx_pkg.do_cenvat_Acctg',
200: pr_gl_entry.source_table_name, -- reference24, 'jai_mtl_trxs',
201: pr_gl_entry.source_document_id, -- reference25, p_transaction_temp_id,
202: pr_gl_entry.reference_table, -- reference26, 'transaction_temp_id',

Line 304: jai_constants.gl_je_source_name, -- reference22,

300: null,
301: null,
302: pr_gl_entry.organization_code, -- reference1, p_params(i).organization_code,
303: pr_gl_entry.description, -- reference10, 'India Localization Entry for Interorg-XFER ',
304: jai_constants.gl_je_source_name, -- reference22,
305: pr_gl_entry.called_from, -- reference23, 'jai_mtl_trx_pkg.do_cenvat_Acctg',
306: pr_gl_entry.source_table_name, -- reference24, 'jai_mtl_trxs',
307: pr_gl_entry.source_document_id, -- reference25, p_transaction_temp_id,
308: pr_gl_entry.reference_table, -- reference26, 'transaction_temp_id',

Line 427: if nvl(r_draft_invoice_dtls.process_excise_flag, jai_constants.no) <> jai_constants.yes then

423: if jai_pa_billing_pkg.gv_debug then
424: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '2 pdir- BefCall to ProcExcise:');
425: end if;
426:
427: if nvl(r_draft_invoice_dtls.process_excise_flag, jai_constants.no) <> jai_constants.yes then
428:
429: process_excise(
430: --pn_project_id => pr_draft_invoice.project_id ,
431: --pn_draft_invoice_num => pr_draft_invoice.draft_invoice_num ,

Line 444: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

440: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '1.1 pdir- After process_excise. pv_process_message:'
441: ||pv_process_message);
442: end if;
443:
444: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
445: goto end_of_procedure;
446: end if;
447:
448: end if;

Line 458: if nvl(r_draft_invoice_dtls.process_vat_flag, jai_constants.no) <> jai_constants.yes then

454: if jai_pa_billing_pkg.gv_debug then
455: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '3 pdir- BefCall to ProcVat');
456: end if;
457:
458: if nvl(r_draft_invoice_dtls.process_vat_flag, jai_constants.no) <> jai_constants.yes then
459: process_vat(
460: pn_project_id => pr_draft_invoice.project_id ,
461: pn_draft_invoice_num => pr_draft_invoice.draft_invoice_num ,
462: -- pn_draft_invoice_id => r_draft_invoice_dtls.draft_invoice_id ,

Line 473: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

469: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '3.1 pdir- After process_vat. pv_process_message:'
470: ||pv_process_message);
471: end if;
472:
473: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
474: goto end_of_procedure;
475: end if;
476:
477: end if;

Line 520: AND attribute_type_code = jai_constants.regn_type_others

516: ) IS
517: SELECT attribute_value
518: FROM jai_rgm_org_regns_v
519: WHERE regime_id = cp_regime_id
520: AND attribute_type_code = jai_constants.regn_type_others
521: AND attribute_code = jai_constants.attr_code_same_inv_no
522: AND organization_id = cp_organization_id
523: AND location_id = cp_location_id;
524:

Line 521: AND attribute_code = jai_constants.attr_code_same_inv_no

517: SELECT attribute_value
518: FROM jai_rgm_org_regns_v
519: WHERE regime_id = cp_regime_id
520: AND attribute_type_code = jai_constants.regn_type_others
521: AND attribute_code = jai_constants.attr_code_same_inv_no
522: AND organization_id = cp_organization_id
523: AND location_id = cp_location_id;
524:
525: ln_regime_id JAI_RGM_DEFINITIONS.regime_id%type;

Line 542: lv_credit_memo_flag := jai_constants.no;

538: if jai_pa_billing_pkg.gv_debug then
539: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '1 Start Process_Vat');
540: end if;
541:
542: lv_credit_memo_flag := jai_constants.no;
543:
544: /* generate vat invoice no */
545: open c_draft_invoice_dtls(pn_project_id, pn_draft_invoice_num);
546: fetch c_draft_invoice_dtls into r_draft_invoice_dtls;

Line 550: lv_credit_memo_flag := jai_constants.yes;

546: fetch c_draft_invoice_dtls into r_draft_invoice_dtls;
547: close c_draft_invoice_dtls;
548:
549: if r_draft_invoice_dtls.parent_draft_invoice_id is not null then
550: lv_credit_memo_flag := jai_constants.yes;
551: end if;
552:
553: open c_regime_id(jai_constants.vat_regime);
554: fetch c_regime_id into ln_regime_id;

Line 553: open c_regime_id(jai_constants.vat_regime);

549: if r_draft_invoice_dtls.parent_draft_invoice_id is not null then
550: lv_credit_memo_flag := jai_constants.yes;
551: end if;
552:
553: open c_regime_id(jai_constants.vat_regime);
554: fetch c_regime_id into ln_regime_id;
555: close c_regime_id;
556:
557: /* for CREDIT MEMO the VAT invoice number should not be generated */

Line 559: if lv_credit_memo_flag = jai_constants.no then

555: close c_regime_id;
556:
557: /* for CREDIT MEMO the VAT invoice number should not be generated */
558:
559: if lv_credit_memo_flag = jai_constants.no then
560:
561: open c_same_inv_no(r_draft_invoice_dtls.organization_id, r_draft_invoice_dtls.location_id, ln_regime_id);
562: fetch c_same_inv_no into lv_same_invoice_no_flag;
563: close c_same_inv_no;

Line 565: if nvl(lv_same_invoice_no_flag, jai_constants.no) = jai_constants.yes then

561: open c_same_inv_no(r_draft_invoice_dtls.organization_id, r_draft_invoice_dtls.location_id, ln_regime_id);
562: fetch c_same_inv_no into lv_same_invoice_no_flag;
563: close c_same_inv_no;
564:
565: if nvl(lv_same_invoice_no_flag, jai_constants.no) = jai_constants.yes then
566: lv_vat_invoice_no := r_draft_invoice_dtls.excise_invoice_no;
567: ld_vat_invoice_date := r_draft_invoice_dtls.excise_invoice_date;
568: end if;
569:

Line 594: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

590: end if;
591:
592: end if;
593:
594: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
595: goto end_of_procedure;
596:
597: elsif lv_vat_invoice_no is null then
598: pv_process_flag := jai_constants.expected_error;

Line 598: pv_process_flag := jai_constants.expected_error;

594: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
595: goto end_of_procedure;
596:
597: elsif lv_vat_invoice_no is null then
598: pv_process_flag := jai_constants.expected_error;
599: pv_process_message := 'VAT Invoice could not be generated';
600: goto end_of_procedure;
601: end if;
602:

Line 613: if lv_credit_memo_flag = jai_constants.yes then

609: if jai_pa_billing_pkg.gv_debug then
610: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '4 rocess_Vat. BefCall to jai_cmn_rgm_vat_accnt_pkg.process_order_invoice. DraftInvoceId:'||r_draft_invoice_dtls.draft_invoice_id);
611: end if;
612:
613: if lv_credit_memo_flag = jai_constants.yes then
614: lv_called_from := 'DRAFT_INVOICE_CM';
615: else
616: lv_called_from := 'DRAFT_INVOICE';
617: end if;

Line 648: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

644: if jai_pa_billing_pkg.gv_debug then
645: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '6 process_Vat. AftCall to jai_cmn_rgm_vat_accnt_pkg.process_order_invoice. pv_process_message:'||pv_process_message);
646: end if;
647:
648: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
649: goto end_of_procedure;
650: end if;
651:
652: UPDATE jai_pa_draft_invoices

Line 668: pv_process_flag := jai_constants.unexpected_error;

664: end if;
665:
666: exception
667: when others then
668: pv_process_flag := jai_constants.unexpected_error;
669: pv_process_message := 'Error in process_vat. Message:'||SQLERRM;
670:
671: end process_vat;
672:

Line 702: upper(jai_constants.tax_type_exc_edu_cess)

698: and source_doc_id = cpn_draft_invoice_id
699: and upper(tax_type)
700: in
701: ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE',
702: upper(jai_constants.tax_type_exc_edu_cess)
703: , jai_constants.tax_type_sh_exc_edu_cess /*budget07*/
704: );
705: /* CVD type of taxes would not exist for projects invoice */
706:

Line 703: , jai_constants.tax_type_sh_exc_edu_cess /*budget07*/

699: and upper(tax_type)
700: in
701: ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE',
702: upper(jai_constants.tax_type_exc_edu_cess)
703: , jai_constants.tax_type_sh_exc_edu_cess /*budget07*/
704: );
705: /* CVD type of taxes would not exist for projects invoice */
706:
707: cursor c_get_excise_breakup (cpn_draft_invoice_id number) is

Line 712: upper(jai_constants.tax_type_exc_edu_cess), func_tax_amt, 0 )), 2) excise_cess

708: select round(sum( decode( upper(tax_type), 'EXCISE', func_tax_amt, 0 )), 2) basic_excise
709: ,round(sum( decode( upper(tax_type), 'ADDL. EXCISE', func_tax_amt, 0 )), 2) additional_excise
710: ,round(sum( decode( upper(tax_type), 'OTHER EXCISE', func_tax_amt, 0 )), 2) other_excise
711: ,round(sum( decode( upper(tax_type),
712: upper(jai_constants.tax_type_exc_edu_cess), func_tax_amt, 0 )), 2) excise_cess
713: ,round(sum( decode( tax_type,
714: jai_constants.tax_type_sh_exc_edu_cess, func_tax_amt, 0 )), 2) sh_excise_cess /*budget07*/
715: from jai_cmn_document_taxes
716: where source_doc_type = jai_pa_billing_pkg.gv_source_projects

Line 714: jai_constants.tax_type_sh_exc_edu_cess, func_tax_amt, 0 )), 2) sh_excise_cess /*budget07*/

710: ,round(sum( decode( upper(tax_type), 'OTHER EXCISE', func_tax_amt, 0 )), 2) other_excise
711: ,round(sum( decode( upper(tax_type),
712: upper(jai_constants.tax_type_exc_edu_cess), func_tax_amt, 0 )), 2) excise_cess
713: ,round(sum( decode( tax_type,
714: jai_constants.tax_type_sh_exc_edu_cess, func_tax_amt, 0 )), 2) sh_excise_cess /*budget07*/
715: from jai_cmn_document_taxes
716: where source_doc_type = jai_pa_billing_pkg.gv_source_projects
717: and source_doc_id = cpn_draft_invoice_id
718: and upper(tax_type)

Line 721: upper(jai_constants.tax_type_exc_edu_cess)

717: and source_doc_id = cpn_draft_invoice_id
718: and upper(tax_type)
719: in
720: ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE',
721: upper(jai_constants.tax_type_exc_edu_cess)
722: , jai_constants.tax_type_sh_exc_edu_cess /*budget07*/
723: );
724:
725:

Line 722: , jai_constants.tax_type_sh_exc_edu_cess /*budget07*/

718: and upper(tax_type)
719: in
720: ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE',
721: upper(jai_constants.tax_type_exc_edu_cess)
722: , jai_constants.tax_type_sh_exc_edu_cess /*budget07*/
723: );
724:
725:
726: cursor c_JAI_CMN_INVENTORY_ORGS (cpn_organization_id number, cpn_location_id number) is

Line 799: lv_exists_excise_tax := jai_constants.no;

795:
796: /* defaults initialization */
797: lv_transaction_type := jai_pa_billing_pkg.gv_trx_type_draft_invoice; -- 'DRAFT_INVOICE';
798: lv_transaction_source := jai_pa_billing_pkg.gv_draft_invoice_release; -- 'DRAFT_INVOICE_RELEASE'
799: lv_exists_excise_tax := jai_constants.no;
800: ld_transaction_date := sysdate;
801: lv_credit_memo_flag := jai_constants.no;
802:
803: /* Get IL related info for the project invoice. */

Line 801: lv_credit_memo_flag := jai_constants.no;

797: lv_transaction_type := jai_pa_billing_pkg.gv_trx_type_draft_invoice; -- 'DRAFT_INVOICE';
798: lv_transaction_source := jai_pa_billing_pkg.gv_draft_invoice_release; -- 'DRAFT_INVOICE_RELEASE'
799: lv_exists_excise_tax := jai_constants.no;
800: ld_transaction_date := sysdate;
801: lv_credit_memo_flag := jai_constants.no;
802:
803: /* Get IL related info for the project invoice. */
804: open c_draft_invoice_dtls(pr_pa_draft_invoices_all.project_id, pr_pa_draft_invoices_all.draft_invoice_num);
805: fetch c_draft_invoice_dtls into r_jai_pa_draft_invoices;

Line 809: lv_credit_memo_flag := jai_constants.yes;

805: fetch c_draft_invoice_dtls into r_jai_pa_draft_invoices;
806: close c_draft_invoice_dtls;
807:
808: if r_jai_pa_draft_invoices.parent_draft_invoice_id is not null then
809: lv_credit_memo_flag := jai_constants.yes;
810: end if;
811:
812: /* Check if Excise is applicable - that is if excise type of taxes exist */
813: open c_exists_excise_tax(r_jai_pa_draft_invoices.draft_invoice_id);

Line 817: if lv_exists_excise_tax <> jai_constants.yes then

813: open c_exists_excise_tax(r_jai_pa_draft_invoices.draft_invoice_id);
814: fetch c_exists_excise_tax into lv_exists_excise_tax;
815: close c_exists_excise_tax;
816:
817: if lv_exists_excise_tax <> jai_constants.yes then
818: /* Excise taxes do not exist, excise processing is not applicable, return with 'X' */
819: pv_process_flag := 'X';
820: pv_process_message := 'Excise processing is not applicable as excise taxes do not exist';
821: goto exit_from_procedure;

Line 874: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

870: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '3 process_excise. AftChkExcBal. lv_register:'||lv_register
871: ||', pv_process_message:'||pv_process_message);
872: end if;
873:
874: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
875: goto exit_from_procedure;
876: end if;
877: /**** Control comes here only if excise balance exists ****/
878:

Line 887: if lv_credit_memo_flag = jai_constants.no then

883:
884: /* Generate Excise Invoice
885: for CREDIT MEMO the excise invoice number should not be generated
886: */
887: if lv_credit_memo_flag = jai_constants.no then
888:
889: jai_cmn_setup_pkg.generate_excise_invoice_no
890: (
891: p_organization_id => r_jai_pa_draft_invoices.organization_id ,

Line 906: pv_process_flag := jai_constants.expected_error;

902: ||', pv_process_message:'||pv_process_message);
903: end if;
904:
905: if pv_process_message is not null then
906: pv_process_flag := jai_constants.expected_error;
907: goto exit_from_procedure;
908: end if;
909:
910: if lv_excise_inv_no is not null then

Line 1001: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error) then

997: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '9 process_excise. After jai_cmn_rg_23ac_ii_pkg.insert_row'
998: ||', ln_register_id:'||ln_register_id||', pv_process_message:'||pv_process_message);
999: end if;
1000:
1001: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error) then
1002: goto exit_from_procedure;
1003: end if;
1004:
1005: /* Set variables for Cess Register Entry */

Line 1059: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

1055: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '12 process_excise. After jai_cmn_rg_pla_trxs_pkg.insert_row'
1056: ||', ln_register_id:'||ln_register_id||', pv_process_message:'||pv_process_message);
1057: end if;
1058:
1059: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
1060: goto exit_from_procedure;
1061: end if;
1062:
1063: /* Set variables for Cess Register Entry */

Line 1093: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

1089: if jai_pa_billing_pkg.gv_debug then
1090: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '15 process_excise. After jai_cmn_rg_others_pkg.insert_row');
1091: end if;
1092:
1093: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
1094: goto exit_from_procedure;
1095: end if;
1096:
1097: end if;

Line 1111: p_tax_type => jai_constants.tax_type_sh_exc_edu_cess , /*budget07*/

1107: (
1108: p_source_type => ln_source_type ,
1109: p_source_name => lv_source_name ,
1110: p_source_id => ln_register_id ,
1111: p_tax_type => jai_constants.tax_type_sh_exc_edu_cess , /*budget07*/
1112: debit_amt => ln_sh_excise_cess_amt ,
1113: credit_amt => null ,
1114: p_process_flag => pv_process_flag ,
1115: p_process_msg => pv_process_message

Line 1122: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

1118: if jai_pa_billing_pkg.gv_debug then
1119: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '15.1 process_excise. After SH jai_cmn_rg_others_pkg.insert_row');
1120: end if;
1121:
1122: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
1123: goto exit_from_procedure;
1124: end if;
1125:
1126: end if;

Line 1140: pv_process_flag := jai_constants.expected_error;

1136: ln_credit_ccid := nvl(r_jai_cmn_inventory_orgs.cenvat_pla_accnt, r_jai_cmn_inventory_orgs1.cenvat_pla_accnt);
1137: end if;
1138:
1139: if ln_credit_ccid is null then
1140: pv_process_flag := jai_constants.expected_error;
1141: pv_process_message := 'Excise account not defined for '||lv_register
1142: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1143: ||'/'||r_jai_pa_draft_invoices.location_id;
1144: goto exit_from_procedure;

Line 1149: pv_process_flag := jai_constants.expected_error;

1145: end if;
1146:
1147: ln_debit_ccid := nvl(r_jai_cmn_inventory_orgs.excise_debit_accnt, r_jai_cmn_inventory_orgs1.excise_debit_accnt);
1148: if ln_debit_ccid is null then
1149: pv_process_flag := jai_constants.expected_error;
1150: pv_process_message := 'Excise account not defined for '||lv_register
1151: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1152: ||'/'||r_jai_pa_draft_invoices.location_id;
1153: goto exit_from_procedure;

Line 1170: r_gl_entry.je_source := jai_constants.pa_je_source; --Added by bgowrava for Bug#6012570

1166: for Project Related AR Invoices. In future when the Project Accounting source is sedded it can be used
1167: */
1168: /* r_gl_entry.je_source := 'Project Accounting'; -- gl_je_headers.je_source%type, */
1169: --r_gl_entry.je_source := 'Receivables India';
1170: r_gl_entry.je_source := jai_constants.pa_je_source; --Added by bgowrava for Bug#6012570
1171: r_gl_entry.je_category := jai_constants.je_category_rg_entry; -- gl_je_headers.je_category%type,
1172: r_gl_entry.set_of_books_id := get_sob_id(pr_pa_draft_invoices_all.org_id); -- gl_sets_of_books.set_of_books_id%type,
1173: r_gl_entry.currency_code := jai_constants.func_curr; -- gl_currencies.currency_code%type,
1174: r_gl_entry.currency_conv_rate := null; -- number,

Line 1171: r_gl_entry.je_category := jai_constants.je_category_rg_entry; -- gl_je_headers.je_category%type,

1167: */
1168: /* r_gl_entry.je_source := 'Project Accounting'; -- gl_je_headers.je_source%type, */
1169: --r_gl_entry.je_source := 'Receivables India';
1170: r_gl_entry.je_source := jai_constants.pa_je_source; --Added by bgowrava for Bug#6012570
1171: r_gl_entry.je_category := jai_constants.je_category_rg_entry; -- gl_je_headers.je_category%type,
1172: r_gl_entry.set_of_books_id := get_sob_id(pr_pa_draft_invoices_all.org_id); -- gl_sets_of_books.set_of_books_id%type,
1173: r_gl_entry.currency_code := jai_constants.func_curr; -- gl_currencies.currency_code%type,
1174: r_gl_entry.currency_conv_rate := null; -- number,
1175: r_gl_entry.currency_conv_date := null; -- date,

Line 1173: r_gl_entry.currency_code := jai_constants.func_curr; -- gl_currencies.currency_code%type,

1169: --r_gl_entry.je_source := 'Receivables India';
1170: r_gl_entry.je_source := jai_constants.pa_je_source; --Added by bgowrava for Bug#6012570
1171: r_gl_entry.je_category := jai_constants.je_category_rg_entry; -- gl_je_headers.je_category%type,
1172: r_gl_entry.set_of_books_id := get_sob_id(pr_pa_draft_invoices_all.org_id); -- gl_sets_of_books.set_of_books_id%type,
1173: r_gl_entry.currency_code := jai_constants.func_curr; -- gl_currencies.currency_code%type,
1174: r_gl_entry.currency_conv_rate := null; -- number,
1175: r_gl_entry.currency_conv_date := null; -- date,
1176: r_gl_entry.accounting_date := trunc(sysdate); -- date,
1177: r_gl_entry.organization_code := jai_general_pkg.get_organization_code(r_jai_pa_draft_invoices.organization_id); -- gl_interface.reference1%TYPE, -- p_params(i).organization_code,

Line 1198: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

1194: pv_process_flag => pv_process_flag,
1195: pv_process_message => pv_process_message
1196: );
1197:
1198: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
1199: goto exit_from_procedure;
1200: end if;
1201:
1202: /* Entry 2 for ExciseEducation Cess */

Line 1217: pv_process_flag := jai_constants.expected_error;

1213: r_jai_cmn_inventory_orgs1.cenvat_pla_accnt);
1214: end if;
1215:
1216: if ln_credit_ccid is null then
1217: pv_process_flag := jai_constants.expected_error;
1218: pv_process_message := 'Excise education cess account not defined for '||lv_register
1219: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1220: ||'/'||r_jai_pa_draft_invoices.location_id;
1221: goto exit_from_procedure;

Line 1227: pv_process_flag := jai_constants.expected_error;

1223:
1224: ln_debit_ccid := nvl(r_jai_cmn_inventory_orgs.excise_edu_cess_debit_accnt,
1225: r_jai_cmn_inventory_orgs1.excise_edu_cess_debit_accnt);
1226: if ln_debit_ccid is null then
1227: pv_process_flag := jai_constants.expected_error;
1228: pv_process_message := 'Excise education cess account not defined for '||lv_register
1229: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1230: ||'/'||r_jai_pa_draft_invoices.location_id;
1231: goto exit_from_procedure;

Line 1251: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

1247: pv_process_flag => pv_process_flag,
1248: pv_process_message => pv_process_message
1249: );
1250:
1251: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
1252: goto exit_from_procedure;
1253: end if;
1254: end if;
1255:

Line 1272: pv_process_flag := jai_constants.expected_error;

1268: r_jai_cmn_inventory_orgs1.cenvat_pla_accnt);
1269: end if;
1270:
1271: if ln_credit_ccid is null then
1272: pv_process_flag := jai_constants.expected_error;
1273: pv_process_message := 'SH education cess account not defined for '||lv_register
1274: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1275: ||'/'||r_jai_pa_draft_invoices.location_id;
1276: goto exit_from_procedure;

Line 1282: pv_process_flag := jai_constants.expected_error;

1278:
1279: ln_debit_ccid := nvl(r_jai_cmn_inventory_orgs.exc_sh_cess_debit_accnt,
1280: r_jai_cmn_inventory_orgs1.exc_sh_cess_debit_accnt);
1281: if ln_debit_ccid is null then
1282: pv_process_flag := jai_constants.expected_error;
1283: pv_process_message := 'SH education cess account not defined for '||lv_register
1284: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1285: ||'/'||r_jai_pa_draft_invoices.location_id;
1286: goto exit_from_procedure;

Line 1294: r_gl_entry.regime_code := jai_constants.tax_type_sh_exc_edu_cess; -- varchar2(30),

1290: r_gl_entry.debit_amount := ln_sh_excise_cess_amt;
1291: r_gl_entry.credit_amount := ln_sh_excise_cess_amt;
1292: r_gl_entry.credit_ccid := ln_credit_ccid; --gl_interface.code_combination_id%TYPE,
1293: r_gl_entry.debit_ccid := ln_debit_ccid; -- gl_interface.code_combination_id%TYPE,
1294: r_gl_entry.regime_code := jai_constants.tax_type_sh_exc_edu_cess; -- varchar2(30),
1295:
1296: if jai_pa_billing_pkg.gv_debug then
1297: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '19.1 process_excise. Before insert_gl_entry- SH Excise Edu Cess');
1298: end if;

Line 1306: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then

1302: pv_process_flag => pv_process_flag,
1303: pv_process_message => pv_process_message
1304: );
1305:
1306: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
1307: goto exit_from_procedure;
1308: end if;
1309: end if;
1310: /*end- budget07 changes */

Line 1340: pv_process_flag := jai_constants.unexpected_error;

1336: null;
1337:
1338: EXCEPTION
1339: when others then
1340: pv_process_flag := jai_constants.unexpected_error;
1341: pv_process_message := 'Error in process_excise. Message:'||SQLERRM;
1342:
1343: END process_excise;
1344:

Line 1435: pv_process_flag := jai_constants.expected_error;

1431: if pv_called_from = 'jai_pa_billing_pkg.process_excise' then
1432:
1433: /* for projects, Inventory organization cannot be an export oriented unit */
1434: if lv_export_oriented_unit = 'Y' then
1435: pv_process_flag := jai_constants.expected_error;
1436: pv_process_message := 'Inventory organization cannot be an export oriented unit';
1437: pv_register := 'ERROR';
1438: goto exit_from_procedure;
1439: end if;

Line 1480: pv_process_flag := jai_constants.unexpected_error;

1476: return ;
1477:
1478: EXCEPTION
1479: when others then
1480: pv_process_flag := jai_constants.unexpected_error;
1481: pv_process_message := 'Error in check_excise_balance. Message:'||sqlerrm;
1482:
1483: END check_excise_balance;
1484:

Line 1633: and jcdt.source_doc_type = jai_constants.pa_draft_invoice;

1629: where jpdil.project_id = cpn_project_id
1630: and jpdil.draft_invoice_num = cpn_draft_invoice_num
1631: and jpdil.line_num = cpn_ar_invoice_line_num
1632: and jpdil.draft_invoice_line_id = jcdt.source_doc_line_id
1633: and jcdt.source_doc_type = jai_constants.pa_draft_invoice;
1634:
1635: r_pa_tax c_get_taxes_from_ar_ref%rowtype;
1636:
1637: cursor c_tax_details (cpn_tax_id ja_in_tax_codes.tax_id%type)

Line 1674: if pv_event not in (jai_constants.IMPORT_TAXES) then

1670:
1671:
1672: begin
1673:
1674: if pv_event not in (jai_constants.IMPORT_TAXES) then
1675: return;
1676: end if;
1677:
1678: begin --> attempt_to_lock

Line 1747: if r_pa_tax.modvat_flag = jai_constants.YES

1743:
1744: lv_assets_tracking_flag := r_inv_dist.assets_tracking_flag;
1745: lv_dist_code_combination_id := null;
1746:
1747: if r_pa_tax.modvat_flag = jai_constants.YES
1748: and nvl(r_tax_details.mod_cr_percentage, -1) > 0 then
1749:
1750: -- recoverable tax
1751: lv_assets_tracking_flag := jai_constants.NO;

Line 1751: lv_assets_tracking_flag := jai_constants.NO;

1747: if r_pa_tax.modvat_flag = jai_constants.YES
1748: and nvl(r_tax_details.mod_cr_percentage, -1) > 0 then
1749:
1750: -- recoverable tax
1751: lv_assets_tracking_flag := jai_constants.NO;
1752:
1753: open c_get_rgm_for_tax_type ( r_tax_details.tax_type);
1754: fetch c_get_rgm_for_tax_type into r_regime;
1755: close c_get_rgm_for_tax_type;

Line 1757: if r_regime.regime_code = jai_constants.service_regime then

1753: open c_get_rgm_for_tax_type ( r_tax_details.tax_type);
1754: fetch c_get_rgm_for_tax_type into r_regime;
1755: close c_get_rgm_for_tax_type;
1756:
1757: if r_regime.regime_code = jai_constants.service_regime then
1758:
1759: -- Service type of tax
1760: lv_account_name := jai_constants.recovery_interim;
1761:

Line 1760: lv_account_name := jai_constants.recovery_interim;

1756:
1757: if r_regime.regime_code = jai_constants.service_regime then
1758:
1759: -- Service type of tax
1760: lv_account_name := jai_constants.recovery_interim;
1761:
1762: elsif r_regime.regime_code = jai_constants.vat_regime
1763: then
1764:

Line 1762: elsif r_regime.regime_code = jai_constants.vat_regime

1758:
1759: -- Service type of tax
1760: lv_account_name := jai_constants.recovery_interim;
1761:
1762: elsif r_regime.regime_code = jai_constants.vat_regime
1763: then
1764:
1765: lv_account_name := jai_constants.recovery;
1766:

Line 1765: lv_account_name := jai_constants.recovery;

1761:
1762: elsif r_regime.regime_code = jai_constants.vat_regime
1763: then
1764:
1765: lv_account_name := jai_constants.recovery;
1766:
1767: end if;
1768:
1769: if r_regime.regime_code in (jai_constants.service_regime, jai_constants.vat_regime)

Line 1769: if r_regime.regime_code in (jai_constants.service_regime, jai_constants.vat_regime)

1765: lv_account_name := jai_constants.recovery;
1766:
1767: end if;
1768:
1769: if r_regime.regime_code in (jai_constants.service_regime, jai_constants.vat_regime)
1770: then
1771:
1772: lv_dist_code_combination_id := jai_rgm_trx_recording_pkg.get_account
1773: (

Line 1775: p_organization_type => jai_constants.orgn_type_io,

1771:
1772: lv_dist_code_combination_id := jai_rgm_trx_recording_pkg.get_account
1773: (
1774: p_regime_id => r_regime.regime_id,
1775: p_organization_type => jai_constants.orgn_type_io,
1776: p_organization_id => r_pa_hdr.organization_id ,
1777: p_location_id => r_pa_hdr.location_id,
1778: p_tax_type => r_tax_details.tax_type,
1779: p_account_name => jai_constants.recovery -- RECOVERY

Line 1779: p_account_name => jai_constants.recovery -- RECOVERY

1775: p_organization_type => jai_constants.orgn_type_io,
1776: p_organization_id => r_pa_hdr.organization_id ,
1777: p_location_id => r_pa_hdr.location_id,
1778: p_tax_type => r_tax_details.tax_type,
1779: p_account_name => jai_constants.recovery -- RECOVERY
1780: );
1781:
1782: else
1783: -- Tax is other than of VAT or Serivce regime

Line 1787: else --> r_pa_tax.modvat_flag = jai_constants.YES ...

1783: -- Tax is other than of VAT or Serivce regime
1784: lv_dist_code_combination_id := r_tax_details.tax_account_id;
1785: end if;
1786:
1787: else --> r_pa_tax.modvat_flag = jai_constants.YES ...
1788:
1789: ln_project_id := r_inv_dist.project_id;
1790: ln_task_id := r_inv_dist.task_id;
1791: lv_exp_type := r_inv_dist.expenditure_type;

Line 1812: if r_pa_tax.modvat_flag = jai_constants.YES

1808: Fnd_File.put_line(Fnd_File.LOG, 'r_pa_tax.modvat_flag ='||r_pa_tax.modvat_flag
1809: ||',r_tax_details.mod_cr_percentage='||r_tax_details.mod_cr_percentage
1810: );
1811:
1812: if r_pa_tax.modvat_flag = jai_constants.YES
1813: and nvl(r_tax_details.mod_cr_percentage, -1) > 0
1814: and nvl(r_tax_details.mod_cr_percentage, -1) < 100
1815: then
1816: --

Line 1850: if r_inv_dist.assets_tracking_flag = jai_constants.YES then

1846: elsif line = 2 then
1847:
1848: ln_tax_amt := ln_nrec_tax_amt;
1849:
1850: if r_inv_dist.assets_tracking_flag = jai_constants.YES then
1851: lv_assets_tracking_flag := jai_constants.YES;
1852: end if;
1853:
1854: lv_modvat_flag := jai_constants.NO ;

Line 1851: lv_assets_tracking_flag := jai_constants.YES;

1847:
1848: ln_tax_amt := ln_nrec_tax_amt;
1849:
1850: if r_inv_dist.assets_tracking_flag = jai_constants.YES then
1851: lv_assets_tracking_flag := jai_constants.YES;
1852: end if;
1853:
1854: lv_modvat_flag := jai_constants.NO ;
1855:

Line 1854: lv_modvat_flag := jai_constants.NO ;

1850: if r_inv_dist.assets_tracking_flag = jai_constants.YES then
1851: lv_assets_tracking_flag := jai_constants.YES;
1852: end if;
1853:
1854: lv_modvat_flag := jai_constants.NO ;
1855:
1856: --
1857: -- This is a non recoverable line hence the tax amounts should be added into the project costs by populating
1858: -- projects related columns so that PROJECTS can consider this line for Project Costing

Line 1952: , jai_constants.NO

1948: )
1949: values
1950: (
1951: r_inv_dist.accounting_date
1952: , jai_constants.NO
1953: , r_inv_dist.assets_addition_flag
1954: , lv_assets_tracking_flag
1955: , jai_constants.NO
1956: , ln_dist_line_num

Line 1955: , jai_constants.NO

1951: r_inv_dist.accounting_date
1952: , jai_constants.NO
1953: , r_inv_dist.assets_addition_flag
1954: , lv_assets_tracking_flag
1955: , jai_constants.NO
1956: , ln_dist_line_num
1957: , lv_dist_code_combination_id
1958: , r_invs.invoice_id
1959: , r_inv_dist.last_updated_by

Line 1973: , jai_constants.NO

1969: , r_tax_details.tax_name
1970: , null
1971: , r_inv_dist.last_update_login
1972: , null
1973: , jai_constants.NO
1974: , null
1975: , null
1976: , r_inv_dist.exchange_date
1977: , r_inv_dist.exchange_rate

Line 1979: , jai_constants.NO

1975: , null
1976: , r_inv_dist.exchange_date
1977: , r_inv_dist.exchange_rate
1978: , r_inv_dist.exchange_rate_type
1979: , jai_constants.NO
1980: , r_inv_dist.program_application_id
1981: , r_inv_dist.program_id
1982: , r_inv_dist.program_update_date
1983: , r_inv_dist.accts_pay_code_combination_id