<div class="form-row">
    <div class="form-item">
        <label>Rental ID</label>
        <select name="rental">
            <% rentals.forEach(rental=> { %>
                <% if (rental.id===invoice.rental) { %>
                    <option selected label="<%= rental.rentalID %>" value="<%= rental.id %>">
                        <% } else { %>
                    <option label="<%= rental.rentalID %>" value="<%= rental.id %>">
                        <% } %>
                            <% }) %>
        </select>
    </div>

    <div class="form-item">
        <label>Customer</label>
        <select name="customer">
            <% customers.forEach(customer=> { %>
                <% if (customer.id===invoice.customer) { %>
                    <option selected label="<%= customer.fullName %>" value="<%= customer.id %>">
                        <% } else { %>
                    <option label="<%= customer.fullName %>" value="<%= customer.id %>">
                        <% } %>
                            <% }) %>
        </select>
    </div>
</div>

<div class="form-row">
    <div class="form-item">
        <label>Invoice ID</label>
        <input type="text" name="invoiceID" value="<%= invoice.invoiceID %>">
    </div>

    <div class="form-item">
        <label>Date Generated</label>
        <input type="date" name="dateGenerated" value="<%= invoice.dateGenerated == null ? '' :
        invoice.dateGenerated.toISOString().split('T')[0] %>">
    </div>
</div>

<div class="form-row">
    <div class="form-item">
        <label>Amount</label>
        <input type="float" name="amount" min="0.0" step="0.01" value="<%= invoice.amount %>">
    </div>
</div>