<div class="container">
    <div class="page-title">
        <h3>Summary</h3>
    </div>
    <div class="row">
        <div class="col-md-12 col-lg-12">
            <div class="card">
                <div class="card-header">Sales by Leasing - Month to Date</div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>Kode Leasing</th>
                                    <th>Name Leasing</th>
                                    <th>Sales</th>
                                </tr>
                            </thead>
                            <tbody>
                                <% var totalSalesByLeasing = 0 %>
                                <% data.forEach(function(d){ %>
                                    <tr>
                                        <td><%= d.KODE_LEASING %></td>
                                        <td><%= d.NAMA_LEASING %></td>
                                        <td><%= d.QTY %></td>
                                    </tr>
                                    <% totalSalesByLeasing+= parseInt(d.QTY); %>
                                <% }) %>
                                <tr>
                                    <th colspan="2" scope="row">Total</th>
                                    <th scope="row"><%= totalSalesByLeasing %></th>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>