DBA Data[Home] [Help]

APPS.JAI_RGM_THHOLD_PROC_PKG dependencies on JAI_CONSTANTS

Line 126: where source_document_id = jai_constants.tcs_surcharge_id

122: ,tax_rate
123: from jai_rgm_taxes
124: where trx_ref_id = ( select max(trx_ref_id)
125: from jai_rgm_refs_all
126: where source_document_id = jai_constants.tcs_surcharge_id
127: and org_tan_no = cp_org_tan_no
128: and fin_year = cp_fin_year
129: and party_id = cp_party_id
130: and item_classification = cp_item_classification

Line 131: and party_type = jai_constants.party_type_customer

127: and org_tan_no = cp_org_tan_no
128: and fin_year = cp_fin_year
129: and party_id = cp_party_id
130: and item_classification = cp_item_classification
131: and party_type = jai_constants.party_type_customer
132: );
133:
134:
135: r_ref_dtls c_get_ref_dtls%rowtype;

Line 187: p_process_flag := jai_constants.successful;

183: and cat.precedence_1 = nvl(cp_line_no, cat.precedence_1); -- This will check that for CESS precedence should be of surcharge
184:
185: begin
186:
187: p_process_flag := jai_constants.successful;
188: p_process_message := null;
189:
190: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id,'Begin CALCULATE_TCS_DOC_AMOUNT');
191: jai_cmn_debug_contexts_pkg.print ( ln_reg_id

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

215: /*
216: Get details regarding surcharge type of tax attached to the category.
217: */
218: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close C_GET_SURCHARGE_TAXES'); */ --commented by bgowrava for bug#5631784
219: open c_get_surcharge_taxes (cp_tax_type => jai_constants.tax_type_tcs_surcharge );
220: fetch c_get_surcharge_taxes into ln_tax_rate
221: ,ln_rounding_factor
222: ,ln_surcharge_tax_id
223: ,ln_surcharge_line_no;

Line 227: p_process_flag := jai_constants.expected_error;

223: ,ln_surcharge_line_no;
224: close c_get_surcharge_taxes ;
225:
226: if ln_tax_rate is null then
227: p_process_flag := jai_constants.expected_error;
228: p_process_message := 'Cannot find surcharge type of taxes for tax_id ='||ln_tax_id||', tax_category_id='||p_threshold_tax_cat_id;
229: return;
230: end if;
231:

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

286: /*
287: || Get tax details for CESS which is defined for Surcharge
288: */
289: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close C_GET_SURCHARGE_TAXES'); */ --commented by bgowrava for bug#5631784
290: open c_get_surcharge_taxes (cp_tax_type => jai_constants.tax_type_tcs_cess
291: ,cp_line_no => ln_surcharge_line_no
292: );
293: fetch c_get_surcharge_taxes into ln_tax_rate
294: ,ln_rounding_factor

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

318:
319: ln_tax_rate := null;
320: ln_rounding_factor := null;
321:
322: open c_get_surcharge_taxes (cp_tax_type => jai_constants.tax_type_sh_tcs_edu_cess
323: ,cp_line_no => ln_surcharge_line_no
324: );
325: fetch c_get_surcharge_taxes into ln_tax_rate
326: ,ln_rounding_factor

Line 358: p_process_flag := jai_constants.successful;

354: Aim: Calculate Surcharge Amount and Generate a Consolidated Document
355: ------------------------------------------------------------------------*/
356:
357: /** Initialize process variables */
358: p_process_flag := jai_constants.successful;
359: p_process_message := null;
360:
361: /** Register procedure for debuging */
362: lv_member_name := 'GENERATE_CONSOLIDATED_DOC';

Line 411: if p_process_flag <> jai_constants.successful then

407:
408: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After: JAI_RGM_THHOLD_PROC_PKG.GET_THRESHOLD_TAX_CAT_ID');
409: 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
410:
411: if p_process_flag <> jai_constants.successful then
412: return;
413: end if;
414:
415: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'Before: CALCULATE_TCS_DOC_AMOUNT');*/ --commented by bgowrava for bug#5631784

Line 431: if p_process_flag <> jai_constants.successful then

427: );
428: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After: CALCULATE_TCS_DOC_AMOUNT');
429: 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
430:
431: if p_process_flag <> jai_constants.successful then
432: return;
433: end if;
434:
435: /*

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

456: 'cp_org_tan_no= '||r_ref_dtls.org_tan_no||chr(10)||
457: 'cp_party_id = '||r_ref_dtls.party_id ||chr(10)||
458: 'cp_fin_year = '||r_ref_dtls.fin_year ||chr(10)||
459: 'cp_item_classification= '||r_ref_dtls.item_classification||chr(10)||
460: 'jai_constants.tcs_surcharge_id='||jai_constants.tcs_surcharge_id||chr(10)||
461: 'jai_constants.party_type_customer='||jai_constants.party_type_customer
462: ); */ --commented by bgowrava for bug#5631784
463:
464: for r_taxes_for_last_doc in c_get_taxes_for_last_doc

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

457: 'cp_party_id = '||r_ref_dtls.party_id ||chr(10)||
458: 'cp_fin_year = '||r_ref_dtls.fin_year ||chr(10)||
459: 'cp_item_classification= '||r_ref_dtls.item_classification||chr(10)||
460: 'jai_constants.tcs_surcharge_id='||jai_constants.tcs_surcharge_id||chr(10)||
461: 'jai_constants.party_type_customer='||jai_constants.party_type_customer
462: ); */ --commented by bgowrava for bug#5631784
463:
464: for r_taxes_for_last_doc in c_get_taxes_for_last_doc
465: ( cp_org_tan_no => r_ref_dtls.org_tan_no

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

470: loop
471: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id
472: , 'Inside For: r_taxes_for_last_doc.tax_type='||r_taxes_for_last_doc.tax_type
473: ); */ --commented by bgowrava for bug#5631784
474: if r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_surcharge then
475: ln_surcharge_tax_id := r_taxes_for_last_doc.tax_id;
476: ln_surcharge_tax_rate := r_taxes_for_last_doc.tax_rate;
477: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_cess then
478: ln_surcharge_cess_tax_id := r_taxes_for_last_doc.tax_id;

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

473: ); */ --commented by bgowrava for bug#5631784
474: if r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_surcharge then
475: ln_surcharge_tax_id := r_taxes_for_last_doc.tax_id;
476: ln_surcharge_tax_rate := r_taxes_for_last_doc.tax_rate;
477: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_cess then
478: ln_surcharge_cess_tax_id := r_taxes_for_last_doc.tax_id;
479: ln_surcharge_cess_tax_rate:= r_taxes_for_last_doc.tax_rate;
480: -- start Bgowrava for forward porting bug#5989740
481: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_sh_tcs_edu_cess then

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

477: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_tcs_cess then
478: ln_surcharge_cess_tax_id := r_taxes_for_last_doc.tax_id;
479: ln_surcharge_cess_tax_rate:= r_taxes_for_last_doc.tax_rate;
480: -- start Bgowrava for forward porting bug#5989740
481: elsif r_taxes_for_last_doc.tax_type = jai_constants.tax_type_sh_tcs_edu_cess then
482: ln_surcharge_sh_cess_tax_id := r_taxes_for_last_doc.tax_id;
483: ln_surcharge_sh_cess_tax_rate:= r_taxes_for_last_doc.tax_rate;
484: -- end Bgowrava for forward porting bug#5989740
485: end if;

Line 489: p_process_flag := jai_constants.expected_error;

485: end if;
486: end loop;
487:
488: 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
489: p_process_flag := jai_constants.expected_error;
490: 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;
491: return;
492: end if;
493: end if; /* r_thhold_info.threshold_slab_id is null */

Line 514: , p_document_id => jai_constants.tcs_surcharge_id

510: , p_source_ref_document_id => r_ref_dtls.source_ref_document_id
511: , p_source_ref_document_type => r_ref_dtls.source_ref_document_type
512: , p_parent_transaction_id => r_ref_dtls.parent_transaction_id
513: , p_org_tan_no => r_ref_dtls.org_tan_no
514: , p_document_id => jai_constants.tcs_surcharge_id
515: , p_document_type => jai_constants.tcs_event_surcharge
516: , p_document_line_id => jai_constants.tcs_surcharge_id
517: , p_document_date => r_ref_dtls.source_document_date
518: , p_table_name => jai_constants.jai_rgm_thresholds

Line 515: , p_document_type => jai_constants.tcs_event_surcharge

511: , p_source_ref_document_type => r_ref_dtls.source_ref_document_type
512: , p_parent_transaction_id => r_ref_dtls.parent_transaction_id
513: , p_org_tan_no => r_ref_dtls.org_tan_no
514: , p_document_id => jai_constants.tcs_surcharge_id
515: , p_document_type => jai_constants.tcs_event_surcharge
516: , p_document_line_id => jai_constants.tcs_surcharge_id
517: , p_document_date => r_ref_dtls.source_document_date
518: , p_table_name => jai_constants.jai_rgm_thresholds
519: , 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 516: , p_document_line_id => jai_constants.tcs_surcharge_id

512: , p_parent_transaction_id => r_ref_dtls.parent_transaction_id
513: , p_org_tan_no => r_ref_dtls.org_tan_no
514: , p_document_id => jai_constants.tcs_surcharge_id
515: , p_document_type => jai_constants.tcs_event_surcharge
516: , p_document_line_id => jai_constants.tcs_surcharge_id
517: , p_document_date => r_ref_dtls.source_document_date
518: , p_table_name => jai_constants.jai_rgm_thresholds
519: , p_line_amount => (ln_surcharge_doc_amt + ln_surcharge_doc_cess_amt + ln_surcharge_doc_sh_cess_amt) --Bgowrava for forward porting bug#5989740
520: , 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 518: , p_table_name => jai_constants.jai_rgm_thresholds

514: , p_document_id => jai_constants.tcs_surcharge_id
515: , p_document_type => jai_constants.tcs_event_surcharge
516: , p_document_line_id => jai_constants.tcs_surcharge_id
517: , p_document_date => r_ref_dtls.source_document_date
518: , p_table_name => jai_constants.jai_rgm_thresholds
519: , p_line_amount => (ln_surcharge_doc_amt + ln_surcharge_doc_cess_amt + ln_surcharge_doc_sh_cess_amt) --Bgowrava for forward porting bug#5989740
520: , p_document_amount => (ln_surcharge_doc_amt + ln_surcharge_doc_cess_amt + ln_surcharge_doc_sh_cess_amt) --Bgowrava for forward porting bug#5989740
521: , p_org_id => r_ref_dtls.org_id
522: , p_organization_id => r_ref_dtls.organization_id

Line 533: if p_process_flag <> jai_constants.successful then

529: );
530: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After: JAI_AR_TCS_REP_PKG.INSERT_REPOSITORY_REFERENCES',jai_cmn_debug_contexts_pkg.summary);
531: 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
532:
533: if p_process_flag <> jai_constants.successful then
534: return;
535: end if;
536:
537: open c_curr_code (cp_org_id => r_ref_dtls.org_id);

Line 553: , p_tax_type => jai_constants.tax_type_tcs_surcharge

549: jai_ar_tcs_rep_pkg.insert_repository_taxes
550: (
551: p_trx_ref_id => ln_trx_ref_id
552: , p_tax_id => ln_surcharge_tax_id
553: , p_tax_type => jai_constants.tax_type_tcs_surcharge
554: , p_tax_rate => ln_surcharge_tax_rate
555: , p_tax_amount => ln_surcharge_doc_amt
556: , p_func_tax_amount => ln_surcharge_doc_amt /* Functional currency is same as trx currency */
557: , p_currency_code => ln_currency_code

Line 564: if p_process_flag <> jai_constants.successful then

560: );
561: /* 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);
562: 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
563:
564: if p_process_flag <> jai_constants.successful then
565: return;
566: end if;
567:
568: /* 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 574: , p_tax_type => jai_constants.tax_type_tcs_cess

570: jai_ar_tcs_rep_pkg.insert_repository_taxes
571: (
572: p_trx_ref_id => ln_trx_ref_id
573: , p_tax_id => ln_surcharge_cess_tax_id
574: , p_tax_type => jai_constants.tax_type_tcs_cess
575: , p_tax_rate => ln_surcharge_cess_tax_rate
576: , p_tax_amount => ln_surcharge_doc_cess_amt
577: , p_func_tax_amount => ln_surcharge_doc_cess_amt /* Functional currency is same as trx currency */
578: , p_currency_code => ln_currency_code

Line 585: if p_process_flag <> jai_constants.successful then

581: );
582: /* 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);
583: 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
584:
585: if p_process_flag <> jai_constants.successful then
586: return;
587: end if;
588:
589: -- start Bgowrava for forward porting bug#5989740

Line 597: , p_tax_type => jai_constants.tax_type_sh_tcs_edu_cess

593: jai_ar_tcs_rep_pkg.insert_repository_taxes
594: (
595: p_trx_ref_id => ln_trx_ref_id
596: , p_tax_id => ln_surcharge_cess_tax_id
597: , p_tax_type => jai_constants.tax_type_sh_tcs_edu_cess
598: , p_tax_rate => ln_surcharge_cess_tax_rate
599: , p_tax_amount => ln_surcharge_doc_sh_cess_amt
600: , p_func_tax_amount => ln_surcharge_doc_sh_cess_amt /* Functional currency is same as trx currency */
601: , p_currency_code => ln_currency_code

Line 608: if p_process_flag <> jai_constants.successful then

604: );
605: 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);
606: 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);
607:
608: if p_process_flag <> jai_constants.successful then
609: return;
610: end if;
611:
612: -- end Bgowrava for forward porting bug#5989740

Line 634: if p_process_flag <> jai_constants.successful then

630: );
631: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After : JAI_AR_TCS_REP_PKG.GENERATE_DOCUMENT',jai_cmn_debug_contexts_pkg.summary);
632: 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
633:
634: if p_process_flag <> jai_constants.successful then
635: return;
636: end if;
637:
638:

Line 662: p_process_flag := jai_constants.unexpected_error;

658: /* jai_cmn_debug_contexts_pkg.deregister (pn_reg_id => ln_reg_id); */ --commented by bgowrava for bug#5631784
659: return;
660: exception
661: when others then
662: p_process_flag := jai_constants.unexpected_error;
663: p_process_message := lv_context||'->'||sqlerrm;
664: /* jai_cmn_debug_contexts_pkg.print(ln_reg_id,lv_context||'->'||sqlerrm,jai_cmn_debug_contexts_pkg.summary);
665: jai_cmn_debug_contexts_pkg.print_stack;*/ -- */ --commented by bgowrava for bug#5631784
666:

Line 752: and thtyps.threshold_type = jai_constants.thhold_typ_cumulative

748: where
749: thslbs.threshold_type_id = thtyps.threshold_type_id
750: and thtyps.threshold_hdr_id = thhdrs.threshold_hdr_id
751: and thhdrs.regime_id = rgmths.regime_id
752: and thtyps.threshold_type = jai_constants.thhold_typ_cumulative
753: and rgmths.fin_year = cp_fin_year
754: and rgmths.party_id = cp_party_id
755: and rgmths.org_tan_no = cp_org_tan_no
756: and rgmths.party_type = cp_party_type

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

784:
785:
786: begin
787: /** Initialize process variables */
788: p_process_flag := jai_constants.successful ;--'SS';
789: p_process_message := null;
790: p_threshold_slab_id := null;
791:
792:

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

813: if p_org_tan_no is null then
814: if p_organization_id is not null then
815: /** Get org_tan_no using inventory organization from regime setup */
816: open c_get_rgm_attribute ( cp_regime_id => p_regime_id
817: , cp_attribute_type_code => jai_constants.rgm_attr_type_code_primary /* PRIMARY */
818: , cp_attribute_code => jai_constants.rgm_attr_code_org_tan /*ORG_TAN_NUM */
819: , cp_organization_id => p_organization_id
820: );
821: fetch c_get_rgm_attribute into ln_org_tan_no;

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

814: if p_organization_id is not null then
815: /** Get org_tan_no using inventory organization from regime setup */
816: open c_get_rgm_attribute ( cp_regime_id => p_regime_id
817: , cp_attribute_type_code => jai_constants.rgm_attr_type_code_primary /* PRIMARY */
818: , cp_attribute_code => jai_constants.rgm_attr_code_org_tan /*ORG_TAN_NUM */
819: , cp_organization_id => p_organization_id
820: );
821: fetch c_get_rgm_attribute into ln_org_tan_no;
822: close c_get_rgm_attribute;

Line 825: p_process_flag := jai_constants.expected_error;

821: fetch c_get_rgm_attribute into ln_org_tan_no;
822: close c_get_rgm_attribute;
823: else
824: /** Both org_tan_no and organization_id are null */
825: p_process_flag := jai_constants.expected_error;
826: p_process_message := 'P_ORG_TAN_NO and P_ORGANIZATION_ID both cannot be null';
827: return;
828: end if;
829: else

Line 836: p_process_flag := jai_constants.expected_error;

832: end if;
833:
834: /** Assumption: If org_tan_no is null cannot derrive threshold amount*/
835: if ln_org_tan_no is null then
836: p_process_flag := jai_constants.expected_error;
837: p_process_message := 'Unable to get mandatory attribute ORG_TAN_NUM using the arguments
838: || P_REGIME_ID='||p_regime_id
839: ||' P_ORGANIZATION_ID=' || p_organization_id;
840: return;

Line 855: p_process_flag := jai_constants.expected_error;

851: close jai_ar_tcs_rep_pkg.get_tcs_fin_year;
852:
853: else
854: /** Both fin_year and org_id are null*/
855: p_process_flag := jai_constants.expected_error;
856: p_process_message := 'Both P_FIN_YEAR and P_ORG_ID cannot be null';
857: return;
858: end if;
859: else

Line 865: p_process_flag := jai_constants.expected_error;

861: end if;
862:
863: /** Assumption: If fin_year is null cannot a unique threshold hdr record */
864: if ln_fin_year is null then
865: p_process_flag := jai_constants.expected_error;
866: p_process_message := 'Unable to derive mandatory LN_FIN_YEAR using the given arguments'
867: ||' P_FIN_YEAR='||p_fin_year
868: ||' P_ORG_ID='||p_organization_id
869: ||' P_SOURCE_TRX_DATE='||p_source_trx_date;

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

872:
873: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id
874: , 'ln_fin_year= '||ln_fin_year
875: ||'ln_org_tan_no='||ln_org_tan_no
876: ||'party_type='||jai_constants.party_type_customer
877: ||'p_party_id='||p_party_id
878: ,jai_cmn_debug_contexts_pkg.detail
879: ); */ -- */ --commented by bgowrava for bug#5631784
880:

Line 882: and p_called_from = jai_constants.tcs_event_surcharge then

878: ,jai_cmn_debug_contexts_pkg.detail
879: ); */ -- */ --commented by bgowrava for bug#5631784
880:
881: if p_called_from is not null
882: and p_called_from = jai_constants.tcs_event_surcharge then
883: /** This is an internal call. Hence fetch the applicable slab id for amount updated in the jai_rgm_thresholds */
884:
885: /**
886: Assumption: To fetch slab from the setup transaction date is mandatory

Line 889: p_process_flag := jai_constants.expected_error;

885: /**
886: Assumption: To fetch slab from the setup transaction date is mandatory
887: */
888: if p_source_trx_date is null then
889: p_process_flag := jai_constants.expected_error;
890: 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');
891: return;
892: end if;
893:

Line 903: p_process_flag := jai_constants.expected_error;

899: Assumption: Party classification cannot be null for a customer as it is one of
900: the attribute used to derrive the slab
901: */
902: if lv_customer_type_lkup_code is null then
903: p_process_flag := jai_constants.expected_error;
904: p_process_message := 'Unable to derive party classification for party_id='||p_party_id;
905: return;
906: end if;
907:

Line 916: , cp_party_type => jai_constants.party_type_customer

912: */
913: /* 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
914: open c_get_threshold_slab ( cp_fin_year => ln_fin_year
915: , cp_org_tan_no => ln_org_tan_no
916: , cp_party_type => jai_constants.party_type_customer
917: , cp_party_id => p_party_id
918: , cp_customer_type_lkup_code => lv_customer_type_lkup_code
919: );
920: fetch c_get_threshold_slab into p_threshold_slab_id;

Line 927: , cp_party_type => jai_constants.party_type_customer

923: else /** p_called_from is null means the call is from outside. So, fetch the threshold slab from jai_rgm_thresholds and return */
924:
925: open c_get_thhold_hdr_slab ( cp_fin_year => ln_fin_year
926: , cp_org_tan_no => ln_org_tan_no
927: , cp_party_type => jai_constants.party_type_customer
928: , cp_party_id => p_party_id
929: );
930: fetch c_get_thhold_hdr_slab into p_threshold_slab_id;
931: close c_get_thhold_hdr_slab;

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

934:
935: /* 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
936:
937: /** Process completed successfully */
938: p_process_flag := jai_constants.successful; --'SS'
939: p_process_message := null;
940:
941: /** Deregister procedure and return*/
942: <>

Line 947: p_process_flag := jai_constants.unexpected_error;

943: /* jai_cmn_debug_contexts_pkg.deregister (pn_reg_id => ln_reg_id);*/ -- */ --commented by bgowrava for bug#5631784
944: return;
945: exception
946: when others then
947: p_process_flag := jai_constants.unexpected_error;
948: p_process_message := lv_context||'->'||sqlerrm;
949: /* jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
950: jai_cmn_debug_contexts_pkg.print_stack;*/ -- */ --commented by bgowrava for bug#5631784
951:

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

989: and operating_unit_id = p_org_id;
990:
991: begin
992: /** Initialize process variables */
993: p_process_flag := jai_constants.successful; --'SS'
994: p_process_message := null;
995:
996: /** Register this procedure for debuging */
997: lv_member_name := 'GET_THRESHOLD_TAX_CAT_ID';

Line 1027: p_process_flag := jai_constants.unexpected_error;

1023:
1024: exception
1025:
1026: when others then
1027: p_process_flag := jai_constants.unexpected_error;
1028: p_process_message := lv_context||'->'||sqlerrm;
1029: jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
1030: jai_cmn_debug_contexts_pkg.print_stack;
1031:

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

1088: ln_exists number(2);
1089:
1090: begin
1091: /** Initialize process variables */
1092: p_process_flag := jai_constants.successful; --'SS'
1093: p_process_message := null;
1094:
1095: /** Register this procedure for debuging */
1096: lv_member_name := 'DEFAULT_THHOLD_TAXES';

Line 1124: if p_source_event = jai_constants.source_ttype_delivery then

1120: , p_process_message ='||p_process_message
1121: , jai_cmn_debug_contexts_pkg.summary
1122: ); */ --commented by bgowrava for bug#5631784
1123: ln_exists := null;
1124: if p_source_event = jai_constants.source_ttype_delivery then
1125: /* Temporary pl-sql block to check if surcharge/surcharge-cess type of tax already exists in the picking line */
1126: declare
1127: cursor c_chk_picking_tax_exists
1128: is

Line 1139: elsif p_source_event = jai_constants.bill_only_invoice then

1135: open c_chk_picking_tax_exists;
1136: fetch c_chk_picking_tax_exists into ln_exists;
1137: close c_chk_picking_tax_exists ;
1138: end;
1139: elsif p_source_event = jai_constants.bill_only_invoice then
1140: /* Temporary pl-sql block to check if surcharge/surcharge-cess type of tax already exists in the ra_customer_trx_lines */
1141:
1142: declare
1143: cursor c_chk_ra_trx_tax_exists

Line 1160: p_process_flag := jai_constants.successful;

1156: end if; /* p_source_event */
1157:
1158: if ln_exists is not null then
1159: -- Tax is already present hence no need to default it
1160: p_process_flag := jai_constants.successful;
1161: p_process_message := null;
1162: /* 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
1163: return;
1164: end if;

Line 1179: if p_source_event = jai_constants.source_ttype_delivery then

1175: loop
1176: fetch refc_tax_cur into r_taxes;
1177: exit when refc_tax_cur%notfound;
1178:
1179: if p_source_event = jai_constants.source_ttype_delivery then
1180: /* 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
1181: insert into JAI_OM_WSH_LINE_TAXES
1182: ( picking_line_id
1183: , tax_line_no

Line 1234: elsif p_source_event = jai_constants.bill_only_invoice then

1230: , r_taxes.p_8
1231: , r_taxes.p_9
1232: , r_taxes.p_10
1233: );
1234: elsif p_source_event = jai_constants.bill_only_invoice then
1235: insert into JAI_AR_TRX_TAX_LINES
1236: (
1237: tax_line_no
1238: ,customer_trx_line_id

Line 1322: , p_thhold_cat_base_tax_typ=> jai_constants.tax_type_tcs

1318: , p_last_update_date => sysdate
1319: , p_last_updated_by => ln_user_id
1320: , p_last_update_login => ln_login_id
1321: , p_vat_assessable_value => p_vat_assessable_value
1322: , p_thhold_cat_base_tax_typ=> jai_constants.tax_type_tcs
1323: , p_threshold_tax_cat_id => p_threshold_tax_cat_id
1324: , p_source_trx_type => p_source_event
1325: , p_action => jai_constants.recalculate_taxes
1326: );

Line 1325: , p_action => jai_constants.recalculate_taxes

1321: , p_vat_assessable_value => p_vat_assessable_value
1322: , p_thhold_cat_base_tax_typ=> jai_constants.tax_type_tcs
1323: , p_threshold_tax_cat_id => p_threshold_tax_cat_id
1324: , p_source_trx_type => p_source_event
1325: , p_action => jai_constants.recalculate_taxes
1326: );
1327: /* 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
1328:
1329: /** Deregister and return */

Line 1337: p_process_flag := jai_constants.unexpected_error;

1333:
1334: exception
1335:
1336: when others then
1337: p_process_flag := jai_constants.unexpected_error;
1338: p_process_message := lv_context||'->'||sqlerrm;
1339: /* jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
1340: jai_cmn_debug_contexts_pkg.print_stack;*/ --commented by bgowrava for bug#5631784
1341:

Line 1347: , p_last_line_flag in varchar2 default jai_constants.yes

1343:
1344: /*------------------------------------------------------------------------------------------------------------*/
1345: procedure maintain_threshold
1346: ( p_transaction_id in jai_rgm_refs_all.transaction_id%type
1347: , p_last_line_flag in varchar2 default jai_constants.yes
1348: , p_process_flag out nocopy varchar2
1349: , p_process_message out nocopy varchar2
1350: )
1351: is

Line 1420: and confirm_pan = jai_constants.yes;

1416: is
1417: select pan_no
1418: from JAI_CMN_CUS_ADDRESSES
1419: where customer_id = cp_customer_id
1420: and confirm_pan = jai_constants.yes;
1421:
1422: cursor c_get_ref_thhold_base_amt (cp_base_tax_type jai_rgm_taxes.tax_type%type)
1423: is
1424: select sum(rtax.func_tax_amt)

Line 1459: and rtax.tax_type = jai_constants.tax_type_tcs_cess

1455: , JAI_CMN_TAX_CTG_LINES srch
1456: , JAI_CMN_TAX_CTG_LINES srchcess
1457: , JAI_CMN_TAXES_ALL tax
1458: where rtax.trx_ref_id = refs.trx_ref_id
1459: and rtax.tax_type = jai_constants.tax_type_tcs_cess
1460: and srch.tax_category_id = cp_thhold_tax_cat_id
1461: and srchcess.tax_category_id = srch.tax_category_id
1462: and srchcess.precedence_1 = srch.line_no
1463: and srchcess.tax_id = rtax.tax_id

Line 1465: and tax.tax_type = jai_constants.tax_type_tcs_surcharge

1461: and srchcess.tax_category_id = srch.tax_category_id
1462: and srchcess.precedence_1 = srch.line_no
1463: and srchcess.tax_id = rtax.tax_id
1464: and srch.tax_id = tax.tax_id
1465: and tax.tax_type = jai_constants.tax_type_tcs_surcharge
1466: and refs.transaction_id = p_transaction_id;
1467:
1468: -- start Bgowrava for forward porting bug#5989740
1469:

Line 1479: and rtax.tax_type = jai_constants.tax_type_sh_tcs_edu_cess

1475: , JAI_CMN_TAX_CTG_LINES srch
1476: , JAI_CMN_TAX_CTG_LINES srchcess
1477: , JAI_CMN_TAXES_ALL tax
1478: where rtax.trx_ref_id = refs.trx_ref_id
1479: and rtax.tax_type = jai_constants.tax_type_sh_tcs_edu_cess
1480: and srch.tax_category_id = cp_thhold_tax_cat_id
1481: and srchcess.tax_category_id = srch.tax_category_id
1482: and srchcess.precedence_1 = srch.line_no
1483: and srchcess.tax_id = rtax.tax_id

Line 1485: and tax.tax_type = jai_constants.tax_type_tcs_surcharge

1481: and srchcess.tax_category_id = srch.tax_category_id
1482: and srchcess.precedence_1 = srch.line_no
1483: and srchcess.tax_id = rtax.tax_id
1484: and srch.tax_id = tax.tax_id
1485: and tax.tax_type = jai_constants.tax_type_tcs_surcharge
1486: and refs.transaction_id = p_transaction_id;
1487:
1488: -- end Bgowrava for forward porting bug#5989740
1489:

Line 1518: p_process_flag := jai_constants.successful;

1514:
1515:
1516: begin
1517: /** Initialize process variables */
1518: p_process_flag := jai_constants.successful;
1519: p_process_message := null;
1520:
1521: /** Register this procedure for debuging */
1522: lv_member_name := 'MAINTAIN_THRESHOLD';

Line 1542: , cp_party_type => jai_constants.party_type_customer

1538: /** Check for combination of ORG_TAN_NO, PARTY_ID, FIN_YEAR a record exists in the jai_rgm_thresholds table */
1539: open c_get_threshold_id
1540: ( cp_regime_id => r_trx_lines.regime_id
1541: , cp_org_tan_no => r_trx_lines.org_tan_no
1542: , cp_party_type => jai_constants.party_type_customer
1543: , cp_party_id => r_trx_lines.party_id
1544: , cp_fin_year => r_trx_lines.fin_year
1545: );
1546: fetch c_get_threshold_id into ln_threshold_id

Line 1588: p_process_flag := jai_constants.expected_error;

1584: /**
1585: Assumption: Customer must have the PAN and it must be confirmed
1586: */
1587: if lr_hdr_record.party_pan_no is null then
1588: p_process_flag := jai_constants.expected_error;
1589: p_process_message := 'Cannot find a confirmed PAN for customer_id='||r_trx_lines.party_id
1590: ||'.Please define a confirmed PAN for the customer in the customer setup';
1591: return;
1592: end if;

Line 1639: p_process_flag := jai_constants.expected_error;

1635: /**
1636: Assumption: When control comes here ln_threshold_id should NOT BE NULL.
1637: */
1638: if ln_threshold_id is null then
1639: p_process_flag := jai_constants.expected_error;
1640: p_process_message := 'Cannot create threshold header record in jai_rgm_thresholds';
1641: return;
1642: end if;
1643:

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

1683: ||', lr_dtl_record.system_surcharge_cess_amt='||lr_dtl_record.system_surcharge_cess_amt
1684: ); */ --commented by bgowrava for bug#5631784
1685:
1686: /** Assign value to amount holders based on the source trx (document) type */
1687: if r_trx_lines.source_document_type in (jai_constants.trx_type_inv_comp, jai_constants.trx_type_inv_incomp ) then
1688:
1689: lr_dtl_record.invoice_amt := nvl(lr_dtl_record.invoice_amt,0) + r_trx_lines.source_document_amt ;
1690:
1691:

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

1688:
1689: lr_dtl_record.invoice_amt := nvl(lr_dtl_record.invoice_amt,0) + r_trx_lines.source_document_amt ;
1690:
1691:
1692: elsif r_trx_lines.source_document_type = jai_constants.ar_cash_tax_confirmed then
1693:
1694: lr_dtl_record.cash_receipt_amt := nvl(lr_dtl_record.cash_receipt_amt,0) + r_trx_lines.source_document_amt;
1695:
1696: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_app , jai_constants.trx_type_cm_app) then

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

1692: elsif r_trx_lines.source_document_type = jai_constants.ar_cash_tax_confirmed then
1693:
1694: lr_dtl_record.cash_receipt_amt := nvl(lr_dtl_record.cash_receipt_amt,0) + r_trx_lines.source_document_amt;
1695:
1696: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_app , jai_constants.trx_type_cm_app) then
1697:
1698: lr_dtl_record.application_amt := nvl(lr_dtl_record.application_amt,0) + r_trx_lines.source_document_amt;
1699:
1700: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_unapp, jai_constants.trx_type_cm_unapp) then

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

1696: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_app , jai_constants.trx_type_cm_app) then
1697:
1698: lr_dtl_record.application_amt := nvl(lr_dtl_record.application_amt,0) + r_trx_lines.source_document_amt;
1699:
1700: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_unapp, jai_constants.trx_type_cm_unapp) then
1701:
1702: lr_dtl_record.unapplication_amt := nvl(lr_dtl_record.unapplication_amt,0) + r_trx_lines.source_document_amt;
1703:
1704: elsif r_trx_lines.source_document_type = jai_constants.trx_type_rct_rvs then

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

1700: elsif r_trx_lines.source_document_type in (jai_constants.trx_type_rct_unapp, jai_constants.trx_type_cm_unapp) then
1701:
1702: lr_dtl_record.unapplication_amt := nvl(lr_dtl_record.unapplication_amt,0) + r_trx_lines.source_document_amt;
1703:
1704: elsif r_trx_lines.source_document_type = jai_constants.trx_type_rct_rvs then
1705:
1706: lr_dtl_record.reversal_amt := nvl (lr_dtl_record.reversal_amt,0) + r_trx_lines.source_document_amt;
1707:
1708: end if;

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

1709:
1710: /** Get threshold base amount (sum of tax amount for tcs type of taxes) for current trx line */
1711:
1712: /* 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
1713: open c_get_ref_thhold_base_amt (cp_base_tax_type => jai_constants.tax_type_tcs);
1714: fetch c_get_ref_thhold_base_amt into ln_ref_thhold_base_amt;
1715: close c_get_ref_thhold_base_amt;
1716:
1717: lr_dtl_record.threshold_base_amt := nvl (lr_dtl_record.threshold_base_amt,0)

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

1723: -----------------------------------------------------------------------------------------------------------------*/
1724:
1725: /** Get manual surcharge amount if any */
1726: /*jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get MANUAL surcharge');
1727: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1728: ,cp_tax_modified_by => jai_constants.tax_modified_by_user
1729: );
1730: fetch c_get_surcharge_amt into ln_manual_surcharge_amt;
1731: close c_get_surcharge_amt ;

Line 1728: ,cp_tax_modified_by => jai_constants.tax_modified_by_user

1724:
1725: /** Get manual surcharge amount if any */
1726: /*jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get MANUAL surcharge');
1727: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1728: ,cp_tax_modified_by => jai_constants.tax_modified_by_user
1729: );
1730: fetch c_get_surcharge_amt into ln_manual_surcharge_amt;
1731: close c_get_surcharge_amt ;
1732:

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

1735: */
1736: /** Get system surcharge amount if any */
1737: /*
1738: jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get SYSTEM surcharge');
1739: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1740: ,cp_tax_modified_by => jai_constants.tax_modified_by_system
1741: );
1742: fetch c_get_surcharge_amt into ln_system_surcharge_amt;
1743: close c_get_surcharge_amt ;

Line 1740: ,cp_tax_modified_by => jai_constants.tax_modified_by_system

1736: /** Get system surcharge amount if any */
1737: /*
1738: jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get SYSTEM surcharge');
1739: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1740: ,cp_tax_modified_by => jai_constants.tax_modified_by_system
1741: );
1742: fetch c_get_surcharge_amt into ln_system_surcharge_amt;
1743: close c_get_surcharge_amt ;
1744:

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

1747: */
1748: /** Get system surcharge cess amount if any */
1749: /*
1750: jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get SYSTEM surcharge cess');
1751: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge_cess
1752: ,cp_tax_modified_by => jai_constants.tax_modified_by_system
1753: );
1754: fetch c_get_surcharge_amt into ln_system_surcharge_cess_amt;
1755: close c_get_surcharge_amt ;

Line 1752: ,cp_tax_modified_by => jai_constants.tax_modified_by_system

1748: /** Get system surcharge cess amount if any */
1749: /*
1750: jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT to get SYSTEM surcharge cess');
1751: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge_cess
1752: ,cp_tax_modified_by => jai_constants.tax_modified_by_system
1753: );
1754: fetch c_get_surcharge_amt into ln_system_surcharge_cess_amt;
1755: close c_get_surcharge_amt ;
1756:

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

1762: /*
1763: || Get the SURCHARGE tax amount
1764: */
1765: /* jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Open/Fetch/Close cursor C_GET_SURCHARGE_AMT');*/ --commented by bgowrava for bug#5631784
1766: open c_get_surcharge_amt (cp_tax_type => jai_constants.tax_type_tcs_surcharge
1767: ,cp_tax_modified_by => null
1768: );
1769: fetch c_get_surcharge_amt into ln_surcharge_amt;
1770: close c_get_surcharge_amt ;

Line 1791: if p_process_flag <> jai_constants.successful then

1787: , p_process_flag => p_process_flag
1788: , p_process_message => p_process_message
1789: );
1790:
1791: if p_process_flag <> jai_constants.successful then
1792: return;
1793: end if;
1794:
1795:

Line 1797: p_process_flag := jai_constants.expected_error;

1793: end if;
1794:
1795:
1796: if ln_thhold_tax_cat_id = -1 then
1797: p_process_flag := jai_constants.expected_error;
1798: p_process_message := 'Cannot find tax category for active threshold slab. Please check the threshold setup';
1799: return;
1800: end if;
1801:

Line 1914: if p_last_line_flag = jai_constants.yes then

1910: where threshold_dtl_id = lr_dtl_record.threshold_dtl_id;
1911:
1912: end if; /** lr_dtl_record.threshold_dtl_id is null */
1913:
1914: if p_last_line_flag = jai_constants.yes then
1915: /*
1916: || This is the last line of the document, so update the summary amounts maintained by header table.
1917: || As repository package is always making a call at document level (not at line level), this flag will
1918: || always be yes

Line 1923: lv_thhold_slab_change_flag := jai_constants.no;

1919: */
1920: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'Before : sync_threshold_header'); */ --commented by bgowrava for bug#5631784
1921:
1922: ln_new_thhold_slab_id := null;
1923: lv_thhold_slab_change_flag := jai_constants.no;
1924:
1925: sync_threshold_header
1926: ( p_threshold_id => ln_threshold_id
1927: , p_source_trx_date => r_trx_lines.source_document_date

Line 1936: if p_process_flag <> jai_constants.successful then

1932: ) ;
1933: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After: sync_threshold_header');
1934: 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
1935:
1936: if p_process_flag <> jai_constants.successful then
1937: return;
1938: end if;
1939:
1940: /** Update jai_rgm_refs_all to punch the threshold_slab_id against all the transaction lines */

Line 1948: if lv_thhold_slab_change_flag = jai_constants.yes then

1944: set threshold_slab_id = ln_new_thhold_slab_id
1945: where transaction_id = p_transaction_id;
1946: end if;
1947:
1948: if lv_thhold_slab_change_flag = jai_constants.yes then
1949: /**
1950: The threshold slab has changed hence delegate the call to generate_consolidated_doc.
1951: Based on the new slab consolidated document needs to be generated which can be either DM or CM.
1952: The API generate_consolidated_doc will calculate document amount and will decide which document

Line 1965: if p_process_flag <> jai_constants.successful then

1961: );
1962: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After : generate_consolidated_doc');
1963: 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
1964:
1965: if p_process_flag <> jai_constants.successful then
1966: return;
1967: end if;
1968:
1969: end if; /** lv_thhold_slab_change_flag = jai_constants.yes */

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

1965: if p_process_flag <> jai_constants.successful then
1966: return;
1967: end if;
1968:
1969: end if; /** lv_thhold_slab_change_flag = jai_constants.yes */
1970:
1971: end if; /** p_last_line_flag = jai_constants.yes */
1972:
1973: end loop; /** r_trx_lines */

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

1967: end if;
1968:
1969: end if; /** lv_thhold_slab_change_flag = jai_constants.yes */
1970:
1971: end if; /** p_last_line_flag = jai_constants.yes */
1972:
1973: end loop; /** r_trx_lines */
1974:
1975: /* 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 1984: p_process_flag := jai_constants.unexpected_error;

1980:
1981: exception
1982:
1983: when others then
1984: p_process_flag := jai_constants.unexpected_error;
1985: p_process_message := lv_context||'->'||sqlerrm;
1986: jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
1987: jai_cmn_debug_contexts_pkg.print_stack;
1988:

Line 2171: p_process_flag := jai_constants.successful;

2167:
2168:
2169: begin
2170: /** Initialize process variables */
2171: p_process_flag := jai_constants.successful;
2172: p_process_message := null;
2173: p_thhold_slab_change_flag := jai_constants.no;
2174:
2175: /** Register this procedure for debuging */

Line 2173: p_thhold_slab_change_flag := jai_constants.no;

2169: begin
2170: /** Initialize process variables */
2171: p_process_flag := jai_constants.successful;
2172: p_process_message := null;
2173: p_thhold_slab_change_flag := jai_constants.no;
2174:
2175: /** Register this procedure for debuging */
2176: lv_member_name := 'SYNC_THRESHOLD_HEADER';
2177: set_debug_context;

Line 2228: , p_called_from => jai_constants.tcs_event_surcharge

2224: , p_party_type => lv_party_type
2225: , p_party_id => ln_party_id
2226: , p_fin_year => ln_fin_year
2227: , p_source_trx_date => p_source_trx_date
2228: , p_called_from => jai_constants.tcs_event_surcharge
2229: , p_threshold_slab_id => ln_new_thhold_slab_id
2230: , p_process_flag => p_process_flag
2231: , p_process_message => p_process_message
2232: );

Line 2235: if p_process_flag <> jai_constants.successful then

2231: , p_process_message => p_process_message
2232: );
2233: /* jai_cmn_debug_contexts_pkg.print ( ln_reg_id, 'After JAI_RGM_THHOLD_PROC_PKG.GET_THRESHOLD_SLAB_ID');
2234: 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
2235: if p_process_flag <> jai_constants.successful then
2236: return;
2237: end if;
2238:
2239: p_new_thhold_slab_id := ln_new_thhold_slab_id;

Line 2250: p_thhold_slab_change_flag := jai_constants.yes;

2246: ,last_updated_by = ln_user_id
2247: ,last_update_login = ln_login_id
2248: where threshold_id = p_threshold_id;
2249:
2250: p_thhold_slab_change_flag := jai_constants.yes;
2251:
2252: end if;
2253:
2254: /** Deregister and return */

Line 2264: p_process_flag := jai_constants.unexpected_error;

2260:
2261: when others then
2262: p_thhold_slab_change_flag := null;
2263: p_new_thhold_slab_id := null;
2264: p_process_flag := jai_constants.unexpected_error;
2265: p_process_message := lv_context||'->'||sqlerrm;
2266: /* jai_cmn_debug_contexts_pkg.print(ln_reg_id,sqlerrm,jai_cmn_debug_contexts_pkg.summary);
2267: jai_cmn_debug_contexts_pkg.print_stack; */ --commented by bgowrava for bug#5631784
2268: