Move accounting reads and tools to .NET ODBC mirror

This commit is contained in:
A R R R Associates
2026-09-06 13:52:51 +05:30
parent 7ae8a40b49
commit 2e32bae6db
11 changed files with 1633 additions and 468 deletions
@@ -207,3 +207,27 @@ def mirror_exceptions(*, node_code: str, accounting_payload: dict[str, Any], lim
query="exceptions",
filters={"limit": limit},
)
def refresh_masters(*, node_code: str, accounting_payload: dict[str, Any], tally_guid: str,
requested_by_user_id: int | None = None) -> dict[str, Any]:
payload = dict(accounting_payload or {})
payload["tally_guid"] = str(tally_guid or "").strip()
if requested_by_user_id is not None:
payload["requested_by_user_id"] = int(requested_by_user_id)
return _unwrap(request_agent_command(
node_code, "accounting_sync_masters", payload, timeout_seconds=330
))
def refresh_transactions(*, node_code: str, accounting_payload: dict[str, Any], tally_guid: str,
date_from: str, date_to: str,
requested_by_user_id: int | None = None) -> dict[str, Any]:
payload = dict(accounting_payload or {})
payload.update({"tally_guid": str(tally_guid or "").strip(),
"date_from": str(date_from or "").strip(),
"date_to": str(date_to or "").strip()})
if requested_by_user_id is not None:
payload["requested_by_user_id"] = int(requested_by_user_id)
return _unwrap(request_agent_command(
node_code, "accounting_sync_transactions", payload, timeout_seconds=330
))