

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

        <ol class="breadcrumb">
            <li><a href="#">المصروفات والايرادات</a></li>
            <li><a href="checkwithdrawalController.php?do=show">الشيكات</a></li>
            <li class="active">سحب شيك</li>
        </ol>


        <div class="panel panel-default">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <h3 class="panel-title">سحب شيك</h3>
            </div>

            <div class="panel-body">


                <form class="form-horizontal" id="myform" action="checkwithdrawalController.php?do=add" method="post" >


                    <div class="form-group">
                        <label for="ddlBank" class="col-lg-2 control-label">البنك</label>

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


                            <select class="select2 wdt100" name="ddlBank" id="ddlBank" onchange="loadAccount(this.value);">
                                <option value="-1">اختر بنك</option>

                                {foreach $bank as $b}
                                <option value="{$b -> bankid}">{$b -> bankname}</option>
                                {/foreach}

                            </select>
                            <div id="bankerror">

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

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

                    <div class="form-group">
                        <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>

                                {foreach $allsuplierdata as $sup}
                                <option value="{$sup ->supplierid}">{$sup -> suppliername}</option>
                                {/foreach}

                            </select>
                            <div id="suppliererror">

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

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



                    <div class="form-group">
                        <label for="accountid" class="col-lg-2 control-label">اسم الحساب</label>

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

                                <select class="select2 wdt100" name="accountid" id="accountid">
                                    <option value="-1">اختر حساب</option>

                                </select>

                            </div>
                            <div id="counterror">

                            </div>

                        </div>
                    </div>



                    <div id="accountnumber">
                        <!-- =================================================   -->


                        <div class="form-group">
                            <label for="accountnumberDis" class="col-lg-2 control-label">رقم الحساب</label>
                            <div class="col-lg-4">
                                <input name="txtPhone" type="text" id="accountnumberDis" name="accountnumberDis"   class="numberinput form-control" placeholder="رقم الحساب" readonly="readonly"/>

                                <input type="hidden" name="accountnumber" id="accountnumber"/>


                            </div>
                        </div>

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

                        <div class="form-group">
                            <label for="accountbeginingbalanceDis" class="col-lg-2 control-label">رصيد سابق</label>
                            <div class="col-lg-4">
                                <div class="input-group">
                                    <input type="text" name="accountbeginingbalanceDis" id="accountbeginingbalanceDis" class="form-control numberinput" readonly="readonly"  value="0" placeholder="رصيد سابق"/>

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

                                <input type="hidden" name="accountbeginingbalance" id="accountbeginingbalance"/>


                            </div>
                        </div>

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

                    </div>


                    <div class="form-group">
                        <label for="txtcheckNum" class="col-lg-2 control-label">رقم الشيك</label>
                        <div class="col-lg-4">

                            <input type="text" name="txtcheckNum" id="txtcheckNum" class="form-control numberinput" placeholder="رقم الشيك" />

                            <div id="chekerror"> </div><div id="chekerror2"></div>
                        </div>
                    </div>

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


                    <div class="form-group">
                        <label for="txtUser" class="col-lg-2 control-label">اسم المستفيد</label>
                        <div class="col-lg-4">

                            <input type="text" name="txtUser" id="txtUser" class="form-control " placeholder="اسم المستفيد" />
                            <div id="userdiv"></div>

                        </div>
                    </div>

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


                    <div class="form-group">
                        <label for="txtAmount" class="col-lg-2 control-label">قيمة الشيك</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input type="text" name="txtAmount" id="txtAmount" class="form-control numberinput positivefloat" placeholder="قيمة الشيك"/>


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

                        </div>
                    </div>

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


                    <div class="form-group">
                        <label for="textNote" class="col-lg-2 control-label">تفاصيل اخرى</label>
                        <div class="col-lg-4">

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

                        </div>
                    </div>

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

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

                </form>


            </div>
        </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}
