Split GTIN4 into GS1 Company Prefix and GS1 ID for Item Sync in NetSuite-TrackTraceRX Integration

Function to split GTIN4 into GS1 Company Prefix and GS1 ID function splitGTIN(gtin) {     if (gtin.length !== 14) {         throw new Error(“GTIN must be 14 digits long.”);     }     // Extract GS1 Company Prefix: remove the first digit and take the next 7 digits     const gs1CompanyPrefix = gtin.substring(1, 8);     //… Continue reading Split GTIN4 into GS1 Company Prefix and GS1 ID for Item Sync in NetSuite-TrackTraceRX Integration