
<style>
    .newoption {
        background-color:#CCCCCC !important;
        font-weight:bold !important;
    }
    .hide_div{
        display: none;
    }
    .show_div{
        display: block;
    }
</style>


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

        <ol class="breadcrumb">
            <li><a href="#">العيادات</a></li>
            <li><a href="rb_kashf.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="modal fade in" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none;">
                <div class="modal-dialog">
                    <div class="modal-content bg-modal">
                        <div class="modal-header">
                            <button type="button" class="close pull-left savemodel2" onclick="closeClientForm()" data-dismiss="modal" aria-hidden="true">×</button>
                            <h4 class="modal-title">اضافة عميل</h4>
                        </div>
                        <div class="modal-body">
                            <form id="clientInfo" action="#" method="post" class="form-horizontal">
                                <div class="form-group">
                                    <label for="newclientName" class="col-lg-2 control-label">اسم العميل</label>
                                    <div class="col-lg-4">
                                        <input class="form-control" placeholder="اسم العميل" id="newclientName" name="newclientName" type="text" required="required" autocomplete="off">


                                        <div id="nameError"></div>
                                    </div>
                                </div>




                                <div class="form-group">
                                    <label for="clientaddress" class="col-lg-2 control-label">{$Programsettingdata->clientcodname} </label>
                                    <div class="col-lg-4">
                                        <input class="form-control" placeholder="{$Programsettingdata->clientcodname}" id="clientcode" name="clientcode" type="text">
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label for="txtAddress" class="col-lg-2 control-label">الشركة </label>
                                    <div class="col-lg-4">

                                        <select name="clientareaid" id="clientareaid" data-placeholder="اختر المنطقة" class="select2 wdt100 select2-offscreen" tabindex="-1">
                                            <option value="0">اختر </option>
                                            {foreach $clientarea as $area}

                                            <option value="{$area->id}">{$area->name}</option>

                                            {/foreach}
                                        </select>
                                        <div id="areaError"></div>

                                    </div>

                                </div>
                                <!-- =================================================   -->
                                <div class="form-group">
                                    <label for="newclientdebt" class="col-lg-2 control-label">المديونية</label>
                                    <div class="col-lg-4">
                                        <input class="form-control numberinput" placeholder="المديونية" id="newclientdebt" name="newclientdebt" type="text" required="required">
                                        <div id="nameError2">

                                        </div>
                                    </div>

                                </div>

                                <div class="form-group">
                                    <label for="clientaddress" class="col-lg-2 control-label">العنوان</label>
                                    <div class="col-lg-4">
                                        <input class="form-control" placeholder="العنوان" id="clientaddress" name="clientaddress" type="text">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="clientphone" class="col-lg-2 control-label">رقم التليفون</label>
                                    <div class="col-lg-4">
                                        <input class="form-control numberinput" placeholder="رقم التليفون" id="clientphone" name="clientphone" type="text">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="clientmobile" class="col-lg-2 control-label">رقم الموبايل</label>
                                    <div class="col-lg-4">
                                        <input class="form-control numberinput" placeholder="رقم الموبايل" id="clientmobile" name="clientmobile" type="text">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="clientdetails" class="col-lg-2 control-label">التعليق</label>
                                    <div class="col-lg-4">
                                        <textarea class="form-control" rows="3" name="clientdetails" id="clientdetails"></textarea>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default savemodel2" onclick="closeClientForm()" data-dismiss="modal">لا</button>
                            <button type="button" class="btn btn-primary savemodel1" >نعم</button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>




            <form class="nameToBeChecked form-horizontal" enctype="multipart/form-data" id="rb_kashfForm" role="form" action="rb_kashf.php?do=update" method="post" >



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

                <input type="hidden" name="kashfid" value="{$editkasf->id}"/>


                <div class="form-group">
                    <label class="col-lg-2 control-label"> رقم تسلسل الكشف</label><br><br><br>
                    <div class="col-lg-4">
                        <input class="form-control" id="kasfh_serial" value="{$editkasf->id}" name="kasfh_serial" readonly="" type="text" style="margin-top: -23px;">

                    </div>
                </div>

                <div class="form-group">
                    <div class="col-lg-4">

                        <label class="sr-only">اسم العميل</label>
                        <div id="clientDiv">
                            <input type="hidden" id="client" name="client"  class="wdt100"  data-placeholder="اختر عميل " />

                        </div>
                        <input type="hidden" name="oldCustomer" id="oldclientid"  value="{$editkasf->customerid}" />
                        <input type="hidden" name="oldclientname"  id="oldclientname"  value="{$custData->clientname}"  />



                    </div>  </div>

                <div class="form-group">
                    <span style="   font-size: 17px; color: red;text-align: center;margin-right: 16px;">  {if !empty($client)}{$client}{/if}</span>
                </div>
                <!-- =================================================   -->

                <!-- =================================================   -->
                <div class="form-group">
                    <div class="col-lg-4">



                        <label class="sr-only">اسم الطبيب</label>
                        <select class="select2 wdt100" id="docSelect" name="docselect" >


                            <option value="-1">اختر طبيب</option>

                            {foreach $alldoc as $alldoctors}
                            {if  $editkasf->doctorid === $alldoctors->userid}

                            <option value="{$alldoctors->userid}" selected>{$alldoctors->username}</option>


                            {else}

                            <option value="{$alldoctors->userid}" >{$alldoctors->username}</option>



                            {/if}
                            {/foreach}
                        </select>
                    </div>  </div>

                <div class="form-group">
                    <span style="   font-size: 17px; color: red;text-align: center;margin-right: 16px;">  {if !empty($doc)}{$doc}{/if}</span>
                </div>
                <!-- =================================================   -->

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



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

<!--                <div class="form-group">
                    <label style="   margin-top: 10px;margin-bottom: 10px;"  class="col-lg-2 control-label">دفع الكشف</label>
                    <div style="margin-right: -64px;    margin-top: 10px;margin-bottom: 10px;" class="col-lg-4">
                        <div class="radio-inline">
                            <label>
                                <input name="paytype" class="paytype" type="radio" id="paytype1" value="0" {if $editkasf->paystatus == 0}   checked="checked"{/if} />
                                دفع الان </label>
                        </div>
                        <div class="radio-inline">
                            <label>
                                <input name="paytype" class="paytype" type="radio"  id="paytype2"  value="1" {if $editkasf->paystatus == 1 }   checked="checked"{/if}    />
                                دفع مع فاتورة </label>
                        </div>
                        <div class="radio-inline">
                            <label>
                                <input name="paytype"  class="paytype" type="radio" id="paytype3" value="2"  {if  $editkasf->paystatus == 2}   checked="checked"{/if}   />
                                تم الدفع </label>
                        </div>
                    </div>
                </div>-->

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



                <div class="form-group  kashfPrice {if  $editkasf->paystatus == 0 || $editkasf->paystatus == 1}  show_div {else} hide_div {/if}">
                    <label class="col-lg-2 control-label">سعر الكشف</label><br><br><br>
                    <div class="col-lg-4">
                        <span id="sprytextfield1">
                            <input style="margin-top: -23px;"  type="text" id="kashfvalue" name="kashf_value" value="{$editkasf->kashfvalue}"  placeholder=" الكشف " class="form-control positivefloat" />
                            <span class="kashf_valueError" style="color: red; display: none;">ادخل الرقم *</span></span>
                    </div>
                </div>

                <div class="form-group  billNo {if  $editkasf->paystatus == 2}  show_div {else} hide_div {/if}" >
                    <label class="col-lg-2 control-label"> ادخل رقم الفاتورة</label><br><br><br>
                    <div class="col-lg-4">
                        <span id="sprytextfield1">
                            <input style="margin-top: -23px;background-color: papayawhip;"  type="text" id="bill_id" name="bill_id" value="{$editkasf->bill_id}"  placeholder=" ادخل رقم الفاتورة " class="form-control positiveNoCVA" />
                    </div>
                </div>


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


                <div class="form-group">
                    <label class="col-lg-2 control-label">نوع الكشف</label><br><br><br>
                    <div  class="col-lg-4">
                        <input style="margin-top: -23px;"   name="kasf_type"  value="{$editkasf->kashftype}"  id="clinic_description"   placeholder=" نوع الكشف " class="form-control" />

                    </div>
                </div>

                <div class="form-group">
                    <span style="    font-size: 17px; color: red;text-align: center;margin-right: 16px;">  {if !empty($katype)}{$katype}{/if}</span>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">تاريخ الكشف</label>
                    <div class="col-lg-4">
                        <input data-date="datetoday" style="    margin-top: 30px;margin-right: -196px;" name="kashfdate"  type="text" class=" form-control awdatepicker" autocomplete="off"  data-date-format="yyyy-mm-dd" id="datentoday" value="{$editkasf->kashfdate}" placeholder="تاريخ الكشف"/>
                    </div>
                </div>


                <div class="form-group">
                    <span style="    font-size: 17px; color: red;text-align: center;margin-right: 16px;">  {if !empty($date)}{$date}{/if}</span>
                </div>
                <!-- =================================================   -->

                <div class="form-group">
                    <div class="col-lg-offset-2 col-lg-4">
                        <button style="    margin-left: 195px; margin-top: 15px;" type="button" id="btnKashf" class="btnedit btn btn-primary pull-left">تعديل </button>
                    </div>
                </div>


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




</div>


{literal}
<script type="text/javascript">
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired: false, invalidValue: "-1"});

    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {isRequired: false, invalidValue: "-1"});

    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "real");

</script>
{/literal}





