<?php $this->load->view('report_pdf/pdf_header'); ?>
<?php
$this->load->helper('report');
$show_title = !isset($show_title) ? true : (bool) $show_title;
$columns = isset($columns) && is_array($columns) && !empty($columns)
    ? $columns
    : report_catalogue_columns('book');
?>

<?php if ($show_title) { ?>
<p style="text-align:center;font-size:14px;margin:5px 0;">
    <b>Accession Register Report</b>
</p>

<p style="text-align:right;font-size:13px;margin:5px 0;">
    Date: <?php echo date("d/m/Y", strtotime($today)); ?>
</p>

<p style="text-align:left ;font-size:13px;margin:5px 0;">
    Total Records : <?php echo report_pdf_total_rows(isset($report) ? $report : array(), isset($pdf_total_rows) ? $pdf_total_rows : null); ?>
</p>
<br><br>
<?php } ?>

<div id="content">
<table style="border-collapse: collapse;width:100%;table-layout:fixed;text-align:left;" border="1" class="table">
    <tr>
        <?php foreach ($columns as $label => $key) { ?>
        <th><?php echo htmlspecialchars($label); ?></th>
        <?php } ?>
    </tr>
    <?php foreach ($report as $row) { ?>
    <tr>
        <?php foreach ($columns as $label => $key) { ?>
        <td><?php echo htmlspecialchars((string) report_cell($row, $key)); ?></td>
        <?php } ?>
    </tr>
    <?php } ?>
</table>
</div>
