Hi every Navison's can help
am workin in navision 2009R2 noh america version ,and my project it is to export electonic payment , so my codeunit it work and report which run the codeunit , my probleme when export payment the field (Routing Number ) the routing field number must be calculated or checked by the checkdigit method, the latter does not work, I do not know why and how I call this function to apply to the fields, this is copy to my code function and the line of routing number :
the routing field number must be calculated or checked by the checkdigit method, the latter does not work, I do not know why and how I call this function to apply to the fields
Weight := '37137137';Digit := 0;
IF STRLEN(DigitString) <= STRLEN(Weight) THEN EXIT(FALSE);
FOR I := 1 TO STRLEN(Weight) DO BEGIN EVALUATE(Digit1,COPYSTR(DigitString,I,1)); EVALUATE(Digit2,COPYSTR(Weight,I,1)); Digit := Digit + Digit1 * Digit2;END;
Digit := 10 - Digit MOD 10;IF Digit = 10 THEN CheckChar := '0'ELSE CheckChar := FORMAT(Digit);EXIT(DigitString[STRLEN(Weight)+1] = CheckChar);
Why you can't use the "STRCHECKSUM Function (Code, Text)" ?
I HAVE NO HELP TO DO IT I NEED AN EXAMPLE IT IS YOU CAN HELP ME.
an how can get the result Calc MOD 10 to pin up in line AddPrnToString(Detail,.....),
Try to use SEARCH (for STRCHECKSUM) there are many examples in this forum already.