firmenbuch: a partnership (KG, OG, GmbH & Co KG) no longer matches the GmbH of the same name
The name search ignored the legal form, so "Huber GmbH & Co KG" (public contracts) was given the register number of "Huber GmbH" in Ebenfurth and thereby linked to that company's managing director. Fixed on the server by moving the number and the officer role to an organisation of their own. Commons register ids reuse firmenbuch_number(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b761517386
commit
c61cb31e4a
3 files changed
+22
-6
No files matched your search
@@ -203,10 +203,20 @@ def search_term(name: str) -> str:
|
||||
return term if len(term) >= 3 else ""
|
||||
|
||||
|
||||
PARTNERSHIP = re.compile(r"\b(kg|og|kommanditgesellschaft|offene gesellschaft|co\.?\s*kg)\b", re.IGNORECASE)
|
||||
|
||||
|
||||
def is_partnership(name: str) -> bool:
|
||||
"""KG / OG / GmbH & Co KG: a different legal entity from the GmbH of the same name (often its general partner)."""
|
||||
return bool(PARTNERSHIP.search(name))
|
||||
|
||||
|
||||
def unique_match(name: str, hits: list[dict[str, Any]]) -> dict[str, Any] | None:
|
||||
"""The one current register entry with the same name (legal form, case and punctuation ignored)."""
|
||||
"""The one current register entry with the same name (legal form, case and punctuation ignored, but a
|
||||
partnership never matches a corporation: 'Huber GmbH & Co KG' is not 'Huber GmbH')."""
|
||||
target = normalize_org_name(name)
|
||||
same = [h for h in hits if h["fn"] and normalize_org_name(h["name"]) == target]
|
||||
same = [h for h in hits if h["fn"] and normalize_org_name(h["name"]) == target
|
||||
and is_partnership(h["name"]) == is_partnership(name)]
|
||||
current = [h for h in same if not h["status"]] or same
|
||||
return current[0] if len(current) == 1 else None
|
||||
|
||||
|
||||
Reference in new issue
Block a user