<div class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" id="iv_data_update">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
<!-- start: page -->
            <div>
              <div class="col-lg-12">
                <section class="panel">
                  <header class="panel-heading">
                    <div class="panel-actions">
                      <a href="#" class="fa fa-caret-down"></a>
                    </div>
                    <h2 class="panel-title">INVOICE UPDATE (IM<?=$id;?>)</h2>
                  </header>
                  <div class="panel-body">
                     <form class="form-horizontal form-bordered" action="" name="form_iv_data" id="form_iv_data" method="post" enctype="multipart/form-data" code="<?=$id?>">
           <div class="box-header" data-original-title>
            <h4 style="color:black;"><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user"></i> ข้อมูลลูกค้า </h4>
          </div>
                 <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">ชื่อลูกค้า <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type=hidden name=id value='<? echo $id;?>'>
                          <input type="text" class="form-control" id="inputDefault" name="cus_name" value="<?=$r['cus_name']?>" required/>
                        </div>
                      </div>

                      <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">ที่อยู่</label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="cus_ads" value="<?=$r['cus_ads']?>">
                        </div>
                      </div>

                      <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">เบอร์ติดต่อ</label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="cus_tel" value="<?=$r['cus_tel']?>">
                        </div>
                      </div>
    
                     <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">E-mail</label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="cus_mail" value="<?=$r['cus_mail']?>">
                        </div>
                      </div>

           <div class="box-header" data-original-title>
            <h4><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user-md"></i> ข้อมูลเซลล์ </h4>
          </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">ชื่อเซลล์ <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="iv_admin"  value="<?=$r['iv_admin']?>" required/>
                        </div>
                      </div>

                     <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">วันที่ออก invoice <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input class="form-control" type="date" id="date" name="iv_date" value="<?=$r['iv_date']?>">
                        </div>
                      </div>

           <div class="box-header" data-original-title>
            <h4><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user-md"></i> รายละเอียดโปรแกรมขาย </h4>
          </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">รหัสโปรแกรมทัวร์ <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="iv_codepro" value="<?=$r['iv_codepro']?>" required/>
                        </div>
                      </div>

                     <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">ชื่อโปรแกรมทัวร์ <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="iv_namepro" value="<?=$r['iv_namepro']?>" required/>
                        </div>
                      </div>

                     <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">ขาไป (วันออกเดินทาง) <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input class="form-control" type="date" id="date" name="pro_datego" value="<?=$r['pro_datego']?>">
                        </div>
                      </div>
                     <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">ขากลับ (วันกลับเดินทาง) <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input class="form-control" type="date" id="date" name="pro_dateback" value="<?=$r['pro_dateback']?>">
                        </div>
                      </div>

                 <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">ประเภท invoice<span class="required">*</span></label>
                        <div class="col-md-6">
                        <?if($r['iv_pay'] == '0'){?>
                         <input type='radio'  name='iv_pay' id='iv_pay' value='0' checked=''>
                          <label for='iv_pay'>invoice ปกติ</label>
                         <input type='radio'  name='iv_pay' id='iv_pay' value='1'>
                          <label for='iv_pay'>invoice เรียกเก็บเงิน</label>
                      <?}else{?>
                    <input type='radio'  name='iv_pay' id='iv_pay' value='0'>
                          <label for='iv_pay'>invoice ปกติ</label>
                         <input type='radio'  name='iv_pay' id='iv_pay' value='1' checked=''>
                          <label for='iv_pay'>invoice เรียกเก็บเงิน</label>
                      <?}?>
                      </div>
                      </div>


  <div class="box-header" data-original-title style="padding:20px;">
     <h4 style="color:red;"><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user-md"></i> ราคา </h4>
  </div>
    
 <div class="table-responsive">
<table class="table table-bordered mb-none">
<thead>
<tr>
<th>ชื่อรายการ</th>
<th>ราคา</th>
<th>จำนวน</th>
</tr>
</thead>
<tbody>
<tr>
<td>ผู้ใหญ่</td>
<td><input class="form-control" type="text" id="adult_price" name="adult_price"  value="<?=$r['adult_price']?>"></td>
<td><input class="form-control" type="text" id="adult_num" name="adult_num"  value="<?=$r['adult_num']?>"></td>
</tr>
<tr>
<td>เด็กมีเตียง</td>
<td><input class="form-control" type="text" id="c_price" name="c_price" value="<?=$r['c_price']?>"></td>
<td><input class="form-control" type="text" id="c_num" name="c_num" value="<?=$r['c_num']?>"></td>
</tr>
<tr>
<td>เด็กไม่มีเตียง</td>
<td><input class="form-control" type="text" id="nb_price" name="nb_price" value="<?=$r['nb_price']?>"></td>
<td><input class="form-control" type="text" id="nb_num" name="nb_num" value="<?=$r['nb_num']?>"></td>
</tr>
<tr>
<td>พักเดี่ยว</td>
<td><input class="form-control" type="text" id="s_price" name="s_price" value="<?=$r['s_price']?>"></td>
<td><input class="form-control" type="text" id="s_num" name="s_num" value="<?=$r['s_num']?>"></td>
</tr>
</tbody>
</table>
</div>


<div class="box-header" data-original-title style="padding:20px;">
  <h4 style="color:red;"><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user-md"></i> ข้อมูล เพิ่มเติม </h4>
</div>
    
 <div class="table-responsive">
<table class="table table-bordered mb-none">
<thead>
<tr>
<th>ชื่อรายการ</th>
<th>ราคา</th>
<th>จำนวน</th>
<th>ใบเสร็จ</th>
</tr>
</thead>
<tbody>
<tr>
<td><input class="form-control" type="text" id="custom1_name" name="custom1_name" value="<?=$r['custom1_name']?>"></td>
<td><input class="form-control" type="text" id="custom1_price" name="custom1_price" value="<?=$r['custom1_price']?>"></td>
<td><input class="form-control" type="text" id="custom1_num" name="custom1_num" value="<?=$r['custom1_num']?>"></td>
<td>
  <?if($r['custom1_val'] == '0'){?>
 <input type='radio'  name='custom1_val' id='custom1_val' value='0' checked=''>
  <label for='custom1_val'>งวด1</label>
 <input type='radio'  name='custom1_val' id='custom1_val' value='1'>
  <label for='custom1_val'>งวด2</label>
<?}else{?>
   <input type='radio'  name='custom1_val' id='custom1_val' value='0'>
  <label for='custom1_val'>งวด1</label>
 <input type='radio'  name='custom1_val' id='custom1_val' value='1' checked=''>
  <label for='custom1_val'>งวด2</label>
<?}?>
</td>
</tr>
<tr>
<td><input class="form-control" type="text" id="custom2_name" name="custom2_name" value="<?=$r['custom2_name']?>"></td>
<td><input class="form-control" type="text" id="custom2_price" name="custom2_price" value="<?=$r['custom2_price']?>"></td>
<td><input class="form-control" type="text" id="custom2_num" name="custom2_num" value="<?=$r['custom2_num']?>"></td>
<td>
  <?if($r['custom2_val'] == '0'){?>
 <input type='radio'  name='custom2_val' id='custom2_val' value='0' checked=''>
  <label for='custom2_val'>งวด1</label>
 <input type='radio'  name='custom2_val' id='custom2_val' value='1'>
  <label for='custom2_val'>งวด2</label>
<?}else{?>
   <input type='radio'  name='custom2_val' id='custom2_val' value='0'>
  <label for='custom2_val'>งวด1</label>
 <input type='radio'  name='custom2_val' id='custom2_val' value='1' checked=''>
  <label for='custom2_val'>งวด2</label>
<?}?>
</td>
</tr>
<tr>
<td><input class="form-control" type="text" id="custom3_name" name="custom3_name" value="<?=$r['custom3_name']?>"></td>
<td><input class="form-control" type="text" id="custom3_price" name="custom3_price" value="<?=$r['custom3_price']?>"></td>
<td><input class="form-control" type="text" id="custom3_num" name="custom3_num" value="<?=$r['custom3_num']?>"></td>
<td>
  <?if($r['custom3_val'] == '0'){?>
 <input type='radio'  name='custom3_val' id='custom3_val' value='0' checked=''>
  <label for='custom3_val'>งวด1</label>
 <input type='radio'  name='custom3_val' id='custom3_val' value='1'>
  <label for='custom3_val'>งวด2</label>
<?}else{?>
   <input type='radio'  name='custom3_val' id='custom3_val' value='0'>
  <label for='custom3_val'>งวด1</label>
 <input type='radio'  name='custom3_val' id='custom3_val' value='1' checked=''>
  <label for='custom3_val'>งวด2</label>
<?}?>
</td>
</tr>
<tr>
<td><input class="form-control" type="text" id="custom4_name" name="custom4_name" value="<?=$r['custom4_name']?>"></td>
<td><input class="form-control" type="text" id="custom4_price" name="custom4_price" value="<?=$r['custom4_price']?>"></td>
<td><input class="form-control" type="text" id="custom4_num" name="custom4_num" value="<?=$r['custom4_num']?>"></td>
<td>
  <?if($r['custom4_val'] == '0'){?>
 <input type='radio'  name='custom4_val' id='custom4_val' value='0' checked=''>
  <label for='custom4_val'>งวด1</label>
 <input type='radio'  name='custom4_val' id='custom4_val' value='1'>
  <label for='custom4_val'>งวด2</label>
<?}else{?>
   <input type='radio'  name='custom4_val' id='custom4_val' value='0'>
  <label for='custom4_val'>งวด1</label>
 <input type='radio'  name='custom4_val' id='custom4_val' value='1' checked=''>
  <label for='custom4_val'>งวด2</label>
<?}?>
</td>
</tr>

</tbody>
</table>
</div>


  <div class="box-header" data-original-title style="padding:20px;">
  <h4 style="color:red;"><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user-md"></i>ส่วนลด</h4>
</div>
    
<div class="table-responsive">
<table class="table table-bordered mb-none">
<thead>
<tr>
<th style="color:red;">ราคาส่วนลด</th>
<th style="color:red;">จำนวน</th>
</tr>
</thead>
<tbody>
<tr>
<td><input class="form-control"  type="text" id="discount_price" name="discount_price" value="<?=$r['discount_price']?>"></td>
<td><input  class="form-control" type="text" id="discount_sum" name="discount_sum" value="<?=$r['discount_sum']?>"></td>
</tr>
</tbody>
</table>
</div>


<div class="table-responsive">
<table class="table table-bordered mb-none">
<thead>
<tr>
<th style="color:red;">ชื่อรายการส่วนลด</th>
<th style="color:red;">ราคาลด</th>
<th style="color:red;">จำนวน</th>
</tr>
</thead>
<tbody>
<tr>
<td><input class="form-control" type="text" id="cus_de_name" name="cus_de_name" value="<?=$r['cus_de_name']?>"></td>
<td><input class="form-control" type="text" id="cus_de_price" name="cus_de_price" value="<?=$r['cus_de_price']?>"></td>
<td><input class="form-control" type="text" id="cus_de_num" name="cus_de_num" value="<?=$r['cus_de_num']?>"></td>
</tr>

<tr>
<td><input class="form-control" type="text" id="cus_de_name2" name="cus_de_name2" value="<?=$r['cus_de_name2']?>"></td>
<td><input class="form-control" type="text" id="cus_de_price2" name="cus_de_price2" value="<?=$r['cus_de_price2']?>"></td>
<td><input class="form-control" type="text" id="cus_de_num2" name="cus_de_num2" value="<?=$r['cus_de_num2']?>"></td>
</tr>

<tr>
<td><input class="form-control" type="text" id="cus_de_name3" name="cus_de_name3" value="<?=$r['cus_de_name3']?>"></td>
<td><input class="form-control" type="text" id="cus_de_price3" name="cus_de_price3" value="<?=$r['cus_de_price3']?>"></td>
<td><input class="form-control" type="text" id="cus_de_num3" name="cus_de_num3" value="<?=$r['cus_de_num3']?>"></td>
</tr>


</tbody>
</table>
</div>


  <div class="box-header" data-original-title style="padding:20px;">
  <h4 style="color:red;"><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user-md"></i> รายละเอียด กำหนดชำระเงิน</h4>
</div>
    
<div class="table-responsive">
<table class="table table-bordered mb-none">
<thead>
<tr>
<th>ราคามัดจำ</th>
<th>จำนวน</th>
<th>ภายในวันที่</th>
<th>ภายในเวลา</th>
</tr>
</thead>
<tbody>
<tr>
<td><input class="form-control" type="text" id="mus_price" name="mus_price" value="<?=$r['mus_price']?>"></td>
<td><input class="form-control" type="text" id="mus_num" name="mus_num" value="<?=$r['mus_num']?>"></td>
<td><input class="form-control" type="date" id="mus_date" name="mus_date" value="<?=$r['mus_date']?>"></td>
<td><input class="form-control" type="time" id="mus_time" name="mus_time" value="<?=$timemus?>"></td>
</tr>
</tbody>
</table>
</div>


                     <div class="form-group" style="margin-top:1rem;">
                        <label class="col-md-3 control-label" for="inputDefault" style="color:red;">ชำระเงินทั้งหมด <span class="required">*</span></label>
                        <div class="col-md-3">
                          <input class="form-control" type="date" id="date_line" name="date_line" value="<?=$r['date_line']?>">
                        </div>
                        <div class="col-md-3">
                          <input class="form-control" type="time" id="date_line_time" name="date_line_time" value="<?=$timedateline?>">
                        </div>
                      </div>

                 <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">NOTE : <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="iv_note" value="<?=$r['iv_note']?>" required/>
                        </div>
                      </div>
                           <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">รีมาค : <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="iv_remark" value="<?=$r['iv_remark']?>">
                        </div>
                      </div>

          <br><br><div class="box-header" data-original-title>
            <h4 style="color:black;"><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user"></i> อ้างอิง Ref. </h4>
          </div>
              <div class="form-group">
                        <label class="col-md-3 control-label">Invoice Ref.1 </label>
                        <div class="col-md-6">
                    <select data-plugin-selectTwo id='iv_ref1' name="iv_ref1" data-rel="chosen" class="form-control populate placeholder">
                    <?
                      $sql = "select * from tbiv;";
                                    $result = mysql_query($sql);
                                    echo '<option value="0">-- เลือกรหัสอินวอย --</option>';
                                    while ($data = mysql_fetch_array($result) ) {
                                    echo "<option value=$data[iv_id] ";
                                      if($r['iv_ref1'] == $data[iv_id]){
                          echo "selected";
                        }
                                    echo ">IM$data[iv_id]</option>";
                                  }
                                  ?>
                    </select>

                        </div>
                      </div>

              <div class="form-group">
                        <label class="col-md-3 control-label">Invoice Ref.2 </label>
                        <div class="col-md-6">
                    <select data-plugin-selectTwo id='iv_ref2' name="iv_ref2" data-rel="chosen" class="form-control populate placeholder">
                    <?
                      $sql = "select * from tbiv;";
                                    $result = mysql_query($sql);
                                    echo '<option value="0">-- เลือกรหัสอินวอย --</option>';
                                    while ($data = mysql_fetch_array($result) ) {
                                    echo "<option value=$data[iv_id] ";
                                      if($r['iv_ref2'] == $data[iv_id]){
                          echo "selected";
                        }
                                    echo ">IM$data[iv_id]</option>";
                                  }
                                  ?>
                    </select>

                        </div>
                      </div>

              <div class="form-group">
                        <label class="col-md-3 control-label">Invoice Ref.3 </label>
                        <div class="col-md-6">
                    <select data-plugin-selectTwo id='iv_ref3' name="iv_ref3" data-rel="chosen" class="form-control populate placeholder">
                    <?
                      $sql = "select * from tbiv;";
                                    $result = mysql_query($sql);
                                    echo '<option value="0">-- เลือกรหัสอินวอย --</option>';
                                    while ($data = mysql_fetch_array($result) ) {
                                    echo "<option value=$data[iv_id] ";
                                      if($r['iv_ref3'] == $data[iv_id]){
                          echo "selected";
                        }
                                    echo ">IM$data[iv_id]</option>";
                                  }
                                  ?>
                    </select>

                        </div>
                      </div>
        <br><br><br><footer class="panel-footer">
                    <div class="row">
                <div class="col-md-12 text-center" style="margin-top:20px;">
                <div class="form-actions">
                  <button type="submit" id="PackageBT" class="btn btn-danger btn-block"><i class="fa fa-save"></i> บันทึก</button>
                </div>
                </div>
                    </div>
                  </footer>

                    </form>
                  </div>
                </section>
            </div>
            </div>

    </div>
  </div>
</div>






<div class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" id="payin_data_update">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
  <section class="panel">
  	  <form class="form-horizontal form-bordered" action="" name="form_pay_data" id="form_pay_data" method="post" enctype="multipart/form-data" code="<?=$id;?>">  
   <div class=" text-center" id="chkimgfieldlogo2">
               <div class="panel-heading bg-primary" data-original-title>
            <h4 style="color:#fff;"><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user"></i> PAY-IN </h4>
          </div>
                      <div class="panel-body">     
                    <div class="col-md-6">
                      <label class="control-label text-center header-form" style="float:none;text-align:center;" for="imgfieldlogo2">
                      <i class="fa fa-file-picture-o" style="margin-bottom:15px;"></i>PAYIN</label>
                  <!-- <label class="control-label" for="imgfield">รูปภาพ</label> -->
                    <ul class="img-list" id="img-list-logo">
                      <li>
                        <a href="#" class="imgfield-msg img-logo-del2" id="imgfield-logo-msg">
                          <img id="imgfield-logo-img" style="width: 50%;margin-bottom:15px;">
                          <span class="text-content"><span>ลบรูปภาพนี้ ?</span></span>
                        </a>
                      </li>
                    </ul>
                  <div class="btn btn-danger">
                    <input class="input-file" id="imgfieldlogo2" type="file" name="files[]">
                    <input type="hidden" id="imgfiles-logo" name="image_field2" >
                    <input class="input-xlarge focused" id="imgfield-msgg" type="text" disabled="" style="display: none;">
                  </div>
                    <?//<a href="#" class="imgfield-msg img-del" id="imgfield-msg"><img id="imgfield-img"></a>?>
                    <div class="progress progress-warning progress-striped active input-xlarge" id="progress-logo" style="height:30px !important; display: none;">
                      <div class="bar"></div>
                    </div>
                </div>

                <div class="col-md-6">
                     <div class="">
                       <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label" for="inputDefault" style="color:red;">TYPE <span class="required">*</span></label>
                        <div class="col-md-6">
                           <select data-plugin-selectTwo name='payment_type' id='payment_type' data-rel="chosen" class="form-control populate placeholder">
                          <option value="0">-- ชำระค่า --</option>
                          <option value="DEP">มัดจำ</option>
                          <option value="PAY">ยอดทั้งหมด</option>
                          <option value="ETC">ส่วนที่เหลือ</option>
                        </select>
                        </div>
                      </div>
                        <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label" for="inputDefault" style="color:red;">INVOICE <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="payment_iv" value="<?=$id?>"/>
                        </div>
                        </div>
                        <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label" for="inputDefault" style="color:red;">DATE <span class="required">*</span></label>
                        <div class="col-md-6">
                           <input class="form-control" type="date" id="date" name="payment_date" value="" required="">
                        </div>
                          </div>
                       <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label" for="inputDefault" style="color:red;">BANK <span class="required">*</span></label>
                        <div class="col-md-6">
                          <select data-plugin-selectTwo name='payment_bank' id='payment_bank' data-rel="chosen" class="form-control populate placeholder">
                          <option value="0">--เลือกธนาคาร--</option>
                          <option value="KBANK">ธ.กสิกรไทย</option>
                          <option value="BBL">ธ.กรุงเทพ</option>
                          <option value="KTB">ธ.กรุงไทย</option>
                          <option value="TMB">ธ.ทหารไทย</option>
                          <option value="SCB">ธ.ไทยพานิชย์</option>
                          <option value="GSB">ธ.ออมสิน</option>
                          <option value="BAY">ธ.กรุงศรีอยุธยา</option>
                          <option value="CITI">ธ.ซิตี้แบงค์</option>
                          <option value="KKP">ธ.เกียรตินาคิน</option>
                          <option value="CIMB">ธ.ซีไอเอ็มบีไทย</option>
                          <option value="TISCO">ธ.ทิสโก้</option>
                          <option value="TBANK">ธ.ธนชาติ</option>
                          <option value="UOBT">ธ.ยูโอบี</option>
                          <option value="SCBT">ธ.สแตนดาร์ดชาร์เตอร์ดไทย</option>
                          <option value="GHBANK">ธ.อาคารสงเคราะห์</option>
                        </select>
                        </div>
                      </div>
                       <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label" for="inputDefault" style="color:red;">TYPE <span class="required">*</span></label>
                        <div class="col-md-6">
                           <select data-plugin-selectTwo name='payment_ref' id='payment_ref' data-rel="chosen" class="form-control populate placeholder">
                          <option value="0">-- ลูกค้าจ่าย --</option>
                          <option value="1">-- จ่ายให้ LAND --</option>
                        </select>
                        </div>
                      </div>

                        <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label" for="inputDefault" style="color:red;">ยอดที่จ่าย <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="payment_total" name="payment_total" value="<?=$r[payment_total]?>"/>
                        </div>
                        </div>

                </div>

                      </div>


                </div>
                <footer class="panel-footer" style="background:#fff;">
                    <div class="row">
   <div class="col-md-12 text-center" style="margin-top:20px;">
                <div class="form-actions">
                  <button type="submit" id="PackageBT" class="btn btn-primary btn-xl btn-block"><i class="fa fa-save"></i> บันทึกการจ่ายเงิน</button>
                </div>
                </div>
                    </div>
                  </footer>

                    </form>
  </section>

    </div>
  </div>
</div>





<div class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" id="doc_data_update">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
  <section class="panel">
      <form class="form-horizontal form-bordered" action="" name="form_doc_data" id="form_doc_data" method="post" enctype="multipart/form-data" code="<?=$id;?>">  
   <div class=" text-center" id="chkimgfieldlogo2">
               <div class="panel-heading bg-primary" data-original-title>
            <h4 style="color:#fff;"><i class="icon-group icon-fw"></i><span class="break"></span> <i class="fa fa-user"></i> เพิ่มเอกสาร </h4>
          </div>
              <div class="panel-body">     
                   <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">INVOICE<span class="required">*</span></label>
                        <div class="col-md-6">
                          <input class="form-control" type="text" id="doc_iv" name="doc_iv" value="<?=$id;?>">
                        </div>
                      </div>
                   <div class="form-group" id="chkseriesdata">
                  <label class="col-md-3 control-label" for="seriesdata">FLIE File</label>
                  <div class="col-md-9">
                  <div class="controls text-left">
                  <div class="attachments" style="display: none;">
                    <ul>
                      <li>
                        <span class="label label-danger">FLIE</span> <b class="file_name"></b>
                        <i></i>
                        <span class="quickMenu">
                          <a href="#" class="remove_file"><i class="fa fa-times fa-2x text-danger" aria-hidden="true"></i></a> 
                          <a href="#" class="f_download"><i class="fa fa-download fa-2x" aria-hidden="true"></i></a> 
                        </span>
                      </li>
                    </ul>
                  </div>
                    <div class="btn btn-danger">
                    <input class="input-file" id="seriesfield" type="file" name="files[]">
                    <input type="hidden" id="seriesdata" name="series_field" value="">
                    <div class="progress progress-warning progress-striped active input-xlarge" id="progress" style="height:30px !important; display: none;">
                      <div class="bar"></div>
                    </div>
                    </div>
                  </div>
                  </div>

                </div>

                 <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">รายละเอียดไฟล์ <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="iv_doc_text" name="doc_text"  value="<?=$r['doc_text']?>" />
                        </div>
                      </div>

                 <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">ลิงค์อ้างอิง <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="doc_ref" name="doc_ref"  value="<?=$r['doc_ref']?>" />
                        </div>
                      </div>

                    <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label" for="inputDefault" style="color:red;">TYPE <span class="required">*</span></label>
                        <div class="col-md-6">
                           <select data-plugin-selectTwo name='doc_type' id='doc_type' data-rel="chosen" class="form-control populate placeholder">
                          <option value="0">-- เอกสารลูกค้า --</option>
                          <option value="1">-- เอกสารของ Land --</option>
                        </select>
                        </div>
                      </div>

                <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">วันที่อัพโหลด<span class="required">*</span></label>
                        <div class="col-md-6">
                          <input class="form-control" type="date" id="date" name="doc_date" value="<?php echo date("Y-m-d");?>">
                        </div>
                      </div>

                      </div>


                </div>
                <footer class="panel-footer" style="background:#fff;">
                    <div class="row">
   <div class="col-md-12 text-center" style="margin-top:20px;">
                <div class="form-actions">
                  <button type="submit" id="PackageBT" class="btn btn-primary btn-xl btn-block"><i class="fa fa-save"></i> อัพโหลดไฟล์ </button>
                </div>
                </div>
                    </div>
                  </footer>

                    </form>
  </section>

    </div>
  </div>
</div>



<div class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" id="iv_pass_update">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
<!-- start: page -->
            <div>
              <div class="col-lg-12">
                <section class="panel">
                  <header class="panel-heading">
                    <div class="panel-actions">
                      <a href="#" class="fa fa-caret-down"></a>
                    </div>
                    <h2 class="panel-title">Passport (IM<?=$id;?>)</h2>
                  </header>
                  <div class="panel-body">
             <section class="panel">
              <header class="panel-heading"  style="margin-bottom:20px;">
                <h2 class="panel-title">PASSENGER &nbsp; &nbsp; <?=$r['adult_num'];?> &nbsp; ท่าน &nbsp; &nbsp;  
             <!--   <a href="?url=" data-link="?url="  class="btn btn-success with-shadow-success" style="position: absolute;right: 16px;top: 10px;">เพิ่มหน้าพาสใหม่</a> -->
                    <input type="hidden" class="form-control"name="namepro" id="namepro"  value="<?=$r['iv_namepro']?>">
                      <input type="hidden" class="form-control"name="namepro" id="namepro"  value="<?=$r['iv_namepro']?>">
                      <input class="form-control" name="pro_dategopr" id="pro_dategopr"
                      value="<?echo ''.datethai($r['pro_datego']).' - '.datethai($r['pro_dateback']).'';?>"  type="hidden">
                      <input type="hidden" class="form-control" id="iv_admin" name="iv_admin"  value="<?=$r['iv_admin']?>"/>
                      <input type="hidden" class="form-control" id="iv_new" name="iv_new" value="IM<?=$r['iv_id']?>">
              </header>

  <div class="row">   
<div class="col-xl-12">
<?if($ca_book == '0'  || $ca_book < $r['adult_num']){?>
 <form class="form-horizontal" name="form_pass_data" id="form_pass_data" method="post" code="<?=$code;?>">
  <table>
    <?$x =1;
      $num = $r['adult_num'] - $ca_book;?>
    <tr style=" background: #e0331e;">
      <th align="center">กรุณาเพิ่มหน้าพาส อีก <?=$num;?> ท่าน ให้ครบ</th>
    </tr>
    <?
      while($x <= $num) {
      ?>
    <tr>
       <td> <input class="form-control" type="hidden" id="name<?=$x?>" name="name<?=$x?>" value="<?=$ads?>"> </td>
    </tr>
    <? $x++ ?> <? } ?>
  </table>
                
                <input class="text" type="hidden" id="allx" type="text" name="allx" style="text-transform:uppercase" value="<?=$x-1?>">
                <input class="text" type="hidden" id="code" type="text" name="code" style="text-transform:uppercase" value="<?=$code?>">
                
               <div class="col-md-12 text-center p-5 mb-5" style="margin-top:20px;margin-bottom: 20px;">
                <div class="form-actions">
                  <button type="submit" id="PackageBT" class="btn btn-danger btn-block"><i class="fa fa-save"></i> SUBMIT</button>
                </div>
                </div>
            </form>
<?}else{?>

<form class="form-horizontal" name="form_pass_data" id="form_pass_data" method="post" code="<?=$code;?>">
<table class="table table-bordered table-striped mb-none" id="datatable-tabletoolss">
    <tr style="    background: #e0331e;">
      <th align="center" class="text-center" style="width:30px;">NO</th>
      <th align="center" style="width:100px;">Passport</th>
      <th align="center">Passport DETAIL</th>
    </tr>
            <?
      $i =0;
      $x =1;
      $book_pass22 = $db->findByAttributes('tbpass',array('pass_iv =' => $id ))->execute();
// $r = $db->findByPK('tb_programe','programe_id',$_GET['id'])->executeRow();
$book_pass = $db->findorderid('tbpass,tbiv','tbpass.pass_iv = tbiv.iv_id && pass_iv',$id,'pass_id asc ,pass_id')->execute();
     while ($cp = mysql_fetch_array($book_pass)){
      $x++
      ?>
        <?
                    if($cp['pass_pic'] == ''){
                      $input = 'block';
                      $showimg = 'none';
                    } else {
                      $input = 'none';
                      $showimg = 'block';
                    }
                    ?>
    <tr><?$i++?>
      <td class="text-danger"><h2><?=$i;?></h2></td>
      <td>
            <input type="hidden" class="input-xlarge focused" id="edits" name="edits" value="edits">
             <input type="hidden" class="input-xlarge focused" id="idpro<?=$x?>" name="idpro<?=$x?>" value="<?=$cp[pass_id];?>">
      <input class="input-file imgfieldlogo3" id="fileupload<?=$cp[pass_id]?>" type="file" name="files[]" style="display: <?=$input;?>;" data-id="<?=$cp[pass_id]?>">
                    <input type="hidden" name="image_field<?=$x;?>" id="N<?=$cp[pass_id]?>" value="<?=$cp[pass_pic]?>">
                    <ul class="img-list" id="img-list<?=$cp[pass_id]?>" style="display: <?=$showimg;?>;">
                      <li class="imgfield-msg" id="imgfield-msg<?=$cp[pass_id]?>">
                        <?php
                        $folder = '../pass';
                        $path_f = 'pass';
                          $path = 'https://www.imaginetourservice.com/'.$path_f.'/'.$cp['pass_pic'];
                          $path2 = 'https://www.imaginetourservice.com/'.$path_f.'/'.$cp['pass_pic'];
                        ?>
                          <img id="imgfield-img<?=$cp[pass_id]?>" class="img-link" src="<? echo $folder;?>/<? echo $cp['pass_pic'];?>" data-img="<? echo $cp['pass_pic'];?>" style="width:200px;margin-bottom:15px;">
<!--                   <a href="#" class="pass_del_payin" id="imgfiles">
                    <span class="text-content"><span>ลบรูปนี้ </span></span>
                  </a> -->
                      </li>
                    </ul>
                    <?//<a href="#" class="imgfield-msg img-del" id="imgfield-msg"><img id="imgfield-img"></a>?>
                    <div class="progress progress-warning progress-striped active" id="P<?=$cp[pass_id]?>" style="height:30px !important; display: none;">
                      <div class="bar" id="PB<?=$cp[pass_id]?>"></div>
                    </div>

     </td>
       <td> 
<!--         <div class="col-md-2"><label>รายละเอียด</label></div> -->
<div class="row">
  <div class="col-md-12" style="margin-bottom:15px;">
      <input class="form-control" type="text" id="pass_num<?=$x?>" name="pass_num<?=$x?>" value="<?=$cp[pass_num];?>" placeholder="Passport num">
  </div>
        <div class="col-md-2">
                <select class="form-control" id="pass_title_eg<?=$x?>" name="pass_title_eg<?=$x?>">
        <option value="MR" <? 
                  if($cp['pass_title_eg'] == 'MR'){
                    echo "selected";
                  } 
                  ?>>MR</option>
                  <option value="MSTR" <? 
                  if($cp['pass_title_eg'] == 'MSTR'){
                    echo "selected";
                  } 
                  ?>>MSTR</option>
                  <option value="MRS" <? 
                  if($cp['pass_title_eg'] == 'MRS'){
                    echo "selected";
                  } 
                  ?>>MRS</option>
                  <option value="MISS" <? 
                  if($cp['pass_title_eg'] == 'MISS'){
                    echo "selected";
                  } 
                  ?>>MISS</option>
                  <option value="MS" <? 
                  if($cp['pass_title_eg'] == 'MS'){
                    echo "selected";
                  } 
                  ?>>MS</option>
                  <option value="PHRA" <? 
                  if($cp['pass_title_eg'] == 'PHRA'){
                    echo "selected";
                  } 
                  ?>>PHRA</option>
                  <option value="PHRAKHRU" <? 
                  if($cp['pass_title_eg'] == 'PHRAKHRU'){
                    echo "selected";
                  } 
                  ?>>PHRAKHRU</option>
                  <option value="PHRAMAHA" <? 
                  if($cp['pass_title_eg'] == 'PHRAMAHA'){
                    echo "selected";
                  } 
                  ?>>PHRAMAHA</option>
                  <option value="PHRAATHIKAN" <? 
                  if($cp['pass_title_eg'] == 'PHRAATHIKAN'){
                    echo "selected";
                  } 
                  ?>>PHRAATHIKAN</option>
                </select>
          </div>
         <div class="col-md-5">
          <input class="form-control" type="text" id="pass_name_eg<?=$x?>" name="pass_name_eg<?=$x?>" value="<?=$cp[pass_name_eg];?>" placeholder="FIRSTNAME">
        </div>
         <div class="col-md-5">
          <input class="form-control" type="text" id="pass_lastname_eg<?=$x?>" name="pass_lastname_eg<?=$x?>" value="<?=$cp[pass_lastname_eg];?>" placeholder="LASTNAME">
        </div>
</div>

<div class="row" style="margin-top:10px;">
        <div class="col-md-2">
        <select class="form-control" id="pass_title_th<?=$x?>" name="pass_title_th<?=$x?>">
  <option value="นาย" <? 
                      if($cp['pass_title_th'] == 'นาย'){
                        echo "selected";
                      } 
                      ?>>นาย</option>
                      <option value="นาง" <? 
                      if($cp['pass_title_th'] == 'นาง'){
                        echo "selected";
                      } 
                      ?>>นาง</option>
                      <option value="น.ส." <? 
                      if($cp['pass_title_th'] == 'น.ส.'){
                        echo "selected";
                      } 
                      ?>>น.ส.</option>
                      <option value="ด.ช." <? 
                      if($cp['pass_title_th'] == 'ด.ช.'){
                        echo "selected";
                      } 
                      ?>>ด.ช.</option>
                      <option value="ด.ญ." <? 
                      if($cp['pass_title_th'] == 'ด.ญ.'){
                        echo "selected";
                      } 
                      ?>>ด.ญ.</option>
                      <option value="พระ" <? 
                      if($cp['pass_title_th'] == 'พระ'){
                        echo "selected";
                      } 
                      ?>>พระ</option>
                      <option value="พระครู" <? 
                      if($cp['pass_title_th'] == 'พระครู'){
                        echo "selected";
                      } 
                      ?>>พระครู</option>
                      <option value="พระมหา" <? 
                      if($cp['pass_title_th'] == 'พระมหา'){
                        echo "selected";
                      } 
                      ?>>พระมหา</option>
                      <option value="พระอธิการ" <? 
                      if($cp['pass_title_th'] == 'พระอธิการ'){
                        echo "selected";
                      } 
                      ?>>พระอธิการ</option>
                    </select>
          </div>
         <div class="col-md-5">
          <input class="form-control" type="text" id="pass_name_th<?=$x?>" name="pass_name_th<?=$x?>" value="<?=$cp[pass_name_th];?>" placeholder="ชื่อจริง">
        </div>
         <div class="col-md-5">
          <input class="form-control" type="text" id="pass_lastname_th<?=$x?>" name="pass_lastname_th<?=$x?>" value="<?=$cp[pass_lastname_th];?>" placeholder="นามสกุล">
        </div>
        <div class="col-md-4"></div>
        <div class="col-md-4"></div>
<!--         <div class="col-md-4" style="margin-top:10px;">
                       <a  class='btn btn-edit-color btn-block i-pass' id="BUTTON<?=$cp[pass_id]?>" folder="<?=$folder;?>" data-id="<?=$cp[pass_id]?>"
                          data-img="https://www.imaginetourservice.com/pass/<? echo $cp['pass_pic'];?>" data-toggle='modal' data-target='#Modal'>
                        <i class='halflings-icon file white'></i>PRINT
                      </a>
        </div> -->
</div>

      </td>
    </tr>
   <?} ?>
  </table>
           
                <input class="text" type="hidden" id="allx" type="text" name="allx" style="text-transform:uppercase" value="<?=$x?>">
                <input class="text" type="hidden" id="code" type="text" name="code" style="text-transform:uppercase" value="<?=$code?>">
                
               <div class="col-md-12 text-center p-5 mb-5" style="margin-top:20px;margin-bottom: 20px;">
                <div class="form-actions">
                  <button type="submit" id="PackageBT" class="btn btn-danger"><i class="fa fa-save"></i> บันทึก</button>
                  <button type="reset" onclick="window.history.back();return false;" class="btn btn-cancel-color">ยกเลิก</button>
                </div>
                </div>
            </form>
<?}?>
      
        </div><!--/span-->
      
      </div>
</section>

                  </div>
                </section>
            </div>
            </div>

    </div>
  </div>
</div>





<div class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" id="iv_data2_update">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
<!-- start: page -->
            <div>
              <div class="col-lg-12">
                <section class="panel">
                  <header class="panel-heading">
                    <div class="panel-actions">
                      <a href="#" class="fa fa-caret-down"></a>
                    </div>
                    <h2 class="panel-title">INVOICE จัดการข้อมูล LAND (IM<?=$id;?>)</h2>
                  </header>
                  <div class="panel-body">
                     <form class="form-horizontal form-bordered" action="" name="form_iv_data2" id="form_iv_data2" method="post" enctype="multipart/form-data" code="<?=$id?>">
                    <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">Wholesale <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type=hidden name=id value='<? echo $id;?>'>
                          <input type="text" class="form-control" id="inputDefault" name="iv_wholesale" value="<?=$r['iv_wholesale']?>" required/>
                        </div>
                      </div>
                 <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">Commission <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="iv_com" value="<?=$r['iv_com']?>" required/>
                        </div>
                      </div>
             <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">Commission SALE <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="iv_com_sale" value="<?=$r['iv_com_sale']?>" required/>
                        </div>
                      </div>
                   <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">ราคาที่ต้องจ่าย LAND <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="iv_land_total" value="<?=$r['iv_land_total']?>" required/>
                        </div>
                      </div>
                   <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">NOTE <span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" class="form-control" id="inputDefault" name="iv_note" value="<?=$r['iv_note']?>" required/>
                        </div>
                      </div>
        <br><br><br><footer class="panel-footer">
                    <div class="row">

          <div class="col-md-12 text-center" style="margin-top:20px;">
                <div class="form-actions">
                  <button type="submit" id="PackageBT" class="btn btn-danger btn-block"><i class="fa fa-save"></i> บันทึก</button>
          <!--         <button type="reset" onclick="window.history.back();return false;" class="btn btn-cancel-color">ยกเลิก</button> -->
                </div>
                </div>
                    </div>
                  </footer>

                    </form>
                  </div>
                </section>
            </div>
            </div>

    </div>
  </div>
</div>






<div class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" id="work_status">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
  <section class="panel">
      <form class="form-horizontal form-bordered" action="" name="form_work_iv" id="form_work_iv" method="post" enctype="multipart/form-data" code="<?=$id;?>">  
   <div class=" text-center" id="chkimgfieldlogo2">
               <div class="panel-heading bg-primary" data-original-title>
            <h4 style="color:#fff;"><i class="icon-group icon-fw"></i><span class="break"></span> ปรับเปลี่ยนสถานะ </h4>
          </div>
              <div class="panel-body">     
                   <div class="form-group">
                        <label class="col-md-3 control-label" for="inputDefault">INVOICE<span class="required">*</span></label>
                        <div class="col-md-6">
                           <input type=hidden name=id value='<? echo $id;?>'>
                          <input class="form-control" type="text" id="doc_iv" name="doc_iv" value="<?=$id;?>">
                        </div>
                      </div>


                    <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label text-dark" for="inputDefault">สถานะ BOOK LAND <span class="required">*</span></label>
                        <div class="col-md-6">
                           <select data-plugin-selectTwo name='iv_status_work1' id='iv_status_work1' data-rel="chosen" class="form-control populate placeholder">
                           <option value="" <?if($r['iv_status_work1'] == ''){echo "selected";}?>>-- เลือกสถานะ --</option>
                           <option value="ส่งจองแล้ว" <?if($r['iv_status_work1'] == 'ส่งจองแล้ว'){echo "selected";}?>>-- ส่งจองแล้ว --</option>
                           <option value="ส่งจองเพิ่มคน" <?if($r['iv_status_work1'] == 'ส่งจองเพิ่มคน'){echo "selected";}?>>-- ส่งจองเพิ่มคน --</option>
                           <option value="Confirm" <?if($r['iv_status_work1'] == 'Confirm'){echo "selected";}?>>-- Confirm --</option>
                           <option value="W/L" <?if($r['iv_status_work1'] == 'W/L'){echo "selected";}?>>-- W/L --</option>
                           <option value="ยังไม่ได้ส่งยกเลิก" <?if($r['iv_status_work1'] == 'ยังไม่ได้ส่งยกเลิก'){echo "selected";}?>>-- ยังไม่ได้ส่งยกเลิก --</option>
                          <option value="ส่งยกเลิกแล้ว" <?if($r['iv_status_work1'] == 'ส่งยกเลิกแล้ว'){echo "selected";}?>>-- ส่งยกเลิกแล้ว --</option>

   <!--                        <option value="">-- เลือกสถานะ --</option>
                          <option value="ส่งจองแล้ว">-- ส่งจองแล้ว--</option>
                          <option value="ส่งจองเพิ่มคน">-- ส่งจองเพิ่มคน--</option>
                          <option value="Confirm">-- Confirm--</option>
                          <option value="W/L">-- W/L--</option>
                          <option value="ยังไม่ได้ส่งยกเลิก">-- ยังไม่ได้ส่งยกเลิก--</option>
                          <option value="ส่งยกเลิกแล้ว">-- ส่งยกเลิกแล้ว--</option> -->

                        </select>
                        </div>
                      </div>

                    <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label text-dark" for="inputDefault">เอกสารที่ได้จากลูกค้า <span class="required">*</span></label>
                        <div class="col-md-6">
                            <input class="form-control" type="text" id="iv_status_work2" name="iv_status_work2" value="<?=$r[iv_status_work2];?>">
                        </div>
                      </div>



                    <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label text-dark" for="inputDefault">เอกสารที่ได้ส่งให้ LAND <span class="required">*</span></label>
                        <div class="col-md-6">
                            <input class="form-control" type="text" id="iv_status_work3" name="iv_status_work3" value="<?=$r[iv_status_work3];?>">
                        </div>
                      </div>



                    <div class="row" style="margin-bottom:15px;">
                        <label class="col-md-3 control-label text-dark" for="inputDefault">ใบนัดหมาย <span class="required">*</span></label>
                        <div class="col-md-6">
                           <select data-plugin-selectTwo name='iv_status_work4' id='iv_status_work4' data-rel="chosen" class="form-control populate placeholder">
                          <option value="" <?if($r['iv_status_work4'] == ''){echo "selected";}?>>-- เลือกสถานะ --</option>
                           <option value="ส่งให้ลูกค้าแล้ว" <?if($r['iv_status_work4'] == 'ส่งให้ลูกค้าแล้ว'){echo "selected";}?>>-- ส่งให้ลูกค้าแล้ว --</option>
                           <option value="ต้องตาม LAND" <?if($r['iv_status_work4'] == 'ต้องตาม LAND'){echo "selected";}?>>-- ต้องตาม LAND --</option>
<!-- 

                          <option value="">-- เลือกสถานะ --</option>
                          <option value="ส่งให้ลูกค้าแล้ว">-- ส่งให้ลูกค้าแล้ว--</option>
                          <option value="ต้องตาม LAND">-- ต้องตาม LAND--</option> -->
                        </select>
                        </div>
                      </div>



                      </div>


                </div>
                <footer class="panel-footer" style="background:#fff;">
                    <div class="row">
   <div class="col-md-12 text-center" style="margin-top:20px;">
                <div class="form-actions">
                  <button type="submit" id="PackageBT" class="btn btn-primary btn-xl btn-block"><i class="fa fa-save"></i> บันทึก</button>
                </div>
                </div>
                    </div>
                  </footer>

                    </form>
  </section>

    </div>
  </div>
</div>




