Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] l10n_uy_edi: Fix en caso de que no exista ninguna adenda #149

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions l10n_uy_edi/models/l10n_uy_cfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ def _l10n_uy_get_cfe_item_detail(self):
'MontoItem': self._uy_cfe_B24_MontoItem(line), # B24 Monto Item
})
if self._is_uy_inv_type_cfe() and line.discount:
item.update({'DescuentoPct': line._uy_cfe_B12_DescuentoPct(line),
item.update({'DescuentoPct': self._uy_cfe_B12_DescuentoPct(line),
'DescuentoMonto': self._uy_cfe_B13_DescuentoMonto(line)
})
item.update(self._uy_cfe_B11_PrecioUnitario(line, item.get('IndFact')))
Expand Down Expand Up @@ -1176,8 +1176,8 @@ def _get_report_params(self):
# En caso de que el contenido de las adendas sea mayor a 799 caracteres, la adenda se imprimira en
# la segunda pagina de forma automatica, caso contrario, el cliente podra elegir el tipo de reporte que quiera
# Si no elige ningun tipo de reporte, se imprimira el default de uruware

if len(self._l10n_uy_get_cfe_adenda().get('Adenda')) > 799:
adenda = self._l10n_uy_get_cfe_adenda().get('Adenda')
if adenda and len(adenda) > 799:
report_params = [['adenda'],['true']]
else:
#En caso de que el cliente eliga el reporte que quiere imprimir
Expand Down