
<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">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <h3 class="panel-title">عرض منتج</h3>
            </div>
            <div class="panel-body">
                <form class="form-horizontal" id="productEditForm" action="productController.php?do=update"  method="post">

                    <input name="productId" id="productId" type="hidden" value="{$productsData->productId}" />
                    <div class="form-group">
                        <label class="col-lg-2 control-label">تصنيف المنتج</label>
                        <div class="col-lg-4"> {foreach $alldata as $data }



                            {if $productsData->productCatId eq $data->productCatId}{$data->productCatName}{/if}



                            {/foreach}

                        </div>
                    </div>

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

                    <table id="productsTable"  class="table table-black">
                        <tr>
                            <td >الإسم</td>
                            <td>الباركود</td>
                            <td >سعر الشراء</td>
                            <td>سعر بيع الجمله</td>
                            <td >سعر بيع الجمله التجزئة</td>
                            <td>سعر بيع الوحده</td>
                        </tr>
                        <tr >
                            <td>{$productsData->productName}


                            </td>
                            <td>{$productsData->parcode}</td>
                            <td>{$productsData->productBuyPrice}</td>
                            <td>{$productsData->productSellAllPrice}</td>
                            <td>{$productsData->productSellHalfPrice}</td>
                            <td>{$productsData->productSellUnitPrice}</td>
                        </tr>
                        <tr>
                            <td >الكمية</td>
                            <td >التاريخ</td>
                            <td >الحد الأدنى للمنتج</td>
                            <td >التعليق</td>

                        </tr>
                        <tr>
                            <td>{$productsData->productquantity}</td>
                            <td >{$productsData->productDate}</td>
                            <td>{$productsData->limitamount}</td>
                            <td >{$productsData->productDescription}</td>

                        </tr>
                        <tr>
                            <td colspan="10"><!--------------------------------  adding units   ----------------------------->

                                <div id="addUnitsDiv1">
                                    <div class="table-responsive">
                                        <table id="unitsTable1"  class="table" >
                                            {assign var=j value=1}
                                            {foreach $productUnitsData as $proUnit}
                                            <tr>
                                                <td><div class="form-group">
                                                        <label class="col-lg-4 control-label">اسم وحدة القياس</label>
                                                        <div class="col-lg-8">

                                                            {foreach $unitsData as $unit}

                                                            {if $proUnit->unitid eq $unit->unitId}{$unit->unitName}{/if}

                                                            {/foreach}

                                                        </div>
                                                    </div></td>
                                                <td><div class="form-group">
                                                        <label class="col-lg-4 control-label">عدد الوحدات</label>
                                                        <div class="col-lg-8">
                                                            <input name="productnumber1{$j}" readonly  id="productnumber1{$j}" type="text" value="{$proUnit->productnumber}" class="form-control"/>
                                                        </div>
                                                    </div></td>
                                                <!--                        <td><a id="remove1{$j}"  onclick="removeUnits(1,{$j});" class="removeUnits">X</a></td>
                                                -->                      </tr>
                                            {capture assign=j}{$j+1}{/capture}
                                            {/foreach}
                                        </table>
                                    </div>
                                    <!--end unitsTable-->
                                </div>
                                <!--                <input class="addUnits btn btn-warning" onClick="addUnits(1);" type="button"  value="إضافة وحدة قياس"/>
                                -->                <input name="unitsItr1" id="unitsItr1" type="hidden" value="{$countProductUnits}" />

                                <!-------------------------------- end adding units   -------------------------->

                        </tr>
                    </table>
                    <!--==============================-->

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <input type="button"  onClick="print_Custom('mycustomheader');"  class="noprint btn btn-primary pull-left" value="طباعة"/>


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