Skip to content

Commit

Permalink
Merge 45d103b into ac7e8c0
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Dec 4, 2017
2 parents ac7e8c0 + 45d103b commit 7e29829
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion l10n_nl_tax_statement/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
'name': 'Netherlands BTW Statement',
'version': '10.0.1.1.0',
'version': '10.0.1.1.1',
'category': 'Localization',
'license': 'AGPL-3',
'author': 'Onestein, Odoo Community Association (OCA)',
Expand Down
10 changes: 10 additions & 0 deletions l10n_nl_tax_statement/models/l10n_nl_vat_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,16 @@ def _finalize_lines(self, lines):
# update 5a and 5c
lines['5a'].update({'btw': _5ab})
lines['5c'].update({'btw': _5cb})

# omzet (from 1a to 4b): invert the original sign
# in case it differs from the sign of related btw
to_be_checked_inverted = ['1a', '1b', '1c', '1d', '2a', '4a', '4b']
for code in to_be_checked_inverted:
btw_sign = 1 if lines[code]['btw'] >= 0.0 else -1
omzet_sign = 1 if lines[code]['omzet'] >= 0.0 else -1
if btw_sign != omzet_sign:
lines[code]['omzet'] *= -1

return lines

@api.model
Expand Down

0 comments on commit 7e29829

Please sign in to comment.