<html>
<head>
  <title><?php echo $menu_label ?></title>
  <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>assets/custom/css/print.css">
</head>
<style type="text/css">
  @media print {
    .noPrint { display: none; }
  }
</style>
<body>
  <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>
	                  <input type="checkbox" name="c_padate" id="pa_date" value="pa_date" onclick="ShowHide(this.value)" checked="true">P.Karyawan Date
	                  <input type="checkbox" name="c_nopa" id="no_pa" value="no_pa" onclick="ShowHide(this.value)" checked="true">P.Karyawan No
	                    <!-- <input type="checkbox" name="c_invno" id="inv_no" value="inv_no" onclick="ShowHide(this.value)" checked="true">PInv No <input type="checkbox" name="c_invdate" id="inv_date" value="inv_date" onclick="ShowHide(this.value)" checked="true">PInv Date -->
	               </td>
              </tr>
              </table>  
          </div>      
      </div>
      <br><br>
      <!-- Header -->
      <div id="print-container">
     
	      <table class="tbl form-header">
	        <tr>
	             <td colspan="2"class="bdr-left bdr-right bdr-top bdr-bottom customer-header" rowspan="2">
	             	<table>
	             		<tr>
		             		<td class="text-top item-desc">
		             			<span class="normal_bold span_block" ><?php echo $this->session->userdata('company_name'); ?> - <?php echo $list_transaksi->BranchName;?> </span>
	          	  				<span class="small_bold span_block"><?php echo $list_transaksi->BranchAddress;?></span>
		             		</td>
		             		<td class="item-no">
		             			<h3>SUSPENDED</h3>
		             		</td>
	             		</tr>
	             	</table>
	              
	            </td>
	            <td colspan="2" class="bdr-left bdr-right bdr-top bdr-bottom title-form">
	              <h4 id="title-form">PAYMENT KARYAWAN</h4>
	            </td>
	        </tr>
	        <tr>
	        	<td class="bdr-left bdr-right bdr-top bdr-bottom no-form">
	              <span class="small_bold span_block no_pa" >PK. No : <?php echo $list_transaksi->EInsNumber;?></span>
	            </td>
	            <td class="bdr-left bdr-right bdr-top bdr-bottom no-form">
	              <span class="small_bold span_block pa_date" >PK. Date : <?php echo date('d-m-Y',strtotime($list_transaksi->EInsDate));?></span>
	            </td>
	        </tr>
	      </table>
	      <!-- Detail Item -->
	      <table class="tbl tbl-item">
	      		<tr>
	      			  <th class="list th-item"><span class="normal_bold">Transfer From</span></th>
			          <th class="list th-item"><span class="normal_bold">Transfer To </span></th>
			          <th class="list th-item"><span class="normal_bold">Bank To</span></th>
			          <!-- <th class="list th-item"><span class="normal_bold">Bank To</span></th> -->
			          <th class="list th-item" ><span class="normal_bold">Amount</span></th>
	      		</tr>
	      		<tr>
	      			<td class="item_no_border bdr-left bdr-right item-code text-left"><span class="normal_bold span_block" ><?php echo  $list_transaksi->nm_employee; ?></span></td>
	      			<td class="item_no_border bdr-left bdr-right item-code text-left"><span class="normal_bold span_block" ><?php echo  $list_transaksi->BranchName; ?></span></td>
	      			<td class="item_no_border bdr-left bdr-right item-code text-left"><span class="normal_bold span_block" ><?php echo  $list_transaksi->Bank_receipt; ?></span></td>
	      			<!-- <td class="item_no_border bdr-left bdr-right item-code text-left"><span class="normal_bold span_block" ><?php echo  $list_transaksi->Bank_receipt; ?></span></td> -->
	      			<td class="item_no_border bdr-left bdr-right item-code text-right"><span class="normal_bold span_block" ><?php echo number_format($list_transaksi->EInsAmount,"2",",","."); ?></span></td>
	      		</tr>
	      		<?php for($x=0;$x<7;$x++):?>
	      		<tr>
	      			<td  class="item_no_border bdr-left bdr-right" ><span class="small_bold">&nbsp;</span></td> 
		            <td  class="item_no_border bdr-left bdr-right" ><span class="small_bold">&nbsp;</span></td>
		            <td  class="item_no_border bdr-left bdr-right" ><span class="small_bold">&nbsp;</span></td>
		            <td  class="item_no_border bdr-left bdr-right" ><span class="small_bold">&nbsp;</span></td>
		           <!--  <td  class="item_no_border bdr-left bdr-right" ><span class="small_bold">&nbsp;</span></td> -->
	      		</tr>
	      		<?php endfor;?>
	        	<tr>
        	   		<td  class="item_no_border bdr-left bdr-right bdr-bottom bdr-top" rowspan="8" colspan="5" width="70%">
        	   			<span class="normal_bold span_block">Description :</span>
        	   			<span class="normal_bold span_block"><?php echo $list_transaksi->EInsDesc;?></span>
        	   		</td>
        		</tr>
	      </table>
	      <!-- Footer Form -->
	      <table class="footer-form">
	        <tr>
	          <td   class="footer-paraf-customer">
	              <span class="normal_bold">Elektronik Prepared By</span>
	              <br><br><br>
	              <?php if($list_transaksi->nm_prepared !=""):?>
	              <span class="normal_bold span_block text-underline"><?php echo $list_transaksi->nm_prepared;?></span>
	          	  <?php else:?>
	              <span class="normal_bold span_block">__________</span>
	              <?php endif;?>
	          </td>
	          <td  class="footer-paraf-customer">
	             <span class="normal_bold">Elektronik Approved By</span>
	              <br><br><br>
	              <?php if($list_transaksi->nm_manager  !=""):?>
	              <span class="normal_bold span_block text-underline"><?php echo $list_transaksi->nm_manager;?></span>
	          	  <?php else:?>
	              <span class="normal_bold span_block">__________</span>
	              <?php endif;?>
	          </td>
	          <td width="80%">&nbsp;</td>
	        </tr>
	        <tr>
	          <td   colspan="3" width="100%">
	            <table>
	              <tr>
	                <td class="footer-right"> <span class="normal_bold text-right">Page : 1 Of 1</span></td>
	              </tr>
	            </table>
	          </td>
	        </tr>
	      </table>
	    </div>
  </div>
</body>
</html>

<script type="text/javascript">

function print_detail(){
  //var opt_print   = $("input[type='radio'][name='opt_print']:checked").val();
  var data_print  = $("#print-container").html();
  Popup(data_print);
  
}




function Popup(data) 
{
    var mywindow = window.open('', 'print-container', 'height=528,width=700');
    var css = '<link rel="stylesheet" href="<?php echo base_url()?>assets/custom/css/print.css" type="text/css" />';
    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>