<% const {
    master,
    details
    } = section;
%>
<p><b>1. Calibration using standard weights :</b></p>
<p>
    <b>Tolerance</b>: +/- Least count of the balance OR +/- 0.1 % of Standard weight whichever is higher
    and value should be rounded off on lower side as per display capacity of balance.
</p>

<table class="table-style">
    <thead>
        <tr>
            <th colspan="2">Standard weights for calibration (<%- master.Periodic_Unit %>)</th>
            <th>Tolerance (<%- master.Periodic_Unit %>)</th>
            <th>Accuracy Limits (Std wt +/- Tolerance) (<%- master.Periodic_Unit %>)</th>
        </tr>
    </thead>
    <tbody>
        <% details.forEach((w, i) => { %>
        <tr>
            <td style="text-align:center;">
                <% if (i == 0) {%>
                    20e
                <% } else if (i == 1) { %>
                    20% of a
                <% } else if (i == 2) { %>
                    50% of a
                <% } else if (i == 3) { %>
                    80% of a
                <% } %>
            </td>
            <td style="text-align:center;"><%= w.Periodic_BalStdWt %></td>
            <td style="text-align:center;"><%= details[i]?.Periodic_Tolerance || ''%></td>
            <td style="text-align:center;"><%= w.Periodic_BalNegTol %> - <%= w.Periodic_BalPosTol %></td>
        </tr>
        <% }) %>
    </tbody>
</table>
<% if(sectionIndex == 0){ %>  
<br>  
<p><b>Note:</b></p>
<ol>
    <li>Adjust zero error before commencing the weighing operation.</li>
    <li>Check against standard weights on every month.</li>
</ol>
<% } %>
<table class="table-style">
    <thead>
        <tr>
            <th>Date</th>
            <th>Time</th>
            <th>Cleanliness (Clean / Unclean)</th>
            <th>Spirit Level (Ok / Not Ok)</th>
            <th>Zero Error</th>
            <th colspan="2">Standard weights kept on the balance (<%- master.Periodic_Unit %>)</th>
            <th>Readings shown (<%- master.Periodic_Unit %>)</th>
            <th>Done by</th>
        </tr>
    </thead>
    <tbody>
        <% details.forEach((element, i) => { %>
        <tr>
            <td style="text-align: center;"> <%- i == 0 ? moment(bmaster.Periodic_CalbDate).format(date_Format) : '' %></td>
            <td style="text-align: center;">
                <%= i == 0 ? confi_tbl.TimeFormat === 'HH:mm'
            ? master.Periodic_CalbTime.slice(0, 5)
            : confi_tbl.TimeFormat === 'HH:mm:ss'
            ? master.Periodic_CalbTime.slice(0, 8)
            : master.Periodic_CalbTime : ''%>
            </td>
            <td style="text-align: center;"><%- i == 0 ? master.Periodic_GeneralCare == 0 ? 'Clean' : '' : '' %></td>
            <td style="text-align: center;"><%- i == 0 ? master.Periodic_SpritLevel == 0 ? 'OK': '' : ''  %></td>
            <td style="text-align: center;"><%- i == 0 ? master.Periodic_ZeroError == 0 ? 'No Zero Error' : '' : '' %></td>
            <td style="text-align: center;">
                <% if (i == 0) {%>
                20e
                <% } else if (i == 1) { %>
                20% of a
                <% } else if (i == 2) { %>
                50% of a
                <% } else if (i == 3) { %>
                80% of a
                <% } %></td>
            <td style="text-align: center;"><%- element.Periodic_BalStdWt %></td>
            <td style="text-align: center;"><%- element.Periodic_ActualWt %></td>
            <td style="text-align: center;"><%- master.Periodic_UserName %></td>
        </tr>
        <% }); %>

    </tbody>
</table>
