
{literal}
<script>
$(function() {
    $("table input,textarea").each(function(index, element) {
        $(this).attr('disabled',true);
    });
});
</script>
{/literal}



<div class="row noprint">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading headercolorx">
           
                <h6 class="text-center"><a href="#" id="company"><strong>ضمان شركه</strong></a>
                </h6>
               
                    
            </div>
            <div class="panel-body" {if empty($companydata)}style="display:none"{else} style="display:block"{/if}  id="companydiv">
                <div class="table-responsive">
                    <!-- hidden values -->
                    <input type="hidden" name="company_insure_no" id="company_insure_no" value="{$companyitr}">
                    <input type="hidden" name="company_tabindex_no" id="company_tabindex_no" value="6">
                    <table class="table table-condensed">
                        <thead>
                            <tr>
                                <td><strong>اسم المنتج</strong></td>
                                <td class="text-center"><strong>سيريل</strong></td>
                                <td class="text-center"><strong>فاتوره الشراء</strong></td>
                                <td class="text-center"><strong>مده ضمان</strong></td>
                                <td class="text-center"><strong>الحاله</strong></td>
                                <td class="text-center"><strong>العيب</strong></td>
                                <td class="text-center"><strong>ملاحظات</strong></td>
                                <td class="text-center"><strong>ملاحقات</strong></td>
                                <td class="text-center"><strong> تكلفه مبدئيه</strong></td>
                                <td class="text-center"><strong>تكلفه شحن</strong></td>
                              <td class="text-center"><strong> المرحله الحاليه</strong></td>
                              <td class="text-center"><strong>مورد</strong></td>
                                
                            </tr>
                        </thead>
                        <tbody id="company_insure_container">
                         {assign var=z value=1}
                        {foreach $companydata as $data}
                            <tr>
                            <input type="hidden" name="searchvalue" id="searchvalue" value="{$Programsettingdata->searchvalue}"/>
                            <input type="hidden" name="companyitr" id="companyitr" value="{$companyitr}"/>
                                <td>
                                <div id="returnproductcompanydiv{$z}">
                                    <input type="hidden" class="select2ajax select2-offscreen" name="productcompany{$z}" id="productcompany{$z}" tabindex="6" data-placeholder="اختر منتج" disabled="disabled" >
                                	
                                    <input type="hidden" id="reoldproductcompany{$z}" name="reoldproductcompany{$z}" value="{$data->productId}"  />
                                       <input type="hidden" id="reoldnamecompany{$z}" name="reoldnamecompany{$z}"  value="{$data->productName}"  />
                                        
                                        
                                        <input type="hidden" id="productname{$z}" name="productname{$z}"  value="{$data->ourserial}"  />
                                           <input type="hidden" id="companydetailid{$z}" name="companydetailid{$z}"  value="{$data->id}"  />       
                                                  </div>
                                </td>
                                <td class="text-center">
                                    <input type="text" class="form-control company_serial" name="company_serial{$z}" id="company_serial{$z}" tabindex="6" placeholder="السيريل" data-no='1' value="{$data->productserial}" >
                                </td>
                                <td class="text-center">
                                	<input type="hidden" class="form-control  pull-right" tabindex="5" name="company_buybill_type{$z}" id="company_buybill_type{$z}" placeholder="نوع الفاتوره" />
                                    <input type="text" class="form-control  pull-right" tabindex="6" name="company_buybill_serial{$z}" id="company_buybill_serial{$z}" placeholder="رقم الفاتوره" value="{$data->buybillid}" />
                                    <div class="clearfix"></div>
                                    <input type="text" class=" pull-right awdatepicker" autocomplete="off"  data-date-format="yyyy-mm-dd" value="2014-09-06" placeholder="تاريخ الفاتورة"  tabindex="6" name="company_buybill_date{$z}" id="company_buybill_date{$z}"  value="{$data->buybilldate}"/>
                                </td>
                                <td class="text-center">
                                    <input type="text" class="form-control"  placeholder="مده الضمان" tabindex="6" name="company_insurce_duration{$z}" id="company_insurce_duration{$z}" value="{$data->insduration}" >
                                </td>
                                <td class="text-center" nowrap>
                                    <div class="radio">
                                        <label>
                                         <input type="hidden" name="company_optionsRadiostype{$z}" id="company_optionsRadiostype{$z}"  tabindex="5" >
                                            <input type="radio" name="company_optionsRadios{$z}" id="company_optionsRadios{$z}" value="0" tabindex="6" {if {$data->insstatus} eq 0 } checked {/if}>
                                            خاضع
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="company_optionsRadios{$z}" id="company_optionsRadiosx{$z}" value="1" tabindex="6" {if {$data->insstatus} eq 1 } checked {/if}>
                                            غير خاضع
                                        </label>
                                    </div>
                                </td>
                                <td class="text-center">
                                    <textarea class="form-control" name="company_error{$z}" id="company_error{$z}" tabindex="6">{$data->problem}</textarea>
                                </td>
                                <td class="text-center">
                                    <textarea class="form-control" name="company_note{$z}" id="company_note{$z}" tabindex="6">{$data->comment}</textarea>
                                </td>
                                <td class="text-center">
                                    <textarea class="form-control" name="company_attch{$z}" id="company_attch{$z}" tabindex="6">{$data->attach}</textarea>
                                </td>
                                <td class="text-center">
                                    <input type="text" class="form-control company_intinal_value" value="{$data->initialcost}" name="company_intinal_cost{$z}" id="company_intinal_cost{$z}" tabindex="5" placeholder="تكلفه مبدئيه" >
                                    
                                    <input type="hidden" class="form-control company_intinal_valuex" value="{$data->initialcost}" name="company_intinal_costx{$z}" id="company_intinal_costx{$z}" tabindex="5" placeholder="تكلفه مبدئيه" >
                                </td>
                                <td class="text-center">
                                    <input type="text" class="form-control company_ship_value" value="{$data->shipcost}" name="company_ship_cost{$z}" id="company_ship_cost{$z}" tabindex="6" placeholder="تكلفه الشحن"  >
                                    
                                     <input type="hidden" class="form-control company_ship_valuex" value="{$data->shipcost}" name="company_ship_costx{$z}" id="company_ship_costx{$z}" tabindex="6" placeholder="تكلفه الشحن"  >
                                </td>
                                  <td class="text-center">
                                    <input type="text" class="form-control" value="{$data->title}" name="currentstage{$y}" id="currentstage{$y}" tabindex="5" >
                                   
                                </td>
                                <td class="text-center">
                                <div id="supplierIdDivxx{$z}">
                                <input type="hidden" class="select2ajax select2-offscreen company_supplier" name="company_supplier{$z}" id="company_supplier{$z}" tabindex="6" data-placeholder="اختر مورد" data-no='1' disabled="disabled">
                              	        <input type="hidden" id="reoldsuppliercompany{$z}" name="reoldsuppliercompany{$z}" value="{$data->supplierid}"  />
                                       <input type="hidden" id="reoldsuppliercompanyname{$z}" name="reoldsuppliercompanyname{$z}"  value="{$data->suppliername}"  />

                               </div>
                                <input type="hidden" id="companystagefrom{$z}" name="companystagefrom{$z}"  value="{$data->stageFrom}"  />
                               <input type="hidden" id="companystageto{$z}" name="companystageto{$z}"  value="{$data->stageTo}"  />
                               <input type="hidden" id="companycurrentstage{$z}" name="companycurrentstage{$z}"  value="{$data->currentstage}"  />
                                <input type="hidden" id="companystatus{$z}" name="companystatus{$z}"  value="{$data->status}"  />
                                 <input type="hidden" id="companycost{$z}" name="companycost{$z}"  value="{$data->cost}"  />
                                </td>
                              
                            </tr>
                            {capture assign=z}{$z+1}{/capture} 
							{/foreach}
                        </tbody>
                    </table>



                    <table class="table table-condensed">
                        <tbody>
                            <tr>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow text-center totaltxt"><strong>اجمالى التكلفه المبدئيه</strong></td>
                                <td class="highrow text-right totalvalue" id="company_total_intial" >0</td>
                                <input type="hidden" name="company_total_intial" id="company_total_intialx" value="0"/>
                                <td class="highrow text-center totaltxt"><strong>المجموع</strong></td>
                                <td class="highrow text-right totalvalue" id="company_total_ship"> 0</td>
                            <input type="hidden" name="company_total_ship" id="company_total_shipx"/>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
