Integración opensource con factura fiscal de Panamá
El instalador de Linux corre un script que descarga las dependencias e instala GATOMALO como un servicio de linux.
curl -sSL https://raw.githubusercontent.com/Bluetide/gatomalo-fiscal/master/setup.sh | bash
Descargar repo e instalar dependencias
git clone git@github.com:Bluetide/gatomalo-fiscal.git gatomalo
cd gatomalo
python3 -m venv venv
source venv/bin/activate
pip install --upgrade wheel pip
pip install -r requirement.txt
Configurar variables de entorno
export ZOHO_AUTH='xyz'
export ZOHO_ORG='xyz'
export ADMIN_USERNAME='admin'
export ADMIN_PASSWORD='somethingyoucanrememberbutitsnotsohardtoguess'
Ejecutar gatomalo
python3 app.py
To send a Factura JSON:
curl http://localhost:5000/facturas_api --data @fact.json -H 'Content-Type: application/json'
To print Reporte X y Z
got to cd /gatomalo
and run
sudo ./tfunilx SendCmd I0X
sudo ./tfunilx SendCmd I0Z
to create a Nota de Credito (devolucion)
curl http://192.168.1.3:5000/nota --data @dev.json -H 'Content-Type: application/json'
Si se realizo una impresion manual previamente, hay que enviar una nota de credito de forma manual con los campos necesarios. Para ejecutar el comando de la impresora enviandole el archivo txt (raw)
sudo ./tfunilx SendFileCmd <archivo.txt>
dev.json default format: factura_id: es el número que se encuentra en localhost:5000/facturas legacy_id: es el número impreso en la factura fiscal
{"nota": {
"factura_id":104,
"legacy_id":140
}}
reporte con rango de fechas de facturas impresas
fecha de inicio YYYMMDD
fecha de fin yyymmdd
RfYYYMMDDyyymmdd
ejemplo (del 1ero de enero de 2014 hasta el 1ero de diciembre de 2014.
sudo ./tfunilx SendCmd Rf01401010150401
Ivan Barria Grimaldo @ibarria0
Roberto Zubieta @zubietaroberto
Carlos Raul Piad @Carlospiad
Efrain Lay @EfrainLayCastillo
Special thanks to: