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

Tools · Accounting Intelligence

GSTR-2B Purchase Intelligence

Import GSTR-2B purchase documents, classify them through the Phase 6 learning engine, and confirm the accounting nature and mapped Tally ledger. Phase 7 does not post vouchers to Tally.

{% if message %}
{{ message }}
{% endif %} {% if error %}
{{ error }}
{% endif %}
{% if selected_client %} {% endif %}
{% if selected_client %}

Import GSTR-2B

Supported: .xlsx, .xlsm and .csv. Summary sheets are ignored automatically; invoice sheets are detected by column headers.

Suggestion & review only · No Tally posting
{% if selected_batch %}
Batch
#{{ selected_batch.id }}
Rows Read
{{ selected_batch.rows_read }}
Imported
{{ selected_batch.rows_imported }}
Duplicates
{{ selected_batch.rows_skipped_duplicate }}
Analyzed
{{ selected_batch.analyzed_rows }}
Reviewed
{{ selected_batch.reviewed_rows }}

{{ selected_batch.original_filename }}

Return period {{ selected_batch.return_period or '-' }} · Status {{ selected_batch.status|replace('_',' ')|title }}

{% for row in purchases %} {% set suggested = nature_by_id.get(row.suggested_nature_id) if row.suggested_nature_id else None %} {% set final = nature_by_id.get(row.final_nature_id) if row.final_nature_id else None %}

{{ row.supplier_name or row.supplier_gstin or 'Supplier' }}

{{ row.document_type|replace('_',' ')|title }} {% if row.review_status == 'reviewed' %} Reviewed {% elif row.review_status == 'suggested' %} Suggested {% else %} Review required {% endif %}
GSTIN: {{ row.supplier_gstin or '-' }}
Invoice: {{ row.invoice_number }} · {{ row.invoice_date }}
HSN: {{ row.hsn_code or '-' }} · POS: {{ row.place_of_supply or '-' }}
{% if row.description_text %}
{{ row.description_text }}
{% endif %}
Taxable
₹{{ '%.2f'|format(row.taxable_value) }}
Invoice Value
₹{{ '%.2f'|format(row.invoice_value) }}
IGST
₹{{ '%.2f'|format(row.igst) }}
CGST + SGST
₹{{ '%.2f'|format(row.cgst + row.sgst) }}
{% if suggested %}
Suggested Nature
{{ suggested.name }}
{{ row.suggested_confidence }}%
{% if row.suggested_ledger_name %}
Ledger: {{ row.suggested_ledger_name }}
{% endif %} {% if explanations.get(row.id) %}
    {% for reason in explanations.get(row.id)[:4] %}
  • • {{ reason }}
  • {% endfor %}
{% endif %}
{% endif %} {% if row.review_status != 'pending_analysis' %}
{% else %}

Run Analyze / Refresh Suggestions before reviewing this invoice.

{% endif %}
{% else %}
This batch has no imported purchase documents.
{% endfor %}
{% endif %} {% endif %}
{% endblock %}