08-08-2023 23:48 PM
This is component library including Barcode generator.
At this time, it supports EAN/JAN and CODE-39 format
* Will update here when other format is available
Input properties
InputCode (Text type) : Barcode data
AutoCheckDigit (Boolean) : If true, add/replace auto-calculated digit.
I found a bug at the check digit calculation.
----------
(10-Right(Text(Sum(Sequence(6,2,2),Int(Mid(JAN_EAN.InputCode,ThisRecord.Value,1)))*3+Sum(Sequence(6,1,2),Int(Mid(JAN_EAN.InputCode,ThisRecord.Value,1)))),1))
----------
When this result is "10", the correct check digit is "0".
But the logic returns "10".
I fixed as the following.
----------
Mod((10-Right(Text(Sum(Sequence(6,2,2),Int(Mid(JAN_EAN.InputCode,ThisRecord.Value,1)))*3+Sum(Sequence(6,1,2),Int(Mid(JAN_EAN.InputCode,ThisRecord.Value,1)))),1)),10)
----------