Fix - Issue #143

This commit is contained in:
Mauricio Baeza 2018-01-23 16:25:01 -06:00
parent deeeabd376
commit 49563020e4
1 changed files with 9 additions and 3 deletions

View File

@ -741,6 +741,13 @@ class LIBO(object):
self._set_cell('{receptor.%s}' % k, v)
return
def _copy_row(self, cell):
row = cell.getCellAddress().Row
source = self._sheet.getRows().getByIndex(row)
nc = self._next_cell(cell)
self._sheet.copyRange(nc.getCellAddress(), source.getRangeAddress())
return
def _conceptos(self, data):
first = True
for concepto in data:
@ -761,16 +768,15 @@ class LIBO(object):
if len(data) > 1:
row = cell_1.getCellAddress().Row + 1
self._sheet.getRows().insertByIndex(row, len(data)-1)
source = self._sheet.getRows().getByIndex(row - 1)
nc = self._next_cell(cell_1)
self._sheet.copyRange(nc.getCellAddress(), source.getRangeAddress())
else:
self._copy_row(cell_1)
cell_1 = self._set_cell(v=key, cell=cell_1)
cell_2 = self._set_cell(v=description, cell=cell_2)
cell_3 = self._set_cell(v=unidad, cell=cell_3)
cell_4 = self._set_cell(v=cantidad, cell=cell_4, value=True)
cell_5 = self._set_cell(v=valor_unitario, cell=cell_5, value=True)
cell_6 = self._set_cell(v=importe, cell=cell_6, value=True)
return
def _add_totales(self, data):