Fixed Bill edit in the frontend (The problem is that $scope.bill, the template used for editing is attempted to be populated even before the ajax promise is fulfilled. So had to put it in the promise callback faunction)