[fixes] compare attributes in lower case
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index fae55f3..3252eb9 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -82,14 +82,16 @@
<div class="cart-taxes row small">
<div class="col-sm-8"><!-- empty --></div>
<div class="col-sm-4">
- {% if (doc.doctype=="Sales Order" and doc.per_billed <= 0)
- or (doc.doctype=="Sales Invoice" and doc.outstanding_amount > 0) %}
- <div class="page-header-actions-block" data-html-block="header-actions">
- <p>
- <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>
+ {% if enabled_checkout %}
+ {% if (doc.doctype=="Sales Order" and doc.per_billed <= 0)
+ or (doc.doctype=="Sales Invoice" and doc.outstanding_amount > 0) %}
+ <div class="page-header-actions-block" data-html-block="header-actions">
+ <p>
+ <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>
+ {% endif %}
{% endif %}
</div>
</div>
diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py
index 4824d44..5cb3ff2 100644
--- a/erpnext/templates/pages/order.py
+++ b/erpnext/templates/pages/order.py
@@ -15,6 +15,10 @@
context.parents = frappe.form_dict.parents
context.payment_ref = frappe.db.get_value("Payment Request",
{"reference_name": frappe.form_dict.name}, "name")
+
+ context.enabled_checkout = frappe.get_doc("Shopping Cart Settings").enable_checkout
+
+ print context.enabled_checkout
if not context.doc.has_website_permission("read"):
frappe.throw(_("Not Permitted"), frappe.PermissionError)