Skip to content

Commit 747c081

Browse files
committed
[IMP]l10n_it_declaration_of_intent: check plafond using force doi
1 parent 640b5ec commit 747c081

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

l10n_it_declaration_of_intent/models/account_move.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,10 @@ def get_declaration_residual_amounts(self, declarations):
295295
if declaration.id not in declarations_amounts:
296296
declarations_amounts[declaration.id] = declaration.available_amount
297297
if any(tax in declaration.taxes_ids for tax in tax_line.tax_ids):
298-
declarations_amounts[declaration.id] -= amount
298+
if not tax_line.force_declaration_of_intent_id or (
299+
tax_line.force_declaration_of_intent_id == declaration
300+
):
301+
declarations_amounts[declaration.id] -= amount
299302
for declaration in declarations:
300303
# exclude amount from lines with invoice_id equals to self
301304
for line in declaration.line_ids.filtered(

0 commit comments

Comments
 (0)