DBA Data[Home] [Help]

APPS.JAI_RGM_THHOLD_PROC_PKG dependencies on JAI_CONSTANTS

Line 215: where source_document_id = jai_constants.tcs_surcharge_id

211: ,tax_rate
212: from jai_rgm_taxes
213: where trx_ref_id = ( select max(trx_ref_id)
214: from jai_rgm_refs_all
215: where source_document_id = jai_constants.tcs_surcharge_id
216: and org_tan_no = cp_org_tan_no
217: and fin_year = cp_fin_year
218: and party_id = cp_party_id
219: and item_classification = cp_item_classification

Line 220: and party_type = jai_constants.party_type_customer

216: and org_tan_no = cp_org_tan_no
217: and fin_year = cp_fin_year
218: and party_id = cp_party_id
219: and item_classification = cp_item_classification
220: and party_type = jai_constants.party_type_customer
221: );
222:
223:
224: r_ref_dtls c_get_ref_dtls%rowtype;

Line 276: p_process_flag := jai_constants.successful;

272: and cat.precedence_1 = nvl(cp_line_no, cat.precedence_1); -- This will check that for CESS precedence should be of surcharge
273:
274: begin
275:
276: p_process_flag := jai_constants.successful;
277: p_process_message := null;
278:
279: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id,'Begin CALCULATE_TCS_DOC_AMOUNT');
280: jai_cmn_debug_contexts_pkg.print ( ln_reg_id

Line 308: open c_get_surcharge_taxes (cp_tax_type => jai_constants.tax_type_tcs_surcharge );

304: /*
305: Get details regarding surcharge type of tax attached to the category.
306: */
307: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close C_GET_SURCHARGE_TAXES'); */ --commented by bgowrava for bug#5631784
308: open c_get_surcharge_taxes (cp_tax_type => jai_constants.tax_type_tcs_surcharge );
309: fetch c_get_surcharge_taxes into ln_tax_rate
310: ,ln_rounding_factor
311: ,ln_surcharge_tax_id
312: ,ln_surcharge_line_no;

Line 316: p_process_flag := jai_constants.expected_error;

312: ,ln_surcharge_line_no;
313: close c_get_surcharge_taxes ;
314:
315: if ln_tax_rate is null then
316: p_process_flag := jai_constants.expected_error;
317: p_process_message := 'Cannot find surcharge type of taxes for tax_id ='||ln_tax_id||', tax_category_id='||p_threshold_tax_cat_id;
318: return;
319: end if;
320:

Line 379: open c_get_surcharge_taxes (cp_tax_type => jai_constants.tax_type_tcs_cess

375: /*
376: || Get tax details for CESS which is defined for Surcharge
377: */
378: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close C_GET_SURCHARGE_TAXES'); */ --commented by bgowrava for bug#5631784
379: open c_get_surcharge_taxes (cp_tax_type => jai_constants.tax_type_tcs_cess
380: ,cp_line_no => ln_surcharge_line_no
381: );
382: fetch c_get_surcharge_taxes into ln_tax_rate
383: ,ln_rounding_factor

Line 411: open c_get_surcharge_taxes (cp_tax_type => jai_constants.tax_type_sh_tcs_edu_cess

407:
408: ln_tax_rate := null;
409: ln_rounding_factor := null;
410:
411: open c_get_surcharge_taxes (cp_tax_type => jai_constants.tax_type_sh_tcs_edu_cess
412: ,cp_line_no => ln_surcharge_line_no
413: );
414: fetch c_get_surcharge_taxes into ln_tax_rate
415: ,ln_rounding_factor

Line 447: p_process_flag := jai_constants.successful;

443: Aim: Calculate Surcharge Amount and Generate a Consolidated Document
444: ------------------------------------------------------------------------*/
445:
446: /** Initialize process variables */
447: p_process_flag := jai_constants.successful;
448: p_process_message := null;
449:
450: /** Register procedure for debuging */
451: lv_member_name := 'GENERATE_CONSOLIDATED_DOC';

Line 500: if p_process_flag <> jai_constants.successful then

496:
497: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After: JAI_RGM_THHOLD_PROC_PKG.GET_THRESHOLD_TAX_CAT_ID');
498: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||', p_process_message='||p_process_message); */ --commented by bgowrava for bug#5631784
499:
500: if p_process_flag <> jai_constants.successful then
501: return;
502: end if;
503:
504: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'Before: CALCULATE_TCS_DOC_AMOUNT');*/ --commented by bgowrava for bug#5631784

Line 520: if p_process_flag <> jai_constants.successful then

516: );
517: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After: CALCULATE_TCS_DOC_AMOUNT');
518: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||', p_process_message='||p_process_message); */ --commented by bgowrava for bug#5631784
519:
520: if p_process_flag <> jai_constants.successful then
521: return;
522: end if;
523:
524: /*

Line 549: 'jai_constants.tcs_surcharge_id='||jai_constants.tcs_surcharge_id||chr(10)||

545: 'cp_org_tan_no= '||r_ref_dtls.org_tan_no||chr(10)||
546: 'cp_party_id = '||r_ref_dtls.party_id ||chr(10)||
547: 'cp_fin_year = '||r_ref_dtls.fin_year ||chr(10)||
548: 'cp_item_classification= '||r_ref_dtls.item_classification||chr(10)||
549: 'jai_constants.tcs_surcharge_id='||jai_constants.tcs_surcharge_id||chr(10)||
550: 'jai_constants.party_type_customer='||jai_constants.party_type_customer
551: ); */ --commented by bgowrava for bug#5631784
552:
553: for r_taxes_for_last_doc in c_get_taxes_for_last_doc

Line 550: 'jai_constants.party_type_customer='||jai_constants.party_type_customer

546: 'cp_party_id = '||r_ref_dtls.party_id ||chr(10)||
547: 'cp_fin_year = '||r_ref_dtls.fin_year ||chr(10)||
548: 'cp_item_classification= '||r_ref_dtls.item_classification||chr(10)||
549: 'jai_constants.tcs_surcharge_id='||jai_constants.tcs_surcharge_id||chr(10)||
550: 'jai_constants.party_type_customer='||jai_constants.party_type_customer
551: ); */ --commented by bgowrava for bug#5631784
552:
553: for r_taxes_for_last_doc in c_get_taxes_for_last_doc
554: ( cp_org_tan_no => r_ref_dtls.org_tan_no

Line 563: if r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_surcharge then

559: loop
560: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id
561: , 'Inside For: r_taxes_for_last_doc.tax_type='||r_taxes_for_last_doc.tax_type
562: ); */ --commented by bgowrava for bug#5631784
563: if r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_surcharge then
564: ln_surcharge_tax_id := r_taxes_for_last_doc.tax_id;
565: ln_surcharge_tax_rate := r_taxes_for_last_doc.tax_rate;
566: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_cess then
567: ln_surcharge_cess_tax_id := r_taxes_for_last_doc.tax_id;

Line 566: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_cess then

562: ); */ --commented by bgowrava for bug#5631784
563: if r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_surcharge then
564: ln_surcharge_tax_id := r_taxes_for_last_doc.tax_id;
565: ln_surcharge_tax_rate := r_taxes_for_last_doc.tax_rate;
566: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_cess then
567: ln_surcharge_cess_tax_id := r_taxes_for_last_doc.tax_id;
568: ln_surcharge_cess_tax_rate:= r_taxes_for_last_doc.tax_rate;
569: -- start Bgowrava for forward porting bug#5989740
570: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_sh_tcs_edu_cess then

Line 570: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_sh_tcs_edu_cess then

566: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_cess then
567: ln_surcharge_cess_tax_id := r_taxes_for_last_doc.tax_id;
568: ln_surcharge_cess_tax_rate:= r_taxes_for_last_doc.tax_rate;
569: -- start Bgowrava for forward porting bug#5989740
570: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_sh_tcs_edu_cess then
571: ln_surcharge_sh_cess_tax_id := r_taxes_for_last_doc.tax_id;
572: ln_surcharge_sh_cess_tax_rate:= r_taxes_for_last_doc.tax_rate;
573: -- end Bgowrava for forward porting bug#5989740
574: end if;

Line 578: p_process_flag := jai_constants.expected_error;

574: end if;
575: end loop;
576:
577: if ln_surcharge_tax_id is null or ln_surcharge_cess_tax_id is null or ln_surcharge_sh_cess_tax_id is null then --Bgowrava for forward porting bug#5989740
578: p_process_flag := jai_constants.expected_error;
579: p_process_message := 'Unable to find tax structure to generate a consolidated document, tax_id(SURCH)='||ln_surcharge_tax_id||', tax_id(CESS)='||ln_surcharge_cess_tax_id;
580: return;
581: end if;
582: end if; /* r_thhold_info.threshold_slab_id is null */

Line 603: , p_document_id => jai_constants.tcs_surcharge_id

599: , p_source_ref_document_id => r_ref_dtls.source_ref_document_id
600: , p_source_ref_document_type => r_ref_dtls.source_ref_document_type
601: , p_parent_transaction_id => r_ref_dtls.parent_transaction_id
602: , p_org_tan_no => r_ref_dtls.org_tan_no
603: , p_document_id => jai_constants.tcs_surcharge_id
604: , p_document_type => jai_constants.tcs_event_surcharge
605: , p_document_line_id => jai_constants.tcs_surcharge_id
606: , p_document_date => r_ref_dtls.source_document_date
607: , p_table_name => jai_constants.jai_rgm_thresholds

Line 604: , p_document_type => jai_constants.tcs_event_surcharge

600: , p_source_ref_document_type => r_ref_dtls.source_ref_document_type
601: , p_parent_transaction_id => r_ref_dtls.parent_transaction_id
602: , p_org_tan_no => r_ref_dtls.org_tan_no
603: , p_document_id => jai_constants.tcs_surcharge_id
604: , p_document_type => jai_constants.tcs_event_surcharge
605: , p_document_line_id => jai_constants.tcs_surcharge_id
606: , p_document_date => r_ref_dtls.source_document_date
607: , p_table_name => jai_constants.jai_rgm_thresholds
608: , p_line_amount => (ln_surcharge_doc_amt + ln_surcharge_doc_cess_amt + ln_surcharge_doc_sh_cess_amt) --Bgowrava for forward porting bug#5989740

Line 605: , p_document_line_id => jai_constants.tcs_surcharge_id

601: , p_parent_transaction_id => r_ref_dtls.parent_transaction_id
602: , p_org_tan_no => r_ref_dtls.org_tan_no
603: , p_document_id => jai_constants.tcs_surcharge_id
604: , p_document_type => jai_constants.tcs_event_surcharge
605: , p_document_line_id => jai_constants.tcs_surcharge_id
606: , p_document_date => r_ref_dtls.source_document_date
607: , p_table_name => jai_constants.jai_rgm_thresholds
608: , p_line_amount => (ln_surcharge_doc_amt + ln_surcharge_doc_cess_amt + ln_surcharge_doc_sh_cess_amt) --Bgowrava for forward porting bug#5989740
609: , p_document_amount => (ln_surcharge_doc_amt + ln_surcharge_doc_cess_amt + ln_surcharge_doc_sh_cess_amt) --Bgowrava for forward porting bug#5989740

Line 607: , p_table_name => jai_constants.jai_rgm_thresholds

603: , p_document_id => jai_constants.tcs_surcharge_id
604: , p_document_type => jai_constants.tcs_event_surcharge
605: , p_document_line_id => jai_constants.tcs_surcharge_id
606: , p_document_date => r_ref_dtls.source_document_date
607: , p_table_name => jai_constants.jai_rgm_thresholds
608: , p_line_amount => (ln_surcharge_doc_amt + ln_surcharge_doc_cess_amt + ln_surcharge_doc_sh_cess_amt) --Bgowrava for forward porting bug#5989740
609: , p_document_amount => (ln_surcharge_doc_amt + ln_surcharge_doc_cess_amt + ln_surcharge_doc_sh_cess_amt) --Bgowrava for forward porting bug#5989740
610: , p_org_id => r_ref_dtls.org_id
611: , p_organization_id => r_ref_dtls.organization_id

Line 622: if p_process_flag <> jai_constants.successful then

618: );
619: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After: JAI_AR_TCS_REP_PKG.INSERT_REPOSITORY_REFERENCES',jai_cmn_debug_contexts_pkg.summary);
620: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||', p_process_message='||p_process_message,jai_cmn_debug_contexts_pkg.summary);*/ --commented by bgowrava for bug#5631784
621:
622: if p_process_flag <> jai_constants.successful then
623: return;
624: end if;
625:
626: open c_curr_code (cp_org_id => r_ref_dtls.org_id);

Line 642: , p_tax_type => jai_constants.tax_type_tcs_surcharge

638: jai_ar_tcs_rep_pkg.insert_repository_taxes
639: (
640: p_trx_ref_id => ln_trx_ref_id
641: , p_tax_id => ln_surcharge_tax_id
642: , p_tax_type => jai_constants.tax_type_tcs_surcharge
643: , p_tax_rate => ln_surcharge_tax_rate
644: , p_tax_amount => ln_surcharge_doc_amt
645: , p_func_tax_amount => ln_surcharge_doc_amt /* Functional currency is same as trx currency */
646: , p_currency_code => ln_currency_code

Line 653: if p_process_flag <> jai_constants.successful then

649: );
650: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After Surcharge Tax: JAI_AR_TCS_REP_PKG.INSERT_REPOSITORY_TAXES',jai_cmn_debug_contexts_pkg.summary);
651: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||', p_process_message='||p_process_message,jai_cmn_debug_contexts_pkg.summary);*/ --commented by bgowrava for bug#5631784
652:
653: if p_process_flag <> jai_constants.successful then
654: return;
655: end if;
656:
657: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'Before Surcharge Cess : JAI_AR_TCS_REP_PKG.INSERT_REPOSITORY_TAXES',jai_cmn_debug_contexts_pkg.summary);*/ --commented by bgowrava for bug#5631784

Line 663: , p_tax_type => jai_constants.tax_type_tcs_cess

659: jai_ar_tcs_rep_pkg.insert_repository_taxes
660: (
661: p_trx_ref_id => ln_trx_ref_id
662: , p_tax_id => ln_surcharge_cess_tax_id
663: , p_tax_type => jai_constants.tax_type_tcs_cess
664: , p_tax_rate => ln_surcharge_cess_tax_rate
665: , p_tax_amount => ln_surcharge_doc_cess_amt
666: , p_func_tax_amount => ln_surcharge_doc_cess_amt /* Functional currency is same as trx currency */
667: , p_currency_code => ln_currency_code

Line 674: if p_process_flag <> jai_constants.successful then

670: );
671: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After Surcharge Cess : JAI_AR_TCS_REP_PKG.INSERT_REPOSITORY_TAXES',jai_cmn_debug_contexts_pkg.summary);
672: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||', p_process_message='||p_process_message,jai_cmn_debug_contexts_pkg.summary);*/ --commented by bgowrava for bug#5631784
673:
674: if p_process_flag <> jai_constants.successful then
675: return;
676: end if;
677:
678: -- start Bgowrava for forward porting bug#5989740

Line 686: , p_tax_type => jai_constants.tax_type_sh_tcs_edu_cess

682: jai_ar_tcs_rep_pkg.insert_repository_taxes
683: (
684: p_trx_ref_id => ln_trx_ref_id
685: , p_tax_id => ln_surcharge_cess_tax_id
686: , p_tax_type => jai_constants.tax_type_sh_tcs_edu_cess
687: , p_tax_rate => ln_surcharge_cess_tax_rate
688: , p_tax_amount => ln_surcharge_doc_sh_cess_amt
689: , p_func_tax_amount => ln_surcharge_doc_sh_cess_amt /* Functional currency is same as trx currency */
690: , p_currency_code => ln_currency_code

Line 697: if p_process_flag <> jai_constants.successful then

693: );
694: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After Surcharge Cess : JAI_AR_TCS_REP_PKG.INSERT_REPOSITORY_TAXES',jai_cmn_debug_contexts_pkg.summary);
695: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||', p_process_message='||p_process_message,jai_cmn_debug_contexts_pkg.summary);
696:
697: if p_process_flag <> jai_constants.successful then
698: return;
699: end if;
700:
701: -- end Bgowrava for forward porting bug#5989740

Line 723: if p_process_flag <> jai_constants.successful then

719: );
720: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After : JAI_AR_TCS_REP_PKG.GENERATE_DOCUMENT',jai_cmn_debug_contexts_pkg.summary);
721: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||', p_process_message='||p_process_message,jai_cmn_debug_contexts_pkg.summary);*/ --commented by bgowrava for bug#5631784
722:
723: if p_process_flag <> jai_constants.successful then
724: return;
725: end if;
726:
727:

Line 751: p_process_flag := jai_constants.unexpected_error;

747: /* jai_cmn_debug_contexts_pkg.deregister (pn_reg_id => ln_reg_id); */ --commented by bgowrava for bug#5631784
748: return;
749: exception
750: when others then
751: p_process_flag := jai_constants.unexpected_error;
752: p_process_message := lv_context||'->'||sqlerrm;
753: /* jai_cmn_debug_contexts_pkg.print(ln_reg_id,lv_context||'->'||sqlerrm,jai_cmn_debug_contexts_pkg.summary);
754: jai_cmn_debug_contexts_pkg.print_stack;*/ -- */ --commented by bgowrava for bug#5631784
755:

Line 841: and thtyps.threshold_type = jai_constants.thhold_typ_cumulative

837: where
838: thslbs.threshold_type_id = thtyps.threshold_type_id
839: and thtyps.threshold_hdr_id = thhdrs.threshold_hdr_id
840: and thhdrs.regime_id = rgmths.regime_id
841: and thtyps.threshold_type = jai_constants.thhold_typ_cumulative
842: and rgmths.fin_year = cp_fin_year
843: and rgmths.party_id = cp_party_id
844: and rgmths.org_tan_no = cp_org_tan_no
845: and rgmths.party_type = cp_party_type

Line 880: p_process_flag := jai_constants.successful ;--'SS';

876:
877:
878: begin
879: /** Initialize process variables */
880: p_process_flag := jai_constants.successful ;--'SS';
881: p_process_message := null;
882: p_threshold_slab_id := null;
883:
884:

Line 909: , cp_attribute_type_code => jai_constants.rgm_attr_type_code_primary /* PRIMARY */

905: if p_org_tan_no is null then
906: if p_organization_id is not null then
907: /** Get org_tan_no using inventory organization from regime setup */
908: open c_get_rgm_attribute ( cp_regime_id => p_regime_id
909: , cp_attribute_type_code => jai_constants.rgm_attr_type_code_primary /* PRIMARY */
910: , cp_attribute_code => jai_constants.rgm_attr_code_org_tan /*ORG_TAN_NUM */
911: , cp_organization_id => p_organization_id
912: );
913: fetch c_get_rgm_attribute into ln_org_tan_no;

Line 910: , cp_attribute_code => jai_constants.rgm_attr_code_org_tan /*ORG_TAN_NUM */

906: if p_organization_id is not null then
907: /** Get org_tan_no using inventory organization from regime setup */
908: open c_get_rgm_attribute ( cp_regime_id => p_regime_id
909: , cp_attribute_type_code => jai_constants.rgm_attr_type_code_primary /* PRIMARY */
910: , cp_attribute_code => jai_constants.rgm_attr_code_org_tan /*ORG_TAN_NUM */
911: , cp_organization_id => p_organization_id
912: );
913: fetch c_get_rgm_attribute into ln_org_tan_no;
914: close c_get_rgm_attribute;

Line 917: p_process_flag := jai_constants.expected_error;

913: fetch c_get_rgm_attribute into ln_org_tan_no;
914: close c_get_rgm_attribute;
915: else
916: /** Both org_tan_no and organization_id are null */
917: p_process_flag := jai_constants.expected_error;
918: p_process_message := 'P_ORG_TAN_NO and P_ORGANIZATION_ID both cannot be null';
919: return;
920: end if;
921: else

Line 928: p_process_flag := jai_constants.expected_error;

924: end if;
925:
926: /** Assumption: If org_tan_no is null cannot derrive threshold amount*/
927: if ln_org_tan_no is null then
928: p_process_flag := jai_constants.expected_error;
929: p_process_message := 'Unable to get mandatory attribute ORG_TAN_NUM using the arguments
930: || P_REGIME_ID='||p_regime_id
931: ||' P_ORGANIZATION_ID=' || p_organization_id;
932: return;

Line 950: p_process_flag := jai_constants.expected_error;

946: -- code ported from BL12.1.3 by zhiwei.xin on 15-MAR-2013 end.
947:
948: else
949: /** Both fin_year and org_id are null*/
950: p_process_flag := jai_constants.expected_error;
951: p_process_message := 'Both P_FIN_YEAR and P_ORG_ID cannot be null';
952: return;
953: end if;
954: else

Line 960: p_process_flag := jai_constants.expected_error;

956: end if;
957:
958: /** Assumption: If fin_year is null cannot a unique threshold hdr record */
959: if ln_fin_year is null then
960: p_process_flag := jai_constants.expected_error;
961: p_process_message := 'Unable to derive mandatory LN_FIN_YEAR using the given arguments'
962: ||' P_FIN_YEAR='||p_fin_year
963: ||' P_ORG_ID='||p_organization_id
964: ||' P_SOURCE_TRX_DATE='||p_source_trx_date;

Line 971: ||'party_type='||jai_constants.party_type_customer

967:
968: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id
969: , 'ln_fin_year= '||ln_fin_year
970: ||'ln_org_tan_no='||ln_org_tan_no
971: ||'party_type='||jai_constants.party_type_customer
972: ||'p_party_id='||p_party_id
973: ,jai_cmn_debug_contexts_pkg.detail
974: ); */ -- */ --commented by bgowrava for bug#5631784
975:

Line 977: and p_called_from = jai_constants.tcs_event_surcharge then

973: ,jai_cmn_debug_contexts_pkg.detail
974: ); */ -- */ --commented by bgowrava for bug#5631784
975:
976: if p_called_from is not null
977: and p_called_from = jai_constants.tcs_event_surcharge then
978: /** This is an internal call. Hence fetch the applicable slab id for amount updated in the jai_rgm_thresholds */
979:
980: /**
981: Assumption: To fetch slab from the setup transaction date is mandatory

Line 984: p_process_flag := jai_constants.expected_error;

980: /**
981: Assumption: To fetch slab from the setup transaction date is mandatory
982: */
983: if p_source_trx_date is null then
984: p_process_flag := jai_constants.expected_error;
985: p_process_message := 'When deriving the threshold slab from setup, P_SOURCE_TRX_DATE cannot be null. P_SOURCE_TRX_DATE='||nvl(to_char(p_source_trx_date),'null');
986: return;
987: end if;
988:

Line 998: p_process_flag := jai_constants.expected_error;

994: Assumption: Party classification cannot be null for a customer as it is one of
995: the attribute used to derrive the slab
996: */
997: if lv_customer_type_lkup_code is null then
998: p_process_flag := jai_constants.expected_error;
999: p_process_message := 'Unable to derive party classification for party_id='||p_party_id;
1000: return;
1001: end if;
1002:

Line 1011: , cp_party_type => jai_constants.party_type_customer

1007: */
1008: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'lv_customer_type_lkup_code='||lv_customer_type_lkup_code, jai_cmn_debug_contexts_pkg.detail);*/ -- */ --commented by bgowrava for bug#5631784
1009: open c_get_threshold_slab ( cp_fin_year => ln_fin_year
1010: , cp_org_tan_no => ln_org_tan_no
1011: , cp_party_type => jai_constants.party_type_customer
1012: , cp_party_id => p_party_id
1013: , cp_customer_type_lkup_code => lv_customer_type_lkup_code
1014: );
1015: fetch c_get_threshold_slab into p_threshold_slab_id;

Line 1022: , cp_party_type => jai_constants.party_type_customer

1018: else /** p_called_from is null means the call is from outside. So, fetch the threshold slab from jai_rgm_thresholds and return */
1019:
1020: open c_get_thhold_hdr_slab ( cp_fin_year => ln_fin_year
1021: , cp_org_tan_no => ln_org_tan_no
1022: , cp_party_type => jai_constants.party_type_customer
1023: , cp_party_id => p_party_id
1024: );
1025: fetch c_get_thhold_hdr_slab into p_threshold_slab_id;
1026: close c_get_thhold_hdr_slab;

Line 1033: p_process_flag := jai_constants.successful; --'SS'

1029:
1030: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'P_THRESHOLD_SLAB_ID='||p_threshold_slab_id,jai_cmn_debug_contexts_pkg.detail);*/ -- */ --commented by bgowrava for bug#5631784
1031:
1032: /** Process completed successfully */
1033: p_process_flag := jai_constants.successful; --'SS'
1034: p_process_message := null;
1035:
1036: /** Deregister procedure and return*/
1037: <>

Line 1042: p_process_flag := jai_constants.unexpected_error;

1038: /* jai_cmn_debug_contexts_pkg.deregister (pn_reg_id => ln_reg_id);*/ -- */ --commented by bgowrava for bug#5631784
1039: return;
1040: exception
1041: when others then
1042: p_process_flag := jai_constants.unexpected_error;
1043: p_process_message := lv_context||'->'||sqlerrm;
1044: /* jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
1045: jai_cmn_debug_contexts_pkg.print_stack;*/ -- */ --commented by bgowrava for bug#5631784
1046:

Line 1088: p_process_flag := jai_constants.successful; --'SS'

1084: and operating_unit_id = p_org_id;
1085:
1086: begin
1087: /** Initialize process variables */
1088: p_process_flag := jai_constants.successful; --'SS'
1089: p_process_message := null;
1090:
1091: /** Register this procedure for debuging */
1092: lv_member_name := 'GET_THRESHOLD_TAX_CAT_ID';

Line 1122: p_process_flag := jai_constants.unexpected_error;

1118:
1119: exception
1120:
1121: when others then
1122: p_process_flag := jai_constants.unexpected_error;
1123: p_process_message := lv_context||'->'||sqlerrm;
1124: jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
1125: jai_cmn_debug_contexts_pkg.print_stack;
1126:

Line 1189: p_process_flag := jai_constants.successful; --'SS'

1185: ln_exists number(2);
1186:
1187: begin
1188: /** Initialize process variables */
1189: p_process_flag := jai_constants.successful; --'SS'
1190: p_process_message := null;
1191:
1192: /** Register this procedure for debuging */
1193: lv_member_name := 'DEFAULT_THHOLD_TAXES';

Line 1221: if p_source_event = jai_constants.source_ttype_delivery then

1217: , p_process_message ='||p_process_message
1218: , jai_cmn_debug_contexts_pkg.summary
1219: ); */ --commented by bgowrava for bug#5631784
1220: ln_exists := null;
1221: if p_source_event = jai_constants.source_ttype_delivery then
1222: /* Temporary pl-sql block to check if surcharge/surcharge-cess type of tax already exists in the picking line */
1223: declare
1224: cursor c_chk_picking_tax_exists
1225: is

Line 1236: elsif p_source_event = jai_constants.bill_only_invoice then

1232: open c_chk_picking_tax_exists;
1233: fetch c_chk_picking_tax_exists into ln_exists;
1234: close c_chk_picking_tax_exists ;
1235: end;
1236: elsif p_source_event = jai_constants.bill_only_invoice then
1237: /* Temporary pl-sql block to check if surcharge/surcharge-cess type of tax already exists in the ra_customer_trx_lines */
1238:
1239: declare
1240: cursor c_chk_ra_trx_tax_exists

Line 1257: p_process_flag := jai_constants.successful;

1253: end if; /* p_source_event */
1254:
1255: if ln_exists is not null then
1256: -- Tax is already present hence no need to default it
1257: p_process_flag := jai_constants.successful;
1258: p_process_message := null;
1259: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Skipping surcharge tax defaultaion as one of the tax is already present in the transaction');*/ --commented by bgowrava for bug#5631784
1260: return;
1261: end if;

Line 1276: if p_source_event = jai_constants.source_ttype_delivery then

1272: loop
1273: fetch refc_tax_cur into r_taxes;
1274: exit when refc_tax_cur%notfound;
1275:
1276: if p_source_event = jai_constants.source_ttype_delivery then
1277: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'r_taxes.tax_id='||r_taxes.tax_id||', ln_exists='||ln_exists); */ --commented by bgowrava for bug#5631784
1278: insert into JAI_OM_WSH_LINE_TAXES
1279: ( picking_line_id
1280: , tax_line_no

Line 1331: elsif p_source_event = jai_constants.bill_only_invoice then

1327: , r_taxes.p_8
1328: , r_taxes.p_9
1329: , r_taxes.p_10
1330: );
1331: elsif p_source_event = jai_constants.bill_only_invoice then
1332: insert into JAI_AR_TRX_TAX_LINES
1333: (
1334: tax_line_no
1335: ,customer_trx_line_id

Line 1419: , p_thhold_cat_base_tax_typ=> jai_constants.tax_type_tcs

1415: , p_last_update_date => sysdate
1416: , p_last_updated_by => ln_user_id
1417: , p_last_update_login => ln_login_id
1418: , p_vat_assessable_value => p_vat_assessable_value
1419: , p_thhold_cat_base_tax_typ=> jai_constants.tax_type_tcs
1420: , p_threshold_tax_cat_id => p_threshold_tax_cat_id
1421: , p_source_trx_type => p_source_event
1422: , p_action => jai_constants.recalculate_taxes
1423: -- Commented by Chong for revert GST changes 2012/10/19

Line 1422: , p_action => jai_constants.recalculate_taxes

1418: , p_vat_assessable_value => p_vat_assessable_value
1419: , p_thhold_cat_base_tax_typ=> jai_constants.tax_type_tcs
1420: , p_threshold_tax_cat_id => p_threshold_tax_cat_id
1421: , p_source_trx_type => p_source_event
1422: , p_action => jai_constants.recalculate_taxes
1423: -- Commented by Chong for revert GST changes 2012/10/19
1424: --, pn_gst_assessable_value => pn_gst_assessable_value -- Added by Jia for GST Bug#10091373 on 2010/09/10
1425: );
1426: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'After: jai_cmn_tax_defaultation_pkg.JA_IN_CALC_PREC_TAXES', jai_cmn_debug_contexts_pkg.summary);*/ --commented by bgowrava for bug#5631784

Line 1436: p_process_flag := jai_constants.unexpected_error;

1432:
1433: exception
1434:
1435: when others then
1436: p_process_flag := jai_constants.unexpected_error;
1437: p_process_message := lv_context||'->'||sqlerrm;
1438: /* jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
1439: jai_cmn_debug_contexts_pkg.print_stack;*/ --commented by bgowrava for bug#5631784
1440:

Line 1446: , p_last_line_flag in varchar2 default jai_constants.yes

1442:
1443: /*------------------------------------------------------------------------------------------------------------*/
1444: procedure maintain_threshold
1445: ( p_transaction_id in jai_rgm_refs_all.transaction_id%type
1446: , p_last_line_flag in varchar2 default jai_constants.yes
1447: , p_process_flag out nocopy varchar2
1448: , p_process_message out nocopy varchar2
1449: )
1450: is

Line 1519: and confirm_pan = jai_constants.yes;

1515: is
1516: select pan_no
1517: from JAI_CMN_CUS_ADDRESSES
1518: where customer_id = cp_customer_id
1519: and confirm_pan = jai_constants.yes;
1520:
1521: cursor c_get_ref_thhold_base_amt (cp_base_tax_type jai_rgm_taxes.tax_type%type)
1522: is
1523: select sum(rtax.func_tax_amt)

Line 1558: and rtax.tax_type = jai_constants.tax_type_tcs_cess

1554: , JAI_CMN_TAX_CTG_LINES srch
1555: , JAI_CMN_TAX_CTG_LINES srchcess
1556: , JAI_CMN_TAXES_ALL tax
1557: where rtax.trx_ref_id = refs.trx_ref_id
1558: and rtax.tax_type = jai_constants.tax_type_tcs_cess
1559: and srch.tax_category_id = cp_thhold_tax_cat_id
1560: and srchcess.tax_category_id = srch.tax_category_id
1561: and srchcess.precedence_1 = srch.line_no
1562: and srchcess.tax_id = rtax.tax_id

Line 1564: and tax.tax_type = jai_constants.tax_type_tcs_surcharge

1560: and srchcess.tax_category_id = srch.tax_category_id
1561: and srchcess.precedence_1 = srch.line_no
1562: and srchcess.tax_id = rtax.tax_id
1563: and srch.tax_id = tax.tax_id
1564: and tax.tax_type = jai_constants.tax_type_tcs_surcharge
1565: and refs.transaction_id = p_transaction_id;
1566:
1567: -- start Bgowrava for forward porting bug#5989740
1568:

Line 1578: and rtax.tax_type = jai_constants.tax_type_sh_tcs_edu_cess

1574: , JAI_CMN_TAX_CTG_LINES srch
1575: , JAI_CMN_TAX_CTG_LINES srchcess
1576: , JAI_CMN_TAXES_ALL tax
1577: where rtax.trx_ref_id = refs.trx_ref_id
1578: and rtax.tax_type = jai_constants.tax_type_sh_tcs_edu_cess
1579: and srch.tax_category_id = cp_thhold_tax_cat_id
1580: and srchcess.tax_category_id = srch.tax_category_id
1581: and srchcess.precedence_1 = srch.line_no
1582: and srchcess.tax_id = rtax.tax_id

Line 1584: and tax.tax_type = jai_constants.tax_type_tcs_surcharge

1580: and srchcess.tax_category_id = srch.tax_category_id
1581: and srchcess.precedence_1 = srch.line_no
1582: and srchcess.tax_id = rtax.tax_id
1583: and srch.tax_id = tax.tax_id
1584: and tax.tax_type = jai_constants.tax_type_tcs_surcharge
1585: and refs.transaction_id = p_transaction_id;
1586:
1587: -- end Bgowrava for forward porting bug#5989740
1588:

Line 1617: p_process_flag := jai_constants.successful;

1613:
1614:
1615: begin
1616: /** Initialize process variables */
1617: p_process_flag := jai_constants.successful;
1618: p_process_message := null;
1619:
1620: /** Register this procedure for debuging */
1621: lv_member_name := 'MAINTAIN_THRESHOLD';

Line 1641: , cp_party_type => jai_constants.party_type_customer

1637: /** Check for combination of ORG_TAN_NO, PARTY_ID, FIN_YEAR a record exists in the jai_rgm_thresholds table */
1638: open c_get_threshold_id
1639: ( cp_regime_id => r_trx_lines.regime_id
1640: , cp_org_tan_no => r_trx_lines.org_tan_no
1641: , cp_party_type => jai_constants.party_type_customer
1642: , cp_party_id => r_trx_lines.party_id
1643: , cp_fin_year => r_trx_lines.fin_year
1644: );
1645: fetch c_get_threshold_id into ln_threshold_id

Line 1687: p_process_flag := jai_constants.expected_error;

1683: /**
1684: Assumption: Customer must have the PAN and it must be confirmed
1685: */
1686: if lr_hdr_record.party_pan_no is null then
1687: p_process_flag := jai_constants.expected_error;
1688: p_process_message := 'Cannot find a confirmed PAN for customer_id='||r_trx_lines.party_id
1689: ||'.Please define a confirmed PAN for the customer in the customer setup';
1690: return;
1691: end if;

Line 1738: p_process_flag := jai_constants.expected_error;

1734: /**
1735: Assumption: When control comes here ln_threshold_id should NOT BE NULL.
1736: */
1737: if ln_threshold_id is null then
1738: p_process_flag := jai_constants.expected_error;
1739: p_process_message := 'Cannot create threshold header record in jai_rgm_thresholds';
1740: return;
1741: end if;
1742:

Line 1786: if r_trx_lines.source_document_type in (jai_constants.trx_type_inv_comp, jai_constants.trx_type_inv_incomp ) then

1782: ||', lr_dtl_record.system_surcharge_cess_amt='||lr_dtl_record.system_surcharge_cess_amt
1783: ); */ --commented by bgowrava for bug#5631784
1784:
1785: /** Assign value to amount holders based on the source trx (document) type */
1786: if r_trx_lines.source_document_type in (jai_constants.trx_type_inv_comp, jai_constants.trx_type_inv_incomp ) then
1787:
1788: lr_dtl_record.invoice_amt := nvl(lr_dtl_record.invoice_amt,0) + r_trx_lines.source_document_amt ;
1789:
1790:

Line 1791: elsif r_trx_lines.source_document_type = jai_constants.ar_cash_tax_confirmed then

1787:
1788: lr_dtl_record.invoice_amt := nvl(lr_dtl_record.invoice_amt,0) + r_trx_lines.source_document_amt ;
1789:
1790:
1791: elsif r_trx_lines.source_document_type = jai_constants.ar_cash_tax_confirmed then
1792:
1793: lr_dtl_record.cash_receipt_amt := nvl(lr_dtl_record.cash_receipt_amt,0) + r_trx_lines.source_document_amt;
1794:
1795: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_app , jai_constants.trx_type_cm_app) then

Line 1795: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_app , jai_constants.trx_type_cm_app) then

1791: elsif r_trx_lines.source_document_type = jai_constants.ar_cash_tax_confirmed then
1792:
1793: lr_dtl_record.cash_receipt_amt := nvl(lr_dtl_record.cash_receipt_amt,0) + r_trx_lines.source_document_amt;
1794:
1795: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_app , jai_constants.trx_type_cm_app) then
1796:
1797: lr_dtl_record.application_amt := nvl(lr_dtl_record.application_amt,0) + r_trx_lines.source_document_amt;
1798:
1799: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_unapp, jai_constants.trx_type_cm_unapp) then

Line 1799: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_unapp, jai_constants.trx_type_cm_unapp) then

1795: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_app , jai_constants.trx_type_cm_app) then
1796:
1797: lr_dtl_record.application_amt := nvl(lr_dtl_record.application_amt,0) + r_trx_lines.source_document_amt;
1798:
1799: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_unapp, jai_constants.trx_type_cm_unapp) then
1800:
1801: lr_dtl_record.unapplication_amt := nvl(lr_dtl_record.unapplication_amt,0) + r_trx_lines.source_document_amt;
1802:
1803: elsif r_trx_lines.source_document_type = jai_constants.trx_type_rct_rvs then

Line 1803: elsif r_trx_lines.source_document_type = jai_constants.trx_type_rct_rvs then

1799: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_unapp, jai_constants.trx_type_cm_unapp) then
1800:
1801: lr_dtl_record.unapplication_amt := nvl(lr_dtl_record.unapplication_amt,0) + r_trx_lines.source_document_amt;
1802:
1803: elsif r_trx_lines.source_document_type = jai_constants.trx_type_rct_rvs then
1804:
1805: lr_dtl_record.reversal_amt := nvl (lr_dtl_record.reversal_amt,0) + r_trx_lines.source_document_amt;
1806:
1807: end if;

Line 1812: open c_get_ref_thhold_base_amt (cp_base_tax_type => jai_constants.tax_type_tcs);

1808:
1809: /** Get threshold base amount (sum of tax amount for tcs type of taxes) for current trx line */
1810:
1811: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_REF_THHOLD_BASE_AMT');*/ --commented by bgowrava for bug#5631784
1812: open c_get_ref_thhold_base_amt (cp_base_tax_type => jai_constants.tax_type_tcs);
1813: fetch c_get_ref_thhold_base_amt into ln_ref_thhold_base_amt;
1814: close c_get_ref_thhold_base_amt;
1815:
1816: lr_dtl_record.threshold_base_amt := nvl (lr_dtl_record.threshold_base_amt,0)

Line 1826: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge

1822: -----------------------------------------------------------------------------------------------------------------*/
1823:
1824: /** Get manual surcharge amount if any */
1825: /*jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get MANUAL surcharge');
1826: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1827: ,cp_tax_modified_by => jai_constants.tax_modified_by_user
1828: );
1829: fetch c_get_surcharge_amt into ln_manual_surcharge_amt;
1830: close c_get_surcharge_amt ;

Line 1827: ,cp_tax_modified_by => jai_constants.tax_modified_by_user

1823:
1824: /** Get manual surcharge amount if any */
1825: /*jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get MANUAL surcharge');
1826: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1827: ,cp_tax_modified_by => jai_constants.tax_modified_by_user
1828: );
1829: fetch c_get_surcharge_amt into ln_manual_surcharge_amt;
1830: close c_get_surcharge_amt ;
1831:

Line 1838: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge

1834: */
1835: /** Get system surcharge amount if any */
1836: /*
1837: jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get SYSTEM surcharge');
1838: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1839: ,cp_tax_modified_by => jai_constants.tax_modified_by_system
1840: );
1841: fetch c_get_surcharge_amt into ln_system_surcharge_amt;
1842: close c_get_surcharge_amt ;

Line 1839: ,cp_tax_modified_by => jai_constants.tax_modified_by_system

1835: /** Get system surcharge amount if any */
1836: /*
1837: jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get SYSTEM surcharge');
1838: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1839: ,cp_tax_modified_by => jai_constants.tax_modified_by_system
1840: );
1841: fetch c_get_surcharge_amt into ln_system_surcharge_amt;
1842: close c_get_surcharge_amt ;
1843:

Line 1850: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge_cess

1846: */
1847: /** Get system surcharge cess amount if any */
1848: /*
1849: jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get SYSTEM surcharge cess');
1850: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge_cess
1851: ,cp_tax_modified_by => jai_constants.tax_modified_by_system
1852: );
1853: fetch c_get_surcharge_amt into ln_system_surcharge_cess_amt;
1854: close c_get_surcharge_amt ;

Line 1851: ,cp_tax_modified_by => jai_constants.tax_modified_by_system

1847: /** Get system surcharge cess amount if any */
1848: /*
1849: jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get SYSTEM surcharge cess');
1850: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge_cess
1851: ,cp_tax_modified_by => jai_constants.tax_modified_by_system
1852: );
1853: fetch c_get_surcharge_amt into ln_system_surcharge_cess_amt;
1854: close c_get_surcharge_amt ;
1855:

Line 1865: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge

1861: /*
1862: || Get the SURCHARGE tax amount
1863: */
1864: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT');*/ --commented by bgowrava for bug#5631784
1865: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1866: ,cp_tax_modified_by => null
1867: );
1868: fetch c_get_surcharge_amt into ln_surcharge_amt;
1869: close c_get_surcharge_amt ;

Line 1890: if p_process_flag <> jai_constants.successful then

1886: , p_process_flag => p_process_flag
1887: , p_process_message => p_process_message
1888: );
1889:
1890: if p_process_flag <> jai_constants.successful then
1891: return;
1892: end if;
1893:
1894:

Line 1896: p_process_flag := jai_constants.expected_error;

1892: end if;
1893:
1894:
1895: if ln_thhold_tax_cat_id = -1 then
1896: p_process_flag := jai_constants.expected_error;
1897: p_process_message := 'Cannot find tax category for active threshold slab. Please check the threshold setup';
1898: return;
1899: end if;
1900:

Line 2013: if p_last_line_flag = jai_constants.yes then

2009: where threshold_dtl_id = lr_dtl_record.threshold_dtl_id;
2010:
2011: end if; /** lr_dtl_record.threshold_dtl_id is null */
2012:
2013: if p_last_line_flag = jai_constants.yes then
2014: /*
2015: || This is the last line of the document, so update the summary amounts maintained by header table.
2016: || As repository package is always making a call at document level (not at line level), this flag will
2017: || always be yes

Line 2022: lv_thhold_slab_change_flag := jai_constants.no;

2018: */
2019: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'Before : sync_threshold_header'); */ --commented by bgowrava for bug#5631784
2020:
2021: ln_new_thhold_slab_id := null;
2022: lv_thhold_slab_change_flag := jai_constants.no;
2023:
2024: sync_threshold_header
2025: ( p_threshold_id => ln_threshold_id
2026: , p_source_trx_date => r_trx_lines.source_document_date

Line 2035: if p_process_flag <> jai_constants.successful then

2031: ) ;
2032: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After: sync_threshold_header');
2033: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||',p_process_message='||p_process_message);*/ --commented by bgowrava for bug#5631784
2034:
2035: if p_process_flag <> jai_constants.successful then
2036: return;
2037: end if;
2038:
2039: /** Update jai_rgm_refs_all to punch the threshold_slab_id against all the transaction lines */

Line 2047: if lv_thhold_slab_change_flag = jai_constants.yes then

2043: set threshold_slab_id = ln_new_thhold_slab_id
2044: where transaction_id = p_transaction_id;
2045: end if;
2046:
2047: if lv_thhold_slab_change_flag = jai_constants.yes then
2048: /**
2049: The threshold slab has changed hence delegate the call to generate_consolidated_doc.
2050: Based on the new slab consolidated document needs to be generated which can be either DM or CM.
2051: The API generate_consolidated_doc will calculate document amount and will decide which document

Line 2064: if p_process_flag <> jai_constants.successful then

2060: );
2061: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After : generate_consolidated_doc');
2062: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||',p_process_message='||p_process_message);*/ --commented by bgowrava for bug#5631784
2063:
2064: if p_process_flag <> jai_constants.successful then
2065: return;
2066: end if;
2067:
2068: end if; /** lv_thhold_slab_change_flag = jai_constants.yes */

Line 2068: end if; /** lv_thhold_slab_change_flag = jai_constants.yes */

2064: if p_process_flag <> jai_constants.successful then
2065: return;
2066: end if;
2067:
2068: end if; /** lv_thhold_slab_change_flag = jai_constants.yes */
2069:
2070: end if; /** p_last_line_flag = jai_constants.yes */
2071:
2072: end loop; /** r_trx_lines */

Line 2070: end if; /** p_last_line_flag = jai_constants.yes */

2066: end if;
2067:
2068: end if; /** lv_thhold_slab_change_flag = jai_constants.yes */
2069:
2070: end if; /** p_last_line_flag = jai_constants.yes */
2071:
2072: end loop; /** r_trx_lines */
2073:
2074: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id,' MAINTAIN_THRESHOLD completed successfully',jai_cmn_debug_contexts_pkg.summary) ;*/ --commented by bgowrava for bug#5631784

Line 2083: p_process_flag := jai_constants.unexpected_error;

2079:
2080: exception
2081:
2082: when others then
2083: p_process_flag := jai_constants.unexpected_error;
2084: p_process_message := lv_context||'->'||sqlerrm;
2085: jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
2086: jai_cmn_debug_contexts_pkg.print_stack;
2087:

Line 2270: p_process_flag := jai_constants.successful;

2266:
2267:
2268: begin
2269: /** Initialize process variables */
2270: p_process_flag := jai_constants.successful;
2271: p_process_message := null;
2272: p_thhold_slab_change_flag := jai_constants.no;
2273:
2274: /** Register this procedure for debuging */

Line 2272: p_thhold_slab_change_flag := jai_constants.no;

2268: begin
2269: /** Initialize process variables */
2270: p_process_flag := jai_constants.successful;
2271: p_process_message := null;
2272: p_thhold_slab_change_flag := jai_constants.no;
2273:
2274: /** Register this procedure for debuging */
2275: lv_member_name := 'SYNC_THRESHOLD_HEADER';
2276: set_debug_context;

Line 2327: , p_called_from => jai_constants.tcs_event_surcharge

2323: , p_party_type => lv_party_type
2324: , p_party_id => ln_party_id
2325: , p_fin_year => ln_fin_year
2326: , p_source_trx_date => p_source_trx_date
2327: , p_called_from => jai_constants.tcs_event_surcharge
2328: , p_threshold_slab_id => ln_new_thhold_slab_id
2329: , p_process_flag => p_process_flag
2330: , p_process_message => p_process_message
2331: );

Line 2334: if p_process_flag <> jai_constants.successful then

2330: , p_process_message => p_process_message
2331: );
2332: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After JAI_RGM_THHOLD_PROC_PKG.GET_THRESHOLD_SLAB_ID');
2333: jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'p_process_flag='||p_process_flag||',p_process_message='||p_process_message);*/ --commented by bgowrava for bug#5631784
2334: if p_process_flag <> jai_constants.successful then
2335: return;
2336: end if;
2337:
2338: p_new_thhold_slab_id := ln_new_thhold_slab_id;

Line 2350: p_thhold_slab_change_flag := jai_constants.yes;

2346: ,last_update_login = ln_login_id
2347: where threshold_id = p_threshold_id;
2348:
2349: if (ln_new_thhold_slab_id is not null) then -- Added if clause by mmurtuza for bug 16052256
2350: p_thhold_slab_change_flag := jai_constants.yes;
2351: end if;
2352:
2353: end if;
2354:

Line 2365: p_process_flag := jai_constants.unexpected_error;

2361:
2362: when others then
2363: p_thhold_slab_change_flag := null;
2364: p_new_thhold_slab_id := null;
2365: p_process_flag := jai_constants.unexpected_error;
2366: p_process_message := lv_context||'->'||sqlerrm;
2367: /* jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
2368: jai_cmn_debug_contexts_pkg.print_stack; */ --commented by bgowrava for bug#5631784
2369: