Mise en place de code-barres EAN13Â
Guide détaillé
Les Ă©tapes Ă exĂ©cuter :Â
- Installer les polices de CodeUPC.zip Â
- Créer la formule personnalisée Generate_EAN13
- CrĂ©er une formule dans l'Ă©tat EAN13Â
Â
Genetate_EAN13
Generate_EAN13({CodeArticle.CodeEAN})
Genetate_EAN13
Function (StringVar input)
NumberVar checkDigitSubtotal;
StringVar checkDigit;
StringVar temp;
checkDigitSubtotal := 3 * (Val(input[2]) + Val(input[4]) + Val(input[6]) + Val(input[8]) + Val(input[10]) + Val(Right(input, 1)));
checkDigitSubtotal := checkDigitSubtotal + Val(input[1]) + Val(input[3]) + Val(input[5]) + Val(input[7]) + Val(input[9]) + Val(input[11]);
checkDigit := Right(ToText(300 - checkDigitSubtotal,"#"), 1);
Select input[1]
Case "0" :
temp := "U|x" + Chr(65 + Val(input[2]))
+ Chr(65 + Val(input[3]))
+ Chr(65 + Val(input[4]))
+ Chr(65 + Val(input[5]))
+ Chr(65 + Val(input[6]))
+ Chr(65 + Val(input[7]))
Case "1" :
temp := "[|x" + Chr(65 + Val(input[2]))
+ Chr(65 + Val(input[3]))
+ Chr(75 + Val(input[4]))
+ Chr(65 + Val(input[5]))
+ Chr(75 + Val(input[6]))
+ Chr(75 + Val(input[7]))
Case "2" :
temp := "V|x" + Chr(65 + Val(input[2]))
+ Chr(65 + Val(input[3]))
+ Chr(75 + Val(input[4]))
+ Chr(75 + Val(input[5]))
+ Chr(65 + Val(input[6]))
+ Chr(75 + Val(input[7]))
Case "3" :
temp := "W|x" + Chr(65 + Val(input[2]))
+ Chr(65 + Val(input[3]))
+ Chr(75 + Val(input[4]))
+ Chr(75 + Val(input[5]))
+ Chr(75 + Val(input[6]))
+ Chr(65 + Val(input[7]))
Case "4" :
temp := "X|x" + Chr(65 + Val(input[2]))
+ Chr(75 + Val(input[3]))
+ Chr(65 + Val(input[4]))
+ Chr(65 + Val(input[5]))
+ Chr(75 + Val(input[6]))
+ Chr(75 + Val(input[7]))
Case "5" :
temp := "Y|x" + Chr(65 + Val(input[2]))
+ Chr(75 + Val(input[3]))
+ Chr(75 + Val(input[4]))
+ Chr(65 + Val(input[5]))
+ Chr(65 + Val(input[6]))
+ Chr(75 + Val(input[7]))
Case "6" :
temp := "Z|x" + Chr(65 + Val(input[2]))
+ Chr(75 + Val(input[3]))
+ Chr(75 + Val(input[4]))
+ Chr(75 + Val(input[5]))
+ Chr(65 + Val(input[6]))
+ Chr(65 + Val(input[7]))
Case "7" :
temp := "u|x" + Chr(65 + Val(input[2]))
+ Chr(75 + Val(input[3]))
+ Chr(65 + Val(input[4]))
+ Chr(75 + Val(input[5]))
+ Chr(65 + Val(input[6]))
+ Chr(75 + Val(input[7]))
Case "8" :
temp := "\|x" + Chr(65 + Val(input[2]))
+ Chr(75 + Val(input[3]))
+ Chr(65 + Val(input[4]))
+ Chr(75 + Val(input[5]))
+ Chr(75 + Val(input[6]))
+ Chr(65 + Val(input[7]))
Case "9" :
temp := "]|x" + Chr(65 + Val(input[2]))
+ Chr(75 + Val(input[3]))
+ Chr(75 + Val(input[4]))
+ Chr(65 + Val(input[5]))
+ Chr(75 + Val(input[6]))
+ Chr(65 + Val(input[7]));
temp + "y" + Mid(input, 8, 5) + checkDigit + "z"
Articles connexes