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

        <ol class="breadcrumb">
            <li><a href="#">نظام  الصيانه</a></li>
            <li><a href="maintenancedeliverys.php?do=show">عرض   التسليم للعميل </a></li>
             {if $del == 0}
            <li class="active">تعديل  </li> 
            {else}
            <li class="active">تفاصيل  </li> 
            {/if}
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
            {if $del == 0}
            <h3 class="panel-title">تعديل  </h3>
            {else}
            <h3 class="panel-title">تفاصيل  </h3> 
            {/if}
            </div>
            <div class="panel-body">

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


                    

                    <div class="form-group">     
                        <label for="txtName" class="col-lg-2 control-label">رقم الايصال  </label>
                        <div class="col-lg-2">
                            <input    required="required"  readonly  type="text" name="receiptnumber" 
                            class="form-control checkcolumn"  placeholder="رقم الايصال "  
                            data-table="maintenances" data-filter="receiptnumber = ? and conditions = 0 " 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->receiptnumber}" />
                        </div>
                  
                        <label for="txtName" class="col-lg-2 control-label">     التاريخ والوقت    </label>
                        <div class="col-lg-2">
                            <input    required="required"  readonly  type="text" name="dateatime" 
                            class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd"  placeholder=" التاريخ والوقت  "  
                            data-table="maintenances" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->dateatime}" />
                        </div>
                        <label for="txtName" class="col-lg-2 control-label">فروع الاستلام  </label>
                        <div class="col-lg-2">
                             <input id="branchId" type="text" name="branch"  class="getselectjoin branchId"  data-placeholder=" فروع الاستلام    "   data-table="branch" 
                              data-tableid="branchId"  data-join="" disabled  data-filter="" data-parent="" data-itr=""  
                              data-search="branchName"/>
                             <input  type="hidden" name="branchId" class="selectedit" data-tableidname="branchId" data-itr="" 
                             data-join="" data-table="branch" data-tableid="branchId" data-search="branchName" value="{$maintenancedata->branchid}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">العملاء  </label>
                        <div class="col-lg-4">
                             <input id="clientid" type="text" disabled name="client"  class="getselectjoin clientid"  data-placeholder=" العملاء   "   data-table="client" 
                              data-tableid="clientid"  data-join=""   data-filter="" data-parent="" data-itr=""  
                              data-search="clientname,'/',clientphone"/>
                             <input  type="hidden" name="clientid" class="selectedit" data-tableidname="clientid"  data-itr="" 
                             data-join="" data-table="client" data-tableid="clientid" data-search="clientname,'/',clientphone"  value="{$maintenancedata->clientid}" />
                        </div>

                        <label for="txtName" class="col-lg-2 control-label">المنتجات   </label>
                        <div class="col-lg-4">
                             <input id="productId" type="text" name="product" disabled  class="getselectmultiple productId"  data-placeholder=" المنتجات    "  disabled  data-table="product" 
                              data-tableid="productId"  data-join=""   data-filter="" data-parent="" data-itr=""  
                              data-search="productName"  />
                             <input  type="hidden" name="productid" class="selecteditm" data-tableidname="productId" data-itr=""
                             data-join="" data-table="product" data-tableid="productId" data-search="productName"  value="{$maintenancedata->productid}" />
                        </div>

                        
                    </div>

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">الكمية </label>
                        <div class="col-lg-4">
                            <input type="text" name="quantity" readonly class="form-control" value="{$maintenancedata->productid}" placeholder="الكمية" />
                        </div>
                        <label for="txtName" class="col-lg-2 control-label"> العيب </label>
                        <div class="col-lg-4">
                            <input     readonly type="text" name="defect" 
                            class="form-control checkcolumn"  placeholder=" العيب    "  
                            data-table="supplier" data-filter=" defect = ? and conditions = 0 " 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->defect}"/>
                            
                        </div>
                         
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">الملحقات</label>
                        <div class="col-lg-4">
                            <input   readonly   type="text" name="accessories" 
                             class="form-control checkcolumn " placeholder=" الملحقات  " 
                             data-table="supplier" data-filter=" accessories = ? and conditions = 0 "  data-tableid=""
                            data-parentid="" data-parentcol="" value="{$maintenancedata->accessories}"/>    
                        </div>
                         
                        <label for="txtName" class="col-lg-2 control-label">ملاحظات </label>
                        <div class="col-lg-4">
                            <input      readonly type="text" name="notes" 
                             class="form-control" placeholder=" ملاحظات  "
                             data-table="" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol="" value="{$maintenancedata->notes}"/>    
                        </div>
                    </div>
                      <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">تكلفة تقديرية </label>
                        <div class="col-lg-4">
                            <input    readonly  type="text" name="estimatedcost" 
                             class="form-control" placeholder=" تكلفة تقديرية  "
                             data-table="" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol="" value="{$maintenancedata->estimatedcost}"/>    
                            
                        </div>
                        <label for="txtName" class="col-lg-2 control-label">تاريخ الشراء </label>
                        <div class="col-lg-4">
                            <input    readonly    type="text" name="datepurchase" 
                             class="form-control awdatepicker" placeholder=" تاريخ الشراء   "
                             data-table="" data-tablecol="" data-tableid="" data-date-format="yyyy-mm-dd" 
                            data-parentid="" data-parentcol="" value="{$maintenancedata->datepurchase}" />    
                            
                        </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"  data-placeholder=" الموردين    " disabled   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="{$maintenancedata->supplierid}" />
                        </div>
                        <label for="txtName" class="col-lg-2 control-label">رقم الفاتورة </label>
                        <div class="col-lg-4">
                            <input   readonly   type="text" name="invoicenumber" 
                             class="form-control" placeholder=" رقم الفاتورة  "
                             data-table="" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol="" value="{$maintenancedata->invoicenumber}"/>    
                            
                        </div>
                    </div>
                    <div class="form-group">
                    
                        <label for="txtName" class="col-lg-2 control-label">تاريخ الفاتورة </label>
                        <div class="col-lg-4">
                            <input    readonly   type="text" name="invoicedate" 
                             class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd"  placeholder=" تاريخ الفاتورة  "
                             data-table="" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol="" value="{$maintenancedata->invoicedate}"/>    
                            
                        </div>
                        <label for="txtName" class="col-lg-2 control-label">المراكز  </label>
                        <div class="col-lg-4">
                             <input id="maintenancecenterid" disabled type="text" name="maintenancecenters"  class="getselectjoin maintenancecenterid"  data-placeholder=" المراكز    "   data-table="maintenancecenters" 
                              data-tableid="id"  data-join=""   data-filter="" data-parent="" data-itr=""  
                              data-search="centername"/>
                             <input  type="hidden" name="maintenancecenterid" class="selectedit" data-tableidname="maintenancecenterid" data-itr="" data-join="" data-table="maintenancecenters" data-tableid="id" data-search="centername" value="{$maintenancedata->maintenancecenterid}" />
                        </div>
                    </div>
                    <div class="form-group">    
                        <label for="txtName" class="col-lg-2 control-label">تاريخ البوليصة   ارسال</label>
                        <div class="col-lg-4">
                             <input  readonly   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="{$maintenancepolicydata->policydate}" />
                        </div>
                        <label for="txtName" class="col-lg-2 control-label">رقم البوليصة   ارسال</label>
                        <div class="col-lg-4">
                            <input    readonly   type="text" name="policynumber" 
                            class="form-control checkcolumn"  placeholder="رقم البوليصة   "  
                            data-table="maintenancepolicys" data-filter="policynumber = ? and conditions = 0 " 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancepolicydata->policynumber}" />
                        </div>
                    </div>
                    <div class="form-group">    
                        <label for="txtName" class="col-lg-2 control-label">شركات الشحن   ارسال</label>
                        <div class="col-lg-4">
                             <input id="maintenancecompanieid" disabled 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="{$maintenancepolicydata->maintenancecompanieid}" />
                        </div>
                        <label for="txtName" class="col-lg-2 control-label">بيان البوليصة   ارسال</label>
                        <div class="col-lg-4">
                            <input    readonly    type="text" name="policystatement" 
                            class="form-control "  placeholder="بيان البوليصة    "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancepolicydata->policystatement}" />
                        </div>
                    </div>
                   

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">تاريخ البوليصة   استلام</label>
                        <div class="col-lg-4">
                             <input    readonly   type="text" name="bpolicydate" 
                            class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd"  placeholder="تاريخ البوليصة  "  data-table="" data-filter="" data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancepolicydata->bpolicydate}" />
                        </div>
                        <label for="txtName" class="col-lg-2 control-label">رقم البوليصة  استلام </label>
                        <div class="col-lg-4">
                            <input    readonly   type="text" name="bpolicynumber" 
                            class="form-control checkcolumn"  placeholder="رقم البوليصة   "  
                            data-table="maintenancepolicys" data-filter="policynumber = ? and conditions = 0 " 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancepolicydata->bpolicynumber}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">شركات الشحن   استلام</label>
                        <div class="col-lg-4">
                             <input id="bmaintenancecompanieid" disabled 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="bmaintenancecompanieid" class="selectedit" data-tableidname="bmaintenancecompanieid"  data-itr="" 
                             data-join="" data-table="maintenancecompanies" data-tableid="id" data-search="companyname,'/',companyphone" value="{$maintenancepolicydata->bmaintenancecompanieid}" />
                        </div>                  
                        <label for="txtName" class="col-lg-2 control-label">بيان البوليصة   استلام</label>
                        <div class="col-lg-4">
                            <input    readonly   type="text" name="bpolicystatement" 
                            class="form-control "  placeholder="بيان البوليصة    "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancepolicydata->bpolicystatement}" />
                        </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="repayment" 
                             class="form-control" placeholder="  السداد  "
                             data-table="" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol="" value="{$maintenancedata->repayment}"/>    
                        </div>
                        <label for="txtName" class="col-lg-2 control-label"> رقم الحافطة </label>
                        <div class="col-lg-4">
                           <input    required="required"    type="text" name="clipnumber" 
                             class="form-control" placeholder="  رقم الحافطة    "
                             data-table="" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol="" value="{$maintenancedata->clipnumber}"/>      
                        </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="deliverydate" 
                             class="form-control awdatepicker" placeholder=" تاريخ التسليم :  "
                             data-table="" data-tablecol="" data-tableid="" data-date-format="yyyy-mm-dd" 
                            data-parentid="" data-parentcol="" value="{$maintenancedata->deliverydate}" />   
                        </div>
                        <label for="txtName" class="col-lg-2 control-label">تكلفة الشحن   الارسال      </label>
                        <div class="col-lg-4">
                           <input    required="required"  id="shipcharge"  type="text" name="shipcharge" 
                            class="form-control totals" placeholder=" تكلفة الشحن  الارسال    "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->shipcharge}"/>
                        </div>
                    </div>
                    <div class="form-group">    
                        <label for="txtName" class="col-lg-2 control-label">تكلفة الشحن  استلام    </label>
                        <div class="col-lg-4">
                            <input    required="required"  id="bshipcharge"  type="text" name="bshipcharge" 
                            class="form-control totals" placeholder=" تكلفة الشحن  استلام  "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->bshipcharge}"/>  
                        </div>
                        <label for="txtName" class="col-lg-2 control-label">تكلفة صيانة </label>
                        <div class="col-lg-4">
                           <input    required="required"  id="maintenancecost"  type="text" name="maintenancecost" 
                            class="form-control totals" placeholder=" تتكلفة صيانة "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->maintenancecost}"/>   
                            
                        </div>
                    </div>
                    <div class="form-group">    
                        <label for="txtName" class="col-lg-2 control-label">اجمالى التكلفة </label>
                        <div class="col-lg-4">
                            <input    required="required"  id="totalcost"  type="text" name="totalcost" 
                            class="form-control totals" placeholder="اجمالى التكلفة"  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->totalcost}" />  
                        </div>
                         <label for="txtName" class="col-lg-2 control-label">المدفوع مقدم </label>
                        <div class="col-lg-4">
                            <input    id="prepaid" readonly  type="text" name="prepaid" 
                             class="form-control" placeholder=" المدفوع مقدم  "
                             data-table="" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol="" value="{$maintenancedata->prepaid}"/>    
                            
                        </div>
                        
                    </div>
                    <div class="form-group">  
                        <label for="txtName" class="col-lg-2 control-label">المطلوب من العميل   </label>
                        <div class="col-lg-4">
                            <input    readonly  id="requiredcustomer"  type="text" name="requiredcustomer" 
                            class="form-control totals" placeholder="المطلوب من العميل "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->requiredcustomer}"/>  
                            
                        </div>  
                        <label for="txtName" class="col-lg-2 control-label">المدفوع لاحقا   </label>
                        <div class="col-lg-4">
                            <input  required="required"   id="paidlater"  type="text" name="paidlater" 
                            class="form-control totals" placeholder="المدفوع لاحقا   "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->paidlater}"/>  
                            
                        </div>
                    </div>
                    <div class="form-group">  
                        <label for="txtName" class="col-lg-2 control-label">اجمالى الدفع </label>
                        <div class="col-lg-4">
                            <input    readonly  id="paidall"  type="text" name="paidall" 
                            class="form-control totals" placeholder="اجمالى الدفع  "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->paidall}"/>  
                            
                        </div>  
                        <label for="txtName" class="col-lg-2 control-label">المتبقى   </label>
                        <div class="col-lg-4">
                            <input  readonly   id="residual"  type="text" name="residual" 
                            class="form-control" placeholder="المتبقى "  
                            data-table="" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$maintenancedata->residual}"/>  
                            
                        </div>
                    </div>

                   


                    
                    <input    type="hidden" type="text" name="maintenances" value="{$maintenancedata->id}"/>
                    
                    {if $del == 0}
                    <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>
                    {/if}
                </form>
            </div>
        </div>
    </div>
</div>




<script type="text/javascript">
    $(document).ready(function () {
        residual();
     });
</script>

