Fix mirror FY period detection and add TDS exception links

This commit is contained in:
A R R R Associates
2026-09-06 21:05:07 +05:30
parent eb83e5418d
commit cbe594e73b
4 changed files with 97 additions and 5 deletions
@@ -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": ""}