Skip to content

Commit

Permalink
Updated theway Profit is calculated
Browse files Browse the repository at this point in the history
  • Loading branch information
nelson-ds committed Jun 2, 2017
1 parent 8396a8c commit 9639cee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website/templates/prediction.html
Expand Up @@ -108,13 +108,13 @@

$("#pic").empty().prepend('<img src="{{ url_for("static", filename="images/mprophet.gif") }}" style="width:80px;height:100px;" />')

$("#result").html('<p align="right"><font size="5"><font size="4">Revenue is: </font></p>')
$("#result").html('<p align="right"><font size="5"><font size="4">Profit is: </font></p>')

if (data.result > data.bdgt) {
$("#arrow").empty().html('<p align="right"><font size="5">$' + numberWithCommas(Math.round((data.result+data.bdgt)/1000000)) + ' Million </font><img src="{{ url_for("static", filename="images/up.png") }}" style="width:24px;height:24px;" align="right" /></p>')
$("#arrow").empty().html('<p align="right"><font size="5">$' + numberWithCommas(Math.round((data.result)/1000000)) + ' Million </font><img src="{{ url_for("static", filename="images/up.png") }}" style="width:24px;height:24px;" align="right" /></p>')
}
else{
$("#arrow").empty().html('<p align="right"><font size="5">$' + numberWithCommas(Math.round((data.result+data.bdgt)/1000000)) + ' Million </font><img src="{{ url_for("static", filename="images/down.png") }}" style="width:24px;height:24px;" /></p>')
$("#arrow").empty().html('<p align="right"><font size="5">$' + numberWithCommas(Math.round((data.result)/1000000)) + ' Million </font><img src="{{ url_for("static", filename="images/down.png") }}" style="width:24px;height:24px;" /></p>')
}

$("#roi").html('<p align="right"><font size="4">ROI: </font><font size="5">' + Math.round(data.result_inc*100)/100 + 'x</font></p>')
Expand Down

0 comments on commit 9639cee

Please sign in to comment.