{% extends "base.html" %} {% block title %}Vendor Invoice {{ invoice.vendor_invoice_no }}{% endblock %} {% block content %} {% set is_inr = (invoice.currency or '')|upper == 'INR' %} {% set taxable_amount = invoice.calculated_taxable_amount %} {% set gst_amount = invoice.calculated_gst_amount %} {% set tds_amount = invoice.calculated_tds_amount if is_inr else 0 %} {% set net_payable = invoice.calculated_net_payable_amount %}
Vendor Invoices

{{ invoice.vendor_invoice_no }}

{{ invoice.vendor.name }} · {{ invoice.vendor.external_translator_id }} · {{ invoice.invoice_branch_display }} · {{ invoice.currency }}
Download Invoice{% if can_manage and invoice.tally_sync_status != 'Synced' and invoice.payment_status != 'Rejected' %}
{% endif %}
Tally Journal
{% if invoice.tally_sync_status == 'Synced' %}Synced{% elif invoice.tally_sync_status == 'Failed' %}Failed{% else %}Pending{% endif %}
{% if invoice.tally_sync_at %}{{ invoice.tally_sync_at.strftime('%d %b %Y %I:%M %p') }}{% else %}Journal number will be generated by Tally{% endif %}
{% if invoice.tally_sync_status == 'Failed' and invoice.tally_sync_error %}
Tally error: {{ invoice.tally_sync_error }}
{% endif %}
Net Payable
{{ invoice.currency }} {{ indian_amount(payment_progress.net|float) }}
Paid
{{ invoice.currency }} {{ indian_amount(payment_progress.paid|float) }}
Scheduled
{{ invoice.currency }} {{ indian_amount(payment_progress.scheduled|float) }}
Remaining
{{ invoice.currency }} {{ indian_amount(payment_progress.remaining|float) }}
{% set pct = ((payment_progress.paid|float / payment_progress.net|float * 100) if payment_progress.net|float > 0 else 0) %}
Payment Progress · {{ invoice.payment_status }}{{ '%.0f'|format(pct) }}%
{% if is_inr %}
INR invoice: {% if invoice.gst_registered %}Taxable INR {{ indian_amount(taxable_amount|float) }} · GST 18% INR {{ indian_amount(gst_amount|float) }} · Gross INR {{ indian_amount(invoice.total_amount|float) }} · {% endif %}TDS 10% INR {{ indian_amount(tds_amount|float) }} · Net INR {{ indian_amount(net_payable|float) }}
{% endif %}
Jobcard Payment Position
Finance can pay/schedule the complete invoice or only selected jobcards.
{% for row in payment_jobcards %}{% endfor %}
JobcardServiceTaxableNet SharePaidScheduledBalance
{{ row.jobcard_code }}{{ row.service_display or '—' }}{{ invoice.currency }} {{ indian_amount(row.taxable|float) }}{{ invoice.currency }} {{ indian_amount(row.net|float) }}{{ invoice.currency }} {{ indian_amount(row.paid|float) }}{{ invoice.currency }} {{ indian_amount(row.scheduled|float) }}{{ invoice.currency }} {{ indian_amount(row.remaining|float) }}
Payment History
{% if payment_transactions %}
{% for pay in payment_transactions %}
{{ pay.status }} · {{ pay.payment_mode|title }}
{{ pay.payment_date.strftime('%d %b %Y') if pay.payment_date else 'No date' }} · {{ pay.reference or 'No reference' }}
{% for a in pay.allocations %}{{ a.invoice_item.jobcard_code }}{% if not loop.last %}, {% endif %}{% endfor %}
{% if pay.remarks %}
{{ pay.remarks }}
{% endif %}
{{ pay.currency }} {{ indian_amount(pay.amount|float) }}
{% if can_manage and pay.status=='Scheduled' %}{% endif %}
{% endfor %}
{% else %}
No granular payment transactions yet. Historical invoice status remains preserved.
{% endif %}
{% if can_manage %}
Record Payment
Full or jobcard-wise payment
For a partial payment, choose Selected Jobcards and tick only the jobcards covered by this transaction.
Select jobcards
{% for row in payment_jobcards if row.remaining > 0 %}{% else %}
All jobcards are fully paid.
{% endfor %}
{% if is_inr and not invoice.tds_confirmed %}
{% endif %}

Invoice Control
{% endif %}
{% for pay in payment_transactions if pay.status=='Scheduled' and can_manage %}{% endfor %} {% endblock %} {% block scripts %}{{ super() }}{% endblock %}