Add Phase 15 customer and sales ledger intelligence
This commit is contained in:
@@ -4,7 +4,7 @@ import io
|
||||
from pathlib import Path
|
||||
import zipfile
|
||||
|
||||
ERP_LOCAL_AGENT_VERSION = "1.14.0"
|
||||
ERP_LOCAL_AGENT_VERSION = "1.15.0"
|
||||
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,2 +1,2 @@
|
||||
__version__ = "1.14.0"
|
||||
__version__ = "1.15.0"
|
||||
AGENT_NAME = "ERP Local Agent"
|
||||
|
||||
@@ -1091,8 +1091,15 @@ class LocalAccountingStore:
|
||||
mapping = self.get_active_mapping_by_guid(client_id, guid)
|
||||
params: list = [guid]
|
||||
where = ["v.tally_guid=?", "TRIM(COALESCE(v.party_ledger_name,''))<>''", "LOWER(TRIM(COALESCE(v.is_cancelled,''))) NOT IN ('yes','true','1')", "LOWER(TRIM(e.ledger_name))<>LOWER(TRIM(v.party_ledger_name))"]
|
||||
if str(voucher_scope or "purchase").strip().lower() == "purchase":
|
||||
scope = str(voucher_scope or "purchase").strip().lower()
|
||||
if scope == "purchase":
|
||||
where.append("LOWER(v.voucher_type_name) LIKE '%purchase%'")
|
||||
elif scope == "sales":
|
||||
where.append("LOWER(v.voucher_type_name) LIKE '%sales%'")
|
||||
elif scope in {"all", "any"}:
|
||||
pass
|
||||
else:
|
||||
raise ValueError("Historical evidence voucher_scope must be purchase, sales or all.")
|
||||
if date_from:
|
||||
where.append("v.voucher_date>=?"); params.append(str(date_from))
|
||||
if date_to:
|
||||
|
||||
Reference in New Issue
Block a user