Hi there,
after an update from BFC 7.0 to BFC10 a specific data processing (hook) does not work anymore with an error message about MU dimension during package generation. I've changed the hook and the generation works fine now but the hook doesn't generate any data.
Any idea about this problem?
here is the hook which copy taxe rates on technical accounts in packages from FL category:
declare
@numb float
BEGIN
set @numb = cast((select count(*) from ct_phase where name = 'FL' and id = [destPhase]) as float)
if @numb = 1
begin
insert into [destTbl] (
PERIOD,ENTITY,ENTORIG,ACCNT,FLOW,NATURE,PARTNER,CTSHARE,CURNCY,
TECHORIG,MU,PMU,GLOBORIG,JOURNAL,ENUMBER,AMOUNT,
CT_0000_DEST,CT_0000_ZONE,TYPE_ENTRY,CT_0000_IMMO,CT_0000_DEVTRANS,CT_0000_PAYS
)
select [destUpdPer],[destEntity],[destEntity],ac.id,fl.id,nat.id,t1.id,0,pack.input_currency_id,
-524283,8191,0,0,0,0, rate.ct_exrate/rate_all.ct_exrate,
0,0,0,immo.id,rate_all.ct_currency,pays.id
from ct_exrate rate, ct_exrate rate_all, ct_exrate_version vers, ct_exrate_type type,
ct_pack pack, ct_account ac, ct_nature nat, ct_flow fl, ct_entity t1, ct_country pays, ct_mu mu, ct_0000_immo immo
where pack.phase_id = [destPhase]
and pack.update_period_id = [destUpdPer]
and pack.entity_id = [destEntity]
and pack.input_currency_id = rate.ct_currency
and rate.ct_period = [destUpdPer]
and rate.ct_version = vers.id
and rate.ct_type = type.id
and rate.ct_entity = 0
and rate_all.ct_period = rate.ct_period
and rate_all.ct_version = rate.ct_version
and rate_all.ct_type = rate.ct_type
and rate_all.ct_entity = rate.ct_entity
and vers.name = 'REEL'
and type.name = 'TC'
and ac.name = 'TR'
and fl.name = 'TT'
and nat.name = '0LIA01'
and t1.name = 'S9999'
and pays.name = 'NA'
and immo.name = 'NA'
and rate_all.ct_exrate <> 0
insert into [destTbl] (
PERIOD,ENTITY,ENTORIG,ACCNT,FLOW,NATURE,PARTNER,CTSHARE,CURNCY,
TECHORIG,MU,PMU,GLOBORIG,JOURNAL,ENUMBER,AMOUNT,
CT_0000_DEST,CT_0000_ZONE,TYPE_ENTRY,CT_0000_IMMO,CT_0000_DEVTRANS,CT_0000_PAYS
)
select [destUpdPer],[destEntity],[destEntity],ac.id,fl.id,nat.id,t1.id,0,pack.input_currency_id,
-524283,8191,0,0,0,0, rate.ct_exrate/rate_all.ct_exrate,
0,0,0,immo.id,rate_all.ct_currency,pays.id
from ct_exrate rate, ct_exrate rate_all, ct_exrate_version vers, ct_exrate_type type,
ct_pack pack, ct_account ac, ct_nature nat, ct_flow fl, ct_entity t1, ct_country pays, ct_0000_immo immo
where pack.phase_id = [destPhase]
and pack.update_period_id = [destUpdPer]
and pack.entity_id = [destEntity]
and pack.input_currency_id = rate.ct_currency
and rate.ct_period = ROUND([destUpdPer]/262144,0)*262144+8192
and rate.ct_version = vers.id
and rate.ct_type = type.id
and rate.ct_entity = 0
and rate_all.ct_period = rate.ct_period
and rate_all.ct_version = rate.ct_version
and rate_all.ct_type = rate.ct_type
and rate_all.ct_entity = rate.ct_entity
and vers.name = 'ESTIM'
and type.name = 'TC'
and ac.name = 'TB'
and fl.name = 'TT'
and nat.name = '0LIA01'
and t1.name = 'S9999'
and pays.name = 'NA'
and immo.name = 'NA'
and rate_all.ct_exrate <> 0
end
END;
regards,
Ludovic