<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/layout :: head('Vendor Report')}"></head>
<body>
<nav th:replace="~{fragments/layout :: adminbar}"></nav>

<section>
    <div class="container">
        <div class="page-header">
            <h1>Vendor-wise Revenue</h1>
            <div>
                <a class="btn btn-outline btn-sm" th:href="@{/admin/reports/vendors/excel}">Export Excel</a>
                <a class="btn btn-ghost btn-sm" th:href="@{/admin/reports}">&larr; Reports</a>
            </div>
        </div>

        <div class="table-wrap">
            <table>
                <thead><tr><th>Vendor</th><th>Trips</th><th>Gross</th><th>Commission</th><th>Net Payable</th></tr></thead>
                <tbody>
                <tr th:each="r : ${rows}">
                    <td th:text="${r.vendor}">vendor</td>
                    <td th:text="${r.trips}">0</td>
                    <td>[[${currencySymbol}]]<span th:text="${r.gross}">0</span></td>
                    <td>[[${currencySymbol}]]<span th:text="${r.commission}">0</span></td>
                    <td><strong>[[${currencySymbol}]]<span th:text="${r.net}">0</span></strong></td>
                </tr>
                <tr th:if="${#lists.isEmpty(rows)}"><td colspan="5" style="color:#888">No vendors.</td></tr>
                </tbody>
            </table>
        </div>
    </div>
</section>

<footer th:replace="~{fragments/layout :: footer}"></footer>
</body>
</html>
