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 # Lista de cambios
v 0.2.0 [14-ago-2021]
- Soporte para varios UUIDs por póliza
v 0.1.0 [15-jul-2021] v 0.1.0 [15-jul-2021]
- Versión inicial - Versión inicial
- Importa txt de pólizas - 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' NAME = 'ZAZCompaqi'
# ~ https://semver.org/ # ~ https://semver.org/
VERSION = '0.1.0' VERSION = '0.2.0'
# ~ Should be unique, used URL inverse # ~ Should be unique, used URL inverse

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <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"/> <identifier value="net.elmau.zaz.compaqi"/>
<version value="0.1.0"/> <version value="0.2.0"/>
<display-name> <display-name>
<name lang="en">ZAZ Compaqi</name> <name lang="en">ZAZ Compaqi</name>
<name lang="es">ZAZ Compaqi</name> <name lang="es">ZAZ Compaqi</name>

View File

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