Thread: UPC Help
View Single Post
  #2  
Old September 18th, 2019, 11:30 AM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 211
Default Re: UPC Help

Change the line that is
retstr = "0"+Field(Var1);

to this:
Code:
retstr = Field(Var1);
if (retstr.length < 11) {
    retstr = "0" + retstr;}
I'm not sure what the warning is but you might try this to replace that last part:
Code:
if (Field(Var1)) {
    final_data = '<span><f name="' + Var6 + '">' +
    NormalizeEntities(MakeUPCABarcode(retstr)) + '</span>';
    return final_data;}
else {
    return "";}
Reply With Quote