<% if (onerec === null) { %>
    <h1>No Record Found</h1>
<% } else { %>
    <h1>Details</h1>
    <table>
        <tr> <td> Order ID: </td> <td> <%= onerec.order_id %> </td> </tr>
        <tr> <td> Customer ID: </td> <td> <%= onerec.customer_id %> </td> </tr>
        <tr> <td> Sale Date: </td> <td> <%= new Date(onerec.saledate).toLocaleDateString('en-US', { timeZone: 'UTC' }) %> </td> </tr>
        <tr> <td> Customer Notes: </td> <td> <%= onerec.customernotes %> </td> </tr>
        <tr> <td> Payment Status: </td> <td> <%= onerec.paymentstatus %> </td> </tr>
    </table>
<% } %>