Skip to content

Commit

Permalink
[FIX][l10n_it_declaration_of_intent] fix creditnote sign
Browse files Browse the repository at this point in the history
  • Loading branch information
matteoopenf authored and Borruso committed Jul 7, 2023
1 parent b9c0521 commit 03b4a46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion l10n_it_declaration_of_intent/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ def get_declaration_residual_amounts(self, declarations):
tax_lines = self.line_ids.filtered("tax_ids")
for tax_line in tax_lines:
# Move lines having `tax_ids` represent the base amount for those taxes
amount = tax_line.price_subtotal
if "refund" in self.move_type:
amount = -tax_line.price_subtotal
else:
amount = tax_line.price_subtotal

for declaration in declarations:
if declaration.id not in declarations_amounts:
declarations_amounts[declaration.id] = declaration.available_amount
Expand Down

0 comments on commit 03b4a46

Please sign in to comment.