{% extends "ui/templates/base/layout.html" %} {% block content %}

Accounting Foundation · Phase 16

Chart of Accounts · Groups & Ledgers

Read the complete mapped Tally Group and Ledger master first, resolve every ledger through its parent-group hierarchy, and maintain a client-specific accounting role before using voucher history for Purchase/Sales classification.

Back to Tally Accounting
{% if message %}
{{ message }}
{% endif %} {% if error %}
{{ error }}
{% endif %}
{% if selected_client %}

Refresh from Tally Group & Ledger Master

This is read-only against Tally. It refreshes the existing local .act master snapshot and copies Groups/Ledgers into the ERP Chart of Accounts for classification and review.

{% if last_sync %}

Last ERP Chart sync: {{ last_sync.created_at_utc }} · {{ last_sync.group_count }} groups · {{ last_sync.ledger_count }} ledgers.

{% endif %}
{% if not node_online %}
ERP Local Agent is not currently online for this branch.
{% elif not available_mappings %}
Map this ERP client to a Tally company first from the Tally Accounting page.
{% endif %}
{% for label,value in [ ('Groups',summary.groups), ('Ledgers',summary.ledgers), ('Classified',summary.classified), ('Review Required',summary.review), ('Manual Overrides',summary.manual) ] %}
{{ label }}
{{ value }}
{% endfor %}
{% if view == 'ledgers' %}

Ledger Master

{{ total }} ledger(s). Manual role overrides survive future Chart refreshes.

{% for row in ledgers %} {% set final_role = effective_role(row) %} {% else %} {% endfor %}
Ledger Parent / Root Group Balances GST / Tax Accounting Role Review / Override
{{ row.name }}
{% if row.master_guid %}
{{ row.master_guid }}
{% endif %} {% if row.party_gstin %}
{{ row.party_gstin }}
{% endif %}
{{ row.parent_group_name or '—' }}
Root: {{ row.root_group_name or '—' }}
Opening: ₹{{ '%.2f'|format(row.opening_balance) }}
Closing: ₹{{ '%.2f'|format(row.closing_balance) }}
{{ row.tax_type or '—' }}
{{ row.gst_applicable or row.gst_registration_type or '—' }}
{% if row.hsn_code %}
HSN/SAC {{ row.hsn_code }}
{% endif %}
{{ role_labels.get(final_role, final_role) }}
{% if row.manual_role_code %} Manual {% else %}
{{ row.suggested_confidence }}% · Automatic
{{ row.suggestion_reason }}
{% endif %}
No Chart-of-Accounts ledgers have been synchronized for this selection yet.
{% if pages > 1 %}
Page {{ page }} of {{ pages }}
{% if page > 1 %} Previous {% endif %} {% if page < pages %} Next {% endif %}
{% endif %}
{% else %}

Tally Group Master

Every Group is resolved to its primary/root Tally Group. This hierarchy drives deterministic ledger-role classification.

{% for row in groups %} {% else %} {% endfor %}
Group Parent Root Group Depth Tally Flags
{{ row.name }} {{ row.parent_name or 'Primary' }} {{ row.root_group_name or row.name }} {{ row.depth }} {% if row.reserved_name %}Reserved: {{ row.reserved_name }}{% endif %} {% if row.is_revenue %}
Revenue: {{ row.is_revenue }}
{% endif %} {% if row.is_deemed_positive %}
Deemed Positive: {{ row.is_deemed_positive }}
{% endif %}
No Group master synchronized yet.
{% endif %} {% endif %}
{% endblock %}