cT769 ;BEREKENING DETAIL PER BOEKJAAR (nieuwe beheer);%T70 ; [ 03/27/2001 11:27 AM ] ; T0 ;Berekening detail per boekjaar ; T1 ;Restwaarde verschillend van 0; ; T0F ;Calcul détail par année compta ; T1F ;Valeur restante différente de 0; ; T0E ;Berekening detail per boekjaar ;cT T1E ;Restwaarde verschillend van 0; G 1 ; ; input : variabelen INV = investeringsjaar ; CAT = kategorie ; TBL = nummer afschrijvingstabel ; ; output : ^TEMP(boot,$J+.01) = jaaroverzicht ; R = eind-restwaarde ; 1 K ^TEMP(boot,$J+.01),^TEMP(boot,$J+.02) ; K @("^"_Q_"AFS(0,$J+.01)") S TBL=$P(UI1," ",3) D ^cT701 ; opbouw ^HULP met gegevens over kalenderjaren ; ; ophalen bestaande gegevens uit ^_Q_AFS S GEW=0 F ITEL=2,3,4,5,8,9 I $P(B(1),D,ITEL)'=$P(OINH,D,ITEL) S GEW=1 11 I GEW D ^cT763 G 12 ; opzetten ^TEMP(boot,$J+.02 S RRZ=$P(LIJNUI1," ",3),CAT=$P(LIJNUI1," ",2)_" " S MND="" F S MND=$O(@("^"_Q_"AFS(INV,CAT,RRZ_"" "",MND)")) Q:MND="" S BED=^(MND) D . S ^TEMP(boot,$J+.02,INV_" "_CAT_RRZ_" "_+MND,0)=BED ; 12 S H=^TEMP(boot,$J,LIJNUI1,0),HF=$P(H,D,8) s HA=$P(H,D,4),HG=$P(H,D,3),HL=$P(H,D,2),HDES=$P(H,D,9) S DESBJ="" I $L(HDES)>1 S DESBJ=$$BJ^cAFE1(Q,HDES) s R=HF\1-1 ; ; D S3^cT701 S HBJ1=R G YZ:HBJ1="" S R=HBJ1 D S1^cT701 S HBP1=$P(R,D) 2 s R=$o(^HULP(boot,$J,R)) g YZ:R="" s HBJ1=R D S1^cT701 S HBP1=$P(R,D) 22 I '$D(@("^"_Q_"AFS(INV,CAT,TBL_"" "",HBP1)")),$O(^(HBP1))="" S R="" G YZ 24 S (HAF1,H0)=0 ; F H=1:1 S H0=$O(@("^"_Q_"AFS(INV,CAT,TBL_"" "",H0)")) Q:H0="" Q:H0'