When to use a barcode instead of a QR code
Warehouse scanners, grocery checkouts, and many badge systems still expect a 1D barcode. A QR code maker will not help a laser that only reads Code 128. Generate the linear code here, keep QR codes for phones and URLs.
EAN-13 and UPC-A include a check digit. If you type 12 digits, the library computes the 13th. Do not invent retail GTINs - those come from GS1. For internal SKUs, Code 128 is the flexible choice.