fix #1051 (negative profit -> 'loss')

This commit is contained in:
rolux 2012-09-30 01:26:19 +02:00
parent b9e1d4aabf
commit 83b71b6c3c
1 changed files with 2 additions and 1 deletions

View File

@ -403,7 +403,8 @@ pandora.ui.infoView = function(data) {
html = [];
['budget', 'gross', 'profit'].forEach(function(key) {
data[key] && html.push(
formatKey(key) + Ox.formatCurrency(data[key], '$')
formatKey(key == 'profit' && data[key] < 0 ? 'loss' : key)
+ Ox.formatCurrency(Math.abs(data[key]), '$')
);
});
$div.html(html.join('; '));