diff --git a/app/modules/accounting/tds_ui.py b/app/modules/accounting/tds_ui.py index 01dfabc..801d4ac 100644 --- a/app/modules/accounting/tds_ui.py +++ b/app/modules/accounting/tds_ui.py @@ -3,6 +3,7 @@ from __future__ import annotations from datetime import date, datetime from decimal import Decimal, InvalidOperation from urllib.parse import quote +from uuid import uuid4 from fastapi import APIRouter, Request from fastapi.responses import RedirectResponse @@ -139,13 +140,22 @@ def tds_root(request: Request, client_id: int | None = None): @router.get("/compliance") -def compliance(request:Request,client_id:int|None=None,tally_guid:str="",date_from:str="",date_to:str="",run:int=0): +def compliance(request:Request,client_id:int|None=None,tally_guid:str="",date_from:str="",date_to:str="",run:int=0,run_token:str=""): db=CommonSessionLocal() try: user,response=_require_partner(request,db,"accounting.tally.view") if response:return response clients,selected,node,online,live,review,start,end,error,history=_workspace(request,db,user,client_id,tally_guid,date_from,date_to,run) - return _render(request,db,user,"modules/accounting/templates/accounting/tds_compliance.html",clients=clients,selected_client=selected,node=node,node_online=online,live=live,review=review,date_from=start,date_to=end,tally_guid=tally_guid,error=error,rules=_rules(db,_tenant_id(request,user)),history=history) + response=_render( + request,db,user,"modules/accounting/templates/accounting/tds_compliance.html", + clients=clients,selected_client=selected,node=node,node_online=online,live=live, + review=review,date_from=start,date_to=end,tally_guid=tally_guid,error=error, + rules=_rules(db,_tenant_id(request,user)),history=history, + run_token=(run_token or uuid4().hex) + ) + response.headers["Cache-Control"]="no-store, no-cache, must-revalidate, max-age=0" + response.headers["Pragma"]="no-cache" + return response finally: db.close() diff --git a/app/modules/accounting/templates/accounting/depreciation_it.html b/app/modules/accounting/templates/accounting/depreciation_it.html index 25edf15..ace038e 100644 --- a/app/modules/accounting/templates/accounting/depreciation_it.html +++ b/app/modules/accounting/templates/accounting/depreciation_it.html @@ -1,6 +1,7 @@ {% extends "ui/templates/base/layout.html" %} {% block content %} {% set mirror = mirror_status.mirror if mirror_status and mirror_status.mirror else {} %} +{% set mirror_effective_ready = mirror.ready_for_financial_year or preview %}
@@ -18,7 +19,7 @@
ERP Local Agent
{{ 'Connected' if agent_online else 'Offline' }}
-
SQLite Mirror
{{ 'Ready' if mirror.ready_for_financial_year else 'Mirror required' }}
{% if mirror.ready_for_financial_year and mirror.company %}
{{ mirror.company.company_name }} · {{ fy_start }} to {{ fy_end }}
{% elif mirror.financial_year_reason %}
{{ mirror.financial_year_reason }}
{% endif %}
+
SQLite Mirror
{{ 'Ready' if mirror_effective_ready else 'Mirror required' }}
{% if mirror_effective_ready and mirror.company %}
{{ mirror.company.company_name }} · {{ fy_start }} to {{ fy_end }}
{% elif mirror.financial_year_reason %}
{{ mirror.financial_year_reason }}
{% endif %}
Write-back
Controlled
Tally is contacted only after approval/posting.
diff --git a/app/modules/accounting/templates/accounting/tally.html b/app/modules/accounting/templates/accounting/tally.html index e7d1087..3b38cd4 100644 --- a/app/modules/accounting/templates/accounting/tally.html +++ b/app/modules/accounting/templates/accounting/tally.html @@ -307,9 +307,16 @@ Read-only export
Before export: open the mapped company in TallyPrime and set Tally's active period (Alt+F2) to cover the full period you want exported. The ODBC mirror reads Tally's active period; the ERP does not change Tally's period automatically.
-
+ + - - + +
+
+ + Select an FY here to create or refresh that year's separate local mirror in the client's FY storage hierarchy. +