<% if (onerec === null) { %>
    <h1>No Record Found</h1>
<% } else { %>
    <h1>Details</h1>
    <table>
        <tr> <td> Order Detail ID: </td> <td> <%= onerec.orderdetail_id %> </td> </tr>
        <tr> <td> Order ID: </td> <td> <%= onerec.order_id %> </td> </tr>
        <tr> <td> Product ID: </td> <td> <%= onerec.product_id %> </td> </tr>
        <tr> <td> Sale Price: </td> <td> <%= Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(onerec.saleprice) %> </td> </tr>
        <tr> <td> Quantity: </td> <td> <%= onerec.qty %> </td> </tr>
    </table>
<% } %>