


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

        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="clientPayedDeptController.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">

                <form class="form-horizontal" role="form" action="clientDeficitController.php?do=add" method="post"  id="spform">




                    <div class="form-group">
                        <label for="partnerid" 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 $clientsData as $data }

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

                                    {/foreach}


                                </select>
                                <span class="selectInvalidMsg">*اختر عميل</span></span></div>
                    </div>

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


                    <div class="form-group">
                        <label for="clientdebtchangebefore" class="col-lg-2 control-label">مديونية العميل</label>
                        <div class="col-lg-4">


                            <div class="input-group">


                                <input type="text" name="clientdebtchangebefore" id="clientdebtchangebefore"  class="form-control" readonly="readonly" />


                                <span class="input-group-addon">{$currency}</span>
                            </div>


                        </div>
                    </div>

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

                    <div class="form-group">
                        <label for="clientdebtchangetype" class="col-lg-2 control-label">نوع العملية</label>
                        <div class="col-lg-4"><span id="spryselect2">
                                <select class="select2 wdt100" name="clientdebtchangetype" id="clientdebtchangetype">
                                    <option value="-1">اختر النوع</option>
                                    <option value="1">تسوية بالخصم</option>
                                    <option value="0">تسوية بالاضافة</option>


                                </select>
                                <span class="selectInvalidMsg">*اختر نوع العملية</span></span></div>
                    </div>

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


                    <div class="form-group">
                        <label for="clientdebtchangeamount" class="col-lg-2 control-label">المبلغ</label>
                        <div class="col-lg-4">
                            <!------------onKeyUp="populateDebt();"----------->

                            <div class="input-group">

                                <span id="sprytextfield3">
                                    <input type="text" name="clientdebtchangeamount" id="clientdebtchangeamount" value="0"   class="form-control positivefloat" placeholder="المبلغ" onkeyup="populateDebt();"/>

                                    <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">ادخل رقم</span><span class="textfieldMinValueMsg">ادخل رقم اكبر من 0</span></span>


                                <span class="input-group-addon">{$currency}</span>
                            </div>


                        </div>
                    </div>

                    <div class="form-group">
                        <label for="productafter" class="col-lg-2 control-label">المبلغ بعد التغيير</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input type="text"  style="width: 356px;" name="clientdebtchangeamountafter" id="clientdebtchangeamountafter"  class="form-control" readonly="readonly" value="0" />
                            </div>
                        </div>
                    </div>



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

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

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

                        </div>
                    </div>

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


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




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




    </div>
</div>



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

    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {invalidValue: "-1"});
    // var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "integer", {minValue: "1"});
    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {invalidValue: "-1"});
</script>
{/literal}
