

<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">

                <!-- end box / title -->

                <form  method="post" id="bindForm" action="?do=update" class="nameToBeChecked form-horizontal" >

                    <div id="printAll">
                        <div class="form-group">
                            <label class="col-lg-2 control-label">اسم الموظف  </label>
                            <div class="col-lg-4">
                                <select name="employee" id="employee" data-placeholder="اختر"  class="select2 wdt100" >
                                    <option value="-1"> اختر </option>
                                    {foreach $employees as $employee}
                                    <option value="{$employee->employeeId}" {if $bind->employeeid == $employee->employeeId} selected {/if}>{$employee->employeeName} </option>
                                    {/foreach}
                                </select>
                                <span id="employeeError" class=" alert-block alert-danger fade in" style="padding: 5px 5px 5px 5px; display: none ;">اختر اسم العميل أولا</span>
                            </div>

                        </div>





                        <div class="form-group">

                            <label class="col-lg-2 control-label">نوع العهدة  </label>
                            <div class="col-lg-4">

                                <div class="radio-inline">
                                    <label>
                                        <input value="1"  class="bindtype" {if $bind->bindtype == 1} checked="checked" {/if} name="bindtype"  type="radio"   />
                                        خزينة   </label>
                                </div>

                                <div class="radio-inline">
                                    <label>
                                        <input value="0" class="bindtype"  name="bindtype" {if $bind->bindtype == 0} checked="checked" {/if}   type="radio"    />

                                        بنك   </label>
                                </div>

                                <span id="kashfError" class=" alert-block alert-danger fade in" style="padding: 5px 5px 5px 5px;display: none;">لا يوجد كشوفات سابقة لهذا العميل</span>
                            </div>



                        </div>

                        <div id="storageDiv" {if $bind->bindtype != 1} style="display:none ;" {/if}>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">الخزينة   </label>
                                <div class="col-lg-4">
                                    <select name="save" id="save" data-placeholder="اختر"  class="select2 wdt100" >
                                        <option value="-1"> اختر </option>
                                        {foreach $saves as $save}
                                        <option value="{$save->saveid}" {if $bind->saveid == $save->saveid} selected {/if}>{$save->savename} </option>
                                        {/foreach}
                                    </select>
                                    <span id="nameError" class=" alert-block alert-danger fade in" style="padding: 5px 5px 5px 5px; display: none ;">اختر اسم العميل أولا</span>
                                </div>

                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">القيمة  </label>
                                <div class="col-lg-4">
                                    <input name="saveValue" id="saveValue" type="text" value="{$bind->savevalue}"  style="display: inline;"  class="form-control wds94 positivefloat" />
                                </div>
                            </div>
                        </div>

                        <div id="bankDiv" {if $bind->bindtype == 1} style="display:none ;" {/if}>
                            <div class="form-group">
                                <label class="col-lg-2 control-label"> البنك   </label>
                                <div class="col-lg-4">
                                    <select name="bank" id="bank" data-placeholder="اختر"  class="select2 wdt100" >
                                        <option value="-1"> اختر </option>
                                        {foreach $bankData as $bank}
                                        <option value="{$bank->bankid}" {if $bind->bankid == $bank->bankid} selected {/if}>{$bank->bankname} </option>
                                        {/foreach}
                                    </select>
                                    <span id="nameError" class=" alert-block alert-danger fade in" style="padding: 5px 5px 5px 5px; display: none ;">اختر اسم العميل أولا</span>
                                </div>

                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label"> الحساب  </label>
                                <div class="col-lg-4">
                                    <select name="account" id="account" data-placeholder="اختر"  class="select2 wdt100" >
                                        <option value="-1"> اختر </option>
                                        {foreach $bankAccounts as $account}
                                        <option value="{$account->accountid}" {if $bind->bankaccount == $account->accountid} selected {/if}>{$account->accountname} </option>
                                        {/foreach}

                                    </select>
                                    <span id="nameError" class=" alert-block alert-danger fade in" style="padding: 5px 5px 5px 5px; display: none ;">اختر اسم العميل أولا</span>
                                </div>

                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">رقم الشيك </label>
                                <div class="col-lg-4">
                                    <input name="ckekNo" id="ckekNo" type="text" value="{$bind->ckekno}"  style="display: inline;"  class="form-control wds94 positiveNo" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">اسم  المستفيد </label>
                                <div class="col-lg-4">
                                    <input name="benefitName" id="benefitName" value="{$bind->benefitname}" type="text"  style="display: inline;"  class="form-control wds94" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">قيمة الشيك  </label>
                                <div class="col-lg-4">
                                    <input name="ckekValue" id="ckekValue" value="{$bind->ckekvalue}" type="text"  style="display: inline;"  class="form-control wds94 positiveNo" />
                                </div>
                            </div>

                        </div>




                        <div class="row">
                            <hr/>
                            <div class="col-lg-6">
                                <h4></h4>
                            </div>
                            <div class="col-lg-6">
                                <h4></h4>
                            </div>
                        </div>


                    </div>




                    <div class="form-group">
                        <div class="col-lg-12">
                            <input name="bindId" id="bindId" type="hidden" value="{$bind->id}" />
                            <button type="submit"   class="btn btn-primary pull-left">حفظ  </button>
                        </div>

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

<!-- Modal -->








