Skip to content

Commit

Permalink
[FIX][MTD VAT V10] raising reconcile error before submitting
Browse files Browse the repository at this point in the history
unreconciled accounts needed to be raised before a submission is processed.
  • Loading branch information
ShreeOpusVL committed May 24, 2019
1 parent be04917 commit ecb2d35
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions account_mtd_vat/models/mtd_vat_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,15 @@ def _handle_vat_submit_returns_endpoint(self):
"Chart of Taxes can not be generated!\n " +
"Please create HMRC Posting Templae record first"
)
for rec in hmrc_posting_config:
if not rec.output_account.reconcile:
raise exceptions.Warning(
"The account {} is not marked as reconciliable !".format(rec.output_account.name)
)
elif not rec.input_account.reconcile:
raise exceptions.Warning(
"The account {} is not marked as reconciliable !".format(rec.output_account.name)
)

vrn = self.get_vrn(self.vrn)
period_key = urllib.quote_plus(self.select_vat_obligation.period_key)
Expand Down

0 comments on commit ecb2d35

Please sign in to comment.