batch changes done

This commit is contained in:
gandhimathi 2018-03-23 17:07:45 +05:30
parent 09daebfe9c
commit fbde6abf09

View File

@ -745,8 +745,20 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$rootScope.updateMoreItems=[];
if($scope.feesStructureInfo[0].InstallmentDetails == '') {
$scope.setModel.feesType.BatchCode = $scope.feesStructureInfo[0].batchDetails[0].BatchCode;
$scope.BatchDate = new Date($scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(6,10)+'-'+$scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(3,5)+'-'+$scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(0,2));
$scope.obj = $scope.feesStructureInfo[0].batchDetails.find(x => x.IsDefault == true);
if($scope.obj==undefined || $scope.obj=='' || $scope.obj==null){
$scope.setModel.feesType.BatchCode = $scope.feesStructureInfo[0].batchDetails[0].BatchCode;
$scope.BatchDate = new Date($scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(6,10)+'-'+$scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(3,5)+'-'+$scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(0,2));
}
else{
$scope.setModel.feesType.BatchCode = $scope.obj.BatchCode;
$scope.BatchDate = new Date($scope.obj.BatchDate.substring(6,10)+'-'+$scope.obj.BatchDate.substring(3,5)+'-'+$scope.obj.BatchDate.substring(0,2));
}
$scope.calculateInstallemnts($scope.feesStructureInfo[0],$scope.setTotalAmount,0,'1');