

<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">نظام المتدربين</a></li>
            <li><a href="studentsPay.php?do=show">عرض دفع المتدربين </a></li>
            <li class="active">اضافة  </li>
        </ol>


        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">اضافة  </h3>
            </div>
            <div class="panel-body">

                {literal}
               <form class="form-horizontal"  action="studentsPay.php"  id="studentformajax" method="post"  enctype="multipart/form-data" data-dosave="?do=savedata">

                    {/literal}
                    
                     <div class="form-group" >
                        <label class="col-lg-2 control-label">اختر  طريقة الدفع </label>
                        <div class="col-lg-4">
                             {if $studentsetting->paymentsystems1}
                            <input type="radio" class="paykind" name="paykind" value="1" {if $studentsetting->paymentsystems1} checked {/if}>
                            <label for="client"> دفع بالتخصص </label>
                            {/if}
                             {if $studentsetting->paymentsystems2}
                            <input type="radio" class="paykind"  name="paykind" value="2" {if !$studentsetting->paymentsystems1 && $studentsetting->paymentsystems2} checked {/if}>
                            <label for="supplier">دفع بالنظام </label>
                             {/if}
                             {if $studentsetting->paymentsystems3}
                             <input type="radio" class="paykind"  name="paykind" value="3" {if !$studentsetting->paymentsystems1 && !$studentsetting->paymentsystems2 && $studentsetting->paymentsystems3} checked {/if}>
                            <label for="supplier">دفع خاص</label>
                             {/if}
                        </div>
                    </div>

                    

                    
                    <div class="form-group"  >
                         <label for="txtName" class="col-lg-2 control-label">  تخصصات المتدربين </label>
                        <div class="col-lg-4">
                          <input id="studentaddsubjectid" type="text" name="studentaddsubjectid" class="getselectjoin"  data-placeholder=" اختر  تخصص المتدرب  "   data-table="studentaddsubjects" 
                            data-join=" LEFT JOIN studentsubjects ON studentaddsubjects.studentsubjectid = studentsubjects.id 
                             LEFT JOIN studentsubjectgroups ON studentaddsubjects.studentsubjectgroupid = studentsubjectgroups.id "  
                            data-filter=" and studentaddsubjects.del < 2  and studentsubjects.del < 2 and studentsubjectgroups.del < 2 "
                            data-parent="" data-itr=""  data-search="subjectname,'/',subjectgroupname,'/',subjectgroupprice"/>  </div>
                    </div>
                    <div class="form-group paymentsystems" {if $studentsetting->paymentsystems1 || 
                        !$studentsetting->paymentsystems2} style="display: none"{/if}>
                         <label for="txtName" class="col-lg-2 control-label">  انظمة  الدفع </label>
                        <div class="col-lg-4">
                            <input id="studentspaymentsystemid" type="text" name="studentspaymentsystemid" class=" getselectjoin"  data-placeholder="اختر  النظام " data-table="studentspaymentsystems" data-join=""   data-filter=" and studentspaymentsystems.del < 2 " data-parent="studentaddsubjectid" data-itr=""  data-search="paymentname,'/',paymentprice"/>
                        </div>
                    </div>

                    <div class="form-group" >
                         <label for="txtName" class="col-lg-2 control-label"> المتدربين</label>
                        <div class="col-lg-4">
                            <input id="" type="text" name="studentaddsubjectdetailid"  class="studentpay getselectjoin"  data-placeholder="اختر  المتدرب  " data-table="studentaddsubjectdetails
                            " data-join=" LEFT JOIN students ON studentaddsubjectdetails.studentid = students.id "   data-filter=" and studentaddsubjectdetails.del < 2 and students.del < 2 " data-parent="studentaddsubjectid" 
                            data-itr=""  data-search="studentname,'/',studentphone" required/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">تاريخ  نهاية الدفع</label>
                        <div class="col-lg-4">
                        <input type="text" class="form-control awdatepicker payenddate" autocomplete="off"   data-date-format="yyyy-mm-dd" name="payenddate" placeholder="yyyy-mm-dd" value="{$date}"  required>
                       </div>
                    </div>
                    <div class="form-group countmonth"  {if $studentsetting->paymentsystems1 || $studentsetting->paymentsystems2 || !$studentsetting->paymentsystems3}  style="display: none" {/if}>
                        <label for="txtName" class="col-lg-2 control-label">عدد الشهور</label>
                        <div class="col-lg-4">
                            <select class="selectnew countmonths" data-placeholder="اختر   " name="countmonths"  id="month">
                            <option value=""></option>
                            {for $foo=1 to 12}
                            <option value="{$foo}">{$foo} شهر  </option>
                            {/for}
                        </select>
                        </div>
                    </div>
                     <div class="form-group newprice" {if $studentsetting->paymentsystems1 || $studentsetting->paymentsystems2 || !$studentsetting->paymentsystems3}  style="display: none" {/if}>
                        <label for="txtName" class="col-lg-2 control-label">سعر  خاص    </label>
                        <div class="col-lg-4">
                        <input type="text" class="form-control floats" id="countmonths"  placeholder="سعر  خاص     "   name="newprice" >
                       </div>
                    </div>


                   
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                             <button type="button" class="btn btn-primary pull-left studentformajax" >حفظ الامر</button>
                          
                        </div>
                    </div>




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




    </div>
</div>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-body modalbody" style="    text-align: center;">
                <a href="javascript:;" data-id="" type="button" class="btn btn-default btn-lg studentspaysend2"  id="studentspaysend" >   نسخ  الكود  </a>
      </div>
    </div>
  </div>
</div>


