Fix portal invoice link to use PDF download instead of desk URL
/Sales Invoice/NAME goes to desk (permission error for portal users). Changed to PDF download API which respects portal user permissions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
19be48231d
commit
42a81f2868
1 changed files with 1 additions and 1 deletions
|
|
@ -190,7 +190,7 @@
|
||||||
<div class="pw-invoices-title">Invoices</div>
|
<div class="pw-invoices-title">Invoices</div>
|
||||||
{% for inv in order.invoices %}
|
{% for inv in order.invoices %}
|
||||||
<div class="pw-invoice-row">
|
<div class="pw-invoice-row">
|
||||||
<a href="/Sales Invoice/{{ inv.name }}" style="color:var(--pw-blue);text-decoration:underline;">{{ inv.name }}</a>
|
<a href="/api/method/frappe.utils.print_format.download_pdf?doctype=Sales+Invoice&name={{ inv.name }}&no_letterhead=0" target="_blank" style="color:var(--pw-blue);text-decoration:underline;">{{ inv.name }}</a>
|
||||||
<span>
|
<span>
|
||||||
${{ "{:,.2f}".format(inv.grand_total | float) }} —
|
${{ "{:,.2f}".format(inv.grand_total | float) }} —
|
||||||
{% if inv.outstanding_amount == 0 %}
|
{% if inv.outstanding_amount == 0 %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue