Enrich ERP and Tally GSTIN display

This commit is contained in:
A R R R Associates
2026-08-20 21:24:35 +05:30
parent de8b32b06d
commit fa0f681106
6 changed files with 117 additions and 8 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import io
from pathlib import Path
import zipfile
ERP_LOCAL_AGENT_VERSION = "1.9.0"
ERP_LOCAL_AGENT_VERSION = "1.9.4"
ERP_LOCAL_AGENT_NAME = "ERP Local Agent"
RUNTIME_ROOT = Path(__file__).resolve().parent / "local_agent_runtime"
_DETERMINISTIC_ZIP_TIMESTAMP = (2026, 1, 1, 0, 0, 0)
@@ -1,4 +1,4 @@
ERP Local Agent 1.9.0
ERP Local Agent 1.9.4
Existing storage, WebSocket tunnel, Tally and client .act functionality are preserved.
@@ -66,3 +66,27 @@ Desktop Supervisor 1.9.0
- Closing the desktop dashboard does NOT stop the supervisor or worker.
- The dashboard automatically reconnects/reloads when the worker goes down and returns during an update.
- Existing browser access at http://127.0.0.1:8788 remains available.
Supervisor detection hotfix 1.9.1:
- Desktop dashboard no longer relies on os.kill(pid, 0) to detect the SYSTEM-owned supervisor.
- Uses Windows OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION) when available.
- Uses localhost dashboard health and recent supervisor_state.json as additional valid signals.
- Prevents false 'ERP Local Agent supervisor did not start' errors caused by cross-user Windows process permissions.
Single-supervisor hotfix 1.9.2:
- Replaces PID-text singleton logic with an msvcrt held byte-range file lock that works across Windows processes/logon sessions.
- Duplicate supervisors immediately exit without starting/killing workers.
- Desktop dashboard never launches an interactive supervisor when the installed ERP Local Agent Scheduled Task exists.
- If the task exists but is stopped, dashboard requests Task Scheduler to start it and waits for localhost health.
- Prevents supervisor/worker restart storms caused by multiple supervisors killing one another's workers.
Global mutex hardening 1.9.3:
- Supervisor primary singleton is Windows Global\ARRR_ERP_Local_Agent_Supervisor via CreateMutexW.
- Existing byte-range lock remains only as fallback if Global mutex creation is unavailable.
- Scheduled Task installation is expected to use MultipleInstances=IgnoreNew.
Tally GSTIN enrichment 1.9.4:
- Loaded-company discovery requests GSTRegistrationNumber, GSTRegistrationDetails, GSTIN and PartyGSTIN.
- Company parser searches GSTIN candidates recursively, including nested GST registration details.
- Existing company GUID/name discovery remains unchanged.
@@ -1,2 +1,2 @@
__version__ = "1.9.0"
__version__ = "1.9.4"
AGENT_NAME = "ERP Local Agent"
@@ -201,7 +201,7 @@ class TallyLiveConnector:
<BODY><DESC>
<STATICVARIABLES><SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT></STATICVARIABLES>
<TDL><TDLMESSAGE>
<COLLECTION NAME="ARRRAccountingLoadedCompanies" ISMODIFY="No"><TYPE>Company</TYPE><FETCH>Name,GUID,GSTRegistrationNumber</FETCH></COLLECTION>
<COLLECTION NAME="ARRRAccountingLoadedCompanies" ISMODIFY="No"><TYPE>Company</TYPE><FETCH>Name,GUID,GSTRegistrationNumber,GSTRegistrationDetails,GSTIN,PartyGSTIN</FETCH></COLLECTION>
</TDLMESSAGE></TDL>
</DESC></BODY>
</ENVELOPE>"""
@@ -563,5 +563,15 @@ class TallyLiveConnector:
if not name or key in seen:
continue
seen.add(key)
companies.append(TallyCompany(name=name, guid=_child_text(element, "GUID"), gstin=_child_text(element, "GSTREGISTRATIONNUMBER")))
gstin = _first_text(
element,
(
"GSTREGISTRATIONNUMBER",
"GSTIN",
"PARTYGSTIN",
"GSTNO",
"GSTNUMBER",
),
)
companies.append(TallyCompany(name=name, guid=_child_text(element, "GUID"), gstin=gstin))
return companies