Emmmanuel FIADUFE

Emmmanuel FIADUFE

  • 780
  • 1.1k
  • 55.6k

Angular controllerJS and C# MVC application

Oct 20 2023 2:14 PM

Hello Team,
Please am using angular controllerJS in my MVC application to Sum up item Quantity,SubTotal,DiscountPercent,VatPercent,TotalAmount but the columns value sum up higher value than expected, kindly  help
  
function sumOfSalesDetails($scope) {
           
            $.each($scope.PrintSalesRecordList.modifiedData, function (index, val) {
                $scope.totalQty += val.Quantity;
                $scope.subTotal += val.SubTotal;
                $scope.DiscountTotal += val.DiscountPercent;
                $scope.VatTotal += val.VatPercent;
                $scope.Total += val.TotalAmount;
            })
        }
    }]);
}).call(angular);  
 


Answers (3)