[enhancement] stock balance page
This commit is contained in:
@@ -86,7 +86,7 @@ $.extend(erpnext.utils, {
|
||||
$(frm.fields_dict['address_html'].wrapper).html("");
|
||||
frm.fields_dict['contact_html'] && $(frm.fields_dict['contact_html'].wrapper).html("");
|
||||
},
|
||||
|
||||
|
||||
render_address_and_contact: function(frm) {
|
||||
// render address
|
||||
$(frm.fields_dict['address_html'].wrapper)
|
||||
@@ -132,3 +132,22 @@ $(document).on('app_ready', function() {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
erpnext.get_item_dashboard_data = function(data, max_count) {
|
||||
if(!max_count) max_count = 0;
|
||||
data.forEach(function(d) {
|
||||
d.actual_or_pending = d.projected_qty + d.reserved_qty + d.reserved_qty_for_production;
|
||||
d.pending_qty = 0;
|
||||
d.total_reserved = d.reserved_qty + d.reserved_qty_for_production;
|
||||
if(d.actual_or_pending > d.actual_qty) {
|
||||
d.pending_qty = d.actual_or_pending - d.actual_qty;
|
||||
}
|
||||
|
||||
max_count = Math.max(d.actual_or_pending, d.actual_qty,
|
||||
d.total_reserved, max_count);
|
||||
});
|
||||
return {
|
||||
data: data,
|
||||
max_count: max_count
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user