mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 13:49:13 +00:00
[enhace] display payment status on order
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{% extends "templates/web.html" %}
|
||||
|
||||
{% block header %}
|
||||
<h1>{{ doc.name }}</h1>
|
||||
<h1>
|
||||
{{ doc.name }}
|
||||
</h1>
|
||||
<!-- <h6 class="text-muted">{{ doc._title or doc.doctype }}</h6> -->
|
||||
{% endblock %}
|
||||
|
||||
@@ -20,7 +22,13 @@
|
||||
<span class="indicator {{ doc.indicator_color or "darkgrey" }}">
|
||||
{{ doc.indicator_title or doc.status or "Submitted" }}
|
||||
</span>
|
||||
</div>
|
||||
{% if doc.base_net_total == doc.advance_paid and payment_ref%}
|
||||
<div>
|
||||
<span class="indicator green" data-toggle="tooltip" title=" Reference Id: {{payment_ref}}"> Paid</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="col-xs-6 text-muted text-right h6">
|
||||
{{ doc.get_formatted("transaction_date") }}
|
||||
</div>
|
||||
@@ -85,9 +93,9 @@
|
||||
<a href="/api/method/erpnext.accounts.doctype.payment_request.payment_request.make_payment_request?dn={{ doc.name }}&dt={{ doc.doctype }}&submit_doc=1&mute_email=1&cart=1"
|
||||
class="btn btn-primary btn-sm">Pay {{ doc.get_formatted("grand_total") }} </a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -13,6 +13,8 @@ def get_context(context):
|
||||
context.doc.set_indicator()
|
||||
|
||||
context.parents = frappe.form_dict.parents
|
||||
|
||||
context.payment_ref = frappe.db.get_value("Payment Request",
|
||||
{"reference_name": frappe.form_dict.name}, "name")
|
||||
|
||||
if not context.doc.has_website_permission("read"):
|
||||
frappe.throw(_("Not Permitted"), frappe.PermissionError)
|
||||
|
||||
Reference in New Issue
Block a user