Skip to content

Commit

Permalink
Merge branch '14.0-fix-account_vat_period_end_statement-vp9' of git+s…
Browse files Browse the repository at this point in the history
…sh://github.com/efatto/l10n-italy into 14.0
  • Loading branch information
Pretecno committed Sep 20, 2024
2 parents ef5c3e0 + 777aca5 commit 9003bba
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions account_vat_period_end_statement/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ class StatementGenericAccountLine(models.Model):
statement_id = fields.Many2one("account.vat.period.end.statement", "VAT statement")
amount = fields.Float("Amount", required=True, digits="Account")
name = fields.Char("Description")
previous_year_credit = fields.Boolean("Previous year credits")


class AccountTax(models.Model):
Expand Down
12 changes: 8 additions & 4 deletions account_vat_period_end_statement/views/account_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,16 @@
<tree editable="bottom">
<field name="account_id" />
<field name="name" />
<field name="previous_year_credit" />
<field name="amount" />
</tree>
</tree>
<form>
<field name="account_id" />
<field name="name" />
<field name="amount" />
<group>
<field name="account_id" />
<field name="name" />
<field name="previous_year_credit" />
<field name="amount" />
</group>
</form>
</field>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,12 @@ def compute_from_liquidazioni(self):
# 2 - Decremento iva detratta con righe negative
for line in liq.generic_vat_account_line_ids:
if line.amount > 0:
quadro.iva_esigibile -= line.amount
if line.previous_year_credit:
quadro.credito_anno_precedente -= line.amount
else:
quadro.iva_esigibile -= line.amount
else:
quadro.iva_detratta += line.amount
if line.previous_year_credit:
quadro.credito_anno_precedente += line.amount
else:
quadro.iva_detratta += line.amount

0 comments on commit 9003bba

Please sign in to comment.