<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>assets/custom/css/print_new.css">
    <head><title>List Currency</title></head>
    <body style="width:auto; margin:auto">
        <div class="easyui-layout" data-options="fit:true,border:false">
            <!-- Top view-->
            <div id="form-header" data-options="region:'north',border:false">
                <div id="form-header-wrapper">
                    <table cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td  valign="middle">
                                <a href="#" class="easyui-linkbutton noPrint" data-options="plain:true,iconCls:'icon-print'" onClick="print_detail()">Print</a>
                                <a href="#" class="easyui-linkbutton noPrint" data-options="plain:true,iconCls:'icon-excel'" onClick="modal_open('Import New Account', 'dlg_importfile');" >Export File</a>
                            </td>
                        </tr>
                    </table>  
                </div>      
            </div>

            <div id="limit-container">

            </div>
            <br><br>
            <div id="list-print-container-small">
                <table class="list-header">
                    <tr>
                        <td colspan="7" class="company-name text-center "><span class="normal_bold span_block " ><?php echo $this->load->model('file/m_new_company')->get_company_name($company_code); ?></span></td>
                    </tr>
                    <tr>
                        <td colspan="7" class="branch-name text-center"><span class="normal_bold span_block " ><?php echo $this->load->model('setup/m_branchinfo')->get_branch_name($branch_code); ?></span></td>
                    </tr>
                    <tr>
                        <td colspan="7" class="list-title text-center"><span class="normal_bold span_block " >List Currency</span></td>
                    </tr>
                    <tr>
                        <td colspan="7" class="s1">&nbsp;</td>
                    </tr>
                    <tr class="list-header-top">
                        <td width="" class="list-code">Currency Code</td>
                        <td width="" class="list-name">Currency Name</td>
                        <td width="" class="list-desc">Description</td>
                    </tr>
                    <?php foreach ($list as $row): ?>
                        <tr class="list-header-middle">
                            <td class=""><?php echo $row->CurrencyCode; ?></td>
                            <td class=""><span class=""><?php echo $row->CurrencyName; ?></span></td>
                            <td class=""><?php echo $row->CurrencyDesc; ?></td>
                        </tr>
                    <?php endforeach; ?>
                </table>
            </div>
        </div>
    </body>
</html>
<script type="text/javascript">
    function print_detail() {
        var data_print = $("#list-print-container-small").html();
        Popup(data_print);

    }

    function Popup(data) {
        var mywindow = window.open('', 'list-print-container', 'height=528,width=600');
        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;
    }
</script>