

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

        <ol class="breadcrumb">
            <li><a href="#"> صرف مواد للمشروع</a></li>
            <li><a href="projectoperationControllerreturn.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">

                <input type="hidden" name="searchvalue" id="searchvalue" value="{$Programsettingdata->searchvalue}"/>
                <input type="hidden" name="path" id="path" value="{$path}"/>
                <input name="storenegative" type="hidden" value="{$storenegative}" id="storenegative" />
                <input name="edit_projectmaterialbill" type="hidden" value="1" id="edit_projectmaterialbill" />



                {literal}
                <form class="nameToBeChecked form-horizontal" role="form" id="projectoperation_form" action="projectoperationControllerreturn.php?do=update" method="post" >

                    {/literal}


                    <div class="row">
                        <div class="col-lg-8">
                            <div class="form-group">
                                <label class="col-lg-3 control-label">رقم التسلسل</label>
                                <div class="col-lg-4">
                                    <input type="text" name="serialno" id="serialno" class="form-control" placeholder="رقم التسلسل" value="{$editelement->serilno}" readonly="">
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-lg-3 control-label"> اسم المخزن</label>
                                <div class="col-lg-4">
                                    <select class="select2 wdt100" name="storeid" id="storeid" required>
                                        {foreach $storeData as $store}
                                        <option value="{$store->storeId}" {if {$editelement->storeid} eq {$store->storeId} } selected {/if}>{$store->storeName}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                        </div>


                        <div class="col-lg-4">
                            <div class="form-group mg-bt5">
                                <label for="clientname" class="col-lg-4 control-label">اسم  المشروع</label>
                                <div class="col-lg-8">
                                    <input type="text" name="projectname" id="project_id"   class="select2product wdt100"  data-placeholder="اختر مشروع" required tabindex="301"/>
                                    <input type="hidden" id="edit_hiddenprojectId" name="edit_hiddenprojectId" value="{$projectData->id}"  />
                                    <input type="hidden" id="edit_hiddenprojectName" name="edit_hiddenprojectName" value="{$projectData->name}"  />

                                </div>
                            </div>
                            <!-- end of form-group-->

                        </div>

                        <div class="col-lg-4">
                            <div class="form-group mg-bt5" >
                                <label class="col-lg-4 control-label">تاريخ الفاتورة</label>
                                <div class="col-lg-8">
                                    <input type="text" class="form-control awdatepicker" autocomplete="off"  data-date-format="yyyy-mm-dd" placeholder="تاريخ الفاتورة" value="{$editelement->projdate}" required="" name="billdate" id="billdate">
                                </div>
                            </div>
                        </div>
                    </div>


                    <div class="row">
                        <div class="row">
                            <hr/>
                            <div class="col-lg-6">
                                <h4>المنتجات</h4>
                            </div>
                            <div class="col-lg-6">
                                <button type="button" name="addpro_projectoperation" id="addpro_projectoperation" class="btn btn-primary pull-left ft-nor"> اضافة جديد</button>
                            </div>
                        </div>

                        <input type="hidden" name="offerhidden_itr" id="offerhidden_itr" value="{$allproductcount}"/>
                        <!-- ======================================Table=============================================================================================== -->

                        <div class="table-responsive bd-gr">
                            <table class="table billtable table-bordered table-black" id="projectoperation_tb">
                                <thead>
                                    <tr>
                                        <th class="wdt120">اسم المنتج</th>
                                        <th class="wdt120"> العدد</th>
                                        <th class="wdt80">السعر</th>
                                        <th class="wdt100n"> الاجمالى</th>
                                        <th>حذف</th>

                                    </tr>
                                </thead>
                                <tbody>
                                    {assign var=i value=1}
                                    {foreach $allproductData as $newpro}
                                    <tr>
                                        <td style="width:500px;">
                                            <input type="text" name="projectproudctid{$i}" id="project_proudctid{$i}"  required  class="select2product wdt100 clas_offerproduct" data-itr='1'  data-placeholder="اختر منتج" tabindex="301"/>
                                            <input type="hidden" id="edit_hiddenproductId{$i}" name="edit_hiddenproductId{$i}" value="{$newpro->productid}"  />
                                            <input type="hidden" id="edit_hiddenproductName{$i}" name="edit_hiddenproductName{$i}" value="{$newpro->productName}"  />
                                        </td>

                                        <td>
                                            <input type="text" name="productnumber{$i}" id="productnumber{$i}"  required data-itr="{$i}"  class="form-control txt-nonraduis positiveNo calcprice pro_num" value="{$newpro->pronumber}" />
                                            <input type="hidden" id="proquqntity{$i}"/>
                                            <!-- <input type="hidden" id="probuyprice{$i}"/> -->
                                        </td>
                                           <td>
                                          
                                            <input type="text" id="probuyprice{$i}" name="probuyprice{$i}"  readonly="" class="txt-nonraduis pro_num" data-itr="{$i}" />
                                        </td>
                                        <td>
                                             <input type="text" id="totalbuyprice{$i}"  readonly="" class="txt-nonraduis"/>
                                        </td>

                                        <td>
                                            <!-- <input type="hidden" id="totalbuyprice{$i}"/> -->
                                            <button type="button" id="remove1" class="projectoperation_remove close flt-none" aria-hidden="true"  >&times;</button>
                                        </td>
                                    </tr>
                                    {capture assign=i}{$i+1}{/capture}
                                    {/foreach}
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="form-group">
                        <button type="button" class="btn btn-primary pull-left ft-nor">
                            اجمالى العدد <span class="badge wht-clo">
                                <div id="div_totalnumber">0</div>
                            </span>
                            <input type="hidden" name="totalpronumber" id="totalpronumber" value="{$editelement->totalnum}">
                            <input type="hidden" name="finaltotalprice" id="finaltotalprice" value="{$editelement->finaltotalprice}"/>
                        </button>
                    </div>

                    <!-- =================================================   -->



                    <!-- =================================================   -->




                    <input type="hidden" name="editid" id="editid" value="{$editelement->id}"/>
                    <input type="hidden" name="entryid" id="entryid" value="{$editelement->entryid}"/>
                    <!-- =================================================   -->

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <input type="submit"   id="offerprice_save" class="btn btn-primary pull-left" value="حفظ">

                        </div>
                    </div>


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




    </div>
</div>


<input type="hidden" name="searchvalue" id="searchvalue" value="{$Programsettingdata->searchvalue}"/>

<!--{literal}

<script type="text/javascript">
    var name = new Spry.Widget.ValidationTextField("name");
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "real");
</script>

{/literal}-->

