DBA Data[Home] [Help]

APPS.JAI_PA_BILLING_PKG dependencies on JAI_PA_DRAFT_INVOICES

Line 62: from jai_pa_draft_invoices

58: draft_invoice_num,
59: process_vat_flag,
60: process_excise_flag,
61: parent_draft_invoice_id
62: from jai_pa_draft_invoices
63: where project_id = cp_project_id
64: and draft_invoice_num = cp_draft_invoice_num;
65:
66: cursor gc_fnd_curr_precision(cp_currency_code fnd_currencies.currency_code%type)

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

135: gl_entry.accounting_date := sysdate; -- date,
136: gl_entry.organization_code := ; -- gl_interface.reference1%TYPE, -- p_params(i).organization_code,
137: gl_entry.description := 'India Localization Entry for Projects Draft Invoice'; -- gl_interface.reference10%TYPE, -- 'India Localization Entry for Interorg-XFER ',
138: gl_entry.called_from := <'jai_pa_billing_pkg.excise>; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
139: gl_entry.reference_table := 'JAI_PA_DRAFT_INVOICES'; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
140: gl_entry.reference_column := 'DRAFT_INVOICE_ID'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
141: gl_entry.reference_id := ; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
142: gl_entry.organization_id := ; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
143: gl_entry.source := 'PROJECTS'; -- JAI_CMN_JOURNAL_ENTRIES.source%type,

Line 390: ln_draft_invoice_id jai_pa_draft_invoices.draft_invoice_id%type;

386: pv_process_flag OUT NOCOPY VARCHAR2,
387: pv_process_message OUT NOCOPY VARCHAR2
388: ) is
389:
390: ln_draft_invoice_id jai_pa_draft_invoices.draft_invoice_id%type;
391:
392: cursor c_tax_cnt(cp_draft_invoice_id in number) is
393: select
394: nvl( sum( decode( nvl(c.regime_code,'XX'), 'VAT', 1, 0)), 0) vat_cnt,

Line 686: UPDATE jai_pa_draft_invoices

682: if pv_process_flag in (jai_constants.unexpected_error, jai_constants.expected_error, 'E') then
683: goto end_of_procedure;
684: end if;
685:
686: UPDATE jai_pa_draft_invoices
687: SET vat_invoice_no = lv_vat_invoice_no,
688: vat_invoice_date = ld_vat_invoice_date,
689: process_vat_flag = 'Y',
690: last_update_date = sysdate,

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

693: WHERE draft_invoice_id = r_draft_invoice_dtls.draft_invoice_id;
694:
695: <>
696: if jai_pa_billing_pkg.gv_debug then
697: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '7 End process_Vat. Aft UPDATE jai_pa_draft_invoices');
698: end if;
699:
700: exception
701: when others then

Line 717: cursor c_jai_pa_draft_invoices is

713: pv_process_message OUT nocopy varchar2
714: )
715: IS
716:
717: cursor c_jai_pa_draft_invoices is
718: select draft_invoice_id
719: ,organization_id
720: ,location_id
721: ,draft_invoice_num

Line 723: from jai_pa_draft_invoices

719: ,organization_id
720: ,location_id
721: ,draft_invoice_num
722: ,project_id
723: from jai_pa_draft_invoices
724: where project_id = pr_pa_draft_invoices_all.project_id
725: and draft_invoice_num = pr_pa_draft_invoices_all.draft_invoice_num;
726:
727:

Line 789: r_jai_pa_draft_invoices c_draft_invoice_dtls%rowtype;

785: where organization_id = cpn_organization_id
786: and fin_active_flag = 'Y';
787: */
788:
789: r_jai_pa_draft_invoices c_draft_invoice_dtls%rowtype;
790: r_jai_cmn_inventory_orgs c_jai_cmn_inventory_orgs%rowtype;
791: r_jai_cmn_inventory_orgs1 c_jai_cmn_inventory_orgs%rowtype;
792:
793:

Line 841: fetch c_draft_invoice_dtls into r_jai_pa_draft_invoices;

837: ld_gl_date := pr_pa_draft_invoices_all.gl_date; /*Bug 12611009 - Fetch GL Date of the PA Draft Invoice*/
838:
839: /* Get IL related info for the project invoice. */
840: open c_draft_invoice_dtls(pr_pa_draft_invoices_all.project_id, pr_pa_draft_invoices_all.draft_invoice_num);
841: fetch c_draft_invoice_dtls into r_jai_pa_draft_invoices;
842: close c_draft_invoice_dtls;
843:
844: if r_jai_pa_draft_invoices.parent_draft_invoice_id is not null then
845: lv_credit_memo_flag := jai_constants.yes;

Line 844: if r_jai_pa_draft_invoices.parent_draft_invoice_id is not null then

840: open c_draft_invoice_dtls(pr_pa_draft_invoices_all.project_id, pr_pa_draft_invoices_all.draft_invoice_num);
841: fetch c_draft_invoice_dtls into r_jai_pa_draft_invoices;
842: close c_draft_invoice_dtls;
843:
844: if r_jai_pa_draft_invoices.parent_draft_invoice_id is not null then
845: lv_credit_memo_flag := jai_constants.yes;
846: end if;
847:
848: /* Check if Excise is applicable - that is if excise type of taxes exist */

Line 849: open c_exists_excise_tax(r_jai_pa_draft_invoices.draft_invoice_id);

845: lv_credit_memo_flag := jai_constants.yes;
846: end if;
847:
848: /* Check if Excise is applicable - that is if excise type of taxes exist */
849: open c_exists_excise_tax(r_jai_pa_draft_invoices.draft_invoice_id);
850: fetch c_exists_excise_tax into lv_exists_excise_tax;
851: close c_exists_excise_tax;
852:
853: if lv_exists_excise_tax <> jai_constants.yes then

Line 863: open c_get_excise_breakup(r_jai_pa_draft_invoices.draft_invoice_id);

859:
860: /*** Control comes here only if excisable taxes exist for the invoice ***/
861:
862: /* Get the break up of tax amount for basic, additional, other excise and Cess */
863: open c_get_excise_breakup(r_jai_pa_draft_invoices.draft_invoice_id);
864: fetch c_get_excise_breakup into ln_basic_excise_amt, ln_additional_excise_amt,
865: ln_other_excise_amt, ln_excise_cess_amt
866: , ln_sh_excise_cess_amt;/*budget07*/
867: close c_get_excise_breakup;

Line 892: pn_organization_id => r_jai_pa_draft_invoices.organization_id ,

888: end if;
889:
890: check_excise_balance
891: (
892: pn_organization_id => r_jai_pa_draft_invoices.organization_id ,
893: pn_location_id => r_jai_pa_draft_invoices.location_id ,
894: pn_basic_excise_amt => ln_basic_excise_amt ,
895: pn_additional_excise_amt => ln_additional_excise_amt ,
896: pn_other_excise_amt => ln_other_excise_amt ,

Line 893: pn_location_id => r_jai_pa_draft_invoices.location_id ,

889:
890: check_excise_balance
891: (
892: pn_organization_id => r_jai_pa_draft_invoices.organization_id ,
893: pn_location_id => r_jai_pa_draft_invoices.location_id ,
894: pn_basic_excise_amt => ln_basic_excise_amt ,
895: pn_additional_excise_amt => ln_additional_excise_amt ,
896: pn_other_excise_amt => ln_other_excise_amt ,
897: pn_excise_cess_amt => ln_excise_cess_amt ,

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

911: goto exit_from_procedure;
912: end if;
913: /**** Control comes here only if excise balance exists ****/
914:
915: ln_fin_year := jai_general_pkg.get_fin_year(r_jai_pa_draft_invoices.organization_id);
916: if jai_pa_billing_pkg.gv_debug then
917: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '5 process_excise. Before jai_cmn_setup_pkg.generate_excise_invoice_no');
918: end if;
919:

Line 927: p_organization_id => r_jai_pa_draft_invoices.organization_id ,

923: if lv_credit_memo_flag = jai_constants.no then
924:
925: jai_cmn_setup_pkg.generate_excise_invoice_no
926: (
927: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
928: p_location_id => r_jai_pa_draft_invoices.location_id ,
929: p_called_from => jai_pa_billing_pkg.gv_source_projects ,
930: p_order_invoice_type_id => null ,
931: p_fin_year => ln_fin_year ,

Line 928: p_location_id => r_jai_pa_draft_invoices.location_id ,

924:
925: jai_cmn_setup_pkg.generate_excise_invoice_no
926: (
927: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
928: p_location_id => r_jai_pa_draft_invoices.location_id ,
929: p_called_from => jai_pa_billing_pkg.gv_source_projects ,
930: p_order_invoice_type_id => null ,
931: p_fin_year => ln_fin_year ,
932: p_excise_inv_no => lv_excise_inv_no ,

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

960: end if;
961:
962: /* Derive the required accounts */
963: /* Accounts for the required location */
964: open c_jai_cmn_inventory_orgs(r_jai_pa_draft_invoices.organization_id, r_jai_pa_draft_invoices.location_id);
965: fetch c_jai_cmn_inventory_orgs into r_jai_cmn_inventory_orgs;
966: close c_jai_cmn_inventory_orgs;
967:
968: /* Accounts for the null location */

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

965: fetch c_jai_cmn_inventory_orgs into r_jai_cmn_inventory_orgs;
966: close c_jai_cmn_inventory_orgs;
967:
968: /* Accounts for the null location */
969: open c_jai_cmn_inventory_orgs(r_jai_pa_draft_invoices.organization_id, null);
970: fetch c_jai_cmn_inventory_orgs into r_jai_cmn_inventory_orgs1;
971: close c_jai_cmn_inventory_orgs;
972:
973: ln_debit_account_id := nvl(r_jai_cmn_inventory_orgs.excise_debit_accnt,

Line 997: p_organization_id => r_jai_pa_draft_invoices.organization_id ,

993: jai_cmn_rg_23ac_ii_pkg.insert_row
994: (
995: p_register_id => ln_register_id ,
996: p_inventory_item_id => 0 /* no inventory item for projects */ ,
997: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
998: p_location_id => r_jai_pa_draft_invoices.location_id ,
999: p_receipt_id => r_jai_pa_draft_invoices.draft_invoice_id ,
1000: p_receipt_date => trunc(ld_transaction_date) ,
1001: p_cr_basic_ed => null ,

Line 998: p_location_id => r_jai_pa_draft_invoices.location_id ,

994: (
995: p_register_id => ln_register_id ,
996: p_inventory_item_id => 0 /* no inventory item for projects */ ,
997: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
998: p_location_id => r_jai_pa_draft_invoices.location_id ,
999: p_receipt_id => r_jai_pa_draft_invoices.draft_invoice_id ,
1000: p_receipt_date => trunc(ld_transaction_date) ,
1001: p_cr_basic_ed => null ,
1002: p_cr_additional_ed => null ,

Line 999: p_receipt_id => r_jai_pa_draft_invoices.draft_invoice_id ,

995: p_register_id => ln_register_id ,
996: p_inventory_item_id => 0 /* no inventory item for projects */ ,
997: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
998: p_location_id => r_jai_pa_draft_invoices.location_id ,
999: p_receipt_id => r_jai_pa_draft_invoices.draft_invoice_id ,
1000: p_receipt_date => trunc(ld_transaction_date) ,
1001: p_cr_basic_ed => null ,
1002: p_cr_additional_ed => null ,
1003: p_cr_additional_cvd => null ,

Line 1020: p_reference_num => r_jai_pa_draft_invoices.draft_invoice_id ,

1016: p_customer_site_id => ln_customer_site_id ,
1017: p_transaction_date => ld_transaction_date ,
1018: p_charge_account_id => ln_debit_account_id ,
1019: p_register_id_part_i => null /* no qty register for projects as no item */,
1020: p_reference_num => r_jai_pa_draft_invoices.draft_invoice_id ,
1021: p_rounding_id => null ,
1022: p_other_tax_credit => null ,
1023: p_other_tax_debit => ln_excise_cess_amt + ln_sh_excise_cess_amt , -- Bug 6012570, Added sh cess
1024: p_transaction_type => lv_transaction_type ,

Line 1055: p_ref_document_id => r_jai_pa_draft_invoices.draft_invoice_id ,

1051:
1052: jai_cmn_rg_pla_trxs_pkg.insert_row
1053: (
1054: p_register_id => ln_register_id ,
1055: p_ref_document_id => r_jai_pa_draft_invoices.draft_invoice_id ,
1056: p_ref_document_date => ld_transaction_date ,
1057: p_dr_invoice_id => lv_excise_inv_no ,
1058: p_dr_invoice_date => ld_excise_invoice_date ,
1059: p_dr_basic_ed => ln_basic_excise_amt ,

Line 1062: p_organization_id => r_jai_pa_draft_invoices.organization_id ,

1058: p_dr_invoice_date => ld_excise_invoice_date ,
1059: p_dr_basic_ed => ln_basic_excise_amt ,
1060: p_dr_additional_ed => ln_additional_excise_amt ,
1061: p_dr_other_ed => ln_other_excise_amt ,
1062: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
1063: p_location_id => r_jai_pa_draft_invoices.location_id ,
1064: p_bank_branch_id => null ,
1065: p_entry_date => ld_transaction_date ,
1066: p_inventory_item_id => 0 /* no inventory item for projects */ ,

Line 1063: p_location_id => r_jai_pa_draft_invoices.location_id ,

1059: p_dr_basic_ed => ln_basic_excise_amt ,
1060: p_dr_additional_ed => ln_additional_excise_amt ,
1061: p_dr_other_ed => ln_other_excise_amt ,
1062: p_organization_id => r_jai_pa_draft_invoices.organization_id ,
1063: p_location_id => r_jai_pa_draft_invoices.location_id ,
1064: p_bank_branch_id => null ,
1065: p_entry_date => ld_transaction_date ,
1066: p_inventory_item_id => 0 /* no inventory item for projects */ ,
1067: p_vendor_cust_flag => 'C' ,

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

1174:
1175: if ln_credit_ccid is null then
1176: pv_process_flag := jai_constants.expected_error;
1177: pv_process_message := 'Excise account not defined for '||lv_register
1178: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1179: ||'/'||r_jai_pa_draft_invoices.location_id;
1180: goto exit_from_procedure;
1181: end if;
1182:

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

1175: if ln_credit_ccid is null then
1176: pv_process_flag := jai_constants.expected_error;
1177: pv_process_message := 'Excise account not defined for '||lv_register
1178: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1179: ||'/'||r_jai_pa_draft_invoices.location_id;
1180: goto exit_from_procedure;
1181: end if;
1182:
1183: ln_debit_ccid := nvl(r_jai_cmn_inventory_orgs.excise_debit_accnt, r_jai_cmn_inventory_orgs1.excise_debit_accnt);

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

1183: ln_debit_ccid := nvl(r_jai_cmn_inventory_orgs.excise_debit_accnt, r_jai_cmn_inventory_orgs1.excise_debit_accnt);
1184: if ln_debit_ccid is null then
1185: pv_process_flag := jai_constants.expected_error;
1186: pv_process_message := 'Excise account not defined for '||lv_register
1187: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1188: ||'/'||r_jai_pa_draft_invoices.location_id;
1189: goto exit_from_procedure;
1190: null;
1191: end if;

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

1184: if ln_debit_ccid is null then
1185: pv_process_flag := jai_constants.expected_error;
1186: pv_process_message := 'Excise account not defined for '||lv_register
1187: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1188: ||'/'||r_jai_pa_draft_invoices.location_id;
1189: goto exit_from_procedure;
1190: null;
1191: end if;
1192:

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

1209: r_gl_entry.currency_code := jai_constants.func_curr; -- gl_currencies.currency_code%type,
1210: r_gl_entry.currency_conv_rate := null; -- number,
1211: r_gl_entry.currency_conv_date := null; -- date,
1212: r_gl_entry.accounting_date := ld_gl_date; -- date, /*Bug 12611009 - Pass GL Date of PA Draft Invoice to GL_INTERFACE*/
1213: 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,
1214: 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 ',
1215: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1216: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1217: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,

Line 1214: 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 ',

1210: r_gl_entry.currency_conv_rate := null; -- number,
1211: r_gl_entry.currency_conv_date := null; -- date,
1212: r_gl_entry.accounting_date := ld_gl_date; -- date, /*Bug 12611009 - Pass GL Date of PA Draft Invoice to GL_INTERFACE*/
1213: 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,
1214: 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 ',
1215: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1216: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1217: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
1218: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',

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

1212: r_gl_entry.accounting_date := ld_gl_date; -- date, /*Bug 12611009 - Pass GL Date of PA Draft Invoice to GL_INTERFACE*/
1213: 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,
1214: 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 ',
1215: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1216: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1217: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
1218: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
1219: r_gl_entry.organization_id := r_jai_pa_draft_invoices.organization_id; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
1220: r_gl_entry.source := jai_pa_billing_pkg.gv_source_projects; -- JAI_CMN_JOURNAL_ENTRIES.source%type,

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

1214: 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 ',
1215: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1216: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1217: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
1218: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
1219: r_gl_entry.organization_id := r_jai_pa_draft_invoices.organization_id; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
1220: r_gl_entry.source := jai_pa_billing_pkg.gv_source_projects; -- JAI_CMN_JOURNAL_ENTRIES.source%type,
1221: r_gl_entry.source_table_name := jai_pa_billing_pkg.gv_draft_invoice_table; -- JAI_CMN_JOURNAL_ENTRIES.source_table_name%type,
1222: r_gl_entry.source_document_id := r_jai_pa_draft_invoices.draft_invoice_id; -- JAI_CMN_JOURNAL_ENTRIES.source_trx_id%type

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

1215: r_gl_entry.called_from := 'jai_pa_billing_pkg.process_excise'; -- gl_interface.reference23%TYPE, -- 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1216: r_gl_entry.reference_table := 'PROJECT_ID:'||r_jai_pa_draft_invoices.project_id; -- gl_interface.reference24%TYPE, -- 'jai_mtl_trxs',
1217: r_gl_entry.reference_column := 'DRAFT_INVOICE_NUM'; -- gl_interface.reference25%TYPE, -- p_transaction_temp_id,
1218: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
1219: r_gl_entry.organization_id := r_jai_pa_draft_invoices.organization_id; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
1220: r_gl_entry.source := jai_pa_billing_pkg.gv_source_projects; -- JAI_CMN_JOURNAL_ENTRIES.source%type,
1221: r_gl_entry.source_table_name := jai_pa_billing_pkg.gv_draft_invoice_table; -- JAI_CMN_JOURNAL_ENTRIES.source_table_name%type,
1222: r_gl_entry.source_document_id := r_jai_pa_draft_invoices.draft_invoice_id; -- JAI_CMN_JOURNAL_ENTRIES.source_trx_id%type
1223:

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

1218: r_gl_entry.reference_id := r_jai_pa_draft_invoices.draft_invoice_num; -- gl_interface.reference26%TYPE, -- 'transaction_temp_id',
1219: r_gl_entry.organization_id := r_jai_pa_draft_invoices.organization_id; -- gl_interface.reference27%TYPE, -- to_char(p_params(i).organization_id)
1220: r_gl_entry.source := jai_pa_billing_pkg.gv_source_projects; -- JAI_CMN_JOURNAL_ENTRIES.source%type,
1221: r_gl_entry.source_table_name := jai_pa_billing_pkg.gv_draft_invoice_table; -- JAI_CMN_JOURNAL_ENTRIES.source_table_name%type,
1222: r_gl_entry.source_document_id := r_jai_pa_draft_invoices.draft_invoice_id; -- JAI_CMN_JOURNAL_ENTRIES.source_trx_id%type
1223:
1224: if jai_pa_billing_pkg.gv_debug then
1225: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '18 process_excise. Before insert_gl_entry- Excise');
1226: end if;

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

1251:
1252: if ln_credit_ccid is null then
1253: pv_process_flag := jai_constants.expected_error;
1254: pv_process_message := 'Excise education cess account not defined for '||lv_register
1255: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1256: ||'/'||r_jai_pa_draft_invoices.location_id;
1257: goto exit_from_procedure;
1258: end if;
1259:

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

1252: if ln_credit_ccid is null then
1253: pv_process_flag := jai_constants.expected_error;
1254: pv_process_message := 'Excise education cess account not defined for '||lv_register
1255: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1256: ||'/'||r_jai_pa_draft_invoices.location_id;
1257: goto exit_from_procedure;
1258: end if;
1259:
1260: ln_debit_ccid := nvl(r_jai_cmn_inventory_orgs.excise_edu_cess_debit_accnt,

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

1261: r_jai_cmn_inventory_orgs1.excise_edu_cess_debit_accnt);
1262: if ln_debit_ccid is null then
1263: pv_process_flag := jai_constants.expected_error;
1264: pv_process_message := 'Excise education cess account not defined for '||lv_register
1265: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1266: ||'/'||r_jai_pa_draft_invoices.location_id;
1267: goto exit_from_procedure;
1268: end if;
1269:

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

1262: if ln_debit_ccid is null then
1263: pv_process_flag := jai_constants.expected_error;
1264: pv_process_message := 'Excise education cess account not defined for '||lv_register
1265: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1266: ||'/'||r_jai_pa_draft_invoices.location_id;
1267: goto exit_from_procedure;
1268: end if;
1269:
1270: if nvl(ln_excise_cess_amt,0) <> 0 then

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

1306:
1307: if ln_credit_ccid is null then
1308: pv_process_flag := jai_constants.expected_error;
1309: pv_process_message := 'SH education cess account not defined for '||lv_register
1310: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1311: ||'/'||r_jai_pa_draft_invoices.location_id;
1312: goto exit_from_procedure;
1313: end if;
1314:

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

1307: if ln_credit_ccid is null then
1308: pv_process_flag := jai_constants.expected_error;
1309: pv_process_message := 'SH education cess account not defined for '||lv_register
1310: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1311: ||'/'||r_jai_pa_draft_invoices.location_id;
1312: goto exit_from_procedure;
1313: end if;
1314:
1315: ln_debit_ccid := nvl(r_jai_cmn_inventory_orgs.exc_sh_cess_debit_accnt,

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

1316: r_jai_cmn_inventory_orgs1.exc_sh_cess_debit_accnt);
1317: if ln_debit_ccid is null then
1318: pv_process_flag := jai_constants.expected_error;
1319: pv_process_message := 'SH education cess account not defined for '||lv_register
1320: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1321: ||'/'||r_jai_pa_draft_invoices.location_id;
1322: goto exit_from_procedure;
1323: end if;
1324:

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

1317: if ln_debit_ccid is null then
1318: pv_process_flag := jai_constants.expected_error;
1319: pv_process_message := 'SH education cess account not defined for '||lv_register
1320: ||' register of Org/Loc:'||r_jai_pa_draft_invoices.organization_id
1321: ||'/'||r_jai_pa_draft_invoices.location_id;
1322: goto exit_from_procedure;
1323: end if;
1324:
1325: if nvl(ln_sh_excise_cess_amt,0) <> 0 then

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

1346: /*end- budget07 changes */
1347:
1348: end if;
1349:
1350: /* Update respective flags on jai_pa_draft_invoices to reflect the excise processing details */
1351: UPDATE jai_pa_draft_invoices
1352: SET excise_invoice_no = lv_excise_inv_no,
1353: excise_invoice_date = ld_excise_invoice_date,
1354: excise_register_type = lv_register,

Line 1351: UPDATE jai_pa_draft_invoices

1347:
1348: end if;
1349:
1350: /* Update respective flags on jai_pa_draft_invoices to reflect the excise processing details */
1351: UPDATE jai_pa_draft_invoices
1352: SET excise_invoice_no = lv_excise_inv_no,
1353: excise_invoice_date = ld_excise_invoice_date,
1354: excise_register_type = lv_register,
1355: excise_register_id = ln_register_id,

Line 1365: WHERE draft_invoice_id = r_jai_pa_draft_invoices.draft_invoice_id;

1361: process_excise_flag = 'Y',
1362: last_update_date = sysdate,
1363: last_updated_by = fnd_global.user_id,
1364: last_update_login = fnd_global.login_id
1365: WHERE draft_invoice_id = r_jai_pa_draft_invoices.draft_invoice_id;
1366:
1367: if jai_pa_billing_pkg.gv_debug then
1368: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '20 process_excise. After UPDATE jai_pa_draft_invoices');
1369: end if;

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

1364: last_update_login = fnd_global.login_id
1365: WHERE draft_invoice_id = r_jai_pa_draft_invoices.draft_invoice_id;
1366:
1367: if jai_pa_billing_pkg.gv_debug then
1368: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '20 process_excise. After UPDATE jai_pa_draft_invoices');
1369: end if;
1370:
1371: << exit_from_procedure >>
1372: null;

Line 1646: from jai_pa_draft_invoices jpdi

1642: , jpdi.location_id
1643: , pdi.system_reference
1644: , pdi.project_id
1645: , pdi.draft_invoice_num
1646: from jai_pa_draft_invoices jpdi
1647: ,pa_draft_invoices pdi
1648: where pdi.project_id = jpdi.project_id
1649: and pdi.draft_invoice_num = jpdi.draft_invoice_num
1650: and pdi.system_reference = cpn_pa_cc_ar_invoice_id;

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

1650: and pdi.system_reference = cpn_pa_cc_ar_invoice_id;
1651:
1652: r_pa_hdr c_get_pa_hdr_from_ar_ref%rowtype;
1653:
1654: cursor c_get_taxes_from_ar_ref (cpn_project_id jai_pa_draft_invoices.project_id%type
1655: ,cpn_draft_invoice_num jai_pa_draft_invoices.draft_invoice_num%type
1656: ,cpn_ar_invoice_line_num ap_invoice_distributions_all.pa_cc_ar_invoice_line_num%type
1657: )
1658: is

Line 1655: ,cpn_draft_invoice_num jai_pa_draft_invoices.draft_invoice_num%type

1651:
1652: r_pa_hdr c_get_pa_hdr_from_ar_ref%rowtype;
1653:
1654: cursor c_get_taxes_from_ar_ref (cpn_project_id jai_pa_draft_invoices.project_id%type
1655: ,cpn_draft_invoice_num jai_pa_draft_invoices.draft_invoice_num%type
1656: ,cpn_ar_invoice_line_num ap_invoice_distributions_all.pa_cc_ar_invoice_line_num%type
1657: )
1658: is
1659: select jcdt.tax_id