Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 543 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 543 Bytes

panama-dv

Program to calculate the DV for the given RUC for Panama. See ALGORITMO PARA EL CALCULO DEL DIGITO VERIFICADOR DE LA RUC Y RECIBO

Usage:

  #!/usr/bin/env python
  import sys
  import argparse
  import ruc

  parser = argparse.ArgumentParser(description='DV calculator')
  parser.add_argument('ruc', type=str)
  args = parser.parse_args()

  dv = ruc.calculateDV(args.ruc)
  if len(dv) == 0:
    print("Unable to calculate RUC!")
    sys.exit(1)

  print(dv)