[wip] inventory tool

This commit is contained in:
Rushabh Mehta
2016-04-22 17:22:22 +05:30
parent 68d428bfd4
commit 0394aec6a4
9 changed files with 191 additions and 65 deletions

View File

@@ -131,23 +131,4 @@ $(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
}
}
});