<style>
    .requiredField{
        color:red;
        font-size: 17px;
        margin-right: -23px;
    }
</style>

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

        <ol class="breadcrumb">
            <li><a href="#">المصروفات والايرادات</a></li>
            <li><a href="depositcheckController.php?do=show">الشيكات</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="depositcheckController.php?do=add" id="myform"  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 class="col-lg-1">
                            <span class="requiredField">*</span>
                        </div>
                    </div>

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

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

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

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

                                {foreach $allclientdata as $client}
                                <option value="{$client->clientid}">{$client->clientname}</option>
                                {/foreach}

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

                            </div>
                        </div>
                        <div class="col-lg-1">
                            <span class="requiredField">*</span>
                        </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="clientDebit" id="clientDebit" class="form-control numberinput" readonly="readonly"  value="0" placeholder="دين العميل"/>

                                <span class="input-group-addon">{$currency}</span>
                            </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 class="col-lg-1">
                            <span class="requiredField">*</span>
                        </div>
                    </div>


                    <div class="form-group" >
                        <label class="col-lg-2 control-label">التاريخ </label>
                        <div class="col-lg-4"> <span id="sprydate">
                                <input type="text" class="form-control awdatepicker" autocomplete="off"  data-date-format="yyyy-mm-dd" placeholder="التاريخ"  value="{$today}" name="checkdate" id="bn">
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                        <div class="col-lg-1">
                            <span class="requiredField">*</span>
                        </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="txtAmount" class="col-lg-2 control-label">قيمة الايداع</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input type="text" name="txtAmount" id="txtAmountxx" class="form-control numberinput positivefloat" placeholder="قيمة الايداع"/>
                                <span class="input-group-addon">{$currency}</span>
                                <div id="chekamount">

                                </div>
                            </div>


                        </div>
                        <div class="col-lg-1">
                            <span class="requiredField">*</span>
                        </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 positivefloat" 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="textNote" class="col-lg-2 control-label">تفاصيل اخرى</label>
                        <div class="col-lg-4">

                            <textarea  class="form-control" rows="3" id="textNote" 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 savebtn">حفظ</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}



