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 %}