


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

        <ol class="breadcrumb">
            <li><a href="#">المصروفات والايرادات</a></li>
            <li><a href="settlementsaveController.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 id="myform" class="form-horizontal" role="form" action="settlementsaveController.php?do=add" method="post" >
                    <div class="form-group">
                        <label for="typesimpotencetreatmentid" class="col-lg-2 control-label"> انواع معالجة  عجز </label>
                        <div class="col-lg-4">
                            <select class="select2 wdt100" name="typesimpotencetreatmentid" id="typesimpotencetreatmentid" >
                                <option value="-1"> اختر  نوع</option>
                                {foreach $typesimpotencetreatmentData as $typesimpotencetreatment}
                                <option value="{$typesimpotencetreatment->typesimpotencetreatmentid}">{$typesimpotencetreatment->typesimpotencetreatmentname}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="saveid" class="col-lg-2 control-label"> الخزنة</label>
                        <div class="col-lg-4">
                            <select class="select2 wdt100" name="saveid" id="saveid" onChange="getsavecurrentvalue();">
                                <option value="-1">اختر خزنة</option>
                                {foreach $saveData as $save}
                                <option value="{$save->saveid}">{$save->savename}</option>
                                {/foreach}
                            </select>
                            <div id="saveError" style="display:none;"></div>
                        </div>
                    </div>

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



                    <div class="form-group">

                        <label for="savedailychangetype" class="col-lg-2 control-label">نوع العملية</label>

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


                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="savedailychangetype" id="addvalue" value="0" onClick="checkaddvalue();" checked>
                                    اضافة
                                </label>
                            </div>

                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="savedailychangetype" id="discountvalue" value="1" onClick="checkdiscountvalue();">
                                    خصم
                                </label>
                            </div>

                        </div>
                    </div>


                    <!-- =================================================   -->
                    <!-- hidden -->
                    <div class="form-group hidden">
                        <label for="supplierid" class="col-lg-2 control-label"> اختر مورد</label>
                        <div class="col-lg-4">
                            <select class="select2 wdt100" name="supplierid" id="supplierid" >
                                <option value="-1"> اختر مورد</option>
                                <option value="-2"> كل الموردين</option>
                                {foreach $supplierData as $supplier}
                                <option value="{$supplier->supplierid}">{$supplier->suppliername}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>



                    <div class="form-group">
                        <label for="savedailysavebefore" class="col-lg-2 control-label">القيمة الحالية</label>
                        <div class="col-lg-4">


                            <div class="input-group">


                                <input type="text" name="savedailysavebefore" id="savedailysavebefore"  class="form-control numberinput" value="0" readonly="readonly" />


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

                        </div>
                    </div>




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



                    <div class="form-group">
                        <label for="savedailychangeamount" class="col-lg-2 control-label">المبلغ</label>
                        <div class="col-lg-4">


                            <div class="input-group">

                                <span id="sprytextfield1">
                                    <input type="text" name="savedailychangeamount" id="savedailychangeamount"  class="form-control positivefloat" value="0" onKeyUp="checksaveValue();" />

                                    <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">ادخل القيمة صحيحة</span></span>


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

                        </div>
                    </div>


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



                    <div class="form-group">
                        <label for="savedailysaveafter" class="col-lg-2 control-label">القيمة بعد التغيير</label>
                        <div class="col-lg-4">


                            <div class="input-group">


                                <input type="text" name="savedailysaveafter" id="savedailysaveafter"  class="form-control numberinput" value="0" readonly="readonly" />


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

                        </div>
                    </div>

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

                    <div class="form-group">
                        <label class="col-lg-2 control-label">تعليق</label>
                        <div class="col-lg-4">
                            <textarea class="form-control" name="note" id="note" rows="5"></textarea>
                        </div>
                    </div>



                    <!-- =================================================   -->
                    <input type="hidden" name="voucher" id="voucher"  value="{$todayx}" class="form-control" />

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


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




    </div>
</div>



{literal}

<script type="text/javascript">

    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "real");
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired: false, invalidValue: "-1"});
</script>


{/literal}


