@@ -508,7 +508,7 @@ function widget_sale_purchase_expense(widget) {
// },0);
if(item.type == 'out_invoice'){
var origin = 0;
- if(item.origin.match(/SO/) != null){
+ if (item.origin && item.origin.match(/SO/) != null) {
origin = item.amount;
}
return origin;