Skip to content

Commit

Permalink
Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KetyaNop committed Nov 20, 2017
1 parent a184361 commit e38d817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/apartment.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ module.exports.set = function(router, pool) {
budgetRemain = Math.round((budgetRemain * 100))/100;

budgetRemain = budgetRemain.toString();
if (budgetRemain[budgetRemain.indexOf(".")+2] == undefined){
if (budgetRemain[budgetRemain.indexOf(".")+2] == undefined && budgetRemain[budgetRemain.indexOf(".")] != undefined){
budgetRemain = budgetRemain.concat("0");
}

apartmentTransferBudget = Math.round((apartmentTransferBudget * 100))/100;
apartmentTransferBudget = apartmentTransferBudget.toString();
if (apartmentTransferBudget[apartmentTransferBudget.indexOf(".")+2] == undefined){
if (apartmentTransferBudget[apartmentTransferBudget.indexOf(".")+2] == undefined && apartmentTransferBudget[apartmentTransferBudget.indexOf(".")] != undefined){
apartmentTransferBudget = apartmentTransferBudget.concat("0");
}
response.render('apartment/apartment_transfer', {
Expand Down

0 comments on commit e38d817

Please sign in to comment.