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

        <!--<ol class="breadcrumb">
  <li><a href="#"> صيانه</a></li>
  <li><a href="clientController.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="panel-body">


                {literal}
                <form class="form-horizontal nameToBeChecked" id="receipt_client_form" role="form" action="receiptController.php?do=add" method="post" >

                    {/literal}


                    <div class="form-group">
                        <label for="clientid" class="col-lg-2 control-label">العميل</label>

                        <div class="col-lg-4"><span id="spryselect1">

                                <select class="select2 wdt100" name="clientid" id="clientid">
                                    <option value="-1">اختر عميل</option>


                                    {foreach $allclient as $data }

                                    <option value="{$data->clientid}" id="xx">{$data->clientname}</option>

                                    {/foreach}


                                </select>

                                <span class="selectInvalidMsg">هذا الحقل إلزامي</span></span></div>

                    </div>


                    <!-- =================================================   -->
                    <div id="receptdiv">
                        <!--<div class="form-group">

                          <label for="receiptid" class="col-lg-2 control-label">رقم الفاتوره</label>

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

                             <select class="select2 wdt100" name="receiptid" id="receiptid">
                               <option value="-1"> اختر فاتوره</option>

                             </select>

                         </div>
                          </div>-->

                    </div>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="totaldebt" class="col-lg-2 control-label"> اجمالى المديونيه</label>

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

                                <input type="text" name="totaldebt" id="totaldebt" class="form-control" readonly="readonly"/>
                                <span class="input-group-addon">{$currency}</span>
                            </div>
                        </div>
                    </div>

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



                    <div class="form-group">
                        <label for="payed" class="col-lg-2 control-label"> المدفوع</label>

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

                                <input type="text" name="payed" id="payed" class="form-control numberinput"  onkeypress="return isNumberKey(event)" required="required"/>
                                <span class="input-group-addon">{$currency}</span>
                            </div>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <label for="payed" class="col-lg-2 control-label"> الدين بعد</label>

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

                                <input type="text" name="debtafter" id="debtafter" class="form-control" readonly="readonly"/>
                                <span class="input-group-addon">{$currency}</span>

                            </div>
                            <label id="showdebt" style="color:#900; display:none"> هذا الرقم اكبر من الدين</label>
                        </div>
                    </div>

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



                    <div class="form-group">
                        <label for="payed" class="col-lg-2 control-label"> الخصم من الدين</label>

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

                                <input type="text" name="discount" id="discount" class="form-control getprototal  numberinput" />
                                <span class="input-group-addon">{$currency}</span>
                            </div>
                        </div>
                    </div>

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


                    <div class="form-group">
                        <label for="payed" class="col-lg-2 control-label"> الباقى</label>

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

                                <input type="text" name="remain" id="remain" class="form-control" readonly="readonly" />
                                <span class="input-group-addon">{$currency}</span>
                            </div>
                            <label id="showremain" style="color:#900; display:none"> هذا الرقم اكبر من الدين</label>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <label for="textDetails" class="col-lg-2 control-label">التعليق</label>
                        <div class="col-lg-4">

                            <textarea  class="form-control" rows="3" name="textDetails" id="textDetails"></textarea>

                        </div>
                    </div>

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

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="submit" class="btn btn-primary pull-left">حفظ الامر</button>
                        </div>
                    </div>




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




    </div>
</div>


<div class="clear"></div>
<!-- ======= .grid_12 - block end ======= -->

</section>
<!-- End of #container -->

</section>
<!-- End of #layout -->
<div class="clear"></div>


{literal}
<script type="text/javascript">

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

</script>
{/literal}
