mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
Fixes issue #12512
This commit is contained in:
@@ -75,13 +75,21 @@ erpnext.stock.ItemDashboard = Class.extend({
|
|||||||
this.content.find('.more').addClass('hidden');
|
this.content.find('.more').addClass('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
// If not any stock in any warehouses provide a message to end user
|
// If not any stock in any warehouses provide a message to end user
|
||||||
if (context.data.length > 0) {
|
if (context.data.length > 0) {
|
||||||
$(frappe.render_template('item_dashboard_list', context)).appendTo(this.result);
|
$(frappe.render_template('item_dashboard_list', context)).appendTo(this.result);
|
||||||
} else {
|
} else {
|
||||||
var message = __(" Currently no stock available in any warehouse")
|
var message = __(" Currently no stock available in any warehouse")
|
||||||
$("<span class='text-muted small'>"+message+"</span>").appendTo(this.result);
|
$("<span class='text-muted small'>"+message+"</span>").appendTo(this.result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (frappe.boot.user.can_write.indexOf("Stock Entry")>=0){
|
||||||
|
$(".btn-move").show();
|
||||||
|
+ $(".btn-add").show();
|
||||||
|
}else{
|
||||||
|
$(".btn-move").hide();
|
||||||
|
+ $(".btn-add").hide();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
get_item_dashboard_data: function(data, max_count, show_item) {
|
get_item_dashboard_data: function(data, max_count, show_item) {
|
||||||
if(!max_count) max_count = 0;
|
if(!max_count) max_count = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user