1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
CREATE OR REPLACE PACKAGE package_edition IS
TYPE ResultSet IS REF CURSOR;
PROCEDURE p_edit_facture( acd_session VARCHAR2, a_Result IN OUT package_edition.ResultSet );
END package_edition;
/
CREATE OR REPLACE PACKAGE BODY package_edition AS
PROCEDURE p_edit_facture( acd_session VARCHAR2, a_Result IN OUT package_edition.ResultSet ) IS
BEGIN
OPEN a_Result FOR
select v_gr_adhesion.adh_code,
v_gr_adhesion.adp_nom1,
v_gr_adhesion.adp_nom2,
v_gr_adhesion.adp_voie,
v_gr_adhesion.adp_comp_loc,
v_gr_adhesion.adp_dist_spec,
v_gr_adhesion.adp_commune,
v_gr_adhesion.adh_nofacture,
v_gr_adhesion.adh_campagne,
v_gr_adhesion.adh_reg_code,
reg.reg_libelle,
v_gr_adhesion.adh_ged_code,
ged.ged_libelle,
v_gr_adhesion.adh_qua_code,
qua.qua_libelle,
v_gr_adhesion.adh_totalht,
v_gr_adhesion.adh_totaltva,
v_gr_adhesion.adh_totalttc,
civ_tres.civ||' '||per_tres.nom||' '||per_tres.pre tresorier,
org_ged.sig||' - '||org_ged.adp_voie||' - '||org_ged.adp_comp_loc||' - '||org_ged.adp_dist_spec||' - '||org_ged.adp_commune adresse_tresorier
from temp_ident,v_gr_adhesion, gr_region reg, gr_geda ged, gr_quartier qua,
srv srv_ged, org org_ged, ior ior_tres, per per_tres, civ civ_tres
where v_gr_adhesion.adh_reg_code = reg.reg_code
and v_gr_adhesion.adh_ged_code = ged.ged_code
and v_gr_adhesion.adh_qua_code = qua.qua_code
and v_gr_adhesion.adh_ged_code = srv_ged.num_srv
and srv_ged.attribut02 = org_ged.num_org
and ior_tres.org_num_org = org_ged.num_org
and ior_tres.fct_cod_fct = 180
and ior_tres.per_num_per = per_tres.num_per
and civ_tres.cod_civ = per_tres.civ_cod_civ
and temp_ident.id_identifiant = v_gr_adhesion.adh_code
and temp_ident.cd_session = acd_session;
END p_edit_facture;
END package_edition;
/
show errors; |