[enhace] display payment status on order
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index f3c91b1..36e23a5 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -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 %}
diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py
index 6c36e3c..4824d44 100644
--- a/erpnext/templates/pages/order.py
+++ b/erpnext/templates/pages/order.py
@@ -13,6 +13,8 @@
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)