Skip to content

Commit

Permalink
[16.0][FIX]l10n_es_aeat_mod369: decimal place vat and base
Browse files Browse the repository at this point in the history
  • Loading branch information
david-s73 committed Feb 24, 2025
1 parent 6208862 commit c97ded6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions l10n_es_aeat_mod369/models/mod369_line_grouped.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,15 @@ def _compute_totals(self):
def _compute_vat_type_str(self):
for line in self:
vat_type_split = str(line.vat_type).split(".")
line.vat_type_str = vat_type_split[0].zfill(3) + vat_type_split[1].zfill(2)
line.vat_type_str = vat_type_split[0].zfill(3) + vat_type_split[1].ljust(
2, "0"
)

@api.depends("base")
def _compute_base_str(self):
for line in self:
base_split = str(line.base).split(".")
line.base_str = base_split[0].zfill(15) + base_split[1].zfill(2)
line.base_str = base_split[0].zfill(15) + base_split[1].ljust(2, "0")

@api.depends("amount")
def _compute_amount_str(self):
Expand Down

0 comments on commit c97ded6

Please sign in to comment.