Dim objEvaluationLine as clsLossEvaluationLine
Dim ValeuraneufHTMontant as decimal
Dim Coefficientdevetuste as decimal
Dim Valeurvenale as decimal
Dim Valeuraneufbonus as decimal
Dim objClaim As clsClaim
objClaim = GetObjectToBeUsedForThisClass(GetType(clsClaim).Name, ListOfObjectsToBeUsedInFormula)
objEvaluationLine=GetObjectToBeUsedForThisClass(GetType(clsLossEvaluationLine).Name, ListOfObjectsToBeUsedInFormula)
Trace("objEvaluationLine found " & objEvaluationLine.AsString(""),7)
if objEvaluationLine isnot nothing then
ValeuraneufHTMontant=clsDynamicMethodOrPropertyCall.Manager.ValueForAPropertyName(objEvaluationLine,"ValeuraneufHTMontant",Nothing,True)
Trace("ValeuraneufHTMontant="& ValeuraneufHTMontant,7)
Trace("objClaim status " & objClaim.ClaimStatus , 7)
if objClaim.ClaimStatus=1 then
'loss declaration
result(0)=ValeuraneufHTMontant
else
Coefficientdevetuste=clsDynamicMethodOrPropertyCall.Manager.ValueForAPropertyName(objEvaluationLine,"Coefficientdevetuste",Nothing,True)
Trace("Coefficientdevetuste="& Coefficientdevetuste,7)
Valeurvenale=clsDynamicMethodOrPropertyCall.Manager.ValueForAPropertyName(objEvaluationLine,"Valeurvenale",Nothing,True)
Trace("Valeurvenale="& Valeurvenale,7)
Valeuraneufbonus=clsDynamicMethodOrPropertyCall.Manager.ValueForAPropertyName(objEvaluationLine,"Valeuraneufbonus",Nothing,True)
Trace("Valeuraneufbonus="& Valeuraneufbonus,7)
if Valeuraneufbonus>0 then
result(0)=Valeurvenale*(1+(Valeuraneufbonus/100))
if result(0)>ValeuraneufHTMontant then
result(0)=ValeuraneufHTMontant
end if
Else
result(0)=Valeurvenale
End if
End If
else
result(0)=0
end if