<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Raise New Bill</title>
    {% load static %}
    <link rel="stylesheet" href="{% static 'welcome.css' %}">
</head>

<body>

   
    <nav class="navbar">
        <div class="logo">Travel Log Management</div>
        <ul class="nav-links">
            <!-- <li><a href="#">Reports</a></li> -->
             <li><a href="{% url 'travel_bill_report' %}">Reports</a></li>
            {% if show_bill_generate %}
                <!-- <li><a href="{% url 'bill_generate' %}]">Bill Generate</a></li> -->
                <li><a href="{% url 'bill_generate' %}" class="active">Bill Generate</a></li>

            {% endif %}
            <li class="inactive-link">Invoice</li>
        </ul>
        <div class="menu-icon">☰</div>
    </nav>
    
    
    <div class="welcome-container">
        <h2>Welcome, {{ user_type }}!</h2>
        
        
    <!-- Travel Bill Report Section -->
    <div class="form-container">
        <h1>Travel Bill Report</h1>
        <table border="1">
            <thead>
                <tr>
                    <th>Guest Name</th>
                    <th>Cell No.</th>
                    <th>Vehicle Type</th>
                    <th>From Date & Time</th>
                    <th>To Date & Time</th>
                    <th>Visit Places</th>
                    <th>Total KMs</th>
                    <th>Total Amount</th>
                    <th>Driver Name</th>
                    <th>Action</th>
                </tr>
            </thead>
            <tbody>
                {% for bill in travel_bills %}
                <tr>
                    <td>{{ bill.guest_name }}</td>
                    <td>{{ bill.cell_no }}</td>
                    <td>{{ bill.vehicle_type }}</td>
                    <td>{{ bill.from_date_time }}</td>
                    <td>{{ bill.to_date_time }}</td>
                    <td>{{ bill.visit_places }}</td>
                    <td>{{ bill.total_kms }}</td>
                    <td>{{ bill.total_amount }}</td>
                    <td>{{ bill.driver_name }}</td>
                     <td>
                        {% if user_type|lower == "kds" %}
                            <button class="paid-btn">Paid</button>
                        {% elif user_type|lower == "agent" %}
                            <button class="view-btn">View</button>
                            <button class="edit-btn">Edit</button>
                            <button class="delete-btn">Delete</button>
                        {% endif %}
                    </td>
                    
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>



    {% load static %}
    <script src="{% static '/main.js' %}"></script>

</body>

    
</html>
