SWISS: Sample for BESR/ESR (ISR) with Rates (Installments), Beispiel für ESR mit Raten
Manuel Grenacher
Here a Sample Code for the calculation of the ISR Line (ESR) -> Ammount PartAdd this code to the Command Script
[quote]
Function GetCheckModulo10(ByVal strNummer As String) As Integer
'strNummer darf nur Ziffern zwischen 0 und 9 enthalten!
Dim intTabelle(0 To 9) As Integer
Dim intubertrag As Integer
Dim intIndex As Integer
intTabelle(0) = 0: intTabelle(1) = 9
intTabelle(2) = 4: intTabelle(3) = 6
intTabelle(4) = 8: intTabelle(5) = 2
intTabelle(6) = 7: intTabelle(7) = 1
intTabelle(8) = 3: intTabelle(9) = 5
For intIndex = 1 To Len(strNummer)
intubertrag = intTabelle((intubertrag + Mid(strNummer, intIndex, 1)) Mod 10)
Next
GetCheckModulo10 = (10 - intubertrag) Mod 10
End Function
Bind the Value Property of the ISR Line with this Code:
[quote]LD.FStr((Installments("InsTotal")*100),"01##########") & GetCheckModulo10(LD.FStr((Installments("InsTotal")*100),"01##########")) & Data("B1_Data.Document.ISRCodLine").Substring(13,40)
0
Please sign in to leave a comment.
Comments
0 comments