<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h6 class="text-center"><strong> شحن عودة</strong> </h6>
            </div>
            <div class="panel-body">
                <div class="table-responsive">


                    <!------------    div     ----------->

                    <form action="insuranceReturn.php?do=add" method="post" id="insuranceReturn">
                        <div class="col-lg-2">
                            <label class="sr-only"> شركة الشحن</label>
                        </div>
                        <div class="col-lg-4" >
                            <select class="select2 wdt300"  name="companyId" id="companyId" required="required">
                                <option></option>
                                <!--<option value="-1">  اختر شركة </option>-->
                                {foreach $ShipperCompanies as $myShipperCompany}
                                <option value="{$myShipperCompany->companyId}">{$myShipperCompany->companyName}</option>
                                {/foreach}
                            </select>
                        </div>

                        <!------------    div     ----------->
                        <div class="col-lg-2">
                            <label class="sr-only"> مسئول الشحن</label>
                        </div>
                        <div class="col-lg-4" >
                            <select class="select2 wdt300"  name="representativeId" id="representativeId" required="required">
                                <option></option>
                                <!--<option value="-1">  اختر </option>-->
                                {foreach $RepresentativeCompanies as $myCompanyRepresentative}
                                <option value="{$myCompanyRepresentative->representativecompanyId}">{$myCompanyRepresentative->representativeName}</option>
                                {/foreach}
                            </select>
                        </div>
                        </br>
                        </br>

                        <!------------    div     ----------->
                        <div class="col-lg-2">
                            <label class="sr-only">رقم البوليصة</label>
                        </div>
                        <div class="col-lg-4" >
                            <input name="Policyholder" id="Policyholder" class="form-control numberinput" type="text" required="required"/>
                        </div>

                        <!------------    div     ----------->
                        <div class="col-lg-2">
                            <label class="sr-only"> التكلفة</label>
                        </div>
                        <div class="col-lg-4" >
                            <input name="cost" id="cost" class="form-control numberinput findcost" type="text" required="required"/>
                        </div>
                        <!------------    div     ----------->
                        </br>
                        </br>

                        <!------------    div     ----------->
                        <div class="col-lg-2">
                            <label class="sr-only"> التاريخ</label>
                        </div>
                        <div class="col-lg-4" >
                            <input name="mydate" id="mydate" class="form-control awdatepicker" autocomplete="off"  data-date-format="yyyy-mm-dd" type="text" required="required"/>
                        </div>

                        <!------------    div     ----------->

                        <div class="clearfix"></div>
                        <br/>
                        <br/>
                        <hr style="border-color:grey;"/>

                        <!------------    tabel     ----------->
                        <br/>
                        <table class="table table-condensed table-black">
                            <thead>
                                <tr>
                                    <td><strong> رجوع</strong></td>
                                    <td><strong> اسم المنتج</strong></td>
                                    <td><strong> السيريال الخاص</strong></td>
                                    <td><strong> السيريال</strong></td>
                                    <td width="200px;"><strong> نوع الضمان <span style="color:red;">*</span></strong></td>
                                    <td><strong> رقم القطعة الجديد</strong></td>
                                    <td><strong> التكلفة</strong></td>
                                    <td><strong> الخصم</strong></td>
                                    <td><strong> متوسط تكلفة الشحن</strong></td>
                                </tr>

                            </thead>
                            <tbody>
                                {assign var="i" value="1"}
                                {foreach $productsData as $myProductsData}
                                <tr>
                                    <td><input name="go{$i}" id="go{$i}" class="go" value="{$myProductsData->id}" type="checkbox"/></td>
                                    <td>{$myProductsData->productName}</td>
                                    <td>{$myProductsData->ourserial}</td>
                                    <td>{$myProductsData->productserial}</td>
                                    <td>
                                        <select class="select2 wdt300 type"  name="type{$i}" id="type{$i}" >
                                            <option value="-1">  اختر </option>
                                            <option value="2"> صيانة</option>
                                            <option value="1"> خصم </option>
                                            <option value="0"> استبدال</option>
                                            <option value="3"> رفض</option>
                                        </select>
                                    </td>
                                    <td><input name="newSN{$i}" id="newSN{$i}" class="form-control" type="text" value="" readonly="readonly" /></td>
                                    <td><input name="insuranceCost{$i}" id="insuranceCost{$i}" class="form-control numberinput insuranceCost" type="text" value="" /></td>
                                    <td><input name="insuranceDiscount{$i}" id="insuranceDiscount{$i}" class="form-control numberinput insuranceDiscount" type="text" value="" /></td>
                                    <td>
                                        <input name="cost{$i}" id="cost{$i}" class="form-control numberinput products" type="text" value="" />
                                        <input name="ourserial{$i}" id="ourserial{$i}" type="hidden" value="{$myProductsData->ourserial}" />
                                    </td>
                                </tr>
                                {assign var="i" value=$i+1}
                                {/foreach}


                            </tbody>
                        </table>
                        <div class="clearfix"></div>
                        <button class="btn btn-primary pull-left"> اجمالى الصيانة
                            <span class="badge wht-clo"><span id="myInsuranceCost">0</span></span>
                            <input name="hidden_myInsuranceCost" id="hidden_myInsuranceCost" type="hidden" value="0" />
                        </button>
                        <br/>
                        <br/>
                        <button class="btn btn-primary pull-left"> اجمالى الخصم
                            <span class="badge wht-clo"><span id="myInsuranceDiscount">0</span></span>
                            <input name="hidden_myInsuranceDiscount" id="hidden_myInsuranceDiscount" type="hidden" value="0" />
                        </button>

                        <br/>
                        <br/>
                        <button class="btn btn-primary pull-left"> اجمالى الشحن
                            <span class="badge wht-clo"><span id="myTotal">0</span></span>
                            <input name="hidden_myTotal" id="hidden_myTotal" type="hidden" value="0" />
                        </button>
                        <br/>
                        <br/>
                        <!--col-lg-4-->
                        <div class="col-lg-offset-8">
                            <div class="well well-sm">
                                <h4 class="text-center"> الاجمالى :  <span id="totalOfTotals">0</span></h4>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                        <input name="hidden_itr" id="hidden_itr" type="hidden" value="{$itr}" />




                        <div align="center"><button type="submit" id="send" name="send" class="btn btn-primary"> شحن عودة </button></div>
                        <br/>

                    </form>

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





