<style>
  .calibration-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Times New Roman", serif;
    font-size: 14px;
  }

  .calibration-table td {
    border: 2px solid #000;
    padding: 8px 10px;
    vertical-align: middle;
  }
  .value {
    width: 30%;
  }
    body {
        font-family: "Times New Roman", serif;
        font-size: 14px;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        page-break-inside: auto;
    }

    td,
    th {
        border: 1px solid #000;
        padding: 6px;
        vertical-align: top;
        page-break-inside: avoid;
    }
     tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }

    table,
    tr,
    td,
    th {
        -webkit-region-break-inside: avoid;
        break-inside: avoid;
    }
    .info-table td {
        padding: 6px 12px;
        border: none;
        /* No borders */
         vertical-align: middle;;
    }

</style>

<div style="padding-left: 30px; padding-right: 30px;">
<table class="calibration-table">
  <tr>
    <td >Instrument ID No.:</td>
    <td class="value"><%= master[`${type}_BalID`]  %></td>
    <td >Weighbox ID:</td>
    <td class="value"><%= master[`${type}_AllWeightboxID`]  %></td>
  </tr>

  <tr>
    <td >Operating Range :</td>
    <td class="value"><%= master[`${type}_Bal_MinOR`] %> - <%= master[`${type}_Bal_MaxOR`] %> <%= master[`${type}_Unit`] %></td>
    <td >Certificate Number:</td>
    <td class="value"><%= master[`${type}_AllWeightboxCert`]  %></td>
  </tr>

  <tr>
    <td >Date:</td>
    <td class="value"><%= moment(master[`${type}_CalbDate`]).format(date_Format) %></td>
    <td >Calibration Date of Weightbox:</td>
    <td class="value"><%- moment(master[`${type}_CalWtBoxDate`]).format(date_Format)  %></td>
  </tr>

  <tr>
    <td >Start Time:</td>
    <td class="value"><%= master[`${type}_CalbTime`] %></td>
    <td>Calibration Due Date of Weightbox:</td>
    <td class="value"><%= moment(master[`${type}_AllWeightboxValidUpto`]).format(date_Format) %></td>
  </tr>

  <tr>
    <td >End Time:</td>
    <td class="value"><%= master[`${type}_CalbEndTime`] %></td>
    <td>
      Next Calibration Due Date<br>
      of Balance:
    </td>
    <td class="value"><%= moment(master[`${type}_DueDate`]).format(date_Format)%></td>
  </tr>
</table>

<div>
  Frequency: <%= master[`${type}_frequency `] || 'Yearly' %>
</div>
<% balCalData.forEach((section, sectionIndex) => { %>
<% if(sectionIndex !== 0) { %>
    <div style="page-break-after: always;"></div>
<% } %>
<% if(section.type === 'Sensitivity') { %>
    <%- include('SensitivityCalibration', {section, sectionIndex}) %>
<% } %>
<% if(section.type === 'Accuracy') { %>
    <%- include('AccuracyCalibration', {section, sectionIndex}) %>
<% } %>
<% if(section.type === 'Eccent') { %>
    <%- include('EccentricityCalibration', {section, sectionIndex}) %>
<% } %>
<% if(section.type === 'Linear') { %>
    <%- include('LinearityCalibration', {section, sectionIndex}) %>
<% } %>
<% if(balCalData.length - 1 === sectionIndex) { %>  
<p><b>Checked By: <%- master[`${type}_VerifyID`] !="NULL" ? `${master[`${type}_VerifyID`]}(${master[`${type}_VerifyName`]})` : '' %></b></p>
<% } %>
<% }) %>
</div>