You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
862 B

import csv
from afip.comprobantes.facturador import MyComprobantesAfip
cuit = ""
password = ""
nombre_empresa = ""
filename = "input.csv"
with open(filename, newline='') as csvfile:
reader = csv.DictReader(csvfile)
afip = MyComprobantesAfip(cuit, password, nombre_empresa, confirmar_manualmente=False)
afip.login()
fila = 1
for row in reader:
print(f'Informacion de la fila: {fila} -> {row}')
afip.generar_comprobante(fecha_comprobante=row["fecha_comprobante"],
id_concepto=2,
fecha_desde=row["fecha_desde"],
fecha_hasta=row["fecha_hasta"],
vencimiento_pago=row["fecha_comprobante"],
referencia=row["referencia"],
concepto=row["concepto"],
precio=row["monto"]
)
fila = fila + 1
afip.cerrar()