<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">
  
        <?php if ($this->session->userdata('u12') == 1 && $this->session->userdata('u13') == 1 ){ ?>
        <a href="javascript:void(0)" id="btnUbh" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit</a>
        <?php } ?>
        <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h13') == 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="btnPrint" class="easyui-linkbutton" iconCls="icon-print" plain="true" title="Print">Print Slip</a>
        <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t13') == 1 ){ ?>
        <!-- <a href="javascript:void(0)" id="btnUpload" class="easyui-linkbutton" iconCls="icon-add" plain="true">Upload SO</a> -->
        <?php } ?>
        <span style="display:inline-block;">
          &nbsp; &nbsp; &nbsp;
          <input id="q">
        </span>
      </div>

      <div id="dlg" class="easyui-dialog" style="width:100%; top:25%;" inline="true" closed="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="po_id" name="po_id">
          <div class="form-group">
            <label class="control-label col-md-1">SO No.</label>
            <div class="col-md-3">
            <input class="form-control easyui-textbox" id="po_no" name="po_no" style="width:90%" required>
            </div>
            <label class="control-label col-md-1">SO Date</label>
            <div class="col-md-3">
              <input class="form-control easyui-datebox" id="po_date" name="po_date" maxlength="10" style="width:90%" required>
            </div>
            <label class="control-label col-md-1">Customer</label>
            <div class="col-md-3">
              <input class="form-control" name="supplier" id="supplier" style="width:90%">
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-1">Currency</label>
            <div class="col-md-3" id="curr1">
              <input class="form-control" name="currency" id="currency" style="display:block">
              <!-- <input type="checkbox" name="autocurr" id="autocurr" value="Auto" onClick="autoCurrency()"/> -->
            </div>
            <!-- <div class="col-md-2" id="curr2">
              <input class="form-control" name="currency" id="currency2" style="display:none">
              <input type="checkbox" name="autocurr" id="autocurr2" value="Auto" onClick="autoCurrency()"/>
            </div>
            <div class="col-md-1">
              <input checked="checked" type="checkbox" id="autocurr" onClick="autoCurrency()"/>Auto
            </div> -->
            
            <label class="control-label col-md-1">Kurs</label>
            <div class="col-md-3">
              <input class="form-control easyui-textbox" name="Kurs" type="text" id="Kurs" value="" size="30">
            </div>
            <label class="control-label col-md-1">Delivery Date</label>
            <div class="col-md-3">
              <input class="form-control easyui-datebox" id="dlv_date" name="dlv_date" style="width:90%">
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-1">Attn.</label>
            <div class="col-md-3">
              <input class="form-control easyui-textbox" name="attn" id="attn" style="width:90%">
            </div>
            <label class="control-label col-md-1">Terms</label>
            <div class="col-md-3">
              <input class="form-control easyui-textbox" id="terms" name="terms" style="width:90%">
            </div>
            <label class="control-label col-md-1">Notes</label>
            <div class="col-md-3">
              <input class="form-control easyui-textbox" id="notes" name="notes" style="width:90%">
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-1">Desc</label>
            <div class="col-md-3">
              <input class="form-control easyui-textbox" id="desc" name="desc" style="width:90%">
            </div>
          </div>
        </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%">
      <table id="dg_det"></table>
      <div id="toolbar_det">
   
        <?php if ($this->session->userdata('t12') == 1 && $this->session->userdata('t13') == 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('u13') == 1 ){ ?>
        <a href="javascript:void(0)" id="btnUbh2" class="easyui-linkbutton" iconCls="icon-edit" plain="true">Edit</a>
        <?php } ?>
        <?php if ($this->session->userdata('h12') == 1 && $this->session->userdata('h13') == 1 ){ ?>
        <a href="javascript:void(0)" id="btnHps2" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Delete</a>
        <?php } ?>
        <span style="display:inline-block;">
          &nbsp; &nbsp; &nbsp;
          <input id="q_det">
        </span>
      </div>
      <div id="dlg2" class="easyui-dialog" style="width:40%;" 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="id" name="id">
          <input type="hidden" id="child_no" name="child_no">
          <div class="form-group">
            <label class="control-label col-md-3">Item Code</label>
            <div class="col-md-4">
              <input class="form-control" id="mat_idMSO" name="mat_id" style="width:70%" required>
            </div>
            <label class="control-label col-md-1">CF</label>
            <div class="col-md-4">
              <input class="form-control easyui-textbox" id="CF" name="CF" style="width:70%" readonly>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-3">SIZE</label>
            <div class="col-md-9">
              <input class="form-control easyui-textbox" id="PartNo" name="PartNo" style="width:100%" readonly>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-3">UOM</label>
            <div class="col-md-2">
              <input class="form-control" id="Sat" name="Sat" style="width:90%" readonly>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-3">Qty.</label>
            <div class="col-md-3">
              <input class="form-control" id="qty" name="qty" style="width:100%">
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-3">Price</label>
            <div class="col-md-3">
              <input class="form-control" id="price" name="price" style="width:100%">
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-3">Amount</label>
            <div class="col-md-3">
              <input class="form-control" id="amount" name="amount" style="width:100%">
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-3">PO/NO</label>
            <div class="col-md-3">
              <input class="form-control" id="npo_id" name="npo_id" style="width:100%">
            </div>
          </div>

        </form>
      </div>
      <div id="dlg2-buttons">
        <a href="#" id="btnSim2" 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 id="dlgUpload" class="easyui-dialog" style="width:40%;" closed="true" buttons="#dlgUpload-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 here
              </div>
            </div>
          </div>
        </form>
      </div>
      <div id="dlgUpload-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>
  </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>