From ecb2d3595231471440a58547431f321a90680c8d Mon Sep 17 00:00:00 2001 From: Shree Sangani Date: Fri, 24 May 2019 15:49:21 +0100 Subject: [PATCH] [FIX][MTD VAT V10] raising reconcile error before submitting unreconciled accounts needed to be raised before a submission is processed. --- account_mtd_vat/models/mtd_vat_endpoint.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/account_mtd_vat/models/mtd_vat_endpoint.py b/account_mtd_vat/models/mtd_vat_endpoint.py index 48ff366..8414764 100644 --- a/account_mtd_vat/models/mtd_vat_endpoint.py +++ b/account_mtd_vat/models/mtd_vat_endpoint.py @@ -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)