<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="maintenancereceipts.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="maintenancereceipts.php"  id="saveformajax" method="post"  enctype="multipart/form-data" data-dosave="?do=savedata" data-direction="maintenancereceipts.php?do=show">
                    {/literal}
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> البوليصة المرسلة </label>
                        <div class="col-lg-10">
                             <input id="maintenancepolicyid" type="text" name="maintenancepolicys"  class="getselectjoin maintenancepolicyid maintenancepolicyget gettabledata"  data-placeholder=" البوليصة المرسلة    "   data-table="maintenancepolicys" data-tableid="id"  data-join=" LEFT JOIN supplier ON maintenancepolicys.supplierid = supplier.supplierid LEFT JOIN maintenancecompanies ON maintenancepolicys.maintenancecompanieid = maintenancecompanies.id  "   data-filter=" and maintenancepolicys.conditions = 0 and maintenancepolicys.sendorreceipt = 1 "  data-parent="" data-itr="" data-search="policynumber,'/',suppliername,'/',companyname,'/',policystatement"/>
                            <input  type="hidden" name="maintenancepolicyid" class="selectedit" data-tableidname="maintenancepolicyid"  data-itr="" data-join=" LEFT JOIN supplier ON maintenancepolicys.supplierid = supplier.supplierid LEFT JOIN maintenancecompanies ON maintenancepolicys.maintenancecompanieid = maintenancecompanies.id" data-table="maintenancepolicys" data-tableid="id" data-search="policynumber,'/',suppliername,'/',companyname,'/',policystatement" 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="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" disabled />
                             <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>
                    <div id="maintenancepolicyget">
                        
                    </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="Modalmaintenanceprocedureid" tabindex="-1" role="dialog" aria-labelledby="ModalmaintenanceprocedureidLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalmaintenanceprocedureidLabel"> اضافة </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="maintenancereceipts.php"  id="formmaintenanceprocedures" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=saveprocedure"  data-direction="">
         <div class="form-group">
            <label for="recipient-name" class="col-form-label">الإجراء  </label>
            <input    required="required"    type="text" name="procedurename" 
            class="form-control checkcolumn"  placeholder=" الإجراء "  
            data-table="maintenanceprocedures" data-filter=" procedurename = ? " 
            data-tableid="" data-parentid="" data-parentcol="" />
          </div>

       
          <input id="popmaintenanceprocedures" type="hidden" name="maintenanceprocedureid" value=""  />
          <input id="itrmaintenanceprocedures" 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="formmaintenanceprocedures"> حفظ</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>