1four51.app.directive('orderdetails', function() { 2 var obj = { 3 restrict: 'AE', 4 templateUrl: 'partials/controls/orderDetails.html', 5 controller: ['$scope', 'Address', function($scope, Address) { 6 if ($scope.isEditforApproval) { 7 var exists = false; 8 angular.forEach($scope.user.CostCenters, function(cc) { 9 if (exists) return; 10 exists = cc == $scope.currentOrder.CostCenter; 11 }); 12 if (!exists) { 13 $scope.user.CostCenters.push({ 14 'Name': $scope.currentOrder.CostCenter 15 }); 16 } 17 } 18 19 $scope.updateCostCenter = updateCostCenter; 20 21 function updateCostCenter() { 22 angular.forEach($scope.user.CostCenters, function(cc) { 23 if (cc.Name == $scope.currentOrder.CostCenter && cc.DefaultAddressID) { 24 Address.get(cc.DefaultAddressID, function(address) { 25 if (address.IsShipping) { 26 $scope.currentOrder.ShipAddressID = cc.DefaultAddressID; 27 } 28 }); 29 } 30 }); 31 } 32 }] 33 }; 34 return obj; 35});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.