<?
$today = date('Y-m-d');
?>
          <!-- start: page -->
            <div class="row">
              <div class="col-lg-12">
                <section class="panel">
                  <header class="panel-heading">
                    <div class="panel-actions">
                      <a href="#" class="fa fa-caret-down"></a>
                      <a href="#" class="fa fa-times"></a>
                    </div>
            
                    <h2 class="panel-title">INVOICE INSERT</h2>
                  </header>
                  <div class="panel-body">
              <form class="form-horizontal form-bordered" action="" name="form_iv" id="form_iv" method="post" enctype="multipart/form-data">
           <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="text" class="form-control" id="inputDefault" name="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">
                        </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">
                        </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">
                        </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>

           <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-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 class="form-control" type="text" class="form-control" id="inputDefault" name="iv_admin" required value="<?=$_SESSION['admin_nickname']?>" />
                        </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="<?=$today;?>">
                        </div>
                      </div>

           <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-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 class="form-control" type="text" class="form-control" id="inputDefault" name="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 class="form-control" type="text" class="form-control" id="inputDefault" name="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="startDate" name="pro_datego" value="">
                        </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="endDate" name="pro_dateback" value="">
                        </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 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>
                        </div>
                      </div>

  <div class="box-header" data-original-title style="padding:20px;">
     <h4 style="color:black;"><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 type="text" class="form-control" id="adult_price" name="adult_price" value=""></td>
<td><input type="text" class="form-control" id="adult_num" name="adult_num" value=""></td>
</tr>
<tr>
<td>เด็กมีเตียง</td>
<td><input type="text" class="form-control" id="c_price" name="c_price" value=""></td>
<td><input type="text" class="form-control" id="c_num" name="c_num" value=""></td>
</tr>
<tr>
<td>เด็กไม่มีเตียง</td>
<td><input type="text" class="form-control" id="nb_price" name="nb_price" value=""></td>
<td><input type="text" class="form-control" id="nb_num" name="nb_num" value=""></td>
</tr>
<tr>
<td>พักเดี่ยว</td>
<td><input type="text" class="form-control" id="s_price" name="s_price" value=""></td>
<td><input type="text" class="form-control" id="s_nu" class="form-control" name="s_num" value=""></td>
</tr>
</tbody>
</table>
</div>


<div class="box-header" data-original-title style="padding:20px;">
  <h4 style="color:black;"><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 type="text" class="form-control" id="custom1_name" name="custom1_name" value=""></td>
<td><input type="text" class="form-control" id="custom1_price" name="custom1_price" value=""></td>
<td><input type="text" class="form-control" id="custom1_num" name="custom1_num" value=""></td>
<td>
 <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>
</td>
</tr>
<tr>
<td><input type="text" class="form-control" id="custom2_name" name="custom2_name" value=""></td>
<td><input type="text" class="form-control" id="custom2_price" name="custom2_price" value=""></td>
<td><input type="text" class="form-control" id="custom2_num" name="custom2_num" value=""></td>
<td>
 <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>
</td>
</tr>


<tr>
<td><input type="text" class="form-control" id="custom3_name" name="custom3_name" value=""></td>
<td><input type="text" class="form-control" id="custom3_price" name="custom3_price" value=""></td>
<td><input type="text" class="form-control" id="custom3_num" name="custom3_num" value=""></td>
<td>
 <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>
</td>
</tr>


<tr>
<td><input type="text" class="form-control" id="custom4_name" name="custom4_name" value=""></td>
<td><input type="text" class="form-control" id="custom4_price" name="custom4_price" value=""></td>
<td><input type="text" class="form-control" id="custom4_num" name="custom4_num" value=""></td>
<td>
 <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>
</td>
</tr>


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


  <div class="box-header" data-original-title style="padding:20px;">
  <h4 style="color:black;"><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 type="text" class="form-control" id="discount_price" name="discount_price" value=""></td>
<td><input type="text" class="form-control" id="discount_sum" name="discount_sum" value=""></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 type="text" class="form-control" id="cus_de_name" name="cus_de_name" value=""></td>
<td><input type="text" class="form-control" id="cus_de_price" name="cus_de_price" value=""></td>
<td><input type="text" class="form-control" id="cus_de_num" name="cus_de_num" value=""></td>
</tr>

<tr>
<td><input type="text" class="form-control" id="cus_de_name2" name="cus_de_name2" value=""></td>
<td><input type="text" class="form-control" id="cus_de_price2" name="cus_de_price2" value=""></td>
<td><input type="text" class="form-control" id="cus_de_num2" name="cus_de_num2" value=""></td>
</tr>

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


  <div class="box-header" data-original-title style="padding:20px;">
  <h4 style="color:black;"><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=""></td>
<td><input class="form-control" type="text" id="mus_num" name="mus_num" value=""></td>
<td><input class="form-control" type="date" id="mus_date" name="mus_date" value=""></td>
<td><input class="form-control" type="time" id="mus_time" name="mus_time" value="15:00"></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="">
                        </div>
                         <div class="col-md-3">
                        <input class="form-control" type="time" id="date_line_time" name="date_line_time" value="15:00">
                      </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"><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>