{% extends "ui/templates/base/layout.html" %} {% block content %} {% if synced %}
Tally accounting masters synchronized successfully.
{% endif %}

Tools · Accounting

Tally Accounting Masters

Phase 3 permanently maps an ERP client or registration to a loaded TallyPrime company using the Tally GUID.

Refresh Tally Companies
{% if initialized %}
Client accounting storage was initialized successfully.
{% endif %} {% if mapped %}
Tally company mapping was saved successfully.
{% endif %} {% if unmapped %}
Tally company mapping was removed.
{% endif %} {% if command_error %}
{{ command_error }}
{% endif %} {% set agent = live_result.agent if live_result else None %} {% set tally = live_result.tally if live_result else None %} {% set accounting = live_result.accounting if live_result else None %}
ERP Local Agent
{{ 'Connected' if agent_online else 'Offline' }}
{{ storage_node.node_name if storage_node else 'No active branch agent' }}
Mapping Module
{{ 'Available' if agent and agent.tally_mapping_capability else ('Update Agent' if agent_online else 'Unavailable') }}
Agent {{ agent.version if agent and agent.version else '-' }}
TallyPrime
{{ 'Connected' if tally and tally.connected else ('Not connected' if tally else 'Not checked') }}
{{ tally.url if tally and tally.url else '127.0.0.1:9000' }}
Loaded Companies
{{ tally.company_count if tally else '-' }}
GUID-based discovery

Only clients assigned to the logged-in Partner in the active branch are shown.

{% if selected_client %}

Accounting Storage

{{ selected_client.client_name }}

{{ 'Initialized' if accounting and accounting.exists else 'Not initialized' }}
{% if accounting and accounting.exists %}
.act Database
{{ accounting.db_path }}
Schema Version
{{ accounting.metadata.schema_version or '2' }}
{% else %}
{% endif %}
{% if accounting and accounting.exists and tally and tally.connected %}

Map ERP Scope to Tally Company

The Tally GUID is stored as the permanent identifier. Company name and GSTIN are retained as descriptive snapshots.

{% endif %} {% if accounting and accounting.exists and tally and tally.connected %}

Phase 3 · Accounting Master Sync

Select the company that is currently open/loaded in TallyPrime. The Local Agent verifies that the selected company is already mapped to this ERP client before reading masters.

Read-only
{% set last_sync = accounting.latest_master_sync if accounting else none %}
Latest Sync
{{ last_sync.completed_at_utc if last_sync and last_sync.completed_at_utc else 'Not synced yet' }}
Company
{{ last_sync.company_name if last_sync else '-' }}
Rows Stored
{{ last_sync.rows_processed if last_sync else 0 }}
Status
{{ last_sync.status|title if last_sync else '-' }}
Synced into the selected client's .act database: Groups, Ledgers, Voucher Types, Stock Groups, Stock Categories, Stock Items, Units, Cost Categories and Cost Centres. No voucher or transaction data is imported in Phase 3.
{% if accounting and accounting.exists %}

Active Tally Mappings

Mappings remain valid across Tally company renames because the GUID is the persistent key.

{% if accounting.mappings %}
{% for mapping in accounting.mappings %} {% endfor %}
ERP Scope Tally Company GUID GSTIN Loaded Action
{% if mapping.registration_id %}
{{ mapping.registration_type_code or 'Registration' }} · {{ mapping.registration_number or mapping.registration_id }}
{{ mapping.registration_trade_name or mapping.registration_legal_name or selected_client.client_name }}
{% else %}
Client level
{{ selected_client.client_name }}
{% endif %}
{{ mapping.company_name }} {{ mapping.tally_guid }} {{ mapping.gstin or '-' }} {{ 'Yes' if mapping.currently_loaded else 'No' }}
{% else %}
No Tally company has been mapped for this client yet.
{% endif %}
{% endif %} {% if tally %}

Loaded Tally Companies

Read-only company discovery from the local TallyPrime instance.

{% if tally.companies %}
{% for company in tally.companies %} {% endfor %}
CompanyGUIDGSTIN
{{ company.name }} {{ company.guid or '-' }} {{ company.gstin or '-' }}
{% else %}
TallyPrime responded, but no loaded company was returned.
{% endif %}
{% endif %} {% endif %}
Phase 3 synchronizes accounting masters only. Voucher/transaction sync and Tally write-back remain disabled and are reserved for later phases.
{% endblock %}