DBA Data[Home] [Help]

APPS.JAI_PA_BILLING_PKG dependencies on JAI_PA_DRAFT_INVOICES

Line 49: from jai_pa_draft_invoices

45: draft_invoice_num,
46: process_vat_flag,
47: process_excise_flag,
48: parent_draft_invoice_id
49: from jai_pa_draft_invoices
50: where project_id = cp_project_id
51: and draft_invoice_num = cp_draft_invoice_num;
52:
53: cursor gc_fnd_curr_precision(cp_currency_code fnd_currencies.currency_code%type)

Line 126: gl_entry.reference_table := 'JAI_PA_DRAFT_INVOICES'; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',

122: gl_entry.accounting_date := sysdate; -- date,
123: gl_entry.organization_code := ; -- gl_interface.reference1%TYPE, -- p_params(i).organization_code,
124: gl_entry.description := 'India Localization Entry for Projects Draft Invoice'; -- gl_interface.reference10%TYPE, -- 'India Localization Entry for Interorg-XFER ',
125: gl_entry.called_from := <'jai_pa_billing_pkg.excise>; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
126: gl_entry.reference_table := 'JAI_PA_DRAFT_INVOICES'; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
127: gl_entry.reference_column := 'DRAFT_INVOICE_ID'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
128: gl_entry.reference_id := ; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
129: gl_entry.organization_id := ; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
130: gl_entry.source := 'PROJECTS'; -- JAI_CMN_JOURNAL_ENTRIES.source%type,

Line 377: ln_draft_invoice_id jai_pa_draft_invoices.draft_invoice_id%type;

373: pv_process_flag OUT NOCOPY VARCHAR2,
374: pv_process_message OUT NOCOPY VARCHAR2
375: ) is
376:
377: ln_draft_invoice_id jai_pa_draft_invoices.draft_invoice_id%type;
378:
379: cursor c_tax_cnt(cp_draft_invoice_id in number) is
380: select
381: nvl( sum( decode( nvl(c.regime_code,'XX'), 'VAT', 1, 0)), 0) vat_cnt,

Line 652: UPDATE jai_pa_draft_invoices

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
653: SET vat_invoice_no = lv_vat_invoice_no,
654: vat_invoice_date = ld_vat_invoice_date,
655: process_vat_flag = 'Y',
656: last_update_date = sysdate,

Line 663: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '7 End process_Vat. Aft UPDATE jai_pa_draft_invoices');

659: WHERE draft_invoice_id = r_draft_invoice_dtls.draft_invoice_id;
660:
661: <>
662: if jai_pa_billing_pkg.gv_debug then
663: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '7 End process_Vat. Aft UPDATE jai_pa_draft_invoices');
664: end if;
665:
666: exception
667: when others then

Line 683: cursor c_jai_pa_draft_invoices is

679: pv_process_message OUT nocopy varchar2
680: )
681: IS
682:
683: cursor c_jai_pa_draft_invoices is
684: select draft_invoice_id
685: ,organization_id
686: ,location_id
687: ,draft_invoice_num

Line 689: from jai_pa_draft_invoices

685: ,organization_id
686: ,location_id
687: ,draft_invoice_num
688: ,project_id
689: from jai_pa_draft_invoices
690: where project_id = pr_pa_draft_invoices_all.project_id
691: and draft_invoice_num = pr_pa_draft_invoices_all.draft_invoice_num;
692:
693:

Line 755: r_jai_pa_draft_invoices c_draft_invoice_dtls%rowtype;

751: where organization_id = cpn_organization_id
752: and fin_active_flag = 'Y';
753: */
754:
755: r_jai_pa_draft_invoices c_draft_invoice_dtls%rowtype;
756: r_jai_cmn_inventory_orgs c_jai_cmn_inventory_orgs%rowtype;
757: r_jai_cmn_inventory_orgs1 c_jai_cmn_inventory_orgs%rowtype;
758:
759:

Line 805: fetch c_draft_invoice_dtls into r_jai_pa_draft_invoices;

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;
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;

Line 808: if r_jai_pa_draft_invoices.parent_draft_invoice_id is not null then

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;
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 */

Line 813: open c_exists_excise_tax(r_jai_pa_draft_invoices.draft_invoice_id);

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);
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

Line 827: open c_get_excise_breakup(r_jai_pa_draft_invoices.draft_invoice_id);

823:
824: /*** Control comes here only if excisable taxes exist for the invoice ***/
825:
826: /* Get the break up of tax amount for basic, additional, other excise and Cess */
827: open c_get_excise_breakup(r_jai_pa_draft_invoices.draft_invoice_id);
828: fetch c_get_excise_breakup into ln_basic_excise_amt, ln_additional_excise_amt,
829: ln_other_excise_amt, ln_excise_cess_amt
830: , ln_sh_excise_cess_amt;/*budget07*/
831: close c_get_excise_breakup;

Line 856: pn_organization_id => r_jai_pa_draft_invoices.organization_id ,

852: end if;
853:
854: check_excise_balance
855: (
856: pn_organization_id => r_jai_pa_draft_invoices.organization_id ,
857: pn_location_id => r_jai_pa_draft_invoices.location_id ,
858: pn_basic_excise_amt => ln_basic_excise_amt ,
859: pn_additional_excise_amt => ln_additional_excise_amt ,
860: pn_other_excise_amt => ln_other_excise_amt ,

Line 857: pn_location_id => r_jai_pa_draft_invoices.location_id ,

853:
854: check_excise_balance
855: (
856: pn_organization_id => r_jai_pa_draft_invoices.organization_id ,
857: pn_location_id => r_jai_pa_draft_invoices.location_id ,
858: pn_basic_excise_amt => ln_basic_excise_amt ,
859: pn_additional_excise_amt => ln_additional_excise_amt ,
860: pn_other_excise_amt => ln_other_excise_amt ,
861: pn_excise_cess_amt => ln_excise_cess_amt ,

Line 879: ln_fin_year := jai_general_pkg.get_fin_year(r_jai_pa_draft_invoices.organization_id);

875: goto exit_from_procedure;
876: end if;
877: /**** Control comes here only if excise balance exists ****/
878:
879: ln_fin_year := jai_general_pkg.get_fin_year(r_jai_pa_draft_invoices.organization_id);
880: if jai_pa_billing_pkg.gv_debug then
881: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '5 process_excise. Before jai_cmn_setup_pkg.generate_excise_invoice_no');
882: end if;
883:

Line 891: p_organization_id => r_jai_pa_draft_invoices.organization_id ,

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 ,
892: p_location_id => r_jai_pa_draft_invoices.location_id ,
893: p_called_from => jai_pa_billing_pkg.gv_source_projects ,
894: p_order_invoice_type_id => null ,
895: p_fin_year => ln_fin_year ,

Line 892: p_location_id => r_jai_pa_draft_invoices.location_id ,

888:
889: jai_cmn_setup_pkg.generate_excise_invoice_no
890: (
891: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
892: p_location_id => r_jai_pa_draft_invoices.location_id ,
893: p_called_from => jai_pa_billing_pkg.gv_source_projects ,
894: p_order_invoice_type_id => null ,
895: p_fin_year => ln_fin_year ,
896: p_excise_inv_no => lv_excise_inv_no ,

Line 928: open c_jai_cmn_inventory_orgs(r_jai_pa_draft_invoices.organization_id, r_jai_pa_draft_invoices.location_id);

924: end if;
925:
926: /* Derive the required accounts */
927: /* Accounts for the required location */
928: open c_jai_cmn_inventory_orgs(r_jai_pa_draft_invoices.organization_id, r_jai_pa_draft_invoices.location_id);
929: fetch c_jai_cmn_inventory_orgs into r_jai_cmn_inventory_orgs;
930: close c_jai_cmn_inventory_orgs;
931:
932: /* Accounts for the null location */

Line 933: open c_jai_cmn_inventory_orgs(r_jai_pa_draft_invoices.organization_id, null);

929: fetch c_jai_cmn_inventory_orgs into r_jai_cmn_inventory_orgs;
930: close c_jai_cmn_inventory_orgs;
931:
932: /* Accounts for the null location */
933: open c_jai_cmn_inventory_orgs(r_jai_pa_draft_invoices.organization_id, null);
934: fetch c_jai_cmn_inventory_orgs into r_jai_cmn_inventory_orgs1;
935: close c_jai_cmn_inventory_orgs;
936:
937: ln_debit_account_id := nvl(r_jai_cmn_inventory_orgs.excise_debit_accnt,

Line 961: p_organization_id => r_jai_pa_draft_invoices.organization_id ,

957: jai_cmn_rg_23ac_ii_pkg.insert_row
958: (
959: p_register_id => ln_register_id ,
960: p_inventory_item_id => 0 /* no inventory item for projects */ ,
961: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
962: p_location_id => r_jai_pa_draft_invoices.location_id ,
963: p_receipt_id => r_jai_pa_draft_invoices.draft_invoice_id ,
964: p_receipt_date => trunc(ld_transaction_date) ,
965: p_cr_basic_ed => null ,

Line 962: p_location_id => r_jai_pa_draft_invoices.location_id ,

958: (
959: p_register_id => ln_register_id ,
960: p_inventory_item_id => 0 /* no inventory item for projects */ ,
961: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
962: p_location_id => r_jai_pa_draft_invoices.location_id ,
963: p_receipt_id => r_jai_pa_draft_invoices.draft_invoice_id ,
964: p_receipt_date => trunc(ld_transaction_date) ,
965: p_cr_basic_ed => null ,
966: p_cr_additional_ed => null ,

Line 963: p_receipt_id => r_jai_pa_draft_invoices.draft_invoice_id ,

959: p_register_id => ln_register_id ,
960: p_inventory_item_id => 0 /* no inventory item for projects */ ,
961: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
962: p_location_id => r_jai_pa_draft_invoices.location_id ,
963: p_receipt_id => r_jai_pa_draft_invoices.draft_invoice_id ,
964: p_receipt_date => trunc(ld_transaction_date) ,
965: p_cr_basic_ed => null ,
966: p_cr_additional_ed => null ,
967: p_cr_additional_cvd => null ,

Line 984: p_reference_num => r_jai_pa_draft_invoices.draft_invoice_id ,

980: p_customer_site_id => ln_customer_site_id ,
981: p_transaction_date => ld_transaction_date ,
982: p_charge_account_id => ln_debit_account_id ,
983: p_register_id_part_i => null /* no qty register for projects as no item */,
984: p_reference_num => r_jai_pa_draft_invoices.draft_invoice_id ,
985: p_rounding_id => null ,
986: p_other_tax_credit => null ,
987: p_other_tax_debit => ln_excise_cess_amt + ln_sh_excise_cess_amt , -- Bug 6012570, Added sh cess
988: p_transaction_type => lv_transaction_type ,

Line 1019: p_ref_document_id => r_jai_pa_draft_invoices.draft_invoice_id ,

1015:
1016: jai_cmn_rg_pla_trxs_pkg.insert_row
1017: (
1018: p_register_id => ln_register_id ,
1019: p_ref_document_id => r_jai_pa_draft_invoices.draft_invoice_id ,
1020: p_ref_document_date => ld_transaction_date ,
1021: p_dr_invoice_id => lv_excise_inv_no ,
1022: p_dr_invoice_date => ld_excise_invoice_date ,
1023: p_dr_basic_ed => ln_basic_excise_amt ,

Line 1026: p_organization_id => r_jai_pa_draft_invoices.organization_id ,

1022: p_dr_invoice_date => ld_excise_invoice_date ,
1023: p_dr_basic_ed => ln_basic_excise_amt ,
1024: p_dr_additional_ed => ln_additional_excise_amt ,
1025: p_dr_other_ed => ln_other_excise_amt ,
1026: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
1027: p_location_id => r_jai_pa_draft_invoices.location_id ,
1028: p_bank_branch_id => null ,
1029: p_entry_date => ld_transaction_date ,
1030: p_inventory_item_id => 0 /* no inventory item for projects */ ,

Line 1027: p_location_id => r_jai_pa_draft_invoices.location_id ,

1023: p_dr_basic_ed => ln_basic_excise_amt ,
1024: p_dr_additional_ed => ln_additional_excise_amt ,
1025: p_dr_other_ed => ln_other_excise_amt ,
1026: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
1027: p_location_id => r_jai_pa_draft_invoices.location_id ,
1028: p_bank_branch_id => null ,
1029: p_entry_date => ld_transaction_date ,
1030: p_inventory_item_id => 0 /* no inventory item for projects */ ,
1031: p_vendor_cust_flag => 'C' ,

Line 1142: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id

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;
1145: end if;
1146:

Line 1143: ||'/'||r_jai_pa_draft_invoices.location_id;

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;
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);

Line 1151: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id

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;
1154: null;
1155: end if;

Line 1152: ||'/'||r_jai_pa_draft_invoices.location_id;

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;
1154: null;
1155: end if;
1156:

Line 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,

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,
1178: r_gl_entry.description := 'India Localization Entry for Project-'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference10%TYPE, -- 'India Localization Entry for Interorg-XFER ',
1179: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1180: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1181: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,

Line 1178: r_gl_entry.description := 'India Localization Entry for Project-'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference10%TYPE, -- 'India Localization Entry for Interorg-XFER ',

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,
1178: r_gl_entry.description := 'India Localization Entry for Project-'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference10%TYPE, -- 'India Localization Entry for Interorg-XFER ',
1179: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1180: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1181: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
1182: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',

Line 1180: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',

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,
1178: r_gl_entry.description := 'India Localization Entry for Project-'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference10%TYPE, -- 'India Localization Entry for Interorg-XFER ',
1179: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1180: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1181: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
1182: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
1183: r_gl_entry.organization_id := r_jai_pa_draft_invoices.organization_id; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
1184: r_gl_entry.source := jai_pa_billing_pkg.gv_source_projects; -- JAI_CMN_JOURNAL_ENTRIES.source%type,

Line 1182: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',

1178: r_gl_entry.description := 'India Localization Entry for Project-'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference10%TYPE, -- 'India Localization Entry for Interorg-XFER ',
1179: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1180: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1181: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
1182: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
1183: r_gl_entry.organization_id := r_jai_pa_draft_invoices.organization_id; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
1184: r_gl_entry.source := jai_pa_billing_pkg.gv_source_projects; -- JAI_CMN_JOURNAL_ENTRIES.source%type,
1185: r_gl_entry.source_table_name := jai_pa_billing_pkg.gv_draft_invoice_table; -- JAI_CMN_JOURNAL_ENTRIES.source_table_name%type,
1186: r_gl_entry.source_document_id := r_jai_pa_draft_invoices.draft_invoice_id; -- JAI_CMN_JOURNAL_ENTRIES.source_trx_id%type

Line 1183: r_gl_entry.organization_id := r_jai_pa_draft_invoices.organization_id; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)

1179: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1180: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1181: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
1182: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
1183: r_gl_entry.organization_id := r_jai_pa_draft_invoices.organization_id; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
1184: r_gl_entry.source := jai_pa_billing_pkg.gv_source_projects; -- JAI_CMN_JOURNAL_ENTRIES.source%type,
1185: r_gl_entry.source_table_name := jai_pa_billing_pkg.gv_draft_invoice_table; -- JAI_CMN_JOURNAL_ENTRIES.source_table_name%type,
1186: r_gl_entry.source_document_id := r_jai_pa_draft_invoices.draft_invoice_id; -- JAI_CMN_JOURNAL_ENTRIES.source_trx_id%type
1187:

Line 1186: r_gl_entry.source_document_id := r_jai_pa_draft_invoices.draft_invoice_id; -- JAI_CMN_JOURNAL_ENTRIES.source_trx_id%type

1182: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
1183: r_gl_entry.organization_id := r_jai_pa_draft_invoices.organization_id; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
1184: r_gl_entry.source := jai_pa_billing_pkg.gv_source_projects; -- JAI_CMN_JOURNAL_ENTRIES.source%type,
1185: r_gl_entry.source_table_name := jai_pa_billing_pkg.gv_draft_invoice_table; -- JAI_CMN_JOURNAL_ENTRIES.source_table_name%type,
1186: r_gl_entry.source_document_id := r_jai_pa_draft_invoices.draft_invoice_id; -- JAI_CMN_JOURNAL_ENTRIES.source_trx_id%type
1187:
1188: if jai_pa_billing_pkg.gv_debug then
1189: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '18 process_excise. Before insert_gl_entry- Excise');
1190: end if;

Line 1219: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id

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;
1222: end if;
1223:

Line 1220: ||'/'||r_jai_pa_draft_invoices.location_id;

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;
1222: end if;
1223:
1224: ln_debit_ccid := nvl(r_jai_cmn_inventory_orgs.excise_edu_cess_debit_accnt,

Line 1229: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id

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;
1232: end if;
1233:

Line 1230: ||'/'||r_jai_pa_draft_invoices.location_id;

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;
1232: end if;
1233:
1234: if nvl(ln_excise_cess_amt,0) <> 0 then

Line 1274: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id

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;
1277: end if;
1278:

Line 1275: ||'/'||r_jai_pa_draft_invoices.location_id;

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;
1277: end if;
1278:
1279: ln_debit_ccid := nvl(r_jai_cmn_inventory_orgs.exc_sh_cess_debit_accnt,

Line 1284: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id

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;
1287: end if;
1288:

Line 1285: ||'/'||r_jai_pa_draft_invoices.location_id;

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;
1287: end if;
1288:
1289: if nvl(ln_sh_excise_cess_amt,0) <> 0 then

Line 1314: /* Update respective flags on jai_pa_draft_invoices to reflect the excise processing details */

1310: /*end- budget07 changes */
1311:
1312: end if;
1313:
1314: /* Update respective flags on jai_pa_draft_invoices to reflect the excise processing details */
1315: UPDATE jai_pa_draft_invoices
1316: SET excise_invoice_no = lv_excise_inv_no,
1317: excise_invoice_date = ld_excise_invoice_date,
1318: excise_register_type = lv_register,

Line 1315: UPDATE jai_pa_draft_invoices

1311:
1312: end if;
1313:
1314: /* Update respective flags on jai_pa_draft_invoices to reflect the excise processing details */
1315: UPDATE jai_pa_draft_invoices
1316: SET excise_invoice_no = lv_excise_inv_no,
1317: excise_invoice_date = ld_excise_invoice_date,
1318: excise_register_type = lv_register,
1319: excise_register_id = ln_register_id,

Line 1329: WHERE draft_invoice_id = r_jai_pa_draft_invoices.draft_invoice_id;

1325: process_excise_flag = 'Y',
1326: last_update_date = sysdate,
1327: last_updated_by = fnd_global.user_id,
1328: last_update_login = fnd_global.login_id
1329: WHERE draft_invoice_id = r_jai_pa_draft_invoices.draft_invoice_id;
1330:
1331: if jai_pa_billing_pkg.gv_debug then
1332: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '20 process_excise. After UPDATE jai_pa_draft_invoices');
1333: end if;

Line 1332: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '20 process_excise. After UPDATE jai_pa_draft_invoices');

1328: last_update_login = fnd_global.login_id
1329: WHERE draft_invoice_id = r_jai_pa_draft_invoices.draft_invoice_id;
1330:
1331: if jai_pa_billing_pkg.gv_debug then
1332: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '20 process_excise. After UPDATE jai_pa_draft_invoices');
1333: end if;
1334:
1335: << exit_from_procedure >>
1336: null;

Line 1610: from jai_pa_draft_invoices jpdi

1606: , jpdi.location_id
1607: , pdi.system_reference
1608: , pdi.project_id
1609: , pdi.draft_invoice_num
1610: from jai_pa_draft_invoices jpdi
1611: ,pa_draft_invoices pdi
1612: where pdi.project_id = jpdi.project_id
1613: and pdi.draft_invoice_num = jpdi.draft_invoice_num
1614: and pdi.system_reference = cpn_pa_cc_ar_invoice_id;

Line 1618: cursor c_get_taxes_from_ar_ref (cpn_project_id jai_pa_draft_invoices.project_id%type

1614: and pdi.system_reference = cpn_pa_cc_ar_invoice_id;
1615:
1616: r_pa_hdr c_get_pa_hdr_from_ar_ref%rowtype;
1617:
1618: cursor c_get_taxes_from_ar_ref (cpn_project_id jai_pa_draft_invoices.project_id%type
1619: ,cpn_draft_invoice_num jai_pa_draft_invoices.draft_invoice_num%type
1620: ,cpn_ar_invoice_line_num ap_invoice_distributions_all.pa_cc_ar_invoice_line_num%type
1621: )
1622: is

Line 1619: ,cpn_draft_invoice_num jai_pa_draft_invoices.draft_invoice_num%type

1615:
1616: r_pa_hdr c_get_pa_hdr_from_ar_ref%rowtype;
1617:
1618: cursor c_get_taxes_from_ar_ref (cpn_project_id jai_pa_draft_invoices.project_id%type
1619: ,cpn_draft_invoice_num jai_pa_draft_invoices.draft_invoice_num%type
1620: ,cpn_ar_invoice_line_num ap_invoice_distributions_all.pa_cc_ar_invoice_line_num%type
1621: )
1622: is
1623: select jcdt.tax_id