<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>Bank Reconcile</title>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>assets/custom/css/print_new.css">
    </head>
    <body style="width:auto; margin:auto">
        <div style="padding:2px">
            <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-print'" onClick="print_detail();">Print</a>
<!--            <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-print'" onClick="link_print('list/cash_and_bank/bank_reconcile/to_print/<?php
//            foreach ($list as $row) {
//                echo $row->TransNumber;
//            }
            ?>');">Print</a>-->
        </div><br />


        <!--<table width="85%" border="0" cellspacing="0" cellpadding="0" style="margin-left:100px; margin-top:10px;">-->
        <?php
//foreach ($list as $row_head) {
//    
//} 
        ?>
<!--            <tr>
                <td class="title">Account No : <?php //echo $row_head->BankReconcile;   ?></td>
                <td class="title">Account Name : <?php //echo $row_head->AccountName;   ?></td>
                <td class="title">Currency Name : <?php //echo $row_head->CurrencyName;   ?></td>
            </tr>-->
            <!--<tr><td>&nbsp;</td></tr>-->
        <!--</table>-->

        <div id="list-print-container">
            <table class="list-header">
                <tr><td colspan="8" class="company-name text-center"><span class="normal_bold span_block " ><?= $company[0]->CompanyName; ?></span></td></tr>
                <tr><td colspan="8" class="list-title text-center"><span class="normal_bold span_block " >Bank Reconcile</span></td></tr>
                <tr><td>&nbsp;</td></tr>
                <tr class="list-header-top">
                    <td width="20"  align='center' class="s4">No</td>
                    <td width="160" align='center' class="s4">Reconcile No.</td>
                    <td width="80"  align='center' class="s4">Date</td>
                    <td width="110" align='center' class="s4">Bank Reconcile</td>
                    <td width="80"  align='center' class="s4">Currency</td>
                    <td width="100" align='center' class="s4">Deposit</td>
                    <td width="100" align='center' class="s4">Withdrawal</td>
                    <td width="100" align='center' class="s4">Status</td>
                </tr>

                <?php
                $no = 1;
                foreach ($list as $row) {
                    ?>
                <tr class="row-preview-list" valign="top">
                        <td class="s5" align='center'><?= $no++; ?></td>
                        <td class="s5" align='center'><?= $row->TransNumber; ?></td>
                        <td class="s5" align='center'><?= convert_to_dmy($row->ReconcileDate); ?></td>
                        <td class="s5" align='center'><?= $row->AccountName; ?></td>
                        <td class="s5" align='center'><?= $row->CurrencyName; ?></td>
                        <td class="s5 currency" align="right"><?php echo $row->SaldoDebet; ?></td>
                        <td class="s5 currency" align="right"><?= $row->SaldoCredit; ?></td>
                        <td class="s5" align="center"><?= $row->TransStatus ?></td>
                    </tr> 
                <?php } ?>
            </table>
        </div>
    </body>
</html>

<script type="text/javascript">
    function print_detail() {
        var data_print = $("#list-print-container").html();
        Popup(data_print);
    }

    function Popup(data) {
        var mywindow = window.open('', 'list-print-container', 'height=528,width=500');
        var css = css_print();
        mywindow.document.write('<html><head><title>Print Detail</title>');
        mywindow.document.write(css);
        mywindow.document.write('</head><body >');
        mywindow.document.write(data);
        mywindow.document.write('</body></html>');

        mywindow.document.close(); // necessary for IE >= 10
        mywindow.focus(); // necessary for IE >= 10

        mywindow.print();
        mywindow.close();
        return true;
    }
    function clickRows(idNumber) {
        parent.tab_edit('Edit <?php echo $menu_label; ?>', '<?php echo $menu_link; ?>', 'icon-edit', 'edit', idNumber);
    }
</script>