Fix make PDF from pays 1.0

This commit is contained in:
el Mau 2023-02-18 12:56:22 -06:00
parent 1984103ff5
commit 93e64eafd8
2 changed files with 10 additions and 5 deletions

View File

@ -1126,6 +1126,7 @@ class LIBO(object):
return
def _cfdipays(self, data):
VERSION2 = '2.0'
version = data['Version']
related = data.pop('related', [])
@ -1159,7 +1160,8 @@ class LIBO(object):
cell_1 = self._set_cell('{doc.uuid}', uuid)
cell_2 = self._set_cell('{doc.serie}', serie)
cell_3 = self._set_cell('{doc.folio}', folio)
cell_4 = self._set_cell('{doc.metodopago}', metodo_pago)
if version != VERSION2:
cell_4 = self._set_cell('{doc.metodopago}', metodo_pago)
cell_5 = self._set_cell('{doc.moneda}', moneda)
cell_6 = self._set_cell('{doc.parcialidad}', parcialidad)
cell_7 = self._set_cell('{doc.saldoanterior}', saldo_anterior, value=True)
@ -1169,7 +1171,8 @@ class LIBO(object):
col1.append((uuid,))
col2.append((serie,))
col3.append((folio,))
col4.append((metodo_pago,))
if version != VERSION2:
col4.append((metodo_pago,))
col5.append((moneda,))
col6.append((parcialidad,))
col7.append((float(saldo_anterior),))
@ -1195,8 +1198,9 @@ class LIBO(object):
target2 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
col = cell_3.getCellAddress().Column
target3 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
col = cell_4.getCellAddress().Column
target4 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
if version != VERSION2:
col = cell_4.getCellAddress().Column
target4 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
col = cell_5.getCellAddress().Column
target5 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
col = cell_6.getCellAddress().Column
@ -1211,7 +1215,8 @@ class LIBO(object):
target1.setFormulaArray(tuple(col1))
target2.setDataArray(tuple(col2))
target3.setFormulaArray(tuple(col3))
target4.setDataArray(tuple(col4))
if version != VERSION2:
target4.setDataArray(tuple(col4))
target5.setDataArray(tuple(col5))
target6.setDataArray(tuple(col6))
target7.setDataArray(tuple(col7))