From 3e97d453b9f666a18fb6227493f5945afcf7805f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 27 Jul 2023 13:27:47 +0000 Subject: [PATCH] change validation resoluion in invoice subtype --- api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api.py b/api.py index 828003c..49faf1b 100644 --- a/api.py +++ b/api.py @@ -31,7 +31,8 @@ def print_bill(data, address): printer.text(d["shop_address"]+'\n') printer.set(align='right', bold=False, height=1, width=1) printer.textln('========================') - if d['invoice']: + + if d['invoice'] and d['invoice']['resolution']: text = "Resolucion de Facturacion # "+str(d['invoice']['resolution']['resolution_number']) \ + "\nValida desde "+d['invoice']['resolution']['valid_date_time_from']+ \ " hasta "+str(d['invoice']['resolution']['valid_date_time_to'])