TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
suman goud
NA
176
54k
How to calculate multiple textboxes and handling NaN
Sep 7 2016 5:58 AM
var origValue = 0 //keeping pending value in original state
$scope.GetTotalAmount = function (data) {
var popDiscAmount = $scope.DiscAmount;
var popDiscAmount1 = $scope.DiscAmount1;
if (origValue == 0) {
origValue = $scope.ReceiptsViewModel.Amount;
}
$scope.ReceiptsViewModel.Amount = (origValue - popDiscAmount);
$scope.ReceiptsViewModel.Amount = ($scope.ReceiptsViewModel.Amount popDiscAmount1);
$scope.ReceiptsViewModel.Amount = ($scope.ReceiptsViewModel.Amount - $scope.AdjustAmount );
calculations are working properly,but when i changing discAmount to10 total value showing NaN, same for discAmount1,
but when i enter AdjustAmount 20, total value adjusting 1000-(10+10+20)=960 showing total value correctly, after closing popup
discAmount changed with 10, amount should subtract by 10 from amount , same for discAmount1 also ,
Reply
Answers (
1
)
how to save documents in angularjs web api using file upload
angular js with ionic