Fix mirror FY period detection and add TDS exception links
This commit is contained in:
@@ -4,7 +4,7 @@ import io
|
||||
from pathlib import Path
|
||||
import zipfile
|
||||
|
||||
ERP_LOCAL_AGENT_VERSION = "1.25.3"
|
||||
ERP_LOCAL_AGENT_VERSION = "1.25.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,2 +1,2 @@
|
||||
__version__ = "1.25.3"
|
||||
__version__ = "1.25.4"
|
||||
AGENT_NAME = "ERP Local Agent"
|
||||
|
||||
@@ -140,7 +140,13 @@ class AccountingMirrorEngine:
|
||||
except sqlite3.Error:
|
||||
unbalanced = 0
|
||||
try:
|
||||
period_row = db.execute("SELECT MIN(date) AS from_date, MAX(date) AS to_date FROM voucher").fetchone()
|
||||
# The proven v3.0.1 mirror stores the voucher date in
|
||||
# voucher.voucher_date. Earlier status code queried a non-existent
|
||||
# "date" column, silently returned a blank period and caused valid
|
||||
# FY mirrors to be shown as "Mirror required".
|
||||
period_row = db.execute(
|
||||
"SELECT MIN(voucher_date) AS from_date, MAX(voucher_date) AS to_date FROM voucher"
|
||||
).fetchone()
|
||||
voucher_period = dict(period_row) if period_row else {"from_date": "", "to_date": ""}
|
||||
except sqlite3.Error:
|
||||
voucher_period = {"from_date": "", "to_date": ""}
|
||||
|
||||
Reference in New Issue
Block a user