Fix GST reconciliation credential vault integration

This commit is contained in:
A R R R Associates
2026-09-10 21:59:20 +05:30
parent 477ea79f76
commit 90d7769bee
2 changed files with 98 additions and 11 deletions
@@ -16,9 +16,24 @@
<input type="hidden" name="csrf_token" value="{{ csrf_token }}"><input type="hidden" name="client_id" value="{{ selected_client.id }}"><input type="hidden" name="registration_id" value="{{ selected_registration.id }}"><input type="hidden" name="period" value="{{ period }}">
<h2 class="font-semibold">1. Download from GST Portal</h2>
<p class="text-xs text-slate-500">The Local Storage Agent opens GST portal on the workstation. Username/password are taken from Credential Vault; captcha/OTP remains interactive. Raw return data is saved under the client's FY/GST/GSTIN/period directory.</p>
<label class="text-sm">Credential Vault Entry<select name="credential_id" required class="mt-1 w-full rounded border p-2"><option value="">Select GST credential</option>{% for c in credentials %}<option value="{{ c.id }}">{{ c.title }}{% if c.reference_number %} — {{ c.reference_number }}{% endif %}</option>{% endfor %}</select></label>
<label class="text-sm">Credential Vault Entry
<select name="credential_id" required class="mt-1 w-full rounded border p-2">
<option value="">Select GST credential</option>
{% for c in credentials %}
<option value="{{ c.id }}" {% if credentials|length == 1 %}selected{% endif %}>{{ c.title }}{% if c.reference_number %} — {{ c.reference_number }}{% endif %}</option>
{% endfor %}
</select>
</label>
{% if not credentials %}
<div class="rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900">
No usable GST Portal credential is linked to this client/GSTIN.
<a class="font-semibold underline" href="/credential-vault/new?client_id={{ selected_client.id }}&registration_id={{ selected_registration.id }}">Add GST Portal credential</a>.
</div>
{% elif credentials|length == 1 %}
<div class="text-xs text-slate-500">The only eligible GST Portal credential has been selected automatically.</div>
{% endif %}
<label class="flex gap-2 text-sm"><input type="checkbox" name="include_2a" value="1"> Also download GSTR-2A</label>
<button {% if not period or not node_online %}disabled{% endif %} class="rounded bg-indigo-600 px-4 py-2 text-white disabled:opacity-50">Start GST Download</button>
<button {% if not period or not node_online or not credentials %}disabled{% endif %} class="rounded bg-indigo-600 px-4 py-2 text-white disabled:opacity-50">Start GST Download</button>
<div class="text-xs">Storage Agent: <b>{{ 'Online' if node_online else 'Offline' }}</b></div>
</form>
<form method="post" action="/tools/accounting/gst-reconciliation/analyze" class="rounded-xl border bg-white p-4 space-y-3">