<?php $url = 'http://' . $_SERVER['SERVER_NAME'] . ':80' . $_SERVER['REQUEST_URI']; ?>

<div id="tb">
  <div title="Transaction" data-options="closable:false" style="padding:10px">
    <div style="height:50%;padding-bottom:10px">
      <table id="dg_hdr"></table>

      <div id="toolbar_hdr">
        <!-- Material -->

          
        <?php if ($this->url == site_url('matout')) { ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t18') == 1) { ?>
            <a href="javascript:void(0)" id="btnTbh" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addForm()">Add</a>
          <?php } ?>
          <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u18') == 1) { ?>
            <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editForm()">Edit</a>
          <?php } ?>
          <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h18') == 1) { ?>
            <a href="javascript:void(0)" id="btnHps" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
          <?php } ?>
          <!-- <a href="javascript:void(0)" id="btnExcelCeisa" class="easyui-linkbutton" iconCls="icon-xls" plain="true" title="Print">Excel Ceisa</a> -->
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t18') == 1) { ?>
            <a href="javascript:void(0)" id="btnTransferCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer to Ceisa</a>
            <a href="javascript:void(0)" id="btnCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer from Ceisa</a>
            <a href="javascript:void(0)" id="btnDaftarCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Get No Daftar</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true" >Upload Excel </a>
          <?php } ?>
        <?php } ?>
        <!-- Finished Good Sub Kontrak -->
        <?php if ($this->url == site_url('fgout_subkon')) { ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t18') == 1) { ?>
            <a href="javascript:void(0)" id="btnTbh" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addForm()">Add</a>
          <?php } ?>
          <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u18') == 1) { ?>
            <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editForm()">Edit</a>
          <?php } ?>
          <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h18') == 1) { ?>
            <a href="javascript:void(0)" id="btnHps" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
          <?php } ?>
          <!-- <a href="javascript:void(0)" id="btnExcelCeisa" class="easyui-linkbutton" iconCls="icon-xls" plain="true" title="Print">Excel Ceisa</a> -->
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t18') == 1) { ?>
            <a href="javascript:void(0)" id="btnTransferCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer to Ceisa</a>
            <a href="javascript:void(0)" id="btnCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer from Ceisa</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true" >Upload Excel </a>
          <?php } ?>
        <?php } ?>
        <!-- Material Sub Kontrak-->
        <?php if ($this->url == site_url('matoutsk')) { ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t19') == 1) { ?>
            <a href="javascript:void(0)" id="btnTbh" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addForm()">Add</a>
          <?php } ?>
          <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u19') == 1) { ?>
            <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editForm()">Edit</a>
          <?php } ?>
          <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h19') == 1) { ?>
            <a href="javascript:void(0)" id="btnHps" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t19') == 1) { ?>
            <a href="javascript:void(0)" id="btnTransferCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer to Ceisa</a>
            <a href="javascript:void(0)" id="btnCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer from Ceisa</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true" >Upload Excel </a>
          <?php } ?>
        <?php } ?>
        <!-- Finished Goods Non Plating-->

        <?php if ($this->url == site_url('fgout')) { ?>

          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnTbh" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addForm()">Add</a>
          <?php } ?>
          <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editForm()">Edit</a>
          <?php } ?>
          <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h20') == 1) { ?>
            <a href="javascript:void(0)" id="btnHps" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnJournal" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:120px">Create Journal</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnTransferCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer to Ceisa</a>
            <a href="javascript:void(0)" id="btnCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer from Ceisa</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true" >Upload Excel </a>
          <?php } ?>
        <?php } ?>
        <!-- Finished Goods Plating-->
        <?php if ($this->url == site_url('fgout_p')) { ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnTbh" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addForm()">Add</a>
          <?php } ?>
          <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editForm()">Edit</a>
          <?php } ?>
          <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h20') == 1) { ?>
            <a href="javascript:void(0)" id="btnHps" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t23') == 1) { ?>
            <a href="javascript:void(0)" id="btnTransferCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer to Ceisa</a>
            <a href="javascript:void(0)" id="btnCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer from Ceisa</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true" >Upload Excel </a>
          <?php } ?>
        <?php } ?>
        <!-- Machine & Equipments-->
        <?php if ($this->url == site_url('macin')) { ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t21') == 1) { ?>
            <a href="javascript:void(0)" id="btnTbh" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addForm()">Add</a>
          <?php } ?>
          <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u21') == 1) { ?>
            <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editForm()">Edit</a>
          <?php } ?>
          <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h21') == 1) { ?>
            <a href="javascript:void(0)" id="btnHps" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t21') == 1) { ?>
            <a href="javascript:void(0)" id="btnTransferCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer to Ceisa</a>
            <a href="javascript:void(0)" id="btnCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer from Ceisa</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true" >Upload Excel </a>
          <?php } ?>
        <?php } ?>
        <!-- Scraps-->
        <?php if ($this->url == site_url('scin')) { ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t22') == 1) { ?>
            <a href="javascript:void(0)" id="btnTbh" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addForm()">Add</a>
          <?php } ?>
          <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u22') == 1) { ?>
            <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editForm()">Edit</a>
          <?php } ?>
          <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h22') == 1) { ?>
            <a href="javascript:void(0)" id="btnHps" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t22') == 1) { ?>
            <a href="javascript:void(0)" id="btnTransferCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer to Ceisa</a>
            <a href="javascript:void(0)" id="btnCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer from Ceisa</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true" >Upload Excel </a>
          <?php } ?>
        <?php } ?>
        <!--rmsin-->
        <?php if ($this->url == site_url('rmsin')) { ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t18') == 1) { ?>
            <a href="javascript:void(0)" id="btnTbh" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addForm()">Add</a>
          <?php } ?>
          <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u18') == 1) { ?>
            <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editForm()">Edit</a>
          <?php } ?>
          <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h18') == 1) { ?>
            <a href="javascript:void(0)" id="btnHps" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t23') == 1) { ?>
            <a href="javascript:void(0)" id="btnTransferCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer to Ceisa</a>
            <a href="javascript:void(0)" id="btnCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer from Ceisa</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true" >Upload Excel </a>
          <?php } ?>
        <?php } ?>
        <!-- WIP-->
        <?php if ($this->url == site_url('wipin')) { ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t23') == 1) { ?>
            <a href="javascript:void(0)" id="btnTbh" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addForm()">Add</a>
          <?php } ?>
          <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u23') == 1) { ?>
            <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editForm()">Edit</a>
          <?php } ?>
          <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h23') == 1) { ?>
            <a href="javascript:void(0)" id="btnHps" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t23') == 1) { ?>
            <a href="javascript:void(0)" id="btnTransferCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer to Ceisa</a>
            <a href="javascript:void(0)" id="btnCeisa" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="width:140px">Transfer from Ceisa</a>
          <?php } ?>
          <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
            <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true" >Upload Excel </a>
          <?php } ?>
        <?php } ?>
        <!-- All In -->
        <!-- <a href="javascript:void(0)" id="btnPrint" class="easyui-linkbutton" iconCls="icon-print" plain="true" title="Print">Print Slip</a> -->
        <span style="display:inline-block;">
          <div style="display:inline-block">
            <label class="control-label">Jenis BC</label>
            <input class="form-control" id="KdJnsDok2" style="width:90%">
          </div>
          &nbsp; &nbsp; &nbsp;
          <input id="q">
        </span>
      </div>

      <div id="dlg" class="easyui-dialog" style="width:100%; top:25%" inline="false" closed="true" modal="true" buttons="#dlg-buttons">
        <!-- <form id="fm" class="form-horizontal" role="form" method="post" style="padding:10px;">
            <input type="submit" id="btnSubmit" name="btnSubmit" style="display:none">
            <input type="hidden" id="matout_id" name="matout_id">
            <table style="table-layout: fixed; width: 100%;">
              <tr>
              <td><label class="control-label">Outgoing No.</label></td>
                <td><input class="form-control easyui-textbox" id="matout_no" name="matout_no" style="width:90%" required></td>
                <?php if ($this->url == site_url('matoutsk') || $this->url == site_url('fgout_subkon')) { ?>
                <td><label class="control-label">Outgoing Type</label></td>
                <td><input class="form-control" name="matout_type" id="matoutsk_type" style="width:90%" required></td>
                <?php } else { ?>
                <td><label class="control-label">Outgoing Type</label></td>
                <td><input class="form-control" name="matout_type" id="matout_type" style="width:90%" required></td>
                <?php } ?>
                <td><label class="control-label">Outgoing Date</label></td>
                <td><input class="form-control easyui-datebox" id="matout_date" name="matout_date" maxlength="10" style="width:90%" required></td>
              </tr>
              <tr>
                <?php if ($this->url == site_url('fgout_subkon')) { ?>
                <td><label class="control-label">PO No.</label></td>
                <td>
                  <input class="form-control" name="po_no" id="po_no" style="width:90%" required>
                  <input type="hidden" name="po_id" id="po_id" style="width:90%">
                </td>
                <td><label class="control-label">Costumer</label></td>
                <td><input class="form-control" name="cust" id="cust" style="width:90%" readonly></td>
                <?php } elseif ($this->url == site_url('matout')) { ?>
                <td><label class="control-label">PO No.</label></td>
                <td>
                  <input class="form-control" name="po_no" id="po_no" style="width:90%" required>
                  <input type="hidden" name="po_id" id="po_id" style="width:90%">
                </td>
                <td><label class="control-label">Costumer</label></td>
                <td><input class="form-control" name="cust" id="cust" style="width:90%" readonly></td>
                <?php } elseif ($this->url == site_url('macin')) { ?>
                <td><label class="control-label">PO No.</label></td>
                <td>
                  <input class="form-control" name="po_no" id="po_nomc" style="width:90%" required>
                  <input type="hidden" name="po_id" id="po_id" style="width:90%">
                </td>
                <td><label class="control-label">Costumer</label></td>
                <td><input class="form-control" name="cust" id="cust" style="width:90%" readonly></td>
                <?php } elseif ($this->url == site_url('rmsin')) { ?>
                <td><label class="control-label">PO No.</label></td>
                <td>
                  <input class="form-control" name="po_no" id="po_norms" style="width:90%" required>
                  <input type="hidden" name="po_id" id="po_id" style="width:90%">
                </td>
                <td><label class="control-label">Costumer</label></td>
                <td><input class="form-control" name="cust" id="cust" style="width:90%" readonly></td>
                <?php } elseif ($this->url == site_url('fgout')) { ?>
                <td><label class="control-label">Costumer</label></td>
                <td><input class="form-control" name="cust" id="cust" style="width:90%" readonly></td>
                <?php } else { ?>
                <td><label class="control-label">PO No.</label></td>
                <td>
                <input class="form-control easyui-textbox" name="po_no" id="po_no" style="width:90%">
                <input type="hidden" name="po_id" id="po_id" style="width:90%">
                </td>
                <td><label class="control-label">Costumer</label></td>
                <td><input class="form-control" name="cust" id="cust" style="width:90%"></td>
                <?php } ?>
              </tr>
              <?php if ($this->url == site_url('scin')) { ?>
                 <tr>
              </tr>
              <td><label class="control-label">To Scrap</label></td>
                <td>
                <input class="form-control" name="scraf_no" id="scraf_no" style="width:90%" required>
                  <input type="hidden" name="po_id" id="po_id" style="width:90%">
                </td>

                <?php } else {  ?>
                  <tr>
              <tr>
                </tr>
                <?php } ?>
              </tr>
              <tr>
              <tr>
                <div class="bc_27">
                <td><label class="control-label">Currency</label></td>
                <td><input class="form-control" name="currency" id="currency" style="width:90%"></td>
                <td><label class="control-label">Kurs</label></td>
                <td><input class="form-control easyui-textbox" id="kurs" name="kurs" style="width:90%"></td>
                </div>
              </tr>
              <tr>
                <td><label class="control-label">Jenis BC</label></td>
                <td><input class="form-control" id="KdJnsDok" name="KdJnsDok" style="width:90%" value="-" placeholder="-"></td>
              </tr>
              <tr>
               
              <td><label class="control-label">No. Pengajuan</label></td>
              <td><input class="form-control easyui-textbox" name="NoAju" id="NoAju" style="width:90%"></td> 
              <td><label class="control-label">No. Daftar</label></td>
                <td><input class="form-control easyui-textbox" name="noBc" id="noBc" style="width:90%"></td>
                <td><label class="control-label">Tgl. Pengajuan</label></td>
                <td><input class="form-control easyui-datebox" id="TgAju" name="TgAju" maxlength="10" style="width:90%"></td>
                <td><label class="control-label">Bruto</label></td>
                <td><input class="form-control" id="Bruto" name="Bruto" style="width:90%"></td>
              </tr>
              <tr>
          
                <td><label class="control-label">Nilai</label></td>
                <td><input class="form-control" id="cif" name="cif" style="width:90%"></td>
                <div class="bc_27">
                <td><label class="control-label">Volume</label></td>
                <td><input class="form-control easyui-numberbox" id="tot_volume" name="tot_volume" style="width:90%"></td>
                </div>
                <td><label class="control-label">Harga Penyerahan</label></td>
                <td><input class="form-control easyui-numberbox" name="HargaSerah" id="HargaSerah" style="width:90%" readonly></td>
                <td><label class="control-label">Jumlah Barang</label></td>
                <td><input class="form-control easyui-numberbox" name="JmlBarang" id="JmlBarang" style="width:90%" readonly></td>
              </tr>
              <tr>
              <td><label class="control-label">Incoterm</label></td>
              <td><input class="form-control" id="KdInco" name="KdInco" style="width:90%"></td>
                <td><label class="control-label">Netto</label></td>
                <td><input class="form-control" id="Netto" name="Netto" style="width:90%"></td>
                <td><label class="control-label">Jenis Kemasan</label></td>
                <td><input class="form-control" name="packing" id="packing" style="width:90%"></td>
              </tr>
              <tr>
                <td><label class="control-label">Kode Kantor</label></td>
                <td><input class="form-control easyui-textbox" id="kodeKantor" name="kodeKantor" style="width:90%"></td>
                <div class="bc_40">
                <td><label class="control-label">Kode kantor Tujuan</label></td>
                <td><input class="form-control easyui-textbox" id="kodeKantorTujuan" name="kodeKantorTujuan" style="width:90%"></td>
                </div>
                <div class="bc_40">
                <td><label class="control-label">Kode TPS</label></td>
                <td><input class="form-control easyui-textbox" id="kodeTps" name="kodeTps" style="width:90%"></td>
                </div>
              </tr>
              <tr>
                <td><label class="control-label">Nama Pengangkut</label></td>
                <td> <select id="namaPengangkut" class="easyui-combobox" name="namaPengangkut" style="width:90%;">
                  <option value="CONTAINER">CONTAINER</option>
                  <option value="WINGBOX">WINGBOX</option>
                  <option value="TRAILER">TRAILER</option>
                  <option value="MOBIL BOX">MOBIL Box</option>
                  <option value="MOBIL PICK-UP">MOBIL PICK-UP</option>
                  <option value="EKSPEDISI">EKSPEDISI</option>
                  <option value="TRUCK">TRUCK</option>
              </select>
              </td>
                <td><label class="control-label">No Pengangkut</label></td>
                <td><input class="form-control easyui-textbox" id="noPengangkut" name="noPengangkut" style="width:90%"></td>
              </tr>
              <tr>
              <td><label class="control-label col-md-2">Tgl. TTD</label></td>
              <td><input class="form-control easyui-datebox" id="TgTTD" name="TgTTD" maxlength="10" style="width:90%"></td>
                <td><label class="control-label">Kota TTD</label></td>
                <td><input class="form-control easyui-textbox" id="kotaTtd" name="kotaTtd" style="width:90%"></td>
                <td><label class="control-label">Nama TTD</label></td>
                <td><input class="form-control easyui-textbox" id="namaTtd" name="namaTtd" value =" TABONAR HASIHOLAN M.ARUAN" style="width:90%"></td>
              </tr>
              <tr>
              <td><label class="control-label">Jabatan TTD</label></td>
                <td><input class="form-control easyui-textbox" id="jabatanTtd" name="jabatanTtd" velue="DIREKSI" style="width:90%"></td>
              </tr>

              <?php if ($this->url == site_url('fgout')) { ?>
              <tr>
                <td><label class="control-label">Lainnya</label></td>
                <td><input class="form-control easyui-textbox" name="lain_id" id="lain_id" style="width:90%"></td>
              </tr>
              <?php } ?>
              <?php if ($this->url == site_url('fgout_p')) { ?>
              <tr>
                <td><label class="control-label">Lainnya</label></td>
                <td><input class="form-control easyui-textbox" name="lain_id" id="lain_id" style="width:90%"></td>
              </tr>
              <?php } ?>
              <?php if ($this->url == site_url('wipin')) { ?>
              <tr>
                <td><label class="control-label">Debit</label></td> 
                <td><input class="form-control" name="accountd_id" id="accountd_id_wip" style="width:90%"></td>
                <td><input class="form-control easyui-textbox" name="acctnamed" id="acctnamed_wip" style="width:90%" readonly></td>
              </tr>
              <tr>
                <td><label class="control-label">Credit</label></td>
                <td><input class="form-control" name="accountc_id" id="accountc_id_wip" style="width:90%"></td>
                <td><input class="form-control easyui-textbox" name="acctnamec" id="acctnamec_wip" style="width:90%" readonly></td>
              </tr>
              <?php } ?>
            </table>
        </form> -->

        <form id="fm" class="form-horizontal" role="form" method="post" style="padding: 10px;">
          <input type="submit" id="btnSubmit" name="btnSubmit" style="display: none">
          <input type="hidden" id="matout_id" name="matout_id">

          <table style="table-layout: fixed; width: 100%;">
            <tr>
              <td><label class="control-label">Jenis BC</label></td>
              <td><input class="form-control" id="KdJnsDok" name="KdJnsDok" style="width:90%" value="-" placeholder="-"></td>
            </tr>
            <tr>
              <td><label class="control-label">Outgoing No.</label></td>
              <td><input class="form-control easyui-textbox" id="matout_no" name="matout_no" style="width:90%" required></td>

              <?php if ($this->url == site_url('matoutsk') || $this->url == site_url('fgout_subkon')) { ?>
                <td><label class="control-label">Outgoing Type</label></td>
                <td><input class="form-control" name="matout_type" id="matoutsk_type" style="width:90%" required></td>
              <?php } else { ?>
                <td><label class="control-label">Outgoing Type</label></td>
                <td><input class="form-control" name="matout_type" id="matout_type" style="width:90%" required></td>
              <?php } ?>

              <td><label class="control-label">Outgoing Date</label></td>
              <td><input class="form-control easyui-datebox" id="matout_date" name="matout_date" maxlength="10" style="width:90%" required></td>
            </tr>

            <tr>
              <?php if ($this->url == site_url('fgout_subkon')) { ?>
                <td><label class="control-label">REF No.</label></td>
                <td><input class="form-control" name="ref_no" id="ref_no" style="width:90%" required>
                  <input type="hidden" name="ref_id" id="ref_id" style="width:90%">
                </td>
                <td><label class="control-label">Costumer</label></td>
                <td><input class="form-control" name="cust" id="cust" style="width:90%" readonly></td>
              <?php } else { ?>
                <td><label class="control-label">REF No.</label></td>
                <td><input class="form-control" name="ref_no" id="ref_no" style="width:90%" required>
                  <input type="hidden" name="ref_id" id="ref_id" style="width:90%">
                </td>
                <td><label class="control-label">Costumer</label></td>
                <td><input class="form-control" name="cust" id="cust" style="width:90%"></td>
              <?php } ?>
            </tr>

            <tr>
              <td><label class="control-label">Currency</label></td>
              <td><input class="form-control" name="currency" id="currency" style="width:90%"></td>
            </tr>



            <tr>
              <td><label class="control-label">No. Pengajuan</label></td>
              <td><input class="form-control easyui-textbox" name="NoAju" id="NoAju" style="width:90%"></td>
              <td><label class="control-label">No. Daftar</label></td>
              <td><input class="form-control easyui-textbox" name="noBc" id="noBc" style="width:90%"></td>
              <td><label class="control-label">Tgl. Pengajuan</label></td>
              <td><input class="form-control easyui-datebox" id="TgAju" name="TgAju" maxlength="10" style="width:90%"></td>
              <td><label class="control-label">Bruto</label></td>
              <td><input class="form-control" id="Bruto" name="Bruto" style="width:90%"></td>
            </tr>

            <tr>
              <td><label class="control-label">Nilai</label></td>
              <td><input class="form-control" id="cif" name="cif" style="width:90%"></td>

              <td><label class="control-label">Volume</label></td>
              <td><input class="form-control easyui-numberbox" id="tot_volume" name="tot_volume" style="width:90%"></td>
              <td><label class="control-label">Harga Penyerahan</label></td>
              <td><input class="form-control easyui-numberbox" name="HargaSerah" id="HargaSerah" style="width:90%" readonly></td>
              <td><label class="control-label">Jumlah Barang</label></td>
              <td><input class="form-control easyui-numberbox" name="JmlBarang" id="JmlBarang" style="width:90%" readonly></td>
            </tr>

            <tr>
              <td><label class="control-label">FOB</label></td>
              <td><input class="form-control easyui-numberbox" id="fob" name="fob" style="width:90%"></td>

              <td><label class="control-label">NDPBM</label></td>
              <td><input class="form-control easyui-numberbox" id="ndpbm" name="ndpbm" style="width:90%"></td>
              <td><label class="control-label">Freight</label></td>
              <td><input class="form-control easyui-numberbox" name="freight" id="freight" style="width:90%"></td>
            </tr>

            <tr>
              <td><label class="control-label">Incoterm</label></td>
              <td><input class="form-control" id="KdInco" name="KdInco" style="width:90%"></td>
              <td><label class="control-label">Netto</label></td>
              <td><input class="form-control" id="Netto" name="Netto" style="width:90%"></td>
              <td><label class="control-label">Jenis Kemasan</label></td>
              <td><input class="form-control" name="packing" id="packing" style="width:90%"></td>
            </tr>

            <tr>
              <td><label class="control-label">Kode Kantor</label></td>
              <td><input class="form-control easyui-textbox" id="kodeKantor" name="kodeKantor" style="width:90%"></td>

              
              <td><label class="control-label">Kode kantor Tujuan</label></td>
              <td><input class="form-control easyui-textbox" id="kodeKantorTujuan" name="kodeKantorTujuan" style="width:90%"></td>

              <td><label class="control-label">Kode TPS</label></td>
              <td><input class="form-control easyui-textbox" id="kodeTps" name="kodeTps" style="width:90%"></td>


            </tr>
            <tr>

              <td><label class="control-label">Kode Kantor Periksa</label></td>
              <td><input class="form-control easyui-textbox" id="kodeKantorPeriksa" name="kodeKantorPeriksa" style="width:90%"></td>

              <td><label class="control-label">Kode kantor Bongkar</label></td>
              <td><input class="form-control easyui-textbox" id="kodeKantorBongkar" name="kodeKantorBongkar" style="width:90%"></td>

              <td><label class="control-label">Kode kantor Expor</label></td>
              <td><input class="form-control easyui-textbox" id="kodekantorExpor" name="kodekantorExpor" style="width:90%"></td>

            </tr>
            <tr>

              <td><label class="control-label">Negara Tujuan</label></td>
              <td><input class="form-control easyui-textbox" id="negaraTujuan" name="negaraTujuan" style="width:90%"></td>

              <td><label class="control-label">Tanggal Periksa</label></td>
              <td><input class="form-control easyui-datebox" id="tanggalPeriksa" name="tanggalPeriksa" style="width:90%"></td>

              <td><label class="control-label">Tanggal Ekspor</label></td>
              <td><input class="form-control easyui-datebox" id="tanggalEkspor" name="tanggalEkspor" style="width:90%"></td>
            </tr>
            <tr>
              <td><label class="control-label">Kode Pelabuhan Bongkar</label></td>
              <td><input class="form-control easyui-textbox" id="kodePelabuhanBongkar" name="kodePelabuhanBongkar" style="width:90%" value=""></td>

              <td><label class="control-label">Kode Pelabuhan Muat</label></td>
              <td><input class="form-control easyui-textbox" id="kodePelabuhanMuat" name="kodePelabuhanMuat" style="width:90%" value="IDTPP"></td>

              <td><label class="control-label">Kode Pelabuhan Muat Akhir</label></td>
              <td><input class="form-control easyui-textbox" id="kodePelabuhanMuatAkhir" name="kodePelabuhanMuatAkhir" style="width:90%"></td>
            </tr>
            <tr>
              <td><label class="control-label">Kode Pelabuhan Transit</label></td>
              <td><input class="form-control easyui-textbox" id="kodePelabuhanTransit" name="kodePelabuhanTransit" style="width:90%"></td>

              <td><label class="control-label">Kode Pelabuhan Tujuan</label></td>
              <td><input class="form-control easyui-textbox" id="kodePelabuhanTujuan" name="kodePelabuhanTujuan" style="width:90%" value=""></td>

              <td><label class="control-label">Kode Pelabuhan Ekspor</label></td>
              <td><input class="form-control easyui-textbox" id="kodePelabuhanEkspor" name="kodePelabuhanEkspor" style="width:90%" value="IDTPP"></td>
            </tr>

            <tr>
              <td><label class="control-label">Nama Pengangkut</label></td>
              <td>
                <select id="namaPengangkut" class="easyui-combobox" name="namaPengangkut" style="width:90%;">
                  <option value="CONTAINER">CONTAINER</option>
                  <option value="WINGBOX">WINGBOX</option>
                  <option value="TRAILER">TRAILER</option>
                  <option value="MOBIL BOX">MOBIL Box</option>
                  <option value="MOBIL PICK-UP">MOBIL PICK-UP</option>
                  <option value="EKSPEDISI">EKSPEDISI</option>
                  <option value="TRUCK">TRUCK</option>
                </select>
              </td>
              <td><label class="control-label">No Pengangkut</label></td>
              <td><input class="form-control easyui-textbox" id="noPengangkut" name="noPengangkut" style="width:90%"></td>
              <td><label class="control-label">Bendera Pengangkut</label></td>
              <td><input class="form-control easyui-textbox" id="bendera" name="bendera" style="width:90%"></td>
            </tr>

            <tr>
              <td><label class="control-label col-md-2">Tgl. TTD</label></td>
              <td><input class="form-control easyui-datebox" id="TgTTD" name="TgTTD" maxlength="10" style="width:90%"></td>
              <td><label class="control-label">Kota TTD</label></td>
              <td><input class="form-control easyui-textbox" id="kotaTtd" name="kotaTtd" style="width:90%"></td>
              <td><label class="control-label">Nama TTD</label></td>
              <td><input class="form-control easyui-textbox" id="namaTtd" name="namaTtd" value="TABONAR HASIHOLAN M.ARUAN" style="width:90%"></td>
            </tr>

            <tr>
              <td><label class="control-label">Jabatan TTD</label></td>
              <td><input class="form-control easyui-textbox" id="jabatanTtd" name="jabatanTtd" value="DIREKSI" style="width:90%"></td>
            </tr>

            <?php if ($this->url == site_url('fgout')) { ?>
              <tr>
                <td><label class="control-label">Lainnya</label></td>
                <td><input class="form-control easyui-textbox" name="lain_id" id="lain_id" style="width:90%"></td>
              </tr>
            <?php } ?>

            <?php if ($this->url == site_url('fgout_p')) { ?>
              <tr>
                <td><label class="control-label">Lainnya</label></td>
                <td><input class="form-control easyui-textbox" name="lain_id" id="lain_id" style="width:90%"></td>
              </tr>
            <?php } ?>

            <?php if ($this->url == site_url('wipin')) { ?>
              <tr>
                <td><label class="control-label">Debit</label></td>
                <td><input class="form-control" name="accountd_id" id="accountd_id_wip" style="width:90%"></td>
                <td><input class="form-control easyui-textbox" name="acctnamed" id="acctnamed_wip" style="width:90%" readonly></td>
              </tr>
              <tr>
                <td><label class="control-label">Credit</label></td>
                <td><input class="form-control" name="accountc_id" id="accountc_id_wip" style="width:90%"></td>
                <td><input class="form-control easyui-textbox" name="acctnamec" id="acctnamec_wip" style="width:90%" readonly></td>
              </tr>
            <?php } ?>
          </table>
        </form>

      </div>
      <div id="dlg-buttons">
        <a href="#" id="btnSim" onclick="javascript:alert('data header tersimpan! (klik ok)')" class="easyui-linkbutton c6" iconCls="icon-ok">Simpan</a>
        <a href="javascript:void(0)" id="btnReset" class="easyui-linkbutton" iconCls="icon-cancel">Kosongkan</a>
      </div>

    </div>

    <div style="height:50%">
      <div id="tbdetail">
        <div title="Barang" data-options="closable:false" style="padding:10px">
          <table id="dg_det"></table>
          <div id="toolbar_det">
            <!-- Material -->
            <?php if ($this->url == site_url('matout')) { ?>
              <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u18') == 1) { ?>
                <a href="javascript:void(0)" id="btnTbh2" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add</a>
                <!-- <a href="javascript:void(0)" id="btnLock2" class="easyui-linkbutton" iconCls="icon-ok" plain="true">Lock</a>  -->
                <a href="javascript:void(0)" id="btnUbh2" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit Qty</a>
                <a href="javascript:void(0)" id="btnAdj" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Adjustment</a>
                <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h23') == 1) { ?>
                <a href="javascript:void(0)" id="btnHps2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
              <?php } ?>
                <!-- <a href="javascript:void(0)" id="btnRst2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Reset Qty</a>  -->
                <b><a href="javascript:void(0)" id="btnRst2All" class="easyui-linkbutton" iconCls="icon-remove" plain="true" style="float:right">Reset Qty (All Items)</a></b>
              <?php } ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t18') == 1) { ?>
                <!-- <a href="javascript:void(0)" id="btnSpr2" class="easyui-linkbutton" iconCls="icon-ok" plain="true">All In Qty / Reset Qty</a>  -->
                <b><a href="javascript:void(0)" id="btnSpr2All" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="float:right">All In Qty (All Items)</a></b>
              <?php } ?>
            <?php } ?>
            <!-- Finished Good Sub Kontrak -->
            <?php if ($this->url == site_url('fgout_subkon')) { ?>
              <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u18') == 1) { ?>
                <!-- <a href="javascript:void(0)" id="btnLock2" class="easyui-linkbutton" iconCls="icon-ok" plain="true">Lock</a>  -->
                <a href="javascript:void(0)" id="btnUbh2" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit Qty</a>
                <a href="javascript:void(0)" id="btnAdj" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Adjustment</a>
                <!-- <a href="javascript:void(0)" id="btnRst2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Reset Qty</a>  -->
                <b><a href="javascript:void(0)" id="btnRst2All" class="easyui-linkbutton" iconCls="icon-remove" plain="true" style="float:right">Reset Qty (All Items)</a></b>
              <?php } ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t18') == 1) { ?>
                <!-- <a href="javascript:void(0)" id="btnSpr2" class="easyui-linkbutton" iconCls="icon-ok" plain="true">All In Qty / Reset Qty</a>  -->
                <b><a href="javascript:void(0)" id="btnSpr2All" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="float:right">All In Qty (All Items)</a></b>
              <?php } ?>
            <?php } ?>
            <!-- Material Sub Kontrak -->
            <?php if ($this->url == site_url('matoutsk')) { ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t19') == 1) { ?>
                <a href="javascript:void(0)" id="btnTbh2" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add</a>
              <?php } ?>
              <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u19') == 1) { ?>
                <a href="javascript:void(0)" id="btnUbh3" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit Qty</a>
              <?php } ?>
              <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h19') == 1) { ?>
                <a href="javascript:void(0)" id="btnHps2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
              <?php } ?>
            <?php } ?>
            <!-- Finished Goods Non Plating -->
            <?php if ($this->url == site_url('fgout')) { ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
                <a href="javascript:void(0)" id="btnTbh2" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add</a>
              <?php } ?>
              <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u20') == 1) { ?>
                <a href="javascript:void(0)" id="btnUbh3" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit Qty</a>
              <?php } ?>
              <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h20') == 1) { ?>
                <a href="javascript:void(0)" id="btnHps2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
              <?php } ?>
            <?php } ?>
            <!-- Finished Goods Plating-->
            <?php if ($this->url == site_url('fgout_p')) { ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t20') == 1) { ?>
                <a href="javascript:void(0)" id="btnTbh2" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add</a>
              <?php } ?>
              <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u20') == 1) { ?>
                <a href="javascript:void(0)" id="btnUbh3" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit Qty</a>
              <?php } ?>
              <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h20') == 1) { ?>
                <a href="javascript:void(0)" id="btnHps2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
              <?php } ?>
            <?php } ?>
            <!-- Machine and Equipments -->
            <?php if ($this->url == site_url('macout')) { ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t21') == 1) { ?>
                <!-- <a href="javascript:void(0)" id="btnLock2" class="easyui-linkbutton" iconCls="icon-ok" plain="true">Lock</a>  -->
                <a href="javascript:void(0)" id="btnUbh2" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit Qty</a>
                <a href="javascript:void(0)" id="btnAdj" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Adjustment</a>
                <!-- <a href="javascript:void(0)" id="btnRst2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Reset Qty</a>  -->
                <b><a href="javascript:void(0)" id="btnRst2All" class="easyui-linkbutton" iconCls="icon-remove" plain="true" style="float:right">Reset Qty (All Items)</a></b>
              <?php } ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t18') == 1) { ?>
                <!-- <a href="javascript:void(0)" id="btnSpr2" class="easyui-linkbutton" iconCls="icon-ok" plain="true">All In Qty / Reset Qty</a>  -->
                <b><a href="javascript:void(0)" id="btnSpr2All" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="float:right">All In Qty (All Items)</a></b>
              <?php } ?>
            <?php } ?>
            <!-- Scrap -->
            <?php if ($this->url == site_url('scout')) { ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t22') == 1) { ?>
                <a href="javascript:void(0)" id="btnTbh2" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add</a>
              <?php } ?>
              <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u22') == 1) { ?>
                <a href="javascript:void(0)" id="btnUbh3" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit Qty</a>
              <?php } ?>
              <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h22') == 1) { ?>
                <a href="javascript:void(0)" id="btnHps2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
              <?php } ?>
            <?php } ?>
            <!-- rmsin -->
            <?php if ($this->url == site_url('rmsout')) { ?>
              <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u18') == 1) { ?>
                <!-- <a href="javascript:void(0)" id="btnLock2" class="easyui-linkbutton" iconCls="icon-ok" plain="true">Lock</a>  -->
                <a href="javascript:void(0)" id="btnUbh2" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit Qty</a>
                <a href="javascript:void(0)" id="btnAdj" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Adjustment</a>
                <!-- <a href="javascript:void(0)" id="btnRst2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Reset Qty</a>  -->
                <b><a href="javascript:void(0)" id="btnRst2All" class="easyui-linkbutton" iconCls="icon-remove" plain="true" style="float:right">Reset Qty (All Items)</a></b>
              <?php } ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t18') == 1) { ?>
                <!-- <a href="javascript:void(0)" id="btnSpr2" class="easyui-linkbutton" iconCls="icon-ok" plain="true">All In Qty / Reset Qty</a>  -->
                <b><a href="javascript:void(0)" id="btnSpr2All" class="easyui-linkbutton" iconCls="icon-ok" plain="true" style="float:right">All In Qty (All Items)</a></b>
              <?php } ?>
            <?php } ?>
            <!-- WIP -->
            <?php if ($this->url == site_url('wipout')) { ?>
              <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t17') == 1 && $this->session->userdata('t23') == 1) { ?>
                <a href="javascript:void(0)" id="btnTbh2" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add</a>
              <?php } ?>
              <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u17') == 1 && $this->session->userdata('u23') == 1) { ?>
                <a href="javascript:void(0)" id="btnUbh3" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit Qty</a>
              <?php } ?>
              <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h17') == 1 && $this->session->userdata('h23') == 1) { ?>
                <a href="javascript:void(0)" id="btnHps2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
              <?php } ?>
            <?php } ?>
            <span style="display:inline-block;">
              &nbsp; &nbsp; &nbsp;
              <input id="q_det">
            </span>
          </div>
          <!-- dlg2 -->

          <div id="dlg2" class="easyui-dialog" style="width:50%; top:20%;" closed="true" buttons="#dlg2-buttons">
            <form id="fm2" class="form-horizontal" role="form" method="post" style="padding:10px;">
              <input type="submit" id="btnSubmit2" name="btnSubmit2" style="display:none">
              <input type="hidden" id="child_no" name="child_no">
              <table style="table-layout: fixed; width: 100%;">
                <tr>
                  <td colspan="1"><label class="control-label ">Item Code</label></td>
                  
                    <td colspan="1"><input class="form-control" id="mat_id" name="mat_id" style="width:50%" required></td>
                
                </tr>
                <tr>
                
                  <td>
                    <label class="control-label ">UOM</label>
                    </td>
                    <td>
                    <input class="form-control" id="Sat" name="Sat" style="width:50%;" >
                    </td>
                </tr>
            
                <?php if (
                  $this->url == site_url('matout') || $this->url == site_url('fgout_subkon')
                  || $this->url == site_url('macin') || $this->url == site_url('rmsin')
                ) { ?>
                  <tr>
                    <td><label class="control-label ">PO Qty.</label></td>
                    <td><input class="form-control" id="poqty" name="poqty" style="width:70%" readonly style="color:brown">></td>
                  </tr>
                  <tr>
                    <td><label class="control-label ">Qty.</label></td>
                    <td><input class="form-control" id="qty" name="qty" style="width:70%" style="color:brown"></td>
                  </tr>
                  <tr>
                    <td><label class="control-label ">In Qty.</label></td>
                    <td colspan="2"><input class="form-control" id="Dqty2" name="Dqty" style="width:34%" readonly disable> before</td>
                  </tr>
         
                  <tr>
                    <td></td>
                    <td><input class="form-control" id="Dqty" name="Dqty" style="width:70%" readonly></td>
                  </tr>
                  <tr>
                    <td><label class="control-label ">Balance.</label></td>
                    <td><input class="form-control" id="Bqty" name="balance" style="width:70%" readonly style="color:brown"></td>
                  </tr>
                  <tr>
                    <td colspan="1"><label class="control-label ">Price</label></td>
                    <td colspan="2"><input class="form-control" id="price" name="price" style="width:60%"></td>
                  </tr>
                  <tr>
                    <td colspan="1"><label class="control-label ">Amount</label></td>
                    <td colspan="2"><input class="form-control" id="amount" name="amount" style="width:60%"></td>
                  </tr>
                <?php } else if ($this->url == site_url('scin')) { ?>
                  <tr>
                    <td><label class="control-label ">Volume</label></td>
                    <td><input class="form-control easyui-textbox" id="volume2" name="volume" style="width:60%" style="color:brown">KGM</td>
                    <!--  <td style="display:none"><input class="form-control" id="poqty2" name="poqty" style="width:40%" style="color:brown"></td>
                    <td style="display:none"><input class="form-control" id="Dqty3" name="Dqty" style="width:40%" style="color:brown"></td> -->
                  </tr>
                  <!-- <tr>
                    <td><label class="control-label ">Qty.</label></td>
                    <td><input class="form-control" id="qty2" name="qty" style="width:70%" style="color:brown"></td>
                    <td style="display:none"><input class="form-control" id="poqty2" name="poqty" style="width:40%" style="color:brown"></td>
                    <td style="display:none"><input class="form-control" id="Dqty3" name="Dqty" style="width:40%" style="color:brown"></td>
                  </tr> -->
            
                  <tr>
                    <td colspan="1"><label class="control-label ">Price</label></td>
                    <td colspan="2"><input class="form-control" id="price2" name="price" style="width:60%"></td>
                  </tr>
                  <tr>
                    <td colspan="1"><label class="control-label ">Amount</label></td>
                    <td colspan="2"><input class="form-control" id="amount2" name="amount" style="width:60%"></td>
                  </tr>
                <?php } else { ?>
                  <tr>
                    <td><label class="control-label ">Qty.</label></td>
                    <td><input class="form-control" id="qty2" name="qty" style="width:70%" style="color:brown"></td>
                    <td style="display:none"><input class="form-control" id="poqty2" name="poqty" style="width:40%" style="color:brown"></td>
                    <td style="display:none"><input class="form-control" id="Dqty3" name="Dqty" style="width:40%" style="color:brown"></td>
                  </tr>
           
                  <tr>
                    <td colspan="1"><label class="control-label ">Price</label></td>
                    <td colspan="2"><input class="form-control" id="price2" name="price" style="width:60%"></td>
                  </tr>
                  <tr>
                    <td colspan="1"><label class="control-label ">Amount</label></td>
                    <td colspan="2"><input class="form-control" id="amount2" name="amount" style="width:60%"></td>
                  </tr>
                <?php } ?>
              </table>
              <!-- <tr>
                  <td><label class="control-label ">Item Code</label></td><br>
                  <?php if ($this->url == site_url('matout')) { ?>
                  <td><input class="form-control" id="mat_id" name="mat_id" style="width:90%" required readonly></td><br>
                  <?php } else { ?>
                  <td><input class="form-control" id="mat_id" name="mat_id" style="width:90%" required></td><br>
                  <?php }  ?>
                  <td><label class="control-label ">Item Description</label></td><br>
                  <td><input class="form-control easyui-textbox" id="NmBarang" name="NmBarang" style="width:100%" readonly></td><br>
                  <td><label class="control-label ">UOM</label></td><br>
                  <td><input class="form-control" id="Sat" name="Sat" style="width:40%" readonly></td><br>
                  <?php if ($this->url == site_url('matout')) { ?>
                  <td><label class="control-label ">PO Qty.</label></td><br>
                  <td><input class="form-control" id="poqty" name="poqty" style="width:40%" readonly style="color:brown"></td><br>
                  <td><label class="control-label ">Qty.</label></td><br>
                  <td><input class="form-control" id="qty" name="qty" style="width:40%" style="color:brown"></td><br>
                  <td><label class="control-label ">In Qty.</label></td><br>
                  <td><input class="form-control" id="Dqty2" name="Dqty" style="width:40%" readonly disable></td> before<br>
                  <td><input class="form-control" id="Dqty" name="Dqty" style="width:40%" readonly></td><br>
                  <td><label class="control-label ">Balance.</label></td><br>
                  <td><input class="form-control" id="Bqty" name="balance" style="width:40%" readonly style="color:brown"></td><br>
                  <td><label class="control-label ">Price</label></td><br>
                  <td><input class="form-control" id="price" name="price" style="width:40%"></td><br>
                  <td><label class="control-label ">Amount</label></td><br>
                  <td><input class="form-control" id="amount" name="amount" style="width:40%" readonly></td><b></b>
                  <?php } else { ?>
                  <div style="display:none">
                    <td><input id="Bqty" disabled></td><br>
                  </div>
                  <td><label class="control-label ">Qty.</label></td><br>
                  <td><input class="form-control" id="qty2" name="qty" style="width:40%" style="color:brown"></td><br>
                  <td><div id="tdpoqty2"><input class="form-control" id="poqty2" name="poqty" style="width:40%" style="color:brown"></div></td>
                  <td><label class="control-label ">Price</label></td><br>
                  <td><input class="form-control" id="price2" name="price" style="width:40%"></td><br>
                  <td><label class="control-label ">Amount</label></td><br>
                  <td><input class="form-control" id="amount2" name="amount" style="width:40%" readonly></td><b></b>
                  <?php } ?>
                </tr> -->
            </form>
          </div>
          <div id="dlg2-buttons">
            <a href="#" id="btnSim2" onclick="javascript:alert('data detail tersimpan!')" class="easyui-linkbutton c6" iconCls="icon-ok">Simpan</a>
            <a href="javascript:void(0)" id="btnReset2" class="easyui-linkbutton" iconCls="icon-cancel">Kosongkan</a>
          </div>
        </div>
      
        <div title="Kontainer" data-options="closable:false" style="padding:10px">
          <table id="dg_det_kon"></table>
          <div id="toolbar_det_kon">
            <a href="javascript:void(0)" id="btnTbh_kon" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add</a>
            <a href="javascript:void(0)" id="btnEdit_kon" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit</a>
            <a href="javascript:void(0)" id="btnDlt_kon" class="easyui-linkbutton" iconCls="icon-delete" plain="true">Delete</a>
          </div>
          <div id="dlg2kon" class="easyui-dialog" style="width:50%; top:20%;" closed="true" buttons="#dlg2-buttonskon">
            <form id="fm2kon" class="form-horizontal" role="form" method="post" style="padding:10px;">
              <input type="submit" id="btnSubmit2" name="btnSubmit2kon" style="display:none">
              <table style="table-layout: fixed; width: 100%;">

                <tr>
                  <td><label class="control-label ">Jenis Kontainer</label></td><br>
                  <td colspan="2"><input class="form-control easyui-combobox" id="KODE_JENIS_KONTAINER" name="KODE_JENIS_KONTAINER" style="width:90%"></td>
                </tr>
                <tr>
                  <td><label class="control-label ">Tipe Kontainer</label></td><br>
                  <td colspan="2"><input class="form-control easyui-combobox" id="KODE_TIPE_KONTAINER" name="KODE_TIPE_KONTAINER" style="width:90%;"></td>
                </tr>

                <tr>
                  <td colspan="1"><label class="control-label ">Ukuran Kontainer</label></td>
                  <td colspan="2"><input class="form-control easyui-combobox" id="KODE_UKURAN_KONTAINER" name="KODE_UKURAN_KONTAINER" style="width:60%"></td>
                </tr>
                <tr>
                  <td colspan="1"><label class="control-label ">No Kontainer</label></td>
                  <td colspan="2"><input class="form-control easyui-textbox" id="NOMOR_KONTAINER" name="NOMOR_KONTAINER" style="width:60%"></td>

                </tr>
              </table>

            </form>
          </div>
          <div id="dlg2-buttonskon">
            <a href="#" id="btnSim2kon" onclick="javascript:alert('data detail tersimpan!')" class="easyui-linkbutton c6" iconCls="icon-ok">Simpan</a>
            <a href="javascript:void(0)" id="btnReset2kon" class="easyui-linkbutton" iconCls="icon-cancel">Kosongkan</a>
          </div>
        </div>
        <div title="Dokumen" data-options="closable:false" style="padding:10px">
          <table id="dg_det_dok"></table>
          <div id="toolbar_det_dok">
            <a href="javascript:void(0)" id="btnTbh_dok" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add</a>
            <a href="javascript:void(0)" id="btnEdit_dok" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit</a>
            <a href="javascript:void(0)" id="btnDlt_dok" class="easyui-linkbutton" iconCls="icon-delete" plain="true">Delete</a>
          </div>
          <div id="dlg2dok" class="easyui-dialog" style="width:50%; top:20%;" closed="true" buttons="#dlg2-buttonsdok">
            <form id="fm2dok" class="form-horizontal" role="form" method="post" style="padding:10px;">
              <input type="submit" id="btnSubmit2" name="btnSubmit2kon" style="display:none">
              <table style="table-layout: fixed; width: 100%;">

                <tr>
                  <td><label class="control-label ">Jenis Dokumen</label></td><br>
                  <td colspan="2"><input class="form-control easyui-combobox" id="seri_dok" name="seri_dok" style="width:90%"></td>
                </tr>
                <tr>
                  <td colspan="1"><label class="control-label ">Dokumen Date</label></td>
                  <td colspan="2"><input class="form-control easyui-datebox" id="tgl_dok" name="tgl_dok" style="width:60%"></td>

                </tr>
                <tr>
                  <td colspan="1"><label class="control-label ">No Dokumen</label></td>
                  <td colspan="2"><input class="form-control easyui-textbox" id="dok_no" name="dok_no" style="width:60%"></td>

                </tr>
              </table>

            </form>
          </div>
          <div id="dlg2-buttonsdok">
            <a href="#" id="btnSim2dok" onclick="javascript:alert('data detail tersimpan!')" class="easyui-linkbutton c6" iconCls="icon-ok">Simpan</a>
            <a href="javascript:void(0)" id="btnReset2dok" class="easyui-linkbutton" iconCls="icon-cancel">Kosongkan</a>
          </div>
        </div>
    <div title="Jaminan" data-options="closable:false" style="padding:10px">
          <table id="dg_det_jaminan"></table>
          <div id="toolbar_det_jaminan">
            <a href="javascript:void(0)" id="btnTbh_jaminan" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add</a>
            <a href="javascript:void(0)" id="btnEdit_jaminan" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit</a>
            <a href="javascript:void(0)" id="btnDlt_jaminan" class="easyui-linkbutton" iconCls="icon-delete" plain="true">Delete</a>
          </div>
        
          <div id="dlg2jaminan" class="easyui-dialog" style="width:50%; top:20%;" closed="true" buttons="#dlg2-buttonsjaminan">
            <form id="fm2jaminan" class="form-horizontal" role="form" method="post" style="padding:10px;">
              <input type="submit" id="btnSubmit2" name="btnSubmit2kon" style="display:none">
        <table style="table-layout: fixed; width: 100%;">
  <tr>
    <td><label class="control-label">Nomor BPJ</label></td>
    <td colspan="2">
      <input class="form-control easyui-textbox" id="nomorBpj" name="nomorBpj" style="width:90%">
    </td>
  </tr>
  <tr>
    <td><label class="control-label">Tanggal BPJ</label></td>
    <td colspan="2">
      <input class="form-control easyui-datebox" id="tanggalBpj" name="tanggalBpj" style="width:60%">
    </td>
  </tr>
  <tr>
    <td><label class="control-label">Kode Jenis Jaminan</label></td>
   <td colspan="2">
  <input class="easyui-combobox" id="kodeJenisJaminan" name="kodeJenisJaminan" style="width:90%;"
    data-options="
      valueField: 'value',
      textField: 'text',
      data: [
        {value: '1', text: 'Tunai'},
        {value: '2', text: 'Bank Garansi'},
        {value: '3', text: 'Customs Bond'},
        {value: '4', text: 'Tertulis/CG'},
        {value: '5', text: 'STTJ'},
        {value: '6', text: 'Pusat'},
        {value: '7', text: 'Indonesia EximBank'},
        {value: '8', text: 'Perusahaan Penjaminan'}
      ],
      panelHeight: 'auto'
    ">
</td>

  </tr>
  <tr>
    <td><label class="control-label">Nomor Jaminan</label></td>
    <td colspan="2">
      <input class="form-control easyui-textbox" id="nomorJaminan" name="nomorJaminan" style="width:90%">
    </td>
  </tr>
  <tr>
    <td><label class="control-label">Tanggal Jaminan</label></td>
    <td colspan="2">
      <input class="form-control easyui-datebox" id="tanggalJaminan" name="tanggalJaminan" style="width:60%">
    </td>
  </tr>
  <tr>
    <td><label class="control-label">Tanggal Jatuh Tempo</label></td>
    <td colspan="2">
      <input class="form-control easyui-datebox" id="tanggalJatuhTempo" name="tanggalJatuhTempo" style="width:60%">
    </td>
  </tr>
  <tr>
    <td><label class="control-label">Penjamin</label></td>
    <td colspan="2">
      <input class="form-control easyui-textbox" id="penjamin" name="penjamin" style="width:90%">
    </td>
  </tr>
  <tr>
    <td><label class="control-label">Nilai Jaminan</label></td>
    <td colspan="2">
      <input class="form-control easyui-numberbox" id="nilaiJaminan" name="nilaiJaminan" style="width:60%">
    </td>
  </tr>
</table>

            </form>
          </div>
          <div id="dlg2-buttonsjaminan">
            <a href="#" id="btnSim2jaminan" onclick="javascript:alert('data detail tersimpan!')" class="easyui-linkbutton c6" iconCls="icon-ok">Simpan</a>
            <a href="javascript:void(0)" id="btnReset2jaminan" class="easyui-linkbutton" iconCls="icon-cancel">Kosongkan</a>
          </div>
        </div>
      </div>
      <div id="dlgCeisa" class="easyui-dialog" style="width:40%;" closed="true" buttons="#dlgCeisa-buttons">
        <form id="fm4" class="form-horizontal" role="form" method="post" enctype="multipart/form-data" style="padding:10px;">
          <input type="submit" id="btnSubmitCeisa" name="btnSubmitCeisa" style="display:none">
          <div class="form-group">
          </div>
          <div class="form-group">
            <label class="control-label col-md-3">Upload Excel</label>
            <div class="col-md-8">
              <input type="file" id="excelFile" name="excelFile" class="form-control" style="width:90%" required>
              <div id="dropZone" style="border: 2px dashed #ccc; padding: 10px; text-align: center; margin-top: 10px;">
                Drag and drop The Excel From Ceisa here
              </div>
            </div>
          </div>
        </form>
      </div>
      <div id="dlgCeisa-buttons">
        <a href="#" id="btnSim4" class="easyui-linkbutton c6" iconCls="icon-ok">Simpan</a>
        <a href="javascript:void(0)" id="btnReset4" class="easyui-linkbutton" iconCls="icon-cancel">Kosongkan</a>
      </div>


      <div id="dlgUpload" class="easyui-dialog" style="width:40%;" closed="true" buttons="#dlgUpload-buttons">
        <form id="fm5" class="form-horizontal" role="form" method="post" enctype="multipart/form-data" style="padding:10px;">
          <input type="submit" id="btnSubmitUpload" name="btnSubmitUpload" style="display:none">
          <div class="form-group">
          </div>
          <div class="form-group">
            <label class="control-label col-md-3">Upload Excel</label>
            <div class="col-md-8">
              <input type="file" id="excelFile2" name="excelFile2" class="form-control" style="width:90%" required>
              <div id="dropZone" style="border: 2px dashed #ccc; padding: 10px; text-align: center; margin-top: 10px;">
                Drag and drop The Excel here
              </div>
            </div>
          </div>
        </form>
      </div>
      <div id="dlgUpload-buttons">
        <a href="#" id="btnSim5" class="easyui-linkbutton" iconCls="icon-ok">Simpan</a>
        <a href="javascript:void(0)" id="btnReset5" class="easyui-linkbutton" iconCls="icon-cancel">Kosongkan</a>
      </div>



      <div id="dlg3" class="easyui-dialog" style="width:40%;" closed="true" buttons="#dlg3-buttons">
        <form id="fm3" class="form-horizontal" role="form" method="post" style="padding:10px;">
          <input type="submit" id="btnSubmit3" name="btnSubmit3" style="display:none">
          <div class="form-group">
            <label class="control-label col-md-3">Barcode Item</label>
            <div class="col-md-8">
              <input class="form-control" id="barcode" name="barcode" style="width:90%" required><label class="checkbox-inline"><input type="checkbox" id="fifo" name="fifo" value="1">FIFO</label>
            </div>
          </div>
        </form>
      </div>
      <div id="dlgCeisa-buttons">
        <a href="#" id="btnSim3" onclick="javascript:alert('data detail tersimpan!')" class="easyui-linkbutton c6" iconCls="icon-ok">Simpan</a>
        <a href="javascript:void(0)" id="btnReset3" class="easyui-linkbutton" iconCls="icon-cancel">Kosongkan</a>
      </div>
    </div>
  </div>
  <div title="List View" data-options="closable:false" style="padding:10px">
    <table id="dg_hdrdet"></table>
    <div id="toolbar_hdrdet">
      <a href="javascript:void(0)" id="btnPrint2" class="easyui-linkbutton" iconCls="icon-print" plain="true" title="Print">Print</a>
      <a href="javascript:void(0)" id="btnExcel" class="easyui-linkbutton" iconCls="icon-xls" plain="true" title="Excel">Excel</a>
      <span style="display:inline-block;">
        &nbsp; &nbsp; &nbsp;
        <input id="q2">
      </span>
    </div>
  </div>
</div>