Hide Rate, Amount in Item Grid template based on permlevel
This commit is contained in:
parent
4f1bccb53d
commit
24989b90ba
@ -72,17 +72,26 @@
|
|||||||
|
|
||||||
<!-- rate -->
|
<!-- rate -->
|
||||||
<div class="col-sm-2 text-right">
|
<div class="col-sm-2 text-right">
|
||||||
|
{% if (frappe.perm.is_visible("rate", doc, frm.perm)) { %}
|
||||||
|
<span class="text-muted">{%= __("hidden") %}</span>
|
||||||
|
{% } else { %}
|
||||||
{%= doc.get_formatted("rate") %}
|
{%= doc.get_formatted("rate") %}
|
||||||
{% if(doc.discount_percentage) { %}
|
{% if(doc.discount_percentage) { %}
|
||||||
<br><span class="label label-default pull-right"
|
<br><span class="label label-default pull-right"
|
||||||
title="{%= __("Discount") %}">
|
title="{%= __("Discount") %}">
|
||||||
{%= -1 * doc.discount_percentage %}%</span>
|
{%= -1 * doc.discount_percentage %}%</span>
|
||||||
{% }%}
|
{% }%}
|
||||||
|
{% } %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- amount -->
|
<!-- amount -->
|
||||||
<div class="col-sm-2 text-right">
|
<div class="col-sm-2 text-right">
|
||||||
|
{% if (frappe.perm.is_visible("amount", doc, frm.perm)) { %}
|
||||||
|
<span class="text-muted">{%= __("hidden") %}</span>
|
||||||
|
{% } else { %}
|
||||||
{%= doc.get_formatted("amount") %}
|
{%= doc.get_formatted("amount") %}
|
||||||
|
{% } %}
|
||||||
|
|
||||||
{% if(in_list(["Sales Order Item", "Purchase Order Item"],
|
{% if(in_list(["Sales Order Item", "Purchase Order Item"],
|
||||||
doc.doctype) && frm.doc.docstatus===1 && doc.amount) {
|
doc.doctype) && frm.doc.docstatus===1 && doc.amount) {
|
||||||
var completed =
|
var completed =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user