<!--to call from js-->
<!--    <div id="RawMaterials" style="display:none">
        {foreach $rows as $material}
                <option value="{$material->productId}">{$material->productName}</option>
        {/foreach}
    </div> -->
<!--    end   -->



<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">التصنيع</a></li>
            <li><a href="#">معادلات الانتاج</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">

                <form action="productionEquationController.php?do=update" method="post" id="form1">
                    <input type="hidden" name="searchvalue" id="searchvalue" value="{$Programsettingdata->searchvalue}"/>
                    <span class="form-group">
                        <input type="hidden" name="productionrateid" id="productionrateid" value="{$productionrate->productionRateId}" />
                    </span>
                    <div class="row">
                        <div class="col-lg-8">
                            <div class="form-group">
                                <label class="col-lg-4 control-label">اسم معادلة الانتاج</label>
                                <div class="col-lg-4">
                                    <input name="name" id="name" value="{$productionrate->name}" type="text" disabled class="form-control"/>
                                </div>
                            </div>

                            <div class="form-group" style="margin-top:30px">
                                </br>
                                <label class="col-lg-4 control-label"> اسم المنتج النهائى</label>
                                <div class="col-lg-4">
                                    <input id="oldfinalproductname" name="oldfinalproductname" type="text" disabled value="{$oldfinalproductname}" />
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="row">
                            <hr/>
                            <div class="col-lg-6">
                                <h4 class="col-lg-4">المكونات
                                </h4>
                            </div>
                        </div>
                        <p><!-- end of title row--></p>
                        <table class="table billtable table-bordered table-black" id="table">
                            <thead>
                                <tr>
                                    <th class="wdt400">المنتجات الخام</th>
                                    <th  class="wdt200"><span class="sr-only">وحدة القياس</span></th>
                                    <!--<th  class="wdt200">نسبة المشاركة </th>-->
                                    <th  class="wdt200" >عدد الوحدات</th>
                                </tr>
                            </thead>
                            <tbody>
                                {assign var=i value=1}
                                {assign var=y value=1}
                                {foreach $Productionrateproduct as $x}
                                <tr>
                                    <td >
                                        <select class="select2 wdt300" name="product{$i}" disabled id="product{$i}" >
                                            {foreach $rows as $material}
                                            <option {if {$material->productId}=={$x->productId}}selected{/if}>{$material->productName}</option>
                                            {/foreach}
                                    </td>
                                    <td>
                                        <div id="unitDiv{$i}">
                                            <select name="unitId{$i}" id="unitId{$i}" disabled class="select2 wdt300">
                                                {foreach $productUnitData{$y} as $myUnit}
                                                <option value="{$myUnit->productunitid}"
                                                        {if {$myUnit->productunitid}=={$x->unitId}}selected="selected"{/if}

                                                    >{$myUnit->unitName}</option>

                                                {/foreach}
                                            </select>
                                        </div>
                                    </td>
                                    <td><div id="table">
                                            <input  name="inputt{$i}" id="inputt{$i}" disabled class="form-control positive" value="{$x->quantity}" tabindex="" />
                                        </div></td>
                                </tr>
                                {capture assign=i}{$i+1}{/capture}
                                {capture assign=y}{$y+1}{/capture}
                                {/foreach}
                            </tbody>
                        </table>
                        <p>&nbsp; </p>
                        <!--                        <button type="button" class="btn btn-primary pull-left ft-nor"> اجمالى النسبة <span class="badge wht-clo">
                                                        <div id="percentage">100</div>

                                                    </span></button>-->
                    </div>
                </form>


            </div> <!-- end of panel-body-->

        </div>  <!-- end of panel panel-default-->

    </div> <!-- end of container-->

</div>  <!-- end of row-->