<style type="text/css">
.modal-header .close {
    margin-top: -24px;
    float: left;

}
table, th, td {
  border: 1px solid black;
  text-align: center;
}

</style>

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

        <ol class="breadcrumb">
            <li><a href="#">نظام  الصيانه</a></li>
            <li><a href="maintenancesends.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="maintenancesends.php"  id="saveformajax" method="post"  enctype="multipart/form-data" data-dosave="?do=savedata" data-direction="maintenancesends.php?do=show">
                    {/literal}


                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">تاريخ البوليصة  </label>
                        <div class="col-lg-4">
                             <input    required="required"    type="text" name="policydate" 
                            class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd"  placeholder="تاريخ البوليصة  "  data-table="" data-filter="" data-tableid="" data-parentid="" data-parentcol="" value="" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">رقم البوليصة  </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="policynumber" 
                            class="form-control checkcolumn"  placeholder="رقم البوليصة   "  
                            data-table="maintenancepolicys" data-filter="policynumber = ? and conditions = 0 " 
                            data-tableid="" data-parentid="" data-parentcol="" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">الموردين  </label>
                        <div class="col-lg-4">
                             <input id="supplierid" type="text" name="supplier"  class="getselectjoin supplierid getmaintenances"  data-placeholder=" الموردين    "   data-table="supplier" 
                              data-tableid="supplierid"  data-join=""   data-filter=" and supplier.conditions = 0 "  data-parent="" data-itr=""  
                              data-search="suppliername,'/',supplierphone"/>
                             <input  type="hidden" name="supplierid" class="selectedit" data-tableidname="supplierid"  data-itr="" 
                             data-join="" data-table="supplier" data-tableid="supplierid" data-search="suppliername,'/',supplierphone" value="" />
                        </div>
                        <button type="button" class="btn btn-primary adddatamodal" data-table="supplier" data-tableid="supplierid" data-toggle="modal" data-target="#Modalsupplierid" data-whatever="@supplier" data-formt="formsupplier" data-selectitr="">اضافة   مورد</button>
                        <button type="button" class="btn btn-primary editdatamodal"  data-model="#Modalsupplierid" data-table="supplier" data-name="supplierid" data-tableid="supplierid" data-join="" data-formt="formsupplier" data-selectitr="">تعديل   مورد</button>
                    </div>


                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">شركات الشحن  </label>
                        <div class="col-lg-4">
                             <input id="maintenancecompanieid" type="text" name="maintenancecompanies"  class="getselectjoin maintenancecompanieid"  data-placeholder=" شركات الشحن "   data-table="maintenancecompanies" 
                              data-tableid="id"  data-join=""   data-filter=" and maintenancecompanies.conditions = 0 "  data-parent="" data-itr=""  
                              data-search="companyname,'/',companyphone"/>
                             <input  type="hidden" name="maintenancecompanieid" class="selectedit" data-tableidname="maintenancecompanieid"  data-itr="" 
                             data-join="" data-table="maintenancecompanies" data-tableid="id" data-search="companyname,'/',companyphone" value="" />
                        </div>
                        <button type="button" class="btn btn-primary adddatamodal" data-table="maintenancecompanies" data-tableid="maintenancecompanieid" data-toggle="modal" data-target="#Modalmaintenancecompanieid" data-whatever="@maintenancecompanies" data-formt="formmaintenancecompanies" data-selectitr="">اضافة  شركه </button>
                        <button type="button" class="btn btn-primary editdatamodal"  data-model="#Modalmaintenancecompanieid" data-table="maintenancecompanies" data-name="maintenancecompanieid" data-tableid="id" data-join="" data-formt="formmaintenancecompanies" data-selectitr="">تعديل   شركه</button>
                    </div>






                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">بيان البوليصة   </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="policystatement" 
                            class="form-control "  placeholder="بيان البوليصة    "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" />
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">قيمة الشحن   </label>
                        <div class="col-lg-4">
                            <input id="shippingvalue"   required="required"    type="text" name="shippingvalue" 
                            class="form-control "  placeholder="قيمة الشحن    "  
                            data-table="" data-filter=""  data-forms="saveformajax"
                            data-tableid="" data-parentid="" data-parentcol="" />
                        </div>
                    </div>
                    <input type="hidden" id="searchgetmaintenances" value="  ">
                    <div id="getmaintenances">
                        
                    </div>
                    
                    <div class="clearfix"></div>
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" class="btn btn-primary pull-left saveformajax" data-form="saveformajax">حفظ الامر</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="Modalsupplierid" tabindex="-1" role="dialog" aria-labelledby="ModalsupplieridLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalsupplieridLabel"> اضافة </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form class="form-horizontal"  action="maintenancesuppliers.php"  id="formsupplier" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=savedata"  data-direction="">
           <div class="form-group">
            <label for="recipient-name" class="col-form-label">كود المورد </label>
            <input type="text" name="suppliercode" class="form-control" value=""/>
          </div>

          <div class="form-group">
            <label for="recipient-name" class="col-form-label">   اسم    المورد   </label>
            <input   required="required"    type="text" name="suppliername" 
                class="form-control checkcolumn"  placeholder="اسم   المورد  "  
                data-table="supplier" data-filter=" suppliername = ? and conditions = 0 " 
                data-tableid="" data-parentid="" data-parentcol="" />
          </div>
         <div class="form-group">
            <label for="recipient-name" class="col-form-label">المحمول</label>
                <input    required="required"    type="text" name="supplierphone" 
                 class="form-control checkcolumn nummbers" placeholder=" المحمول   "  
                 data-table="supplier" data-filter=" supplierphone = ? and conditions = 0 "  data-tableid=""
                data-parentid="" data-parentcol=""/>                
        </div>
        <div class="form-group">
            <label for="recipient-name" class="col-form-label">الارضى</label>
                <input    required="required"    type="text" name="suppliermobile" 
                 class="form-control checkcolumn nummbers" placeholder=" الارضى " 
                 data-table="supplier" data-filter=" suppliermobile = ? and conditions = 0 "  data-tableid=""
                data-parentid="" data-parentcol=""/>    
        </div>
        <div class="form-group">
            <label for="recipient-name" class="col-form-label">عنوان   المورد    </label>
                <input    required="required"    type="text" name="supplieraddress" 
                 class="form-control" placeholder=" عنوان  المورد    "
                 data-table="" data-tablecol="" data-tableid=""
                data-parentid="" data-parentcol=""/>    
                
        </div>
        
         
        <div class="form-group">
            <label for="recipient-name" class="col-form-label">المدينة</label>
             <input id="goverareaid" type="text" name="goverarea"  class="getselectjoin goverareaid"  data-placeholder=" المحافظه    /  المدينة    "   data-table="goverarea" 
              data-tableid="clientareaid" 
              data-join=" LEFT JOIN government on government.governmetid = goverarea.governmentid
              LEFT JOIN clientarea on clientarea.id = goverarea.clientareaid "   data-filter="" 
              data-parent="" data-itr=""  
              data-search="governmentname,'/',name"/>
             <input  type="hidden" name="goverareaid" class="selectedit" data-tableidname="goverareaid"  data-itr="" 
             data-join=" LEFT JOIN government on government.governmetid = goverarea.governmentid
              LEFT JOIN clientarea on clientarea.id = goverarea.clientareaid "
             data-table="goverarea" data-tableid="goverareaid"
              data-search="governmentname,'/',name" value="" />
        </div>
        <div class="form-group">
             <label for="recipient-name" class="col-form-label">اسم المستفيد فى الشيك</label>
            <input type="text" name="namepayeecheck" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
        <div class="form-group">
             <label for="recipient-name" class="col-form-label">مسئول الضمانات</label>
                <input type="text" name="warrantyOfficer" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
        <div class="form-group">
             <label for="recipient-name" class="col-form-label">موبايل الضمانات</label>
                <input type="text" name="warrantymobile" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
        <div class="form-group">
             <label for="recipient-name" class="col-form-label">اسم البائع</label>
                <input type="text" name="sellername" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
        <div class="form-group">
            <label for="recipient-name" class="col-form-label">موبايل البائع</label>
                <input type="text" name="sellermobile" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
          
          <input id="popsupplier" type="hidden" name="supplierid" value=""  />
          <input id="itrsupplier" type="hidden" name="selectitr" value=""  />

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">الغاء</button>
        <button type="button" class="btn btn-primary saveformajax" data-form="formsupplier"> حفظ</button>
      </div>
    </div>
  </div>
</div>

<div class="modal fade" id="Modalmaintenancecompanieid" tabindex="-1" role="dialog" aria-labelledby="ModalmaintenancecompanieidLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalmaintenancecompanieidLabel"> اضافة </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form class="form-horizontal"  action="maintenancesends.php"  id="formmaintenancecompanies" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=savecompany"  data-direction="">
          

          <div class="form-group">
            <label for="recipient-name" class="col-form-label">   الشركه       </label>
            <input   required="required"    type="text" name="companyname" 
                class="form-control checkcolumn"  placeholder="الشركه     "  
                data-table="maintenancecompanies" data-filter=" companyname = ? and conditions = 0 " 
                data-tableid="" data-parentid="" data-parentcol="" />
          </div>
         <div class="form-group">
            <label for="recipient-name" class="col-form-label">التليفون</label>
                <input    required="required"    type="text" name="companyphone" 
                 class="form-control checkcolumn nummbers" placeholder=" التليفون   "  
                 data-table="maintenancecompanies" data-filter=" companyphone = ? and conditions = 0 "  data-tableid=""
                data-parentid="" data-parentcol=""/>                
        </div>
        <div class="form-group">
            <label for="recipient-name" class="col-form-label">العنوان        </label>
                <input    type="text" name="companyaddress" 
                 class="form-control" placeholder=" العنوان       "
                 data-table="" data-tablecol="" data-tableid=""
                data-parentid="" data-parentcol=""/>    
                
        </div>
        
   
          <input id="popmaintenancecompanies" type="hidden" name="maintenancecompanieid" value=""  />
          <input id="itrmaintenancecompanies" type="hidden" name="selectitr" value=""  />

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">الغاء</button>
        <button type="button" class="btn btn-primary saveformajax" data-form="formmaintenancecompanies"> حفظ</button>
      </div>
    </div>
  </div>
</div>