Emmmanuel FIADUFE

Emmmanuel FIADUFE

  • 793
  • 1.1k
  • 53.6k

ASP.net Select total quantity and total sales by date range

Mar 1 2024 4:12 PM

var totalAmount = 0;
                var totalQty = 0;
                for (var i = 0; i < data.length; i++) {
                    totalAmount += parseFloat(data[i].TotalAmount);
                    totalQty += parseFloat(data[i].Quantity);
                }               
                
                    $("#tqty").val(totalQty);
                    $("#ttotal").val(totalAmount);
                }
                

            "data": function (d) {
                    d.sDate = $("#startdate").val();
                    d.eDate = $("#enddate").val();
                    d.SearvedById = $("#role").val();
                    return { SearvedById: d.SearvedById, sDate: d.sDate, eDate: d.eDate };

                }


Answers (2)