DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_VAT_ACCNT_PKG dependencies on JAI_CONSTANTS

Line 188: AND jrr.regime_code = jai_constants.vat_regime

184: AND jmt.transaction_header_id=jcdt.source_doc_id
185: AND jmt.transaction_temp_id=jcdt.source_doc_line_id
186: AND jcdt.tax_id=jtc.tax_id
187: AND jtc.tax_type= jrg.attribute_code
188: AND jrr.regime_code = jai_constants.vat_regime
189: AND jrg.regime_id = jrr.regime_id
190: AND jrg.registration_type = 'TAX_TYPES' ;
191:
192:

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

221: JAI_CMN_TAXES_ALL jtc ,
222: ( --Date 14/06/2007 by sacsethi for bug 6072461 , View is replaced by subquery with vat reversal
223: SELECT jrttv1.tax_type tax_type
224: FROM jai_regime_tax_types_v jrttv1
225: WHERE jrttv1.regime_code = jai_constants.vat_regime --Modified by JMEENA from jrttv1.tax_type to jrttv1.regime_code for bug#6944839
226: UNION
227: SELECT 'VAT REVERSAL' tax_type FROM DUAL
228: ) jrttv
229: WHERE

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

232: jspl.delivery_id = p_delivery_id AND
233: jspl.delivery_detail_id = jsptl.delivery_detail_id AND
234: jsptl.tax_id = jtc.tax_id AND
235: jtc.tax_type = jrttv.tax_type AND
236: -- jrttv.regime_code = jai_constants.vat_regime AND --Date 14/06/2007 by sacsethi for bug 6072461
237: NOT EXISTS ( SELECT 1
238: FROM jai_rgm_trx_records jrtr
239: WHERE
240: -- Bug 5739005. Added by vkantamn

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

247: jrtr.attribute1 = jspl.delivery_id AND
248: jrtr.source_document_id = jspl.delivery_detail_id AND
249: jrtr.reference_id = jsptl.tax_id
250: )
251: AND cp_source = jai_constants.source_wsh /* Bug# 6012570 (5876390) */
252: /* start. bug#Bug# 6012570 (5876390). added the union condition */
253: UNION
254: SELECT
255: jpdi.draft_invoice_id ,

Line 273: WHERE jrttv1.regime_code = jai_constants.vat_regime

269: jai_cmn_document_taxes jcdt ,
270: (
271: SELECT jrttv1.tax_type tax_type
272: FROM jai_regime_tax_types_v jrttv1
273: WHERE jrttv1.regime_code = jai_constants.vat_regime
274: UNION
275: SELECT 'VAT REVERSAL' tax_type FROM DUAL
276: ) jrttv
277: WHERE cp_source = jai_pa_billing_pkg.gv_source_projects

Line 317: WHERE jrttv1.regime_code = jai_constants.vat_regime

313: JAI_CMN_TAXES_ALL jtc ,
314: ( --Date 14/06/2007 by sacsethi for bug 6072461 , View is replaced by subquery with vat reversal
315: SELECT jrttv1.tax_type tax_type
316: FROM jai_regime_tax_types_v jrttv1
317: WHERE jrttv1.regime_code = jai_constants.vat_regime
318: UNION
319: SELECT 'VAT REVERSAL' tax_type
320: FROM DUAL
321: ) jrttv

Line 374: lv_process_flag := jai_constants.successful ;

370: /******************************************************************************************
371: ||Variable Initialization
372: ******************************************************************************************/
373:
374: lv_process_flag := jai_constants.successful ;
375: lv_process_message := null ;
376:
377: p_process_flag := lv_process_flag ;
378: p_process_message := lv_process_message ;

Line 392: p_process_flag := jai_constants.expected_error;

388: ******************************************************************************************/
389:
390: IF p_regime_id IS NULL THEN
391: record_debug_messages('2.1 REGIME ID cannot be null');
392: p_process_flag := jai_constants.expected_error;
393: p_process_message := 'Invalid REGIME';
394: return;
395: END IF;
396:

Line 405: p_process_flag := jai_constants.expected_error;

401: IF p_organization_id IS NULL OR
402: p_location_id IS NULL
403: THEN
404: record_debug_messages('3 Organization_id or Location_id cannot be null. Please provide a valid value for these fields');
405: p_process_flag := jai_constants.expected_error;
406: p_process_message := 'Organization_id or Location_id cannot be null. Please provide a valid value for these fields';
407: return;
408: END IF;
409:

Line 418: p_process_flag := jai_constants.expected_error;

414: IF p_delivery_id IS NULL AND
415: p_customer_trx_id IS NULL
416: THEN
417: record_debug_messages(' 4 Delivery ID/Customer_trx_id both cannot be null. Please provide a valid value for either one of the two');
418: p_process_flag := jai_constants.expected_error;
419: p_process_message := 'Delivery ID/Customer_trx_id both cannot be null. Please provide a valid value for either one of the two';
420: return;
421: END IF;
422:

Line 433: p_process_flag := jai_constants.expected_error;

429: nvl(p_called_from,'####') <> 'JA_IN_LOC_AR_HDR_UPD_TRG_VAT'
430: AND nvl(p_transaction_type ,'####') <> 'DRAFT_INVOICE_CM' /* bug#6012570 (5876390) introduced for Projects Billing Implementation */
431: THEN
432: record_debug_messages('5 Vat Invoice Number cannot be null. Please provide a valid VAT Invoice Number');
433: p_process_flag := jai_constants.expected_error;
434: p_process_message := nvl(p_transaction_type ,'####') /* bug#6012570 (5876390) */
435: || 'Vat Invoice Number cannot be null. Please provide a valid VAT Invoice Number';
436: return;
437: END IF;

Line 446: upper(jai_constants.source_wsh)

442: || accounting entries.
443: ******************************************************************************************/
444:
445: IF upper(p_source) in (
446: upper(jai_constants.source_wsh)
447: , jai_pa_billing_pkg.gv_source_projects /* Bug# 6012570 (5876390) */
448: )
449: THEN
450:

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

452: jai_cmn_utils_pkg.print_log ( jai_pa_billing_pkg.file, '3 rgm_om_ar_vat_accnt_pkg.process_order_invoice . Psource:'||p_source);
453: end if;
454:
455: /* Start Bug# 6012570 (5876390) */
456: if upper(p_source) = upper(jai_constants.source_wsh) then
457: record_debug_messages ('6 Delivery PROCESSING');
458: lv_source_trx_type := jai_constants.source_ttype_delivery;
459: lv_source_table_name := jai_constants.tname_dlry_dtl;
460: lv_called_from := jai_constants.vat_repo_call_from_om_ar;

Line 458: lv_source_trx_type := jai_constants.source_ttype_delivery;

454:
455: /* Start Bug# 6012570 (5876390) */
456: if upper(p_source) = upper(jai_constants.source_wsh) then
457: record_debug_messages ('6 Delivery PROCESSING');
458: lv_source_trx_type := jai_constants.source_ttype_delivery;
459: lv_source_table_name := jai_constants.tname_dlry_dtl;
460: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
461: lv_attribute_context := jai_constants.contxt_delivery;
462:

Line 459: lv_source_table_name := jai_constants.tname_dlry_dtl;

455: /* Start Bug# 6012570 (5876390) */
456: if upper(p_source) = upper(jai_constants.source_wsh) then
457: record_debug_messages ('6 Delivery PROCESSING');
458: lv_source_trx_type := jai_constants.source_ttype_delivery;
459: lv_source_table_name := jai_constants.tname_dlry_dtl;
460: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
461: lv_attribute_context := jai_constants.contxt_delivery;
462:
463: elsif p_source = jai_pa_billing_pkg.gv_source_projects then

Line 460: lv_called_from := jai_constants.vat_repo_call_from_om_ar;

456: if upper(p_source) = upper(jai_constants.source_wsh) then
457: record_debug_messages ('6 Delivery PROCESSING');
458: lv_source_trx_type := jai_constants.source_ttype_delivery;
459: lv_source_table_name := jai_constants.tname_dlry_dtl;
460: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
461: lv_attribute_context := jai_constants.contxt_delivery;
462:
463: elsif p_source = jai_pa_billing_pkg.gv_source_projects then
464: record_debug_messages ('6 Projects Draft Invoice PROCESSING');

Line 461: lv_attribute_context := jai_constants.contxt_delivery;

457: record_debug_messages ('6 Delivery PROCESSING');
458: lv_source_trx_type := jai_constants.source_ttype_delivery;
459: lv_source_table_name := jai_constants.tname_dlry_dtl;
460: lv_called_from := jai_constants.vat_repo_call_from_om_ar;
461: lv_attribute_context := jai_constants.contxt_delivery;
462:
463: elsif p_source = jai_pa_billing_pkg.gv_source_projects then
464: record_debug_messages ('6 Projects Draft Invoice PROCESSING');
465: lv_source_trx_type := jai_pa_billing_pkg.gv_trx_type_draft_invoice; -- 'DRAFT_INVOICE';

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

501: lc_account_name := null;
502: /* End - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/
503:
504: /* Start Bug# 6012570 (5876390) */
505: if upper(p_source) = upper(jai_constants.source_wsh) then
506: ln_source_id := rec_cur_get_deliveries.delivery_detail_id;
507:
508: elsif p_source = jai_pa_billing_pkg.gv_source_projects then
509: ln_source_id := rec_cur_get_deliveries.delivery_id; /* this is draft_invoice_id */

Line 525: p_organization_type => jai_constants.orgn_type_io ,

521: ||for the "RECOVERY ACCOUNT"
522: *******************************/
523: ln_recov_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
524: p_regime_id => p_regime_id ,
525: p_organization_type => jai_constants.orgn_type_io ,
526: p_organization_id => p_organization_id ,
527: p_location_id => p_location_id ,
528: p_tax_type => rec_cur_get_deliveries.tax_type ,
529: p_account_name => jai_constants.recovery

Line 529: p_account_name => jai_constants.recovery

525: p_organization_type => jai_constants.orgn_type_io ,
526: p_organization_id => p_organization_id ,
527: p_location_id => p_location_id ,
528: p_tax_type => rec_cur_get_deliveries.tax_type ,
529: p_account_name => jai_constants.recovery
530: ) ;
531:
532: /*******************************
533: || Get the code combination id

Line 538: p_organization_type => jai_constants.orgn_type_io ,

534: || for the "EXPENSE ACCOUNT"
535: *******************************/
536: ln_expense_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
537: p_regime_id => p_regime_id ,
538: p_organization_type => jai_constants.orgn_type_io ,
539: p_organization_id => p_organization_id ,
540: p_location_id => p_location_id ,
541: p_tax_type => rec_cur_get_deliveries.tax_type ,
542: p_account_name => jai_constants.expense

Line 542: p_account_name => jai_constants.expense

538: p_organization_type => jai_constants.orgn_type_io ,
539: p_organization_id => p_organization_id ,
540: p_location_id => p_location_id ,
541: p_tax_type => rec_cur_get_deliveries.tax_type ,
542: p_account_name => jai_constants.expense
543: ) ;
544: lc_account_name := jai_constants.recovery;
545: ln_charge_ac_id := ln_recov_acct_ccid;
546: ln_balancing_ac_id := ln_expense_acct_ccid;

Line 544: lc_account_name := jai_constants.recovery;

540: p_location_id => p_location_id ,
541: p_tax_type => rec_cur_get_deliveries.tax_type ,
542: p_account_name => jai_constants.expense
543: ) ;
544: lc_account_name := jai_constants.recovery;
545: ln_charge_ac_id := ln_recov_acct_ccid;
546: ln_balancing_ac_id := ln_expense_acct_ccid;
547: ln_credit_amount := rec_cur_get_deliveries.func_tax_amount;
548: IF ln_charge_ac_id IS NULL OR

Line 552: p_process_flag := jai_constants.expected_error;

548: IF ln_charge_ac_id IS NULL OR
549: ln_balancing_ac_id IS NULL
550: THEN
551: record_debug_messages('9 VAT delivery accounting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT Reversal');
552: p_process_flag := jai_constants.expected_error;
553: p_process_message := 'VAT delivery accounting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT reversal';
554: return;
555: END IF;
556: /* End - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/

Line 565: p_organization_type => jai_constants.orgn_type_io ,

561: ||for the "LIABILITY ACCOUNT"
562: *******************************/
563: ln_liab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
564: p_regime_id => p_regime_id ,
565: p_organization_type => jai_constants.orgn_type_io ,
566: p_organization_id => p_organization_id ,
567: p_location_id => p_location_id ,
568: p_tax_type => rec_cur_get_deliveries.tax_type ,
569: p_account_name => jai_constants.liability

Line 569: p_account_name => jai_constants.liability

565: p_organization_type => jai_constants.orgn_type_io ,
566: p_organization_id => p_organization_id ,
567: p_location_id => p_location_id ,
568: p_tax_type => rec_cur_get_deliveries.tax_type ,
569: p_account_name => jai_constants.liability
570: ) ;
571:
572: /*******************************
573: || Get the code combination id

Line 578: p_organization_type => jai_constants.orgn_type_io ,

574: || for the "INTERIM LIABILITY ACCOUNT"
575: *******************************/
576: ln_intliab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
577: p_regime_id => p_regime_id ,
578: p_organization_type => jai_constants.orgn_type_io ,
579: p_organization_id => p_organization_id ,
580: p_location_id => p_location_id ,
581: p_tax_type => rec_cur_get_deliveries.tax_type ,
582: p_account_name => jai_constants.liability_interim

Line 582: p_account_name => jai_constants.liability_interim

578: p_organization_type => jai_constants.orgn_type_io ,
579: p_organization_id => p_organization_id ,
580: p_location_id => p_location_id ,
581: p_tax_type => rec_cur_get_deliveries.tax_type ,
582: p_account_name => jai_constants.liability_interim
583: ) ;
584:
585:
586: /* Start - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/

Line 587: lc_account_name := jai_constants.liability;

583: ) ;
584:
585:
586: /* Start - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/
587: lc_account_name := jai_constants.liability;
588: ln_charge_ac_id := ln_liab_acct_ccid;
589: ln_balancing_ac_id := ln_intliab_acct_ccid;
590: ln_debit_amount := rec_cur_get_deliveries.func_tax_amount;
591: IF ln_charge_ac_id IS NULL OR

Line 595: p_process_flag := jai_constants.expected_error;

591: IF ln_charge_ac_id IS NULL OR
592: ln_balancing_ac_id IS NULL
593: THEN
594: 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');
595: p_process_flag := jai_constants.expected_error;
596: 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';
597: return;
598: END IF;
599: END IF;

Line 612: p_process_flag := jai_constants.expected_error;

608: IF ln_liab_acct_ccid IS NULL OR
609: ln_intliab_acct_ccid IS NULL
610: THEN
611: 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');
612: p_process_flag := jai_constants.expected_error;
613: 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';
614: return;
615: END IF;
616: END IF ;

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

622: ||', p_organization_id -> ' || p_organization_id
623: ||', p_location_id -> ' || p_location_id
624: ||', vat_exemption_flag -> ' || rec_cur_get_deliveries.vat_exemption_flag
625: ||', pn_assessable_value ->' || rec_cur_get_deliveries.vat_assessable_value
626: ||', account_name -> ' || jai_constants.liability
627: ||', p_charge_account_id-> ' || ln_liab_acct_ccid
628: ||', p_balancing_account_id-> ' || ln_intliab_acct_ccid
629: ||',ln_debit_amount -> ' || ln_debit_amount
630: ||',ln_credit_amount -> ' || ln_credit_amount

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

634: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_deliveries.tax_id
635: ||', p_inv_organization_id -> ' || p_organization_id
636: ||', p_attribute1 i.e delivery_id -> ' || rec_cur_get_deliveries.delivery_id
637: ||', p_attribute2 i.e order_line_id -> ' || rec_cur_get_deliveries.order_line_id
638: ||', p_attribute_context -> ' || jai_constants.contxt_delivery
639: );
640:
641: record_debug_messages ('11 Before call to jai_cmn_rgm_recording_pkg.insert_vat_repository_entry');
642:

Line 652: pv_organization_type => jai_constants.orgn_type_io ,

648: jai_cmn_rgm_recording_pkg.insert_vat_repository_entry (
649: pn_repository_id => ln_repository_id ,
650: pn_regime_id => p_regime_id ,
651: pv_tax_type => rec_cur_get_deliveries.tax_type ,
652: pv_organization_type => jai_constants.orgn_type_io ,
653: pn_organization_id => p_organization_id ,
654: pn_location_id => p_location_id ,
655: pv_source => p_source ,
656: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery , */

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

652: pv_organization_type => jai_constants.orgn_type_io ,
653: pn_organization_id => p_organization_id ,
654: pn_location_id => p_location_id ,
655: pv_source => p_source ,
656: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery , */
657: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl , */
658: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id , */
659: pd_transaction_date => rec_cur_get_deliveries.creation_date ,
660: /* Date 14/06/2007 by sacsethi for bug 6072461

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

653: pn_organization_id => p_organization_id ,
654: pn_location_id => p_location_id ,
655: pv_source => p_source ,
656: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery , */
657: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl , */
658: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id , */
659: pd_transaction_date => rec_cur_get_deliveries.creation_date ,
660: /* Date 14/06/2007 by sacsethi for bug 6072461
661: pv_account_name => jai_constants.liability ,

Line 661: pv_account_name => jai_constants.liability ,

657: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl , */
658: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id , */
659: pd_transaction_date => rec_cur_get_deliveries.creation_date ,
660: /* Date 14/06/2007 by sacsethi for bug 6072461
661: pv_account_name => jai_constants.liability ,
662: pn_charge_account_id => ln_liab_acct_ccid ,
663: pn_balancing_account_id => ln_intliab_acct_ccid ,
664: Changes in account name , charge account id and balancing account id */
665: pv_account_name => lc_account_name ,

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

673: pn_batch_id => p_batch_id ,
674: pn_inv_organization_id => p_organization_id ,
675: pv_invoice_no => p_vat_invoice_no ,
676: pd_invoice_date => nvl(p_default_invoice_date,rec_cur_get_deliveries.creation_date) ,
677: pv_called_from => lv_called_from, /* Bug# 6012570 (5876390) jai_constants.vat_repo_call_from_om_ar , */
678: pv_process_flag => lv_process_flag ,
679: pv_process_message => lv_process_message ,
680: pv_attribute_context => lv_attribute_context, /* Bug# 6012570 (5876390) jai_constants.contxt_delivery , */
681: pv_attribute1 => rec_cur_get_deliveries.delivery_id ,

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

676: pd_invoice_date => nvl(p_default_invoice_date,rec_cur_get_deliveries.creation_date) ,
677: pv_called_from => lv_called_from, /* Bug# 6012570 (5876390) jai_constants.vat_repo_call_from_om_ar , */
678: pv_process_flag => lv_process_flag ,
679: pv_process_message => lv_process_message ,
680: pv_attribute_context => lv_attribute_context, /* Bug# 6012570 (5876390) jai_constants.contxt_delivery , */
681: pv_attribute1 => rec_cur_get_deliveries.delivery_id ,
682: pv_attribute2 => rec_cur_get_deliveries.order_line_id ,
683: pv_attribute3 => NULL ,
684: pv_attribute4 => NULL ,

Line 696: IF lv_process_flag = jai_constants.expected_error OR

692: ||', lv_process_message:'||lv_process_message
693: );
694: end if;
695:
696: IF lv_process_flag = jai_constants.expected_error OR
697: lv_process_flag = jai_constants.unexpected_error
698: THEN
699: /*
700: || As Returned status is an error hence:-

Line 697: lv_process_flag = jai_constants.unexpected_error

693: );
694: end if;
695:
696: IF lv_process_flag = jai_constants.expected_error OR
697: lv_process_flag = jai_constants.unexpected_error
698: THEN
699: /*
700: || As Returned status is an error hence:-
701: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

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

727: ||', p_organization_id -> ' || p_organization_id
728: ||', p_location_id -> ' || p_location_id
729: ||', vat_exemption_flag -> ' || rec_cur_get_deliveries.vat_exemption_flag
730: ||', pn_assessable_value ->' || rec_cur_get_deliveries.vat_assessable_value
731: ||', account_name -> ' || jai_constants.liability
732: ||', p_charge_account_id-> ' || ln_liab_acct_ccid
733: ||', p_balancing_account_id-> ' || ln_intliab_acct_ccid
734: ||', ln_debit_amount -> ' || ln_debit_amount
735: ||', ln_credit_amount -> ' || ln_credit_amount

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

740: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_deliveries.tax_id
741: ||', p_inv_organization_id -> ' || p_organization_id
742: ||', p_attribute1 i.e delivery_id -> ' || rec_cur_get_deliveries.delivery_id
743: ||', p_attribute2 i.e order_line_id -> ' || rec_cur_get_deliveries.order_line_id
744: ||', p_attribute_context -> ' || jai_constants.contxt_delivery
745: );
746:
747:
748: if jai_pa_billing_pkg.gv_debug then

Line 755: pv_organization_type => jai_constants.orgn_type_io ,

751:
752: jai_cmn_rgm_recording_pkg.do_vat_accounting (
753: pn_regime_id => p_regime_id ,
754: pn_repository_id => ln_repository_id ,
755: pv_organization_type => jai_constants.orgn_type_io ,
756: pn_organization_id => p_organization_id ,
757: /*Check with support whether this should be transaction date or sysdate */
758: pd_accounting_date => nvl(p_default_invoice_date,rec_cur_get_deliveries.creation_date) ,
759: pd_transaction_date => rec_cur_get_deliveries.creation_date ,

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

765: */ pn_credit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
766: pn_debit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
767: pn_credit_ccid => ln_charge_ac_id ,
768: pn_debit_ccid => ln_balancing_ac_id ,
769: pv_called_from => lv_called_from, /* Bug# 6012570 (5876390) jai_constants.vat_repo_call_from_om_ar , */
770: pv_process_flag => lv_process_flag ,
771: pv_process_message => lv_process_message ,
772: pv_tax_type => rec_cur_get_deliveries.tax_type ,
773: pv_source => p_source ,

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

770: pv_process_flag => lv_process_flag ,
771: pv_process_message => lv_process_message ,
772: pv_tax_type => rec_cur_get_deliveries.tax_type ,
773: pv_source => p_source ,
774: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery ,*/
775: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl ,*/
776: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id ,*/
777: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/'JA_IN_TAX_CODES' ,
778: pn_reference_id => rec_cur_get_deliveries.tax_id

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

771: pv_process_message => lv_process_message ,
772: pv_tax_type => rec_cur_get_deliveries.tax_type ,
773: pv_source => p_source ,
774: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery ,*/
775: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl ,*/
776: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id ,*/
777: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/'JA_IN_TAX_CODES' ,
778: pn_reference_id => rec_cur_get_deliveries.tax_id
779: );

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

773: pv_source => p_source ,
774: pv_source_trx_type => lv_source_trx_type, /* Bug# 6012570 (5876390) jai_constants.source_ttype_delivery ,*/
775: pv_source_table_name => lv_source_table_name, /* Bug# 6012570 (5876390) jai_constants.tname_dlry_dtl ,*/
776: pn_source_id => ln_source_id, /* Bug# 6012570 (5876390) rec_cur_get_deliveries.delivery_detail_id ,*/
777: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/'JA_IN_TAX_CODES' ,
778: pn_reference_id => rec_cur_get_deliveries.tax_id
779: );
780:
781: if jai_pa_billing_pkg.gv_debug then

Line 789: IF lv_process_flag = jai_constants.expected_error OR

785: );
786: end if;
787:
788:
789: IF lv_process_flag = jai_constants.expected_error OR
790: lv_process_flag = jai_constants.unexpected_error
791: THEN
792: /*
793: || As Returned status is an error hence:-

Line 790: lv_process_flag = jai_constants.unexpected_error

786: end if;
787:
788:
789: IF lv_process_flag = jai_constants.expected_error OR
790: lv_process_flag = jai_constants.unexpected_error
791: THEN
792: /*
793: || As Returned status is an error hence:-
794: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

Line 818: --jai_constants.source_intxfer

814: END LOOP;
815:
816: /*added by rchandan for bug#6030615*/
817: ELSIF p_source='INTERORG_XFER' THEN
818: --jai_constants.source_intxfer
819: /*
820: || Process Interorg Transfers - INV side processing
821: */
822: ln_rgm_cnt := 0;

Line 851: p_organization_type => jai_constants.orgn_type_io ,

847: ||for the "RECOVERY ACCOUNT"
848: *******************************/
849: ln_recov_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
850: p_regime_id => p_regime_id ,
851: p_organization_type => jai_constants.orgn_type_io ,
852: p_organization_id => p_organization_id ,
853: p_location_id => p_location_id ,
854: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
855: p_account_name => jai_constants.recovery

Line 855: p_account_name => jai_constants.recovery

851: p_organization_type => jai_constants.orgn_type_io ,
852: p_organization_id => p_organization_id ,
853: p_location_id => p_location_id ,
854: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
855: p_account_name => jai_constants.recovery
856: ) ;
857: /*******************************
858: || Get the code combination id
859: || for the "EXPENSE ACCOUNT"

Line 863: p_organization_type => jai_constants.orgn_type_io ,

859: || for the "EXPENSE ACCOUNT"
860: *******************************/
861: ln_expense_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
862: p_regime_id => p_regime_id ,
863: p_organization_type => jai_constants.orgn_type_io ,
864: p_organization_id => p_organization_id ,
865: p_location_id => p_location_id ,
866: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
867: p_account_name => jai_constants.expense

Line 867: p_account_name => jai_constants.expense

863: p_organization_type => jai_constants.orgn_type_io ,
864: p_organization_id => p_organization_id ,
865: p_location_id => p_location_id ,
866: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
867: p_account_name => jai_constants.expense
868: ) ;
869: lc_account_name := jai_constants.recovery;
870: ln_charge_ac_id := ln_recov_acct_ccid;
871: ln_balancing_ac_id := ln_expense_acct_ccid;

Line 869: lc_account_name := jai_constants.recovery;

865: p_location_id => p_location_id ,
866: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
867: p_account_name => jai_constants.expense
868: ) ;
869: lc_account_name := jai_constants.recovery;
870: ln_charge_ac_id := ln_recov_acct_ccid;
871: ln_balancing_ac_id := ln_expense_acct_ccid;
872: ln_credit_amount := rec_cur_get_mtl_txns.tax_amt;
873: IF ln_charge_ac_id IS NULL OR

Line 877: p_process_flag := jai_constants.expected_error;

873: IF ln_charge_ac_id IS NULL OR
874: ln_balancing_ac_id IS NULL
875: THEN
876: record_debug_messages('9 VAT delivery accounting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT Reversal');
877: p_process_flag := jai_constants.expected_error;
878: p_process_message := 'VAT delivery accounting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT reversal';
879: return;
880: END IF;
881: ELSE

Line 888: p_organization_type => jai_constants.orgn_type_io ,

884: ||for the "LIABILITY ACCOUNT"
885: *******************************/
886: ln_liab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
887: p_regime_id => p_regime_id ,
888: p_organization_type => jai_constants.orgn_type_io ,
889: p_organization_id => p_organization_id ,
890: p_location_id => p_location_id ,
891: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
892: p_account_name => jai_constants.liability

Line 892: p_account_name => jai_constants.liability

888: p_organization_type => jai_constants.orgn_type_io ,
889: p_organization_id => p_organization_id ,
890: p_location_id => p_location_id ,
891: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
892: p_account_name => jai_constants.liability
893: ) ;
894: /*******************************
895: || Get the code combination id
896: || for the "INTERIM LIABILITY ACCOUNT"

Line 900: p_organization_type => jai_constants.orgn_type_io ,

896: || for the "INTERIM LIABILITY ACCOUNT"
897: *******************************/
898: ln_intliab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
899: p_regime_id => p_regime_id ,
900: p_organization_type => jai_constants.orgn_type_io ,
901: p_organization_id => p_organization_id ,
902: p_location_id => p_location_id ,
903: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
904: p_account_name => jai_constants.liability_interim

Line 904: p_account_name => jai_constants.liability_interim

900: p_organization_type => jai_constants.orgn_type_io ,
901: p_organization_id => p_organization_id ,
902: p_location_id => p_location_id ,
903: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
904: p_account_name => jai_constants.liability_interim
905: ) ;
906: lc_account_name := jai_constants.liability;
907: ln_charge_ac_id := ln_liab_acct_ccid;
908: ln_balancing_ac_id := ln_intliab_acct_ccid;

Line 906: lc_account_name := jai_constants.liability;

902: p_location_id => p_location_id ,
903: p_tax_type => rec_cur_get_mtl_txns.tax_type ,
904: p_account_name => jai_constants.liability_interim
905: ) ;
906: lc_account_name := jai_constants.liability;
907: ln_charge_ac_id := ln_liab_acct_ccid;
908: ln_balancing_ac_id := ln_intliab_acct_ccid;
909: ln_debit_amount := rec_cur_get_mtl_txns.tax_amt;
910: IF ln_charge_ac_id IS NULL OR

Line 914: p_process_flag := jai_constants.expected_error;

910: IF ln_charge_ac_id IS NULL OR
911: ln_balancing_ac_id IS NULL
912: THEN
913: 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');
914: p_process_flag := jai_constants.expected_error;
915: 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';
916: return;
917: END IF;
918: END IF;

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

934: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_mtl_txns.tax_id
935: ||', p_inv_organization_id -> ' || p_organization_id
936: ||', p_attribute1 i.e delivery_id -> ' || rec_cur_get_mtl_txns.transaction_header_id
937: ||', p_attribute2 i.e order_line_id -> ' || null
938: ||', p_attribute_context -> ' || jai_constants.contxt_delivery
939: );
940: record_debug_messages ('11 Before call to jai_cmn_rgm_recording_pkg.insert_repository_entry');
941: jai_cmn_rgm_recording_pkg.insert_vat_repository_entry (
942: pn_repository_id => ln_repository_id ,

Line 945: pv_organization_type => jai_constants.orgn_type_io ,

941: jai_cmn_rgm_recording_pkg.insert_vat_repository_entry (
942: pn_repository_id => ln_repository_id ,
943: pn_regime_id => p_regime_id ,
944: pv_tax_type => rec_cur_get_mtl_txns.tax_type ,
945: pv_organization_type => jai_constants.orgn_type_io ,
946: pn_organization_id => p_organization_id ,
947: pn_location_id => p_location_id ,
948: pv_source => p_source ,
949: pv_source_trx_type => jai_constants.source_ttype_delivery ,

Line 949: pv_source_trx_type => jai_constants.source_ttype_delivery ,

945: pv_organization_type => jai_constants.orgn_type_io ,
946: pn_organization_id => p_organization_id ,
947: pn_location_id => p_location_id ,
948: pv_source => p_source ,
949: pv_source_trx_type => jai_constants.source_ttype_delivery ,
950: pv_source_table_name => jai_constants.tname_dlry_dtl ,
951: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
952: pd_transaction_date => rec_cur_get_mtl_txns.creation_date ,
953: pv_account_name => lc_account_name ,

Line 950: pv_source_table_name => jai_constants.tname_dlry_dtl ,

946: pn_organization_id => p_organization_id ,
947: pn_location_id => p_location_id ,
948: pv_source => p_source ,
949: pv_source_trx_type => jai_constants.source_ttype_delivery ,
950: pv_source_table_name => jai_constants.tname_dlry_dtl ,
951: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
952: pd_transaction_date => rec_cur_get_mtl_txns.creation_date ,
953: pv_account_name => lc_account_name ,
954: pn_charge_account_id => ln_charge_ac_id ,

Line 965: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,

961: pn_batch_id => p_batch_id ,
962: pn_inv_organization_id => p_organization_id ,
963: pv_invoice_no => p_vat_invoice_no ,
964: pd_invoice_date => nvl(p_default_invoice_date,rec_cur_get_mtl_txns.creation_date) ,
965: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
966: pv_process_flag => lv_process_flag ,
967: pv_process_message => lv_process_message ,
968: pv_attribute_context => jai_constants.contxt_delivery ,
969: pv_attribute1 => rec_cur_get_mtl_txns.transaction_header_id ,

Line 968: pv_attribute_context => jai_constants.contxt_delivery ,

964: pd_invoice_date => nvl(p_default_invoice_date,rec_cur_get_mtl_txns.creation_date) ,
965: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
966: pv_process_flag => lv_process_flag ,
967: pv_process_message => lv_process_message ,
968: pv_attribute_context => jai_constants.contxt_delivery ,
969: pv_attribute1 => rec_cur_get_mtl_txns.transaction_header_id ,
970: pv_attribute2 => NULL ,
971: pv_attribute3 => NULL ,
972: pv_attribute4 => NULL ,

Line 975: IF lv_process_flag = jai_constants.expected_error OR

971: pv_attribute3 => NULL ,
972: pv_attribute4 => NULL ,
973: pv_attribute5 => NULL
974: );
975: IF lv_process_flag = jai_constants.expected_error OR
976: lv_process_flag = jai_constants.unexpected_error
977: THEN
978: /*
979: || As Returned status is an error hence:-

Line 976: lv_process_flag = jai_constants.unexpected_error

972: pv_attribute4 => NULL ,
973: pv_attribute5 => NULL
974: );
975: IF lv_process_flag = jai_constants.expected_error OR
976: lv_process_flag = jai_constants.unexpected_error
977: THEN
978: /*
979: || As Returned status is an error hence:-
980: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

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

1012: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_mtl_txns.tax_id
1013: ||', p_inv_organization_id -> ' || p_organization_id
1014: ||', p_attribute1 i.e delivery_id -> ' || rec_cur_get_mtl_txns.transaction_header_id
1015: ||', p_attribute2 i.e order_line_id -> ' || null
1016: ||', p_attribute_context -> ' || jai_constants.contxt_delivery
1017: );
1018: /*commented by vasavi*/
1019: /*
1020: jai_cmn_rgm_recording_pkg.do_vat_accounting (

Line 1023: pv_organization_type => jai_constants.orgn_type_io ,

1019: /*
1020: jai_cmn_rgm_recording_pkg.do_vat_accounting (
1021: pn_regime_id => p_regime_id ,
1022: pn_repository_id => ln_repository_id ,
1023: pv_organization_type => jai_constants.orgn_type_io ,
1024: pn_organization_id => p_organization_id ,
1025: pd_accounting_date => nvl(p_default_invoice_date,rec_cur_get_mtl_txns.creation_date) ,
1026: pd_transaction_date => rec_cur_get_mtl_txns.creation_date ,
1027: pn_credit_amount => nvl(ln_debit_amount,ln_credit_amount) ,

Line 1031: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,

1027: pn_credit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
1028: pn_debit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
1029: pn_credit_ccid => ln_charge_ac_id ,
1030: pn_debit_ccid => ln_balancing_ac_id ,
1031: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
1032: pv_process_flag => lv_process_flag ,
1033: pv_process_message => lv_process_message ,
1034: pv_tax_type => rec_cur_get_mtl_txns.tax_type ,
1035: pv_source => p_source ,

Line 1036: pv_source_trx_type => jai_constants.source_ttype_delivery ,

1032: pv_process_flag => lv_process_flag ,
1033: pv_process_message => lv_process_message ,
1034: pv_tax_type => rec_cur_get_mtl_txns.tax_type ,
1035: pv_source => p_source ,
1036: pv_source_trx_type => jai_constants.source_ttype_delivery ,
1037: pv_source_table_name => jai_constants.tname_dlry_dtl ,
1038: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
1039: pv_reference_name => 'JA_IN_TAX_CODES' ,
1040: pn_reference_id => rec_cur_get_mtl_txns.tax_id

Line 1037: pv_source_table_name => jai_constants.tname_dlry_dtl ,

1033: pv_process_message => lv_process_message ,
1034: pv_tax_type => rec_cur_get_mtl_txns.tax_type ,
1035: pv_source => p_source ,
1036: pv_source_trx_type => jai_constants.source_ttype_delivery ,
1037: pv_source_table_name => jai_constants.tname_dlry_dtl ,
1038: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
1039: pv_reference_name => 'JA_IN_TAX_CODES' ,
1040: pn_reference_id => rec_cur_get_mtl_txns.tax_id
1041: );

Line 1042: IF lv_process_flag = jai_constants.expected_error OR

1038: pn_source_id => rec_cur_get_mtl_txns.transaction_temp_id ,
1039: pv_reference_name => 'JA_IN_TAX_CODES' ,
1040: pn_reference_id => rec_cur_get_mtl_txns.tax_id
1041: );
1042: IF lv_process_flag = jai_constants.expected_error OR
1043: lv_process_flag = jai_constants.unexpected_error
1044: THEN
1045: record_debug_messages(' 15 Error in call to jai_cmn_rgm_recording_pkg.do_vat_accounting - lv_process_flag '||lv_process_flag
1046: ||', lv_process_message' || lv_process_message

Line 1043: lv_process_flag = jai_constants.unexpected_error

1039: pv_reference_name => 'JA_IN_TAX_CODES' ,
1040: pn_reference_id => rec_cur_get_mtl_txns.tax_id
1041: );
1042: IF lv_process_flag = jai_constants.expected_error OR
1043: lv_process_flag = jai_constants.unexpected_error
1044: THEN
1045: record_debug_messages(' 15 Error in call to jai_cmn_rgm_recording_pkg.do_vat_accounting - lv_process_flag '||lv_process_flag
1046: ||', lv_process_message' || lv_process_message
1047: ||', Delivery id - ' || rec_cur_get_mtl_txns.transaction_header_id

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

1059: */
1060: end if;---ln_rgm_cnt if
1061: END LOOP;
1062:
1063: ELSIF upper(p_source) = upper(jai_constants.source_ar) THEN
1064:
1065: record_debug_messages ('17 Manual AR processing for customer_trx_id -> '||p_customer_trx_id);
1066: /*
1067: || Process Invoices - AR side processing

Line 1072: 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)

1068: */
1069: /* Bug 5739005. Added by vkantamn
1070: * Included parameters for the cursor.
1071: */
1072: 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)
1073: LOOP
1074: record_debug_messages (' ************18 PROCESSING customer_trx_id -> '|| p_customer_trx_id
1075: ||'link_to_cust_trx_line_id -> '||rec_cur_get_man_ar_inv_taxes.link_to_cust_trx_line_id
1076: ||'customer_trx_line_id ->'||rec_cur_get_man_ar_inv_taxes.customer_trx_line_id

Line 1105: p_organization_type => jai_constants.orgn_type_io ,

1101: ||for the "RECOVERY ACCOUNT"
1102: *******************************/
1103: ln_recov_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1104: p_regime_id => p_regime_id ,
1105: p_organization_type => jai_constants.orgn_type_io ,
1106: p_organization_id => p_organization_id ,
1107: p_location_id => p_location_id ,
1108: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type,
1109: p_account_name => jai_constants.recovery

Line 1109: p_account_name => jai_constants.recovery

1105: p_organization_type => jai_constants.orgn_type_io ,
1106: p_organization_id => p_organization_id ,
1107: p_location_id => p_location_id ,
1108: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type,
1109: p_account_name => jai_constants.recovery
1110: ) ;
1111:
1112: /*******************************
1113: || Get the code combination id

Line 1118: p_organization_type => jai_constants.orgn_type_io ,

1114: || for the "EXPENSE ACCOUNT"
1115: *******************************/
1116: ln_expense_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1117: p_regime_id => p_regime_id ,
1118: p_organization_type => jai_constants.orgn_type_io ,
1119: p_organization_id => p_organization_id ,
1120: p_location_id => p_location_id ,
1121: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type,
1122: p_account_name => jai_constants.expense

Line 1122: p_account_name => jai_constants.expense

1118: p_organization_type => jai_constants.orgn_type_io ,
1119: p_organization_id => p_organization_id ,
1120: p_location_id => p_location_id ,
1121: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type,
1122: p_account_name => jai_constants.expense
1123: ) ;
1124: IF ln_recov_acct_ccid IS NULL OR
1125: ln_expense_acct_ccid IS NULL
1126: THEN

Line 1128: p_process_flag := jai_constants.expected_error;

1124: IF ln_recov_acct_ccid IS NULL OR
1125: ln_expense_acct_ccid IS NULL
1126: THEN
1127: record_debug_messages('20 VAT receivables accouting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT Reversal');
1128: p_process_flag := jai_constants.expected_error;
1129: p_process_message := 'VAT receivables accouting entries cannot be passed. Please set up the Recovery account and the Expense account for VAT Reversal';
1130: return;
1131: END IF;
1132: /* End - sacsethi, Added w.r.t BUG#6072461 ( for VAT Reversal)*/

Line 1141: p_organization_type => jai_constants.orgn_type_io ,

1137: ||for the "LIABILITY ACCOUNT"
1138: *******************************/
1139: ln_liab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1140: p_regime_id => p_regime_id ,
1141: p_organization_type => jai_constants.orgn_type_io ,
1142: p_organization_id => p_organization_id ,
1143: p_location_id => p_location_id ,
1144: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1145: p_account_name => jai_constants.liability

Line 1145: p_account_name => jai_constants.liability

1141: p_organization_type => jai_constants.orgn_type_io ,
1142: p_organization_id => p_organization_id ,
1143: p_location_id => p_location_id ,
1144: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1145: p_account_name => jai_constants.liability
1146: ) ;
1147:
1148: /*******************************
1149: || Get the code combination id

Line 1154: p_organization_type => jai_constants.orgn_type_io ,

1150: || for the "INTERIM LIABILITY ACCOUNT"
1151: *******************************/
1152: ln_intliab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
1153: p_regime_id => p_regime_id ,
1154: p_organization_type => jai_constants.orgn_type_io ,
1155: p_organization_id => p_organization_id ,
1156: p_location_id => p_location_id ,
1157: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1158: p_account_name => jai_constants.liability_interim

Line 1158: p_account_name => jai_constants.liability_interim

1154: p_organization_type => jai_constants.orgn_type_io ,
1155: p_organization_id => p_organization_id ,
1156: p_location_id => p_location_id ,
1157: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1158: p_account_name => jai_constants.liability_interim
1159: ) ;
1160:
1161:
1162: /*

Line 1169: p_process_flag := jai_constants.expected_error;

1165: IF ln_liab_acct_ccid IS NULL OR
1166: ln_intliab_acct_ccid IS NULL
1167: THEN
1168: 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');
1169: p_process_flag := jai_constants.expected_error;
1170: 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';
1171: return;
1172: END IF;
1173: END IF;

Line 1197: lc_account_name := jai_constants.recovery ;

1193:
1194: IF p_transaction_type IN ('INV','DM') THEN
1195: /* Start - sacsethi, Added w.r.t 6072461 ( for VAT Reversal)*/
1196: IF ( rec_cur_get_man_ar_inv_taxes.tax_type = 'VAT REVERSAL' ) THEN
1197: lc_account_name := jai_constants.recovery ;
1198: ln_charge_ac_id := ln_recov_acct_ccid ;
1199: ln_balancing_ac_id := ln_expense_acct_ccid ;
1200: ln_debit_amount := null ;
1201: ln_credit_amount := abs(rec_cur_get_man_ar_inv_taxes.func_tax_amount) ;

Line 1203: lc_account_name := jai_constants.liability ;

1199: ln_balancing_ac_id := ln_expense_acct_ccid ;
1200: ln_debit_amount := null ;
1201: ln_credit_amount := abs(rec_cur_get_man_ar_inv_taxes.func_tax_amount) ;
1202: ELSE
1203: lc_account_name := jai_constants.liability ;
1204: /* End - sacsethi, Added w.r.t 6072461 ( for VAT Reversal)*/
1205: ln_charge_ac_id := ln_liab_acct_ccid ;
1206: ln_balancing_ac_id := ln_intliab_acct_ccid ;
1207: ln_debit_amount := abs(rec_cur_get_man_ar_inv_taxes.func_tax_amount) ;

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

1224: ||', p_organization_id -> ' || p_organization_id
1225: ||', p_location_id -> ' || p_location_id
1226: ||', vat_exemption_flag -> ' || rec_cur_get_man_ar_inv_taxes.vat_exemption_flag
1227: ||', pn_assessable_value ->' || rec_cur_get_man_ar_inv_taxes.vat_assessable_value
1228: ||', account_name -> ' || jai_constants.liability
1229: ||', p_charge_account_id-> ' || ln_charge_ac_id
1230: ||', p_balancing_account_id-> ' || ln_balancing_ac_id
1231: ||', ln_debit_amount -> ' || ln_debit_amount
1232: ||', ln_credit_amount -> ' || ln_credit_amount

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

1236: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_man_ar_inv_taxes.tax_id
1237: ||', p_inv_organization_id -> ' || p_organization_id
1238: ||', p_attribute1 i.e customer_trx_id -> ' || rec_cur_get_man_ar_inv_taxes.customer_trx_id
1239: ||', p_attribute2 i.e link_to_cust_trx_line_id -> ' || rec_cur_get_man_ar_inv_taxes.link_to_cust_trx_line_id
1240: ||', p_attribute_context -> ' || jai_constants.contxt_manual_ar
1241: );
1242:
1243:
1244: record_debug_messages ('22 Before call to jai_cmn_rgm_recording_pkg.insert_vat_repository_entry');

Line 1251: pv_organization_type => jai_constants.orgn_type_io ,

1247: jai_cmn_rgm_recording_pkg.insert_vat_repository_entry (
1248: pn_repository_id => ln_repository_id ,
1249: pn_regime_id => p_regime_id ,
1250: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1251: pv_organization_type => jai_constants.orgn_type_io ,
1252: pn_organization_id => p_organization_id ,
1253: pn_location_id => p_location_id ,
1254: pv_source => p_source ,
1255: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,

Line 1255: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,

1251: pv_organization_type => jai_constants.orgn_type_io ,
1252: pn_organization_id => p_organization_id ,
1253: pn_location_id => p_location_id ,
1254: pv_source => p_source ,
1255: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1256: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1257: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1258: pd_transaction_date => rec_cur_get_man_ar_inv_taxes.creation_date ,
1259: pv_account_name => lc_account_name , --Date 14/06/2007 by sacsethi for bug 6072461

Line 1256: pv_source_table_name => jai_constants.tname_cus_trx_lines ,

1252: pn_organization_id => p_organization_id ,
1253: pn_location_id => p_location_id ,
1254: pv_source => p_source ,
1255: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1256: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1257: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1258: pd_transaction_date => rec_cur_get_man_ar_inv_taxes.creation_date ,
1259: pv_account_name => lc_account_name , --Date 14/06/2007 by sacsethi for bug 6072461
1260: pn_charge_account_id => ln_charge_ac_id ,

Line 1271: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,

1267: pn_batch_id => p_batch_id ,
1268: pn_inv_organization_id => p_organization_id ,
1269: pv_invoice_no => p_vat_invoice_no ,
1270: pd_invoice_date => nvl(p_default_invoice_date,rec_cur_get_man_ar_inv_taxes.creation_date) ,
1271: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
1272: pv_process_flag => lv_process_flag ,
1273: pv_process_message => lv_process_message ,
1274: pv_attribute_context => jai_constants.contxt_manual_ar ,
1275: pv_attribute1 => rec_cur_get_man_ar_inv_taxes.customer_trx_id ,

Line 1274: pv_attribute_context => jai_constants.contxt_manual_ar ,

1270: pd_invoice_date => nvl(p_default_invoice_date,rec_cur_get_man_ar_inv_taxes.creation_date) ,
1271: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
1272: pv_process_flag => lv_process_flag ,
1273: pv_process_message => lv_process_message ,
1274: pv_attribute_context => jai_constants.contxt_manual_ar ,
1275: pv_attribute1 => rec_cur_get_man_ar_inv_taxes.customer_trx_id ,
1276: pv_attribute2 => rec_cur_get_man_ar_inv_taxes.link_to_cust_trx_line_id ,
1277: pv_attribute3 => NULL ,
1278: pv_attribute4 => NULL ,

Line 1284: IF lv_process_flag = jai_constants.expected_error OR

1280: );
1281:
1282:
1283:
1284: IF lv_process_flag = jai_constants.expected_error OR
1285: lv_process_flag = jai_constants.unexpected_error
1286: THEN
1287: /*
1288: || As Returned status is an error hence:-

Line 1285: lv_process_flag = jai_constants.unexpected_error

1281:
1282:
1283:
1284: IF lv_process_flag = jai_constants.expected_error OR
1285: lv_process_flag = jai_constants.unexpected_error
1286: THEN
1287: /*
1288: || As Returned status is an error hence:-
1289: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

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

1314: ||', p_organization_id -> ' || p_organization_id
1315: ||', p_location_id -> ' || p_location_id
1316: ||', vat_exemption_flag -> ' || rec_cur_get_man_ar_inv_taxes.vat_exemption_flag
1317: ||', pn_assessable_value ->' || rec_cur_get_man_ar_inv_taxes.vat_assessable_value
1318: ||', account_name -> ' || jai_constants.liability
1319: ||', pn_credit_ccid-> ' || ln_charge_ac_id
1320: ||', pn_debit_ccid -> ' || ln_balancing_ac_id
1321: ||', ln_debit_amount -> ' || ln_debit_amount
1322: ||', ln_credit_amount -> ' || ln_credit_amount

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

1326: ||', p_reference_id i.e tax_id -> ' || rec_cur_get_man_ar_inv_taxes.tax_id
1327: ||', p_inv_organization_id -> ' || p_organization_id
1328: ||', p_attribute1 i.e customer_trx_id -> ' || rec_cur_get_man_ar_inv_taxes.customer_trx_id
1329: ||', p_attribute2 i.e link_to_cust_trx_line_id -> ' || rec_cur_get_man_ar_inv_taxes.link_to_cust_trx_line_id
1330: ||', p_attribute_context -> ' || jai_constants.contxt_manual_ar
1331: );
1332:
1333:
1334:

Line 1338: pv_organization_type => jai_constants.orgn_type_io ,

1334:
1335: jai_cmn_rgm_recording_pkg.do_vat_accounting (
1336: pn_regime_id => p_regime_id ,
1337: pn_repository_id => ln_repository_id ,
1338: pv_organization_type => jai_constants.orgn_type_io ,
1339: pn_organization_id => p_organization_id ,
1340: /*Check with support whether this should be transaction date or sysdate */
1341: pd_accounting_date => nvl(p_default_invoice_date,rec_cur_get_man_ar_inv_taxes.creation_date) ,
1342: pd_transaction_date => rec_cur_get_man_ar_inv_taxes.creation_date ,

Line 1347: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,

1343: pn_credit_amount => nvl(ln_credit_amount,ln_debit_amount) ,
1344: pn_debit_amount => nvl(ln_debit_amount,ln_credit_amount) ,
1345: pn_credit_ccid => ln_charge_ac_id ,
1346: pn_debit_ccid => ln_balancing_ac_id ,
1347: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
1348: pv_process_flag => lv_process_flag ,
1349: pv_process_message => lv_process_message ,
1350: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1351: pv_source => p_source ,

Line 1352: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,

1348: pv_process_flag => lv_process_flag ,
1349: pv_process_message => lv_process_message ,
1350: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1351: pv_source => p_source ,
1352: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1353: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1354: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1355: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/ 'JA_IN_TAX_CODES' ,
1356: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id

Line 1353: pv_source_table_name => jai_constants.tname_cus_trx_lines ,

1349: pv_process_message => lv_process_message ,
1350: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
1351: pv_source => p_source ,
1352: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1353: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1354: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1355: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/ 'JA_IN_TAX_CODES' ,
1356: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id
1357: );

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

1351: pv_source => p_source ,
1352: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
1353: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
1354: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
1355: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/ 'JA_IN_TAX_CODES' ,
1356: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id
1357: );
1358:
1359: IF lv_process_flag = jai_constants.expected_error OR

Line 1359: IF lv_process_flag = jai_constants.expected_error OR

1355: pv_reference_name => /*jai_constants.JAI_CMN_TAXES_ALL*/ 'JA_IN_TAX_CODES' ,
1356: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id
1357: );
1358:
1359: IF lv_process_flag = jai_constants.expected_error OR
1360: lv_process_flag = jai_constants.unexpected_error
1361: THEN
1362: /*
1363: || As Returned status is an error hence:-

Line 1360: lv_process_flag = jai_constants.unexpected_error

1356: pn_reference_id => rec_cur_get_man_ar_inv_taxes.tax_id
1357: );
1358:
1359: IF lv_process_flag = jai_constants.expected_error OR
1360: lv_process_flag = jai_constants.unexpected_error
1361: THEN
1362: /*
1363: || As Returned status is an error hence:-
1364: ||1. Delivery processing should be terminated,Rollback the insert and exit Loop

Line 1394: p_process_flag := jai_constants.unexpected_error ;

1390:
1391: EXCEPTION
1392: WHEN OTHERS THEN
1393: record_debug_messages (' 29 In Exception Section - SQLERRM ->'||substr(sqlerrm,1,300) );
1394: p_process_flag := jai_constants.unexpected_error ;
1395: p_process_message := 'Unexpeced error occured in procedure process_order_invoice for document_id -> '||nvl(p_delivery_id,p_customer_trx_id)||substr(SQLERRM,1,300);
1396:
1397: END process_order_invoice;
1398: