lib/barby/barcode/upc_supplemental.rb
#Checksum is different for 2 and 5 digits
#2-digits don't really have a checksum, just a remainder to look up the parity
Checksum is different for 2 and 5 digits
2-digits don't really have a checksum, just a remainder to look up the parity
Checksum is different for 2 and 5 digits 2 - digits don ' t really have a checksum just a remainder to look up the parity
def checksum
      if two_digit?
        data.to_i % 4
      elsif five_digit?
        (odd_sum + even_sum) % 10
      end
    end
def checksum if two_digit? data . to_i % 4 elsif five_digit? ( odd_sum + even_sum ) % 10 end end
Checksum is different for 2 and 5 digits
2-digits don't really have a checksum, just a remainder to look up the parity
Checksum is different for 2 and 5 digits 2 - digits don ' t really have a checksum just a remainder to look up the parity