
<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">
                <form class="form-horizontal" action="?do=add" method="post">
                    <!--validate the form before checking name-->

                    <div class="form-group">
                        <label class="col-lg-2 control-label">اسم المورد</label>
                        <div class="col-lg-4"> <span id="spryselect1">
                                <label for="supplierid"></label>
                                <select name="supplierid" id="supplierid" data-placeholder="اختر اسم المورد:"  class="select2 wdt100">
                                    <option value="-1"> اختر مورد</option>





                                    {foreach $suppliersData as $data }





                                    <option value="{$data->supplierid}">{$data->suppliername}</option>





                                    {/foreach}




                                </select>
                                <span class="selectInvalidMsg">اختر اسم المورد</span><span class="selectRequiredMsg">اختر اسم المورد.</span></span> </div>
                    </div>

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

                    <div class="form-group">
                        <label class="col-lg-2 control-label">مديونية المورد</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input name="supplierdebtchangebefore" type="text" id="supplierdebtchangebefore" readonly="readonly"  class="form-control"/>
                                <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"> <span id="spryselect2">
                                <select name="supplierdebtchangetype" id="supplierdebtchangetype" data-placeholder="اختر النوع:"  class="select2 wdt100">
                                    <option value="-1">اختر النوع</option>
                                    <option value="1">تسوية بالخصم</option>
                                    <option value="0">تسوية بالإضافة</option>
                                </select>
                                <span class="selectInvalidMsg">اختر النوع</span><span class="selectRequiredMsg">اختر النوع</span></span> </div>
                    </div>

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

                    <div class="form-group">
                        <label class="col-lg-2 control-label">المبلغ</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <span id="sprytextfield3">

                                    <input type="text" name="supplierdebtchangeamount" id="supplierdebtchangeamount" class="numberinput form-control" />
                                    <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">ادخل رقم</span></span>
                                <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 name="comment" cols="" rows="" class="form-control" id="comment" class="form-control"></textarea>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button name="btnAdd" type="submit" id="btnAdd" 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");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "real");
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {invalidValue: "-1"});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "real");
    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {invalidValue: "-1"});
</script>
{/literal}

{literal}
<script type="text/javascript">
    jQuery(function () {
        $("form").submit(function () {
// submit more than once return false
            $(this).submit(function () {
                return false;
            });
// submit once return true
            return true;
        });
    });
</script>
{/literal}