https://github.com/rmax/impuestos
https://github.com/rmax/impuestos
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rmax/impuestos
- Owner: rmax
- License: other
- Created: 2020-05-12T20:22:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-12T20:23:00.000Z (about 6 years ago)
- Last Synced: 2025-05-15T09:14:46.875Z (about 1 year ago)
- Language: Python
- Size: 618 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
Python library to generate control code as:
Requirements:
- python 2.5
- python-crypto
Usage:
>>> from utils.controlcode import ControlCode
>>> cc = ControlCode(auth, secret)
# Direct generation passing date & nit
>>> print cc.generate(bill, amount, date=date, nit=nit)
# Batch generation with persistent date & nit
>>> cc.set_date(date).set_nit(nit)
>>> for (bill, amount) in data:
print cc.generate(bill, amount)
Note:
auth - Número de Autorización
secret - LLave de dosificación
date - Fecha de la factura e.g 20081010 or 2008/10/10
nit - NIT o CI
bill - Número de Factura
amount - Monto facturado