{% extends "base.html" %} {% block header %}Tally Ledger Mapping{% endblock %} {% block content %} {% set mapped_count = branches|selectattr("tally_ledger_name")|list|length %} {% set pending_count = branches|rejectattr("tally_ledger_name")|list|length %}
Finance / Tally

Branch-wise Tally Ledger Mapping

Map each client branch to its exact customer ledger name in Tally. Every branch can have an independent ledger mapping.
Total Branches
{{ branches|length }}
Mapped
{{ mapped_count }}
Pending
{{ pending_count }}
Reset
{% if branches|length == 0 %}
No client branches found
{% if q %} No branch matched “{{ q }}”. Try another company, branch, GSTIN, PAN, city, state, or ledger name. {% else %} Add a client branch before creating its Tally ledger mapping. {% endif %}
{% else %}
{% for branch in branches %} {% set client = branch.client %} {% endfor %}
Client PAN Branch GST Details Tally Ledger Name Status Action
{{ client.company_name if client else '-' }}
{% if client %}
Client ID: {{ client.id }}
{% if client.client_type %} {{ client.client_type }} {% endif %} {% if client.client_category %} {{ client.client_category }} {% endif %}
{% endif %}
{% if client and client.pan %} {{ client.pan }} {% else %} - {% endif %}
{{ branch.branch_location or 'Branch' }}
{% if branch.city %}{{ branch.city }}{% endif %} {% if branch.state %} {% if branch.city %}, {% endif %}{{ branch.state }} {% endif %} {% if not branch.city and not branch.state %} Location not available {% endif %}
Branch ID: {{ branch.id }}
{% if branch.is_active %} Active {% else %} Inactive {% endif %}
GSTIN: {% if branch.gst %}
{{ branch.gst }}
{% else %}
-
{% endif %}
{% if branch.gst_registration_type %}
{{ branch.gst_registration_type }}
{% endif %}
{% if not branch.tally_ledger_name and client and client.tally_ledger_name %}
Existing client-level mapping: {{ client.tally_ledger_name }}
{% else %}
Use the exact spelling available in Tally.
{% endif %}
{% if branch.tally_ledger_name %} Mapped {% else %} Pending {% endif %}
Saving or clearing a ledger name affects only the selected branch.
{% endif %}
{% endblock %}