Merge pull request #7662 from nick9822/patch-2

Sales analytics error after upgrade
This commit is contained in:
Nabin Hait 2017-02-09 11:45:30 +05:30 committed by GitHub
commit 2b5fa7647a

View File

@ -202,7 +202,9 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
if (posting_date >= from_date && posting_date <= to_date) {
var item = me.item_by_name[tl[me.tree_grid.item_key]] ||
me.item_by_name['Not Set'];
item[me.column_map[tl.posting_date].field] += (is_val ? tl.base_net_amount : tl.qty);
if(item){
item[me.column_map[tl.posting_date].field] += (is_val ? tl.base_net_amount : tl.qty);
}
}
}
});