<% const {
    master,
    details
    } = section;
%>
<% if (Report != "yearlyPeriodic") { %>
 <p><b><%= sectionIndex + 1 %>. Eccentricity test :</b></p>
    <p><b>Note:</b> Adjust zero error before commencing the weighing operation.</p>
    <br>
    <div style="display:flex; justify-content:center; gap:50px; margin-bottom:20px; page-break-inside: avoid;">
        <div style="width:170px; height:170px; border:2px solid #000; border-radius:50%; position:relative;">
            <span style="position:absolute; top:35px; left:45px;">C1</span>
            <span style="position:absolute; top:35px; right:45px;">C2</span>
            <span style="position:absolute; bottom:35px; left:45px;">C3</span>
            <span style="position:absolute; bottom:35px; right:45px;">C4</span>
            <span style="position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);">C</span>
        </div>

        <div style="width:170px; height:170px; border:2px solid #000; position:relative;">
            <span style="position:absolute; top:20px; left:25px;">C1</span>
            <span style="position:absolute; top:20px; right:25px;">C3</span>
            <span style="position:absolute; bottom:20px; left:25px;">C2</span>
            <span style="position:absolute; bottom:20px; right:25px;">C4</span>
            <span style="position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);">C</span>
        </div>

    </div>
    <table class="table-style">
        <thead>
            <tr>
            <th>Sr No.</th>
            <th>Standard Weight (<%- master.Eccent_Unit %>)</th>
            <th>Position</th>
            <th>Reading displayed by the balance (<%- master.Eccent_Unit %>)</th>
            <th>Deviation from center = X - C</th>
            <th>Remark</th>
        </tr>
        </thead>

        <tbody>
            <% details.forEach((element, i) => { %>
                <tr>
                    <td align="center"><%= i + 1 %>.</td>

                    <td align="center">
                        <%= element.Eccent_BalStdWt %>
                    </td>

                    <td align="center">
                        <%= ['C','C1','C2','C3','C4'][i] || '' %>
                    </td>

                    <td align="center">
                        <%= element.Eccent_ActualWt %>
                    </td>

                    <td align="center">
                        <%= i === 0 ? '.....' : element.Eccent_Deviation %>
                    </td>

                    <td align="center">
                        <%= element.Eccent_Remark %>
                    </td>
                </tr>
            <% }) %>
        </tbody>
    </table>
    <br>

    <p>Where, X = C1, C2, C3, C4 i.e. different corners of the balance.</p>

    <p><b>Acceptance criteria :</b> Deviation is not more than 0.05%</p>

    <p><b>Result:</b> <%- master.Eccent_Remark == "Ok" ? configRemark[0] : configRemark[1] %></p>
<% } else { %>
    <p><b><%= sectionIndex + 1 %>. Test: Eccentricity test </p>
    <table class="table-style">
        <thead>
            <tr>
                <td colspan="4" style="text-align: left;">Eccentric Test : Reference Weight = <%- details[0].Eccent_BalStdWt %> <%- master.Eccent_Unit %></td>
            </tr>
            <tr>
                <th>Reference Position</th>
                <th>Observed Weight</th>
                <th>Deviation from center</th>
                <th>% Deviation (Limit: NMT 0.05 %)</th>
            </tr>
        </thead>
        <tbody>
            <% details.forEach((element, i) => { %>
            <tr>
                <td align="center"> 
                    <% if (i == 0) {%>
                    C1 (Center)
                    <% } else if (i == 1) { %>
                    C2
                    <% } else if (i == 2) { %>
                    C3
                    <% } else if (i == 3) { %>
                    C4
                    <% } else if (i == 4) { %>
                    C5
                    <% } %>
                </td>
                <td align="center">
                    <% if (i == 0) { %>
                    (C1- C1) = <%- element.Eccent_ActualWt %> <%- master.Eccent_Unit %>
                     <% } else if (i == 1) { %>
                    (C1- C2) = <%- element.Eccent_ActualWt %> <%- master.Eccent_Unit %>
                    <% } else if (i == 2) { %>
                    (C1- C3) = <%- element.Eccent_ActualWt %> <%- master.Eccent_Unit %>
                    <% } else if (i == 3) { %>
                    (C1- C4) = <%- element.Eccent_ActualWt %> <%- master.Eccent_Unit %>
                    <% } else if (i == 4) { %>
                    (C1- C5) = <%- element.Eccent_ActualWt %> <%- master.Eccent_Unit %>
                    <% } %>
                </td>
                <td align="center"><%- element.Eccent_Deviation %> <%- master.Eccent_Unit %></td>
                <td align="center"><%- element.Eccent_PerDeviation %></td>
            </tr>
            <% })%>
        </tbody>
    </table>
    <p><b>Test Result : <%- master.Eccent_Remark == "Ok" ? configRemark[0] :  master.Eccent_Remark != null ? configRemark[1] : '' %></b></p>
    <% } %>