From 8be6cb2d6119dab82a371315b0487997a2e307fe Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:09:03 +0200 Subject: [PATCH] fix(VAT ID Check): avoid re-checking Invalid Input (backport #51) (#53) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext_germany/tasks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext_germany/tasks.py b/erpnext_germany/tasks.py index 4460b9a..aaf1d1f 100644 --- a/erpnext_germany/tasks.py +++ b/erpnext_germany/tasks.py @@ -1,6 +1,5 @@ import frappe from erpnext import get_default_company -from erpnext_germany.utils.eu_vat import parse_vat_id from frappe.query_builder import DocType from pypika import Interval from pypika import functions as fn @@ -78,7 +77,7 @@ def get_last_check_query(party_type: str): ) .where( (vat_id_checks.party_type == party_type) - & (vat_id_checks.status == "Completed") + & (vat_id_checks.status.isin(["Completed", "Invalid Input"])) ) .groupby(vat_id_checks.party) )