From eb83e5418d3cd95c90ee54b2f27f6f1fa2c8ab2e Mon Sep 17 00:00:00 2001 From: A R R R Associates Date: Sun, 6 Sep 2026 20:49:42 +0530 Subject: [PATCH] Validate FY mirrors and repair depreciation and TDS review --- app/modules/accounting/opening_balance_ui.py | 4 +- .../templates/accounting/depreciation_it.html | 4 +- .../accounting/opening_balances.html | 20 ++-- .../templates/accounting/tds_compliance.html | 32 ++++- .../templates/accounting/tds_liability.html | 2 +- .../accounting/tds_reconciliation.html | 2 +- .../templates/accounting/tds_rules.html | 4 +- app/modules/accounting/ui.py | 2 +- app/modules/documents/agent_package.py | 2 +- .../erp_local_agent/__init__.py | 2 +- .../erp_local_agent/accounting_store.py | 1 + .../erp_local_agent/commands.py | 113 +++++++++++++++++- 12 files changed, 166 insertions(+), 22 deletions(-) diff --git a/app/modules/accounting/opening_balance_ui.py b/app/modules/accounting/opening_balance_ui.py index fd4ffcc..4e3d548 100644 --- a/app/modules/accounting/opening_balance_ui.py +++ b/app/modules/accounting/opening_balance_ui.py @@ -203,13 +203,13 @@ def page( # the ERP header is now FY2026-27. if not requested_fy: active_status, active_response = mirror_status_for(active_fy) - active_ready = bool((active_status.get("mirror") or {}).get("ready")) + active_ready = bool((active_status.get("mirror") or {}).get("ready_for_financial_year")) if active_ready: current_fy = active_fy else: prior_active_fy = _previous_financial_year(active_fy) prior_status, prior_response = mirror_status_for(prior_active_fy) - prior_ready = bool((prior_status.get("mirror") or {}).get("ready")) + prior_ready = bool((prior_status.get("mirror") or {}).get("ready_for_financial_year")) if prior_ready: current_fy = prior_active_fy else: diff --git a/app/modules/accounting/templates/accounting/depreciation_it.html b/app/modules/accounting/templates/accounting/depreciation_it.html index e83064c..351cfaf 100644 --- a/app/modules/accounting/templates/accounting/depreciation_it.html +++ b/app/modules/accounting/templates/accounting/depreciation_it.html @@ -18,7 +18,7 @@
ERP Local Agent
{{ 'Connected' if agent_online else 'Offline' }}
-
SQLite Mirror
{{ 'Ready' if mirror.ready else 'Mirror required' }}
{{ mirror.company.company_name if mirror.ready and mirror.company else '' }}
+
SQLite Mirror
{{ 'Ready' if mirror.ready_for_financial_year else 'Mirror required' }}
{{ mirror.company.company_name if mirror.ready_for_financial_year and mirror.company else '' }}
Write-back
Controlled
Tally is contacted only after approval/posting.
@@ -122,8 +122,6 @@ {% endif %} {% endif %} - -
Phase 6 enables only controlled depreciation Journal write-back. All master and transaction synchronization remain read-only; no other Tally create/alter/delete operation is enabled.