29: */
30: PROCEDURE Gen_Invoice_Number(
31: p_regime_id JAI_RGM_DEFINITIONS.regime_id%Type,
32: p_organization_id hr_all_organization_units.organization_id%Type,
33: p_location_id hr_locations.location_id%Type,
34: p_DATE DATE,
35: p_doc_class jai_rgm_doc_seq_dtls.document_class%Type ,
36: p_doc_type_id jai_rgm_doc_seq_dtls.document_class_type_id%Type,
37: p_invoice_number OUT NOCOPY VARCHAR2, /* caller should call with parameter of size VARCHAR2(100)*/
46: ln_regnum JAI_RGM_REGISTRATIONS.attribute_value%Type ;
47:
48: CURSOR c_rgm_hdr(p_regime_id JAI_RGM_DEFINITIONS.regime_id%Type,
49: p_organization_id hr_all_organization_units.organization_id%Type,
50: p_location_id hr_locations.location_id%Type ,
51: p_date DATE
52: ) IS
53: SELECT RGM_DOCUMENT_SEQ_ID
54: FROM jai_rgm_doc_seq_hdrs rhdr
68: AND TRUNC(p_date) between TRUNC(rhdr.effective_from) and NVL(TRUNC(rhdr.effective_to) ,sysdate) ;
69:
70: CURSOR c_rgm_regnum(p_regime_id JAI_RGM_DEFINITIONS.regime_id%Type,
71: p_organization_id hr_all_organization_units.organization_id%Type,
72: p_location_id hr_locations.location_id%Type,
73: p_att_type_code jai_rgm_registrations.attribute_type_Code%TYPE , --rchandan for bug#4428980
74: p_att_code jai_rgm_registrations.attribute_Code%TYPE --rchandan for bug#4428980
75: ) IS
76: select attribute_value