{% if invoice.invoice_origin == "CREDIT_NOTE_REPLACEMENT"
and not invoice.irn
and invoice.einvoice_status != "Generated"
and invoice.tally_sync_status != "Synced" %}
{% endif %}
{% if invoice.einvoice_status != "Generated" %}
{% elif not invoice.signed_qr_code or not invoice.einvoice_qr_image %}
{% endif %}
{% if invoice.tally_sync_status == "Synced" %}
Synced to Tally
{% else %}
{% endif %}
{% if invoice.tally_sync_status == "Synced" %}
Synced to Tally
{% endif %}
{% if invoice.status != "Cancelled" %}
{% if generated_credit_note %}
Credit Note Generated
{% elif invoice.credit_note_status == "Requested" %}
Credit Note Requested
{% elif invoice.credit_note_status == "Approved" %}
Credit Note Approved
{% elif current_user.has_perm("credit_notes.requests.create") %}
Raise Credit Note Request
{% endif %}
{% endif %}
Back to PI
Download PDF
Payments
{% if can_edit_invoice_items %}
{% elif current_user.has_perm("invoices.generate") and (invoice.irn or invoice.einvoice_status == "Generated" or invoice.tally_sync_status == "Synced") %}
Items Locked
{% if can_manual_exception_edit %}
Exception Edit
{% endif %}
{% endif %}
{% if current_user.has_perm("invoices.generate")
and invoice.status != "Cancelled" %}
{% endif %}
{% if not invoice.irn
and invoice.tally_sync_status != "Synced"
and invoice.status != "Cancelled" %}
{% endif %}
{% if invoice.manual_item_edit_count %}
Post-Issue Invoice Line Items Edited
This invoice has {{ invoice.manual_item_edit_count }} manual post-issue edit(s).
The invoice subtotal remained unchanged. IRN/Tally records are not automatically rewritten.