Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def newUPC():
- #... sacamos el último de la BD
- oldValue += 1
- st = UPC_RAIZ + "%04d" % (oldValue,)
- dc = -(int(st[0]) + 3*int(st[1]) + int(st[2]) + 3*int(st[3]) + int(st[4]) + 3*int(st[5]) + int(st[6]) + 3*int(st[7]) + int(st[8]) + 3*int(st[9]) + int(st[10]) + 3*int(st[11])) % 10
- return st + str(dc)
- def newISRC(twoDigitsYear):
- #... sacamos el último de la BD
- oldValue += 1
- st = str(ISRC_RAIZ) + "%02d-" % (twoDigitsYear,)
- return st + "%05d" % (oldValue,)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement