DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_VAT_ACCNT_PKG dependencies on JAI_CONSTANTS

Line 249: AND jrr.regime_code = jai_constants.vat_regime

245: AND jmt.transaction_header_id=jcdt.source_doc_id
246: AND jmt.transaction_temp_id=jcdt.source_doc_line_id
247: AND jcdt.tax_id=jtc.tax_id
248: AND jtc.tax_type= jrg.attribute_code
249: AND jrr.regime_code = jai_constants.vat_regime
250: AND jrg.regime_id = jrr.regime_id
251: AND jrg.registration_type = 'TAX_TYPES' ;
252:
253:

Line 286: WHERE jrttv1.regime_code = jai_constants.vat_regime --Modified by JMEENA from jrttv1.tax_type to jrttv1.regime_code for bug#6944839

282: JAI_CMN_TAXES_ALL jtc ,
283: ( --Date 14/06/2007 by sacsethi for bug 6072461 , View is replaced by subquery with vat reversal
284: SELECT jrttv1.tax_type tax_type
285: FROM jai_regime_tax_types_v jrttv1
286: WHERE jrttv1.regime_code = jai_constants.vat_regime --Modified by JMEENA from jrttv1.tax_type to jrttv1.regime_code for bug#6944839
287: UNION
288: SELECT 'VAT REVERSAL' tax_type FROM DUAL
289: ) jrttv
290: WHERE

Line 301: -- jrttv.regime_code = jai_constants.vat_regime AND --Date 14/06/2007 by sacsethi for bug 6072461

297: (jspl.order_line_id = p_order_line_id AND jspl.order_line_id = jsptl.order_line_id)) AND
298: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
299: jsptl.tax_id = jtc.tax_id AND
300: jtc.tax_type = jrttv.tax_type AND
301: -- jrttv.regime_code = jai_constants.vat_regime AND --Date 14/06/2007 by sacsethi for bug 6072461
302: NOT EXISTS
303: -- start for bug 16058504 by anupgupt
304: (SELECT 1
305: FROM jai_rgm_trx_records jrtr

Line 348: -- AND cp_source = jai_constants.source_wsh /* Bug# 6012570 (5876390) */

344: jrtr.reference_id = jsptl.tax_id
345: )*/
346: -- end for bug 16058504 by anupgupt
347: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
348: -- AND cp_source = jai_constants.source_wsh /* Bug# 6012570 (5876390) */
349: AND (cp_source = jai_constants.source_wsh OR cp_source = jai_constants.source_nsh)
350: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
351:
352: /* start. bug#Bug# 6012570 (5876390). added the union condition */

Line 349: AND (cp_source = jai_constants.source_wsh OR cp_source = jai_constants.source_nsh)

345: )*/
346: -- end for bug 16058504 by anupgupt
347: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
348: -- AND cp_source = jai_constants.source_wsh /* Bug# 6012570 (5876390) */
349: AND (cp_source = jai_constants.source_wsh OR cp_source = jai_constants.source_nsh)
350: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
351:
352: /* start. bug#Bug# 6012570 (5876390). added the union condition */
353: UNION

Line 373: WHERE jrttv1.regime_code = jai_constants.vat_regime

369: jai_cmn_document_taxes jcdt ,
370: (
371: SELECT jrttv1.tax_type tax_type
372: FROM jai_regime_tax_types_v jrttv1
373: WHERE jrttv1.regime_code = jai_constants.vat_regime
374: UNION
375: SELECT 'VAT REVERSAL' tax_type FROM DUAL
376: ) jrttv
377: WHERE cp_source = jai_pa_billing_pkg.gv_source_projects

Line 418: WHERE jrttv1.regime_code = jai_constants.vat_regime

414: JAI_CMN_TAXES_ALL jtc ,
415: ( --Date 14/06/2007 by sacsethi for bug 6072461 , View is replaced by subquery with vat reversal
416: SELECT jrttv1.tax_type tax_type
417: FROM jai_regime_tax_types_v jrttv1
418: WHERE jrttv1.regime_code = jai_constants.vat_regime
419: UNION
420: SELECT 'VAT REVERSAL' tax_type
421: FROM DUAL
422: ) jrttv

Line 498: lv_process_flag := jai_constants.successful ;

494: /******************************************************************************************
495: ||Variable Initialization
496: ******************************************************************************************/
497:
498: lv_process_flag := jai_constants.successful ;
499: lv_process_message := null ;
500:
501: p_process_flag := lv_process_flag ;
502: p_process_message := lv_process_message ;

Line 516: p_process_flag := jai_constants.expected_error;

512: ******************************************************************************************/
513:
514: IF p_regime_id IS NULL THEN
515: record_debug_messages('2.1 REGIME ID cannot be null');
516: p_process_flag := jai_constants.expected_error;
517: p_process_message := 'Invalid REGIME';
518: return;
519: END IF;
520:

Line 529: p_process_flag := jai_constants.expected_error;

525: IF p_organization_id IS NULL OR
526: p_location_id IS NULL
527: THEN
528: record_debug_messages('3 Organization_id or Location_id cannot be null. Please provide a valid value for these fields');
529: p_process_flag := jai_constants.expected_error;
530: p_process_message := 'Organization_id or Location_id cannot be null. Please provide a valid value for these fields';
531: return;
532: END IF;
533:

Line 547: p_process_flag := jai_constants.expected_error;

543: THEN
544: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
545: record_debug_messages(' 4 Delivery ID/Order Line ID/Customer_trx_id both cannot be null. Please provide a valid value for either one of the three');
546: -- record_debug_messages(' 4 Delivery ID/Customer_trx_id both cannot be null. Please provide a valid value for either one of the two');
547: p_process_flag := jai_constants.expected_error;
548: -- p_process_message := 'Delivery ID/Customer_trx_id both cannot be null. Please provide a valid value for either one of the two';
549: p_process_message := 'Delivery ID/Order Line ID/Customer_trx_id both cannot be null. Please provide a valid value for either one of the three';
550: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
551: return;

Line 576: p_process_flag := jai_constants.expected_error;

572: nvl(p_called_from,'####') <> 'JA_IN_LOC_AR_HDR_UPD_TRG_VAT'
573: AND nvl(p_transaction_type ,'####') <> 'DRAFT_INVOICE_CM' /* bug#6012570 (5876390) introduced for Projects Billing Implementation */
574: THEN
575: record_debug_messages('5 Vat Invoice Number cannot be null. Please provide a valid VAT Invoice Number');
576: p_process_flag := jai_constants.expected_error;
577: p_process_message := nvl(p_transaction_type ,'####') /* bug#6012570 (5876390) */
578: || 'Vat Invoice Number cannot be null. Please provide a valid VAT Invoice Number';
579: return;
580: END IF;

Line 590: upper(jai_constants.source_wsh)

586: || accounting entries.
587: ******************************************************************************************/
588:
589: IF upper(p_source) in (
590: upper(jai_constants.source_wsh)
591: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
592: ,upper(jai_constants.source_nsh)
593: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
594: , jai_pa_billing_pkg.gv_source_projects /* Bug# 6012570 (5876390) */

Line 592: ,upper(jai_constants.source_nsh)

588:
589: IF upper(p_source) in (
590: upper(jai_constants.source_wsh)
591: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
592: ,upper(jai_constants.source_nsh)
593: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
594: , jai_pa_billing_pkg.gv_source_projects /* Bug# 6012570 (5876390) */
595: )
596: THEN

Line 603: if upper(p_source) = upper(jai_constants.source_wsh) then

599: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '3 rgm_om_ar_vat_accnt_pkg.process_order_invoice . Psource:'||p_source);
600: end if;
601:
602: /* Start Bug# 6012570 (5876390) */
603: if upper(p_source) = upper(jai_constants.source_wsh) then
604: record_debug_messages ('6 Delivery PROCESSING');
605: lv_source_trx_type := jai_constants.source_ttype_delivery;
606: lv_source_table_name := jai_constants.tname_dlry_dtl;
607: lv_called_from := jai_constants.vat_repo_call_from_om_ar;

Line 605: lv_source_trx_type := jai_constants.source_ttype_delivery;

601:
602: /* Start Bug# 6012570 (5876390) */
603: if upper(p_source) = upper(jai_constants.source_wsh) then
604: record_debug_messages ('6 Delivery PROCESSING');
605: lv_source_trx_type := jai_constants.source_ttype_delivery;
606: lv_source_table_name := jai_constants.tname_dlry_dtl;
607: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
608: lv_attribute_context := jai_constants.contxt_delivery;
609:

Line 606: lv_source_table_name := jai_constants.tname_dlry_dtl;

602: /* Start Bug# 6012570 (5876390) */
603: if upper(p_source) = upper(jai_constants.source_wsh) then
604: record_debug_messages ('6 Delivery PROCESSING');
605: lv_source_trx_type := jai_constants.source_ttype_delivery;
606: lv_source_table_name := jai_constants.tname_dlry_dtl;
607: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
608: lv_attribute_context := jai_constants.contxt_delivery;
609:
610: elsif p_source = jai_pa_billing_pkg.gv_source_projects then

Line 607: lv_called_from := jai_constants.vat_repo_call_from_om_ar;

603: if upper(p_source) = upper(jai_constants.source_wsh) then
604: record_debug_messages ('6 Delivery PROCESSING');
605: lv_source_trx_type := jai_constants.source_ttype_delivery;
606: lv_source_table_name := jai_constants.tname_dlry_dtl;
607: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
608: lv_attribute_context := jai_constants.contxt_delivery;
609:
610: elsif p_source = jai_pa_billing_pkg.gv_source_projects then
611: record_debug_messages ('6 Projects Draft Invoice PROCESSING');

Line 608: lv_attribute_context := jai_constants.contxt_delivery;

604: record_debug_messages ('6 Delivery PROCESSING');
605: lv_source_trx_type := jai_constants.source_ttype_delivery;
606: lv_source_table_name := jai_constants.tname_dlry_dtl;
607: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
608: lv_attribute_context := jai_constants.contxt_delivery;
609:
610: elsif p_source = jai_pa_billing_pkg.gv_source_projects then
611: record_debug_messages ('6 Projects Draft Invoice PROCESSING');
612: lv_source_trx_type := jai_pa_billing_pkg.gv_trx_type_draft_invoice; -- 'DRAFT_INVOICE';

Line 617: elsif p_source = upper(jai_constants.source_nsh) then

613: lv_source_table_name := jai_pa_billing_pkg.gv_draft_invoice_table; -- 'JAI_PA_DRAFT_INVOICES';
614: lv_called_from := p_called_from;
615: lv_attribute_context := jai_pa_billing_pkg.gv_draft_invoice_release; -- 'DRAFT_INVOICE_RELEASE';
616: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
617: elsif p_source = upper(jai_constants.source_nsh) then
618: record_debug_messages ('6 Non-Shippable Item PROCESSING');
619: lv_source_trx_type := jai_constants.source_ttype_non_shippable;
620: lv_source_table_name := jai_constants.tname_order_lines_all;
621: lv_called_from := jai_constants.vat_repo_call_from_om_ar;

Line 619: lv_source_trx_type := jai_constants.source_ttype_non_shippable;

615: lv_attribute_context := jai_pa_billing_pkg.gv_draft_invoice_release; -- 'DRAFT_INVOICE_RELEASE';
616: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
617: elsif p_source = upper(jai_constants.source_nsh) then
618: record_debug_messages ('6 Non-Shippable Item PROCESSING');
619: lv_source_trx_type := jai_constants.source_ttype_non_shippable;
620: lv_source_table_name := jai_constants.tname_order_lines_all;
621: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
622: lv_attribute_context := jai_constants.contxt_non_shippable;
623: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end

Line 620: lv_source_table_name := jai_constants.tname_order_lines_all;

616: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
617: elsif p_source = upper(jai_constants.source_nsh) then
618: record_debug_messages ('6 Non-Shippable Item PROCESSING');
619: lv_source_trx_type := jai_constants.source_ttype_non_shippable;
620: lv_source_table_name := jai_constants.tname_order_lines_all;
621: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
622: lv_attribute_context := jai_constants.contxt_non_shippable;
623: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
624: end if;

Line 621: lv_called_from := jai_constants.vat_repo_call_from_om_ar;

617: elsif p_source = upper(jai_constants.source_nsh) then
618: record_debug_messages ('6 Non-Shippable Item PROCESSING');
619: lv_source_trx_type := jai_constants.source_ttype_non_shippable;
620: lv_source_table_name := jai_constants.tname_order_lines_all;
621: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
622: lv_attribute_context := jai_constants.contxt_non_shippable;
623: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
624: end if;
625:

Line 622: lv_attribute_context := jai_constants.contxt_non_shippable;

618: record_debug_messages ('6 Non-Shippable Item PROCESSING');
619: lv_source_trx_type := jai_constants.source_ttype_non_shippable;
620: lv_source_table_name := jai_constants.tname_order_lines_all;
621: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
622: lv_attribute_context := jai_constants.contxt_non_shippable;
623: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
624: end if;
625:
626: /* End Bug# 6012570 (5876390) */

Line 660: if upper(p_source) = upper(jai_constants.source_wsh) then

656: lc_account_name := null;
657: /* End - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/
658:
659: /* Start Bug# 6012570 (5876390) */
660: if upper(p_source) = upper(jai_constants.source_wsh) then
661: ln_source_id := rec_cur_get_deliveries.delivery_detail_id;
662:
663: elsif p_source = jai_pa_billing_pkg.gv_source_projects then
664: ln_source_id := rec_cur_get_deliveries.delivery_id; /* this is draft_invoice_id */

Line 666: elsif p_source = upper(jai_constants.source_nsh) then

662:
663: elsif p_source = jai_pa_billing_pkg.gv_source_projects then
664: ln_source_id := rec_cur_get_deliveries.delivery_id; /* this is draft_invoice_id */
665: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
666: elsif p_source = upper(jai_constants.source_nsh) then
667: ln_source_id := rec_cur_get_deliveries.order_line_id;
668: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
669: end if;
670: /* End Bug# 6012570 (5876390) */

Line 683: p_organization_type => jai_constants.orgn_type_io ,

679: ||for the "RECOVERY ACCOUNT"
680: *******************************/
681: ln_recov_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
682: p_regime_id => p_regime_id ,
683: p_organization_type => jai_constants.orgn_type_io ,
684: p_organization_id => p_organization_id ,
685: p_location_id => p_location_id ,
686: p_tax_type => rec_cur_get_deliveries.tax_type ,
687: p_account_name => jai_constants.recovery

Line 687: p_account_name => jai_constants.recovery

683: p_organization_type => jai_constants.orgn_type_io ,
684: p_organization_id => p_organization_id ,
685: p_location_id => p_location_id ,
686: p_tax_type => rec_cur_get_deliveries.tax_type ,
687: p_account_name => jai_constants.recovery
688: ) ;
689:
690: /*******************************
691: || Get the code combination id

Line 696: p_organization_type => jai_constants.orgn_type_io ,

692: || for the "EXPENSE ACCOUNT"
693: *******************************/
694: ln_expense_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
695: p_regime_id => p_regime_id ,
696: p_organization_type => jai_constants.orgn_type_io ,
697: p_organization_id => p_organization_id ,
698: p_location_id => p_location_id ,
699: p_tax_type => rec_cur_get_deliveries.tax_type ,
700: p_account_name => jai_constants.expense

Line 700: p_account_name => jai_constants.expense

696: p_organization_type => jai_constants.orgn_type_io ,
697: p_organization_id => p_organization_id ,
698: p_location_id => p_location_id ,
699: p_tax_type => rec_cur_get_deliveries.tax_type ,
700: p_account_name => jai_constants.expense
701: ) ;
702: lc_account_name := jai_constants.recovery;
703: ln_charge_ac_id := ln_recov_acct_ccid;
704: ln_balancing_ac_id := ln_expense_acct_ccid;

Line 702: lc_account_name := jai_constants.recovery;

698: p_location_id => p_location_id ,
699: p_tax_type => rec_cur_get_deliveries.tax_type ,
700: p_account_name => jai_constants.expense
701: ) ;
702: lc_account_name := jai_constants.recovery;
703: ln_charge_ac_id := ln_recov_acct_ccid;
704: ln_balancing_ac_id := ln_expense_acct_ccid;
705: ln_debit_amount := rec_cur_get_deliveries.func_tax_amount; /* Modified ln_credit_amount to ln_debit_amount for bug 8657720 by vumaasha */
706:

Line 711: p_process_flag := jai_constants.expected_error;

707: IF ln_charge_ac_id IS NULL OR
708: ln_balancing_ac_id IS NULL
709: THEN
710: record_debug_messages('9 VAT delivery accounting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT Reversal');
711: p_process_flag := jai_constants.expected_error;
712: p_process_message := 'VAT delivery accounting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT reversal';
713: return;
714: END IF;
715: /* End - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/

Line 724: p_organization_type => jai_constants.orgn_type_io ,

720: ||for the "LIABILITY ACCOUNT"
721: *******************************/
722: ln_liab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
723: p_regime_id => p_regime_id ,
724: p_organization_type => jai_constants.orgn_type_io ,
725: p_organization_id => p_organization_id ,
726: p_location_id => p_location_id ,
727: p_tax_type => rec_cur_get_deliveries.tax_type ,
728: p_account_name => jai_constants.liability

Line 728: p_account_name => jai_constants.liability

724: p_organization_type => jai_constants.orgn_type_io ,
725: p_organization_id => p_organization_id ,
726: p_location_id => p_location_id ,
727: p_tax_type => rec_cur_get_deliveries.tax_type ,
728: p_account_name => jai_constants.liability
729: ) ;
730:
731: /*******************************
732: || Get the code combination id

Line 737: p_organization_type => jai_constants.orgn_type_io ,

733: || for the "INTERIM LIABILITY ACCOUNT"
734: *******************************/
735: ln_intliab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
736: p_regime_id => p_regime_id ,
737: p_organization_type => jai_constants.orgn_type_io ,
738: p_organization_id => p_organization_id ,
739: p_location_id => p_location_id ,
740: p_tax_type => rec_cur_get_deliveries.tax_type ,
741: p_account_name => jai_constants.liability_interim

Line 741: p_account_name => jai_constants.liability_interim

737: p_organization_type => jai_constants.orgn_type_io ,
738: p_organization_id => p_organization_id ,
739: p_location_id => p_location_id ,
740: p_tax_type => rec_cur_get_deliveries.tax_type ,
741: p_account_name => jai_constants.liability_interim
742: ) ;
743:
744:
745: /* Start - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/

Line 746: lc_account_name := jai_constants.liability;

742: ) ;
743:
744:
745: /* Start - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/
746: lc_account_name := jai_constants.liability;
747: ln_charge_ac_id := ln_liab_acct_ccid;
748: ln_balancing_ac_id := ln_intliab_acct_ccid;
749: ln_debit_amount := rec_cur_get_deliveries.func_tax_amount;
750: IF ln_charge_ac_id IS NULL OR

Line 754: p_process_flag := jai_constants.expected_error;

750: IF ln_charge_ac_id IS NULL OR
751: ln_balancing_ac_id IS NULL
752: THEN
753: record_debug_messages('9 VAT delivery accounting entries cannot be passed. Please set up the Liability account and the Interim Liability account for the corresponding VAT regime');
754: p_process_flag := jai_constants.expected_error;
755: p_process_message := 'VAT delivery accounting entries cannot be passed. Please set up the Liability account and the Interim Liability account for the corresponding VAT regime';
756: return;
757: END IF;
758: END IF;

Line 771: p_process_flag := jai_constants.expected_error;

767: IF ln_liab_acct_ccid IS NULL OR
768: ln_intliab_acct_ccid IS NULL
769: THEN
770: record_debug_messages('9 VAT delivery accouting entries cannot be passed. Please set up the Liability account and the Interim Liability account for the corresponding VAT regime');
771: p_process_flag := jai_constants.expected_error;
772: p_process_message := 'VAT delivery accouting entries cannot be passed. Please set up the Liability account and the Interim Liability account for the corresponding VAT regime';
773: return;
774: END IF;
775: END IF ;

Line 785: ||', account_name -> ' || jai_constants.liability

781: ||', p_organization_id -> ' || p_organization_id
782: ||', p_location_id -> ' || p_location_id
783: ||', vat_exemption_flag -> ' || rec_cur_get_deliveries.vat_exemption_flag
784: ||', pn_assessable_value ->' || rec_cur_get_deliveries.vat_assessable_value
785: ||', account_name -> ' || jai_constants.liability
786: ||', p_charge_account_id-> ' || ln_liab_acct_ccid
787: ||', p_balancing_account_id-> ' || ln_intliab_acct_ccid
788: ||',ln_debit_amount -> ' || ln_debit_amount
789: ||',ln_credit_amount -> ' || ln_credit_amount

Line 797: ||', p_attribute_context -> ' || jai_constants.contxt_delivery

793: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_deliveries.tax_id
794: ||', p_inv_organization_id -> ' || p_organization_id
795: ||', p_attribute1 i.e delivery_id -> ' || rec_cur_get_deliveries.delivery_id
796: ||', p_attribute2 i.e order_line_id -> ' || rec_cur_get_deliveries.order_line_id
797: ||', p_attribute_context -> ' || jai_constants.contxt_delivery
798: );
799:
800: record_debug_messages ('11 Before call to jai_cmn_rgm_recording_pkg.insert_vat_repository_entry');
801:

Line 811: pv_organization_type => jai_constants.orgn_type_io ,

807: jai_cmn_rgm_recording_pkg.insert_vat_repository_entry (
808: pn_repository_id => ln_repository_id ,
809: pn_regime_id => p_regime_id ,
810: pv_tax_type => rec_cur_get_deliveries.tax_type ,
811: pv_organization_type => jai_constants.orgn_type_io ,
812: pn_organization_id => p_organization_id ,
813: pn_location_id => p_location_id ,
814: pv_source => p_source ,
815: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery , */

Line 815: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery , */

811: pv_organization_type => jai_constants.orgn_type_io ,
812: pn_organization_id => p_organization_id ,
813: pn_location_id => p_location_id ,
814: pv_source => p_source ,
815: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery , */
816: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl , */
817: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id , */
818: pd_transaction_date => rec_cur_get_deliveries.creation_date ,
819: /* Date 14/06/2007 by sacsethi for bug 6072461

Line 816: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl , */

812: pn_organization_id => p_organization_id ,
813: pn_location_id => p_location_id ,
814: pv_source => p_source ,
815: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery , */
816: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl , */
817: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id , */
818: pd_transaction_date => rec_cur_get_deliveries.creation_date ,
819: /* Date 14/06/2007 by sacsethi for bug 6072461
820: pv_account_name => jai_constants.liability ,

Line 820: pv_account_name => jai_constants.liability ,

816: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl , */
817: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id , */
818: pd_transaction_date => rec_cur_get_deliveries.creation_date ,
819: /* Date 14/06/2007 by sacsethi for bug 6072461
820: pv_account_name => jai_constants.liability ,
821: pn_charge_account_id => ln_liab_acct_ccid ,
822: pn_balancing_account_id => ln_intliab_acct_ccid ,
823: Changes in account name , charge account id and balancing account id */
824: pv_account_name => lc_account_name ,

Line 836: pv_called_from => lv_called_from, /* Bug# 6012570 (5876390) jai_constants.vat_repo_call_from_om_ar , */

832: pn_batch_id => p_batch_id ,
833: pn_inv_organization_id => p_organization_id ,
834: pv_invoice_no => p_vat_invoice_no ,
835: pd_invoice_date => nvl(p_default_invoice_date,rec_cur_get_deliveries.creation_date) ,
836: pv_called_from => lv_called_from, /* Bug# 6012570 (5876390) jai_constants.vat_repo_call_from_om_ar , */
837: pv_process_flag => lv_process_flag ,
838: pv_process_message => lv_process_message ,
839: --Modified by Bo Li for replacing old attribtue columns with new ones Begin
840: -----------------------------------------------------------------------------------------------------------------

Line 841: pv_trx_reference_context => lv_attribute_context, /* Bug# 6012570 (5876390) jai_constants.contxt_delivery , */

837: pv_process_flag => lv_process_flag ,
838: pv_process_message => lv_process_message ,
839: --Modified by Bo Li for replacing old attribtue columns with new ones Begin
840: -----------------------------------------------------------------------------------------------------------------
841: pv_trx_reference_context => lv_attribute_context, /* Bug# 6012570 (5876390) jai_constants.contxt_delivery , */
842: pv_trx_reference1 => rec_cur_get_deliveries.delivery_id ,
843: pv_trx_reference2 => rec_cur_get_deliveries.order_line_id ,
844: pv_trx_reference3 => NULL ,
845: pv_trx_reference4 => NULL ,

Line 859: IF lv_process_flag = jai_constants.expected_error OR

855: ||', lv_process_message:'||lv_process_message
856: );
857: end if;
858:
859: IF lv_process_flag = jai_constants.expected_error OR
860: lv_process_flag = jai_constants.unexpected_error
861: THEN
862: /*
863: || As Returned status is an error hence:-

Line 860: lv_process_flag = jai_constants.unexpected_error

856: );
857: end if;
858:
859: IF lv_process_flag = jai_constants.expected_error OR
860: lv_process_flag = jai_constants.unexpected_error
861: THEN
862: /*
863: || As Returned status is an error hence:-
864: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

Line 897: ||', account_name -> ' || jai_constants.liability

893: ||', p_organization_id -> ' || p_organization_id
894: ||', p_location_id -> ' || p_location_id
895: ||', vat_exemption_flag -> ' || rec_cur_get_deliveries.vat_exemption_flag
896: ||', pn_assessable_value ->' || rec_cur_get_deliveries.vat_assessable_value
897: ||', account_name -> ' || jai_constants.liability
898: ||', p_charge_account_id-> ' || ln_liab_acct_ccid
899: ||', p_balancing_account_id-> ' || ln_intliab_acct_ccid
900: ||', ln_debit_amount -> ' || ln_debit_amount
901: ||', ln_credit_amount -> ' || ln_credit_amount

Line 910: ||', p_attribute_context -> ' || jai_constants.contxt_delivery

906: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_deliveries.tax_id
907: ||', p_inv_organization_id -> ' || p_organization_id
908: ||', p_attribute1 i.e delivery_id -> ' || rec_cur_get_deliveries.delivery_id
909: ||', p_attribute2 i.e order_line_id -> ' || rec_cur_get_deliveries.order_line_id
910: ||', p_attribute_context -> ' || jai_constants.contxt_delivery
911: );
912:
913:
914: if jai_pa_billing_pkg.gv_debug then

Line 921: pv_organization_type => jai_constants.orgn_type_io ,

917:
918: jai_cmn_rgm_recording_pkg.do_vat_accounting (
919: pn_regime_id => p_regime_id ,
920: pn_repository_id => ln_repository_id ,
921: pv_organization_type => jai_constants.orgn_type_io ,
922: pn_organization_id => p_organization_id ,
923: /*Check with support whether this should be transaction date or sysdate */
924: pd_accounting_date => nvl(p_default_invoice_date,rec_cur_get_deliveries.creation_date) ,
925: pd_transaction_date => rec_cur_get_deliveries.creation_date ,

Line 935: pv_called_from => lv_called_from, /* Bug# 6012570 (5876390) jai_constants.vat_repo_call_from_om_ar , */

931: */ pn_credit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
932: pn_debit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
933: pn_credit_ccid => ln_charge_ac_id ,
934: pn_debit_ccid => ln_balancing_ac_id ,
935: pv_called_from => lv_called_from, /* Bug# 6012570 (5876390) jai_constants.vat_repo_call_from_om_ar , */
936: pv_process_flag => lv_process_flag ,
937: pv_process_message => lv_process_message ,
938: pv_tax_type => rec_cur_get_deliveries.tax_type ,
939: pv_source => p_source ,

Line 940: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery ,*/

936: pv_process_flag => lv_process_flag ,
937: pv_process_message => lv_process_message ,
938: pv_tax_type => rec_cur_get_deliveries.tax_type ,
939: pv_source => p_source ,
940: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery ,*/
941: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl ,*/
942: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id ,*/
943: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/'JA_IN_TAX_CODES' ,
944: pn_reference_id => rec_cur_get_deliveries.tax_id

Line 941: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl ,*/

937: pv_process_message => lv_process_message ,
938: pv_tax_type => rec_cur_get_deliveries.tax_type ,
939: pv_source => p_source ,
940: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery ,*/
941: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl ,*/
942: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id ,*/
943: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/'JA_IN_TAX_CODES' ,
944: pn_reference_id => rec_cur_get_deliveries.tax_id
945: );

Line 943: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/'JA_IN_TAX_CODES' ,

939: pv_source => p_source ,
940: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery ,*/
941: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl ,*/
942: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id ,*/
943: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/'JA_IN_TAX_CODES' ,
944: pn_reference_id => rec_cur_get_deliveries.tax_id
945: );
946:
947: if jai_pa_billing_pkg.gv_debug then

Line 955: IF lv_process_flag = jai_constants.expected_error OR

951: );
952: end if;
953:
954:
955: IF lv_process_flag = jai_constants.expected_error OR
956: lv_process_flag = jai_constants.unexpected_error
957: THEN
958: /*
959: || As Returned status is an error hence:-

Line 956: lv_process_flag = jai_constants.unexpected_error

952: end if;
953:
954:
955: IF lv_process_flag = jai_constants.expected_error OR
956: lv_process_flag = jai_constants.unexpected_error
957: THEN
958: /*
959: || As Returned status is an error hence:-
960: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

Line 984: --jai_constants.source_intxfer

980: END LOOP;
981:
982: /*added by rchandan for bug#6030615*/
983: ELSIF p_source='INTERORG_XFER' THEN
984: --jai_constants.source_intxfer
985: /*
986: || Process Interorg Transfers - INV side processing
987: */
988: ln_rgm_cnt := 0;

Line 1017: p_organization_type => jai_constants.orgn_type_io ,

1013: ||for the "RECOVERY ACCOUNT"
1014: *******************************/
1015: ln_recov_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1016: p_regime_id => p_regime_id ,
1017: p_organization_type => jai_constants.orgn_type_io ,
1018: p_organization_id => p_organization_id ,
1019: p_location_id => p_location_id ,
1020: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1021: p_account_name => jai_constants.recovery

Line 1021: p_account_name => jai_constants.recovery

1017: p_organization_type => jai_constants.orgn_type_io ,
1018: p_organization_id => p_organization_id ,
1019: p_location_id => p_location_id ,
1020: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1021: p_account_name => jai_constants.recovery
1022: ) ;
1023: /*******************************
1024: || Get the code combination id
1025: || for the "EXPENSE ACCOUNT"

Line 1029: p_organization_type => jai_constants.orgn_type_io ,

1025: || for the "EXPENSE ACCOUNT"
1026: *******************************/
1027: ln_expense_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1028: p_regime_id => p_regime_id ,
1029: p_organization_type => jai_constants.orgn_type_io ,
1030: p_organization_id => p_organization_id ,
1031: p_location_id => p_location_id ,
1032: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1033: p_account_name => jai_constants.expense

Line 1033: p_account_name => jai_constants.expense

1029: p_organization_type => jai_constants.orgn_type_io ,
1030: p_organization_id => p_organization_id ,
1031: p_location_id => p_location_id ,
1032: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1033: p_account_name => jai_constants.expense
1034: ) ;
1035: lc_account_name := jai_constants.recovery;
1036: ln_charge_ac_id := ln_recov_acct_ccid;
1037: ln_balancing_ac_id := ln_expense_acct_ccid;

Line 1035: lc_account_name := jai_constants.recovery;

1031: p_location_id => p_location_id ,
1032: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1033: p_account_name => jai_constants.expense
1034: ) ;
1035: lc_account_name := jai_constants.recovery;
1036: ln_charge_ac_id := ln_recov_acct_ccid;
1037: ln_balancing_ac_id := ln_expense_acct_ccid;
1038: ln_debit_amount := rec_cur_get_mtl_txns.tax_amt; /* Modified ln_credit_amount to ln_debit_amount for bug 8657720 by vumaasha */
1039:

Line 1044: p_process_flag := jai_constants.expected_error;

1040: IF ln_charge_ac_id IS NULL OR
1041: ln_balancing_ac_id IS NULL
1042: THEN
1043: record_debug_messages('9 VAT delivery accounting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT Reversal');
1044: p_process_flag := jai_constants.expected_error;
1045: p_process_message := 'VAT delivery accounting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT reversal';
1046: return;
1047: END IF;
1048: ELSE

Line 1055: p_organization_type => jai_constants.orgn_type_io ,

1051: ||for the "LIABILITY ACCOUNT"
1052: *******************************/
1053: ln_liab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1054: p_regime_id => p_regime_id ,
1055: p_organization_type => jai_constants.orgn_type_io ,
1056: p_organization_id => p_organization_id ,
1057: p_location_id => p_location_id ,
1058: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1059: p_account_name => jai_constants.liability

Line 1059: p_account_name => jai_constants.liability

1055: p_organization_type => jai_constants.orgn_type_io ,
1056: p_organization_id => p_organization_id ,
1057: p_location_id => p_location_id ,
1058: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1059: p_account_name => jai_constants.liability
1060: ) ;
1061: /*******************************
1062: || Get the code combination id
1063: || for the "INTERIM LIABILITY ACCOUNT"

Line 1067: p_organization_type => jai_constants.orgn_type_io ,

1063: || for the "INTERIM LIABILITY ACCOUNT"
1064: *******************************/
1065: ln_intliab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1066: p_regime_id => p_regime_id ,
1067: p_organization_type => jai_constants.orgn_type_io ,
1068: p_organization_id => p_organization_id ,
1069: p_location_id => p_location_id ,
1070: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1071: p_account_name => jai_constants.liability_interim

Line 1071: p_account_name => jai_constants.liability_interim

1067: p_organization_type => jai_constants.orgn_type_io ,
1068: p_organization_id => p_organization_id ,
1069: p_location_id => p_location_id ,
1070: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1071: p_account_name => jai_constants.liability_interim
1072: ) ;
1073: lc_account_name := jai_constants.liability;
1074: ln_charge_ac_id := ln_liab_acct_ccid;
1075: ln_balancing_ac_id := ln_intliab_acct_ccid;

Line 1073: lc_account_name := jai_constants.liability;

1069: p_location_id => p_location_id ,
1070: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
1071: p_account_name => jai_constants.liability_interim
1072: ) ;
1073: lc_account_name := jai_constants.liability;
1074: ln_charge_ac_id := ln_liab_acct_ccid;
1075: ln_balancing_ac_id := ln_intliab_acct_ccid;
1076: ln_debit_amount := rec_cur_get_mtl_txns.tax_amt;
1077: IF ln_charge_ac_id IS NULL OR

Line 1081: p_process_flag := jai_constants.expected_error;

1077: IF ln_charge_ac_id IS NULL OR
1078: ln_balancing_ac_id IS NULL
1079: THEN
1080: record_debug_messages('9 VAT delivery accounting entries cannot be passed. Please set up the Liability account and the Interim Liability account for the corresponding VAT regime');
1081: p_process_flag := jai_constants.expected_error;
1082: p_process_message := 'VAT delivery accounting entries cannot be passed. Please set up the Liability account and the Interim Liability account for the corresponding VAT regime';
1083: return;
1084: END IF;
1085: END IF;

Line 1105: ||', p_attribute_context -> ' || jai_constants.contxt_delivery

1101: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_mtl_txns.tax_id
1102: ||', p_inv_organization_id -> ' || p_organization_id
1103: ||', p_attribute1 i.e delivery_id -> ' || rec_cur_get_mtl_txns.transaction_header_id
1104: ||', p_attribute2 i.e order_line_id -> ' || null
1105: ||', p_attribute_context -> ' || jai_constants.contxt_delivery
1106: );
1107: record_debug_messages ('11 Before call to jai_cmn_rgm_recording_pkg.insert_repository_entry');
1108: jai_cmn_rgm_recording_pkg.insert_vat_repository_entry (
1109: pn_repository_id => ln_repository_id ,

Line 1112: pv_organization_type => jai_constants.orgn_type_io ,

1108: jai_cmn_rgm_recording_pkg.insert_vat_repository_entry (
1109: pn_repository_id => ln_repository_id ,
1110: pn_regime_id => p_regime_id ,
1111: pv_tax_type => rec_cur_get_mtl_txns.tax_type ,
1112: pv_organization_type => jai_constants.orgn_type_io ,
1113: pn_organization_id => p_organization_id ,
1114: pn_location_id => p_location_id ,
1115: pv_source => p_source ,
1116: pv_source_trx_type => jai_constants.source_ttype_delivery ,

Line 1116: pv_source_trx_type => jai_constants.source_ttype_delivery ,

1112: pv_organization_type => jai_constants.orgn_type_io ,
1113: pn_organization_id => p_organization_id ,
1114: pn_location_id => p_location_id ,
1115: pv_source => p_source ,
1116: pv_source_trx_type => jai_constants.source_ttype_delivery ,
1117: pv_source_table_name => jai_constants.tname_dlry_dtl ,
1118: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
1119: pd_transaction_date => rec_cur_get_mtl_txns.creation_date ,
1120: pv_account_name => lc_account_name ,

Line 1117: pv_source_table_name => jai_constants.tname_dlry_dtl ,

1113: pn_organization_id => p_organization_id ,
1114: pn_location_id => p_location_id ,
1115: pv_source => p_source ,
1116: pv_source_trx_type => jai_constants.source_ttype_delivery ,
1117: pv_source_table_name => jai_constants.tname_dlry_dtl ,
1118: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
1119: pd_transaction_date => rec_cur_get_mtl_txns.creation_date ,
1120: pv_account_name => lc_account_name ,
1121: pn_charge_account_id => ln_charge_ac_id ,

Line 1132: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,

1128: pn_batch_id => p_batch_id ,
1129: pn_inv_organization_id => p_organization_id ,
1130: pv_invoice_no => p_vat_invoice_no ,
1131: pd_invoice_date => nvl(p_default_invoice_date,rec_cur_get_mtl_txns.creation_date) ,
1132: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
1133: pv_process_flag => lv_process_flag ,
1134: pv_process_message => lv_process_message ,
1135: --Modified by Bo Li for replacing old attribtue columns with new ones Begin
1136: -----------------------------------------------------------------------------------------------------------------

Line 1137: pv_trx_reference_context => jai_constants.contxt_delivery ,

1133: pv_process_flag => lv_process_flag ,
1134: pv_process_message => lv_process_message ,
1135: --Modified by Bo Li for replacing old attribtue columns with new ones Begin
1136: -----------------------------------------------------------------------------------------------------------------
1137: pv_trx_reference_context => jai_constants.contxt_delivery ,
1138: pv_trx_reference1 => rec_cur_get_mtl_txns.transaction_header_id ,
1139: pv_trx_reference2 => NULL ,
1140: pv_trx_reference3 => NULL ,
1141: pv_trx_reference4 => NULL ,

Line 1146: IF lv_process_flag = jai_constants.expected_error OR

1142: pv_trx_reference5 => NULL
1143: -----------------------------------------------------------------------------------------------------------------
1144: --Modified by Bo Li for replacing old attribtue columns with new ones End
1145: );
1146: IF lv_process_flag = jai_constants.expected_error OR
1147: lv_process_flag = jai_constants.unexpected_error
1148: THEN
1149: /*
1150: || As Returned status is an error hence:-

Line 1147: lv_process_flag = jai_constants.unexpected_error

1143: -----------------------------------------------------------------------------------------------------------------
1144: --Modified by Bo Li for replacing old attribtue columns with new ones End
1145: );
1146: IF lv_process_flag = jai_constants.expected_error OR
1147: lv_process_flag = jai_constants.unexpected_error
1148: THEN
1149: /*
1150: || As Returned status is an error hence:-
1151: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

Line 1187: ||', p_attribute_context -> ' || jai_constants.contxt_delivery

1183: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_mtl_txns.tax_id
1184: ||', p_inv_organization_id -> ' || p_organization_id
1185: ||', p_attribute1 i.e delivery_id -> ' || rec_cur_get_mtl_txns.transaction_header_id
1186: ||', p_attribute2 i.e order_line_id -> ' || null
1187: ||', p_attribute_context -> ' || jai_constants.contxt_delivery
1188: );
1189: /*commented by vasavi*/
1190: /*
1191: jai_cmn_rgm_recording_pkg.do_vat_accounting (

Line 1194: pv_organization_type => jai_constants.orgn_type_io ,

1190: /*
1191: jai_cmn_rgm_recording_pkg.do_vat_accounting (
1192: pn_regime_id => p_regime_id ,
1193: pn_repository_id => ln_repository_id ,
1194: pv_organization_type => jai_constants.orgn_type_io ,
1195: pn_organization_id => p_organization_id ,
1196: pd_accounting_date => nvl(p_default_invoice_date,rec_cur_get_mtl_txns.creation_date) ,
1197: pd_transaction_date => rec_cur_get_mtl_txns.creation_date ,
1198: pn_credit_amount => nvl(ln_debit_amount,ln_credit_amount) ,

Line 1202: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,

1198: pn_credit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
1199: pn_debit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
1200: pn_credit_ccid => ln_charge_ac_id ,
1201: pn_debit_ccid => ln_balancing_ac_id ,
1202: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
1203: pv_process_flag => lv_process_flag ,
1204: pv_process_message => lv_process_message ,
1205: pv_tax_type => rec_cur_get_mtl_txns.tax_type ,
1206: pv_source => p_source ,

Line 1207: pv_source_trx_type => jai_constants.source_ttype_delivery ,

1203: pv_process_flag => lv_process_flag ,
1204: pv_process_message => lv_process_message ,
1205: pv_tax_type => rec_cur_get_mtl_txns.tax_type ,
1206: pv_source => p_source ,
1207: pv_source_trx_type => jai_constants.source_ttype_delivery ,
1208: pv_source_table_name => jai_constants.tname_dlry_dtl ,
1209: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
1210: pv_reference_name => 'JA_IN_TAX_CODES' ,
1211: pn_reference_id => rec_cur_get_mtl_txns.tax_id

Line 1208: pv_source_table_name => jai_constants.tname_dlry_dtl ,

1204: pv_process_message => lv_process_message ,
1205: pv_tax_type => rec_cur_get_mtl_txns.tax_type ,
1206: pv_source => p_source ,
1207: pv_source_trx_type => jai_constants.source_ttype_delivery ,
1208: pv_source_table_name => jai_constants.tname_dlry_dtl ,
1209: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
1210: pv_reference_name => 'JA_IN_TAX_CODES' ,
1211: pn_reference_id => rec_cur_get_mtl_txns.tax_id
1212: );

Line 1213: IF lv_process_flag = jai_constants.expected_error OR

1209: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
1210: pv_reference_name => 'JA_IN_TAX_CODES' ,
1211: pn_reference_id => rec_cur_get_mtl_txns.tax_id
1212: );
1213: IF lv_process_flag = jai_constants.expected_error OR
1214: lv_process_flag = jai_constants.unexpected_error
1215: THEN
1216: record_debug_messages(' 15 Error in call to jai_cmn_rgm_recording_pkg.do_vat_accounting - lv_process_flag '||lv_process_flag
1217: ||', lv_process_message' || lv_process_message

Line 1214: lv_process_flag = jai_constants.unexpected_error

1210: pv_reference_name => 'JA_IN_TAX_CODES' ,
1211: pn_reference_id => rec_cur_get_mtl_txns.tax_id
1212: );
1213: IF lv_process_flag = jai_constants.expected_error OR
1214: lv_process_flag = jai_constants.unexpected_error
1215: THEN
1216: record_debug_messages(' 15 Error in call to jai_cmn_rgm_recording_pkg.do_vat_accounting - lv_process_flag '||lv_process_flag
1217: ||', lv_process_message' || lv_process_message
1218: ||', Delivery id - ' || rec_cur_get_mtl_txns.transaction_header_id

Line 1234: ELSIF upper(p_source) = upper(jai_constants.source_ar) THEN

1230: */
1231: end if;---ln_rgm_cnt if
1232: END LOOP;
1233:
1234: ELSIF upper(p_source) = upper(jai_constants.source_ar) THEN
1235:
1236: record_debug_messages ('17 Manual AR processing for customer_trx_id -> '||p_customer_trx_id);
1237: /*
1238: || Process Invoices - AR side processing

Line 1243: FOR rec_cur_get_man_ar_inv_taxes IN cur_get_man_ar_inv_taxes(upper(p_source),jai_constants.source_ttype_man_ar_inv,jai_constants.tname_cus_trx_lines)

1239: */
1240: /* Bug 5739005. Added by vkantamn
1241: * Included parameters for the cursor.
1242: */
1243: FOR rec_cur_get_man_ar_inv_taxes IN cur_get_man_ar_inv_taxes(upper(p_source),jai_constants.source_ttype_man_ar_inv,jai_constants.tname_cus_trx_lines)
1244: LOOP
1245: record_debug_messages (' ************18 PROCESSING customer_trx_id -> '|| p_customer_trx_id
1246: ||'link_to_cust_trx_line_id -> '||rec_cur_get_man_ar_inv_taxes.link_to_cust_trx_line_id
1247: ||'customer_trx_line_id ->'||rec_cur_get_man_ar_inv_taxes.customer_trx_line_id

Line 1276: p_organization_type => jai_constants.orgn_type_io ,

1272: ||for the "RECOVERY ACCOUNT"
1273: *******************************/
1274: ln_recov_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1275: p_regime_id => p_regime_id ,
1276: p_organization_type => jai_constants.orgn_type_io ,
1277: p_organization_id => p_organization_id ,
1278: p_location_id => p_location_id ,
1279: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type,
1280: p_account_name => jai_constants.recovery

Line 1280: p_account_name => jai_constants.recovery

1276: p_organization_type => jai_constants.orgn_type_io ,
1277: p_organization_id => p_organization_id ,
1278: p_location_id => p_location_id ,
1279: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type,
1280: p_account_name => jai_constants.recovery
1281: ) ;
1282:
1283: /*******************************
1284: || Get the code combination id

Line 1289: p_organization_type => jai_constants.orgn_type_io ,

1285: || for the "EXPENSE ACCOUNT"
1286: *******************************/
1287: ln_expense_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1288: p_regime_id => p_regime_id ,
1289: p_organization_type => jai_constants.orgn_type_io ,
1290: p_organization_id => p_organization_id ,
1291: p_location_id => p_location_id ,
1292: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type,
1293: p_account_name => jai_constants.expense

Line 1293: p_account_name => jai_constants.expense

1289: p_organization_type => jai_constants.orgn_type_io ,
1290: p_organization_id => p_organization_id ,
1291: p_location_id => p_location_id ,
1292: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type,
1293: p_account_name => jai_constants.expense
1294: ) ;
1295: IF ln_recov_acct_ccid IS NULL OR
1296: ln_expense_acct_ccid IS NULL
1297: THEN

Line 1299: p_process_flag := jai_constants.expected_error;

1295: IF ln_recov_acct_ccid IS NULL OR
1296: ln_expense_acct_ccid IS NULL
1297: THEN
1298: record_debug_messages('20 VAT receivables accouting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT Reversal');
1299: p_process_flag := jai_constants.expected_error;
1300: p_process_message := 'VAT receivables accouting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT Reversal';
1301: return;
1302: END IF;
1303: /* End - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/

Line 1312: p_organization_type => jai_constants.orgn_type_io ,

1308: ||for the "LIABILITY ACCOUNT"
1309: *******************************/
1310: ln_liab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1311: p_regime_id => p_regime_id ,
1312: p_organization_type => jai_constants.orgn_type_io ,
1313: p_organization_id => p_organization_id ,
1314: p_location_id => p_location_id ,
1315: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1316: p_account_name => jai_constants.liability

Line 1316: p_account_name => jai_constants.liability

1312: p_organization_type => jai_constants.orgn_type_io ,
1313: p_organization_id => p_organization_id ,
1314: p_location_id => p_location_id ,
1315: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1316: p_account_name => jai_constants.liability
1317: ) ;
1318:
1319: /*******************************
1320: || Get the code combination id

Line 1325: p_organization_type => jai_constants.orgn_type_io ,

1321: || for the "INTERIM LIABILITY ACCOUNT"
1322: *******************************/
1323: ln_intliab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1324: p_regime_id => p_regime_id ,
1325: p_organization_type => jai_constants.orgn_type_io ,
1326: p_organization_id => p_organization_id ,
1327: p_location_id => p_location_id ,
1328: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1329: p_account_name => jai_constants.liability_interim

Line 1329: p_account_name => jai_constants.liability_interim

1325: p_organization_type => jai_constants.orgn_type_io ,
1326: p_organization_id => p_organization_id ,
1327: p_location_id => p_location_id ,
1328: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1329: p_account_name => jai_constants.liability_interim
1330: ) ;
1331:
1332:
1333: /*

Line 1340: p_process_flag := jai_constants.expected_error;

1336: IF ln_liab_acct_ccid IS NULL OR
1337: ln_intliab_acct_ccid IS NULL
1338: THEN
1339: record_debug_messages('20 VAT receivable accouting entries cannot be passed. Please set up the Liability account and the Interim Liability account for the corresponding VAT regime');
1340: p_process_flag := jai_constants.expected_error;
1341: p_process_message := 'VAT receivable accouting entries cannot be passed. Please set up the Liability account and the Interim Liability account for the corresponding VAT regime';
1342: return;
1343: END IF;
1344: END IF;

Line 1368: lc_account_name := jai_constants.recovery ;

1364:
1365: IF p_transaction_type IN ('INV','DM') THEN
1366: /* Start - sacsethi, Added w.r.t 6072461 ( for VAT Reversal)*/
1367: IF ( rec_cur_get_man_ar_inv_taxes.tax_type = 'VAT REVERSAL' ) THEN
1368: lc_account_name := jai_constants.recovery ;
1369: ln_charge_ac_id := ln_recov_acct_ccid ;
1370: ln_balancing_ac_id := ln_expense_acct_ccid ;
1371: ln_credit_amount := null ;
1372: ln_debit_amount := abs(rec_cur_get_man_ar_inv_taxes.func_tax_amount) ; /* modified for bug 8657720 by vumaasha */

Line 1375: lc_account_name := jai_constants.liability ;

1371: ln_credit_amount := null ;
1372: ln_debit_amount := abs(rec_cur_get_man_ar_inv_taxes.func_tax_amount) ; /* modified for bug 8657720 by vumaasha */
1373:
1374: ELSE
1375: lc_account_name := jai_constants.liability ;
1376: --start additions for bug#10189258
1377: if sign(rec_cur_get_man_ar_inv_taxes.func_tax_amount)<0
1378: then
1379: ln_charge_ac_id := ln_intliab_acct_ccid ;

Line 1394: lc_account_name := jai_constants.recovery ; -- Added By Bo Li for Bug#9766552 on 2010-06-09

1390: END IF;
1391:
1392:
1393: ELSIF p_transaction_type = 'CM' THEN
1394: lc_account_name := jai_constants.recovery ; -- Added By Bo Li for Bug#9766552 on 2010-06-09
1395: ln_charge_ac_id := ln_intliab_acct_ccid ;
1396: ln_balancing_ac_id := ln_liab_acct_ccid ;
1397: ln_debit_amount := null ;
1398: ln_credit_amount := abs(rec_cur_get_man_ar_inv_taxes.func_tax_amount) ;

Line 1411: ||', account_name -> ' || jai_constants.liability

1407: ||', p_organization_id -> ' || p_organization_id
1408: ||', p_location_id -> ' || p_location_id
1409: ||', vat_exemption_flag -> ' || rec_cur_get_man_ar_inv_taxes.vat_exemption_flag
1410: ||', pn_assessable_value ->' || rec_cur_get_man_ar_inv_taxes.vat_assessable_value
1411: ||', account_name -> ' || jai_constants.liability
1412: ||', p_charge_account_id-> ' || ln_charge_ac_id
1413: ||', p_balancing_account_id-> ' || ln_balancing_ac_id
1414: ||', ln_debit_amount -> ' || ln_debit_amount
1415: ||', ln_credit_amount -> ' || ln_credit_amount

Line 1423: ||', p_attribute_context -> ' || jai_constants.contxt_manual_ar

1419: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_man_ar_inv_taxes.tax_id
1420: ||', p_inv_organization_id -> ' || p_organization_id
1421: ||', p_attribute1 i.e customer_trx_id -> ' || rec_cur_get_man_ar_inv_taxes.customer_trx_id
1422: ||', p_attribute2 i.e link_to_cust_trx_line_id -> ' || rec_cur_get_man_ar_inv_taxes.link_to_cust_trx_line_id
1423: ||', p_attribute_context -> ' || jai_constants.contxt_manual_ar
1424: );
1425:
1426:
1427: record_debug_messages ('22 Before call to jai_cmn_rgm_recording_pkg.insert_vat_repository_entry');

Line 1453: pv_organization_type => jai_constants.orgn_type_io ,

1449: jai_cmn_rgm_recording_pkg.insert_vat_repository_entry (
1450: pn_repository_id => ln_repository_id ,
1451: pn_regime_id => p_regime_id ,
1452: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1453: pv_organization_type => jai_constants.orgn_type_io ,
1454: pn_organization_id => p_organization_id ,
1455: pn_location_id => p_location_id ,
1456: pv_source => p_source ,
1457: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,

Line 1457: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,

1453: pv_organization_type => jai_constants.orgn_type_io ,
1454: pn_organization_id => p_organization_id ,
1455: pn_location_id => p_location_id ,
1456: pv_source => p_source ,
1457: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1458: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1459: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1460: -- pd_transaction_date => rec_cur_get_man_ar_inv_taxes.creation_date ,
1461: /*commented and added the below for bug#13495960*/

Line 1458: pv_source_table_name => jai_constants.tname_cus_trx_lines ,

1454: pn_organization_id => p_organization_id ,
1455: pn_location_id => p_location_id ,
1456: pv_source => p_source ,
1457: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1458: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1459: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1460: -- pd_transaction_date => rec_cur_get_man_ar_inv_taxes.creation_date ,
1461: /*commented and added the below for bug#13495960*/
1462: pd_transaction_date => nvl(p_default_invoice_date,rec_cur_get_man_ar_inv_taxes.creation_date) ,

Line 1475: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,

1471: pn_batch_id => p_batch_id ,
1472: pn_inv_organization_id => p_organization_id ,
1473: pv_invoice_no => p_vat_invoice_no ,
1474: pd_invoice_date => nvl(p_default_invoice_date,rec_cur_get_man_ar_inv_taxes.creation_date) ,
1475: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
1476: pv_process_flag => lv_process_flag ,
1477: pv_process_message => lv_process_message ,
1478: --Modified by Bo Li for replacing old attribtue columns with new ones Begin
1479: -----------------------------------------------------------------------------------------------------------------

Line 1480: pv_trx_reference_context => jai_constants.contxt_manual_ar ,

1476: pv_process_flag => lv_process_flag ,
1477: pv_process_message => lv_process_message ,
1478: --Modified by Bo Li for replacing old attribtue columns with new ones Begin
1479: -----------------------------------------------------------------------------------------------------------------
1480: pv_trx_reference_context => jai_constants.contxt_manual_ar ,
1481: pv_trx_reference1 => rec_cur_get_man_ar_inv_taxes.customer_trx_id ,
1482: pv_trx_reference2 => rec_cur_get_man_ar_inv_taxes.link_to_cust_trx_line_id ,
1483: pv_trx_reference3 => NULL ,
1484: pv_trx_reference4 => NULL ,

Line 1492: IF lv_process_flag = jai_constants.expected_error OR

1488: );
1489:
1490:
1491:
1492: IF lv_process_flag = jai_constants.expected_error OR
1493: lv_process_flag = jai_constants.unexpected_error
1494: THEN
1495: /*
1496: || As Returned status is an error hence:-

Line 1493: lv_process_flag = jai_constants.unexpected_error

1489:
1490:
1491:
1492: IF lv_process_flag = jai_constants.expected_error OR
1493: lv_process_flag = jai_constants.unexpected_error
1494: THEN
1495: /*
1496: || As Returned status is an error hence:-
1497: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

Line 1527: ||', account_name -> ' || jai_constants.liability

1523: ||', p_organization_id -> ' || p_organization_id
1524: ||', p_location_id -> ' || p_location_id
1525: ||', vat_exemption_flag -> ' || rec_cur_get_man_ar_inv_taxes.vat_exemption_flag
1526: ||', pn_assessable_value ->' || rec_cur_get_man_ar_inv_taxes.vat_assessable_value
1527: ||', account_name -> ' || jai_constants.liability
1528: ||', pn_credit_ccid-> ' || ln_charge_ac_id
1529: ||', pn_debit_ccid -> ' || ln_balancing_ac_id
1530: ||', ln_debit_amount -> ' || ln_debit_amount
1531: ||', ln_credit_amount -> ' || ln_credit_amount

Line 1539: ||', p_attribute_context -> ' || jai_constants.contxt_manual_ar

1535: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_man_ar_inv_taxes.tax_id
1536: ||', p_inv_organization_id -> ' || p_organization_id
1537: ||', p_attribute1 i.e customer_trx_id -> ' || rec_cur_get_man_ar_inv_taxes.customer_trx_id
1538: ||', p_attribute2 i.e link_to_cust_trx_line_id -> ' || rec_cur_get_man_ar_inv_taxes.link_to_cust_trx_line_id
1539: ||', p_attribute_context -> ' || jai_constants.contxt_manual_ar
1540: );
1541:
1542: IF --nvl(rec_cur_get_man_ar_inv_taxes.inclusive_tax_flag, 'N') = 'Y' AND
1543: ln_external_flag > 0 THEN --Add by Xiao for bug#11936390.

Line 1550: pv_organization_type => jai_constants.orgn_type_io ,

1546: ELSE
1547: jai_cmn_rgm_recording_pkg.do_vat_accounting (
1548: pn_regime_id => p_regime_id ,
1549: pn_repository_id => ln_repository_id ,
1550: pv_organization_type => jai_constants.orgn_type_io ,
1551: pn_organization_id => p_organization_id ,
1552: /*Check with support whether this should be transaction date or sysdate */
1553: pd_accounting_date => nvl(p_default_invoice_date,rec_cur_get_man_ar_inv_taxes.creation_date) ,
1554: pd_transaction_date => rec_cur_get_man_ar_inv_taxes.creation_date ,

Line 1559: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,

1555: pn_credit_amount => nvl(ln_credit_amount,ln_debit_amount) ,
1556: pn_debit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
1557: pn_credit_ccid => ln_charge_ac_id ,
1558: pn_debit_ccid => ln_balancing_ac_id ,
1559: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
1560: pv_process_flag => lv_process_flag ,
1561: pv_process_message => lv_process_message ,
1562: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1563: pv_source => p_source ,

Line 1564: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,

1560: pv_process_flag => lv_process_flag ,
1561: pv_process_message => lv_process_message ,
1562: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1563: pv_source => p_source ,
1564: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1565: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1566: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1567: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/ 'JA_IN_TAX_CODES' ,
1568: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id

Line 1565: pv_source_table_name => jai_constants.tname_cus_trx_lines ,

1561: pv_process_message => lv_process_message ,
1562: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1563: pv_source => p_source ,
1564: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1565: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1566: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1567: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/ 'JA_IN_TAX_CODES' ,
1568: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id
1569: );

Line 1567: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/ 'JA_IN_TAX_CODES' ,

1563: pv_source => p_source ,
1564: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1565: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1566: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1567: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/ 'JA_IN_TAX_CODES' ,
1568: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id
1569: );
1570:
1571: IF lv_process_flag = jai_constants.expected_error OR

Line 1571: IF lv_process_flag = jai_constants.expected_error OR

1567: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/ 'JA_IN_TAX_CODES' ,
1568: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id
1569: );
1570:
1571: IF lv_process_flag = jai_constants.expected_error OR
1572: lv_process_flag = jai_constants.unexpected_error
1573: THEN
1574: /*
1575: || As Returned status is an error hence:-

Line 1572: lv_process_flag = jai_constants.unexpected_error

1568: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id
1569: );
1570:
1571: IF lv_process_flag = jai_constants.expected_error OR
1572: lv_process_flag = jai_constants.unexpected_error
1573: THEN
1574: /*
1575: || As Returned status is an error hence:-
1576: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

Line 1607: p_process_flag := jai_constants.unexpected_error ;

1603:
1604: EXCEPTION
1605: WHEN OTHERS THEN
1606: record_debug_messages (' 29 In Exception Section - SQLERRM ->'||substr(sqlerrm,1,300) );
1607: p_process_flag := jai_constants.unexpected_error ;
1608: p_process_message := 'Unexpeced error occured in procedure process_order_invoice for document_id -> '||
1609: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
1610: -- nvl(p_delivery_id,p_customer_trx_id)
1611: nvl(p_delivery_id, NVL(p_order_line_id, p_customer_trx_id))