Skip to content

Commit

Permalink
[FIX][MTD VAT V12] 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 79b5591 commit c7ca479
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 @@ -391,6 +391,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.parse.quote_plus(self.select_vat_obligation.period_key)
Expand Down

0 comments on commit c7ca479

Please sign in to comment.