<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">تصنيع </a></li>
            <li><a href="#">{if $simpleSettingData->taskOrderName == 1}طلبية{else}أمر شغل{/if}</a></li>
            <li class="active">اضافة جديد</li>
        </ol>

        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title"> اضافة {if $simpleSettingData->taskOrderName == 1}طلبية{else}أمر شغل{/if}</h3>
            </div>

            <div class="panel-body">

                <form action="taskOrderController.php?do=add" method="post" id="form1" class="form-horizontal nameToBeChecked" enctype="multipart/form-data">
                    <input type="hidden" name="searchvalue" id="searchvalue" value="{$Programsettingdata->searchvalue}"/>
                    <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="title" id="name"  type="text" class="form-control" required/>
                                </div>
                            </div>
                            <br/>
                            <div class="form-group">
                                <label class="col-lg-4 control-label">تاريخ البداية</label>
                                <div class="col-lg-4">
                                    <input type="text" class="form-control awdatepicker" autocomplete="off" id="from" data-date-format="yyyy-mm-dd" name="from">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-4 control-label">تاريخ التسليم</label>
                                <div class="col-lg-4">
                                    <input type="text" class="form-control awdatepicker" autocomplete="off" id="to" data-date-format="yyyy-mm-dd" name="to">
                                </div>
                            </div>
                            <div class="form-group">
                                </br>
                                <label class="col-lg-4 control-label">المنتج </label>
                                <div class="col-lg-4">
                                    <input type="hidden" class="getFinalProductsWithOutProductionEquation wdt300" name="finalProductId" id="finalProductId" data-placeholder=" اختر منتج"  />
                                </div>

                            </div>
                            <div class="form-group">
                                <label class="col-lg-4 control-label">عدد</label>
                                <div class="col-lg-4">
                                    <input name="proNumber" id="proNumber" type="number" class="form-control positive" min="1"/>
                                </div>
                            </div>
                            {if $simpleSettingData->orderclient == 0}
                            <div class="form-group">
                                <label class="col-lg-4 control-label">العميل</label>
                                <div class="col-lg-4">
                                    <select class="select2 wdt100" name="clientid" id="clientid">
                                        <option value="-1"></option>
                                        {foreach $clientData as $data}
                                        <option value="{$data->clientid}">{$data->clientname}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            {/if}
                            <div class="form-group">
                                <label for="email" class="col-lg-4 control-label">صورة</label>
                                <div class="col-lg-4">
                                    <input type="file" name="file" id="file"/>
                                </div>
                            </div>

                        </div>
                    </div>

                    <div class="row"  >

                        <div class="row">
                            <hr/>
                            <div class="col-lg-6">
                                <h4 class="col-lg-4">المكونات
                                </h4>
                            </div>
                            <!--
                                                        <div class="col-lg-6">
                                                            <button type="button" name="addrow" id="addrow" class="btn btn-primary pull-left ft-nor"> اضافة جديد</button>
                                                            <button type="button" style="display:none;" name="addrow" id="addrow" class="btn btn-primary pull-left ft-nor" onclick="addrow();"> اضافة جديد</button>
                                                        </div>-->

                        </div>

                        <p><!-- end of title row--></p>
                        <table class="table billtable table-bordered table-black col-lg-4" 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>
                                    <!--<th class="wdt200">حذف</th>-->
                                </tr>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                    </div>
                    <div class="row" align="center">
                        <button type="submit" id="save" class="btn btn-primary">  حفظ</button>

                        <span style="color:#F00;font-weight:bold;font-size:120%;" > {$msg}</span>
                        <!--<button type="submit" id="saveAndNew" class="btn btn-success" onclick="return changeFormAction({$billnameid});">حفظ وجديد</button>-->
                    </div>

                </form>

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

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

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

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


<script>
    $(function () {
        $("#save").on('click', function () {
            $(this).hide();
        });
    });
</script>
