From 1264d67689ad705dd126ec426e528cdfd1cdd592 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:59:54 +0200 Subject: [PATCH] fix(VAT ID Check): avoid re-checking Invalid Input (#51) --- 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) )