Emmmanuel FIADUFE

Emmmanuel FIADUFE

  • 749
  • 1.2k
  • 58.5k

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)