Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Mise en place de code-barres EAN13 

Guide détaillé

Les étapes à exécuter : 

  1. Installer les polices de CodeUPC.zip  
  2. Créer la formule personnalisée Generate_EAN13
  3. 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



  • No labels