Created
October 14, 2018 11:30
-
-
Save mahbub-shohag/2f61ba3cf7aa617e3755e718e4029151 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.purchaseOrderCheckChange = function(purorderobj){ | |
if($scope.itemList.length>0) | |
{ | |
var found = $scope.itemList.some(function(o){ | |
return purorderobj.PUR_REQ_NO === o.PUR_REQ_NO; | |
}) | |
if(!found){ | |
$scope.itemList.push(purorderobj); | |
}else{ | |
var index = $scope.itemList.indexOf(purorderobj); | |
$scope.itemList.splice(index,1); | |
} | |
} | |
else{ | |
$scope.itemList.push(purorderobj); | |
} | |
console.log($scope.itemList); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment