mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 05:39:12 +00:00
[fixes] compare attributes in lower case
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -15,6 +15,10 @@ def get_context(context):
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user