fix: show Purchase Order Portal Pay button based on configuration

This commit is contained in:
s-aga-r 2023-02-08 15:02:39 +05:30
parent d7ef5ad955
commit 20bdc63b03
2 changed files with 12 additions and 9 deletions

View File

@ -34,6 +34,7 @@
</a>
</ul>
</div>
{% if show_pay_button %}
<div class="form-column col-sm-6">
<div class="page-header-actions-block" data-html-block="header-actions">
<p>
@ -44,6 +45,7 @@
</p>
</div>
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -55,6 +55,7 @@ def get_context(context):
)
context.available_loyalty_points = int(loyalty_program_details.get("loyalty_points"))
context.show_pay_button = frappe.db.get_single_value("Buying Settings", "show_pay_button")
context.show_make_pi_button = False
if context.doc.get("supplier"):
# show Make Purchase Invoice button based on permission