Soporte para varios UUIDs por póliza

This commit is contained in:
Mauricio Baeza 2021-08-14 21:52:48 -05:00
commit 1b23488043
6 changed files with 13 additions and 8 deletions

View File

@ -1,5 +1,8 @@
# Lista de cambios
v 0.2.0 [14-ago-2021]
- Soporte para varios UUIDs por póliza
v 0.1.0 [15-jul-2021]
- Versión inicial
- Importa txt de pólizas

View File

@ -1 +1 @@
0.1.0
0.2.0

View File

@ -29,7 +29,7 @@ TYPE_EXTENSION = 1
NAME = 'ZAZCompaqi'
# ~ https://semver.org/
VERSION = '0.1.0'
VERSION = '0.2.0'
# ~ Should be unique, used URL inverse

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:d="http://openoffice.org/extensions/description/2006">
<identifier value="net.elmau.zaz.compaqi"/>
<version value="0.1.0"/>
<version value="0.2.0"/>
<display-name>
<name lang="en">ZAZ Compaqi</name>
<name lang="es">ZAZ Compaqi</name>

View File

@ -65,7 +65,7 @@ def _get_mov(row):
importe_e = 0.0
diario = row[8].strip() or '0'
description = row[7]
uuid = row[15].strip()
uuid = row[15].strip().split('|')
data = dict(
num_cuenta = num_cuenta,
reference = reference,
@ -118,10 +118,11 @@ def _export_polizas():
line, uuid = _get_mov(row)
lines.append(line)
if uuid:
uuids.add(uuid)
line = f'AM {uuid}'
lines.append(line)
if uuid[0]:
for u in uuid:
uuids.add(u)
line = f'AM {u}'
lines.append(line)
if uuids:
for u in uuids:
@ -135,6 +136,7 @@ def _export_polizas():
return
@app.catch_exception
def _import_polizas():
if not _validate_sheets():