



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

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




        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;"> عرض الحسابات</h3>
                <a href="{$youtubes[88]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="bankaccountController.php" class="hidden-print"><input type="button" style="margin-left: 12px" id="submit"  class="btn btn-primary pull-left " value="إضافة جديد"/></a>
            </div>
            <div class="panel-body">


                <div id="outputString" class="alert alert-block alert-success fade in" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>

                    <p id="outputStringValue">{$outputString}</p>

                    <div class="clearfix"></div>
                </div>




                <form class="form-inline hidden-print " action="bankaccountController.php?do=show" method="post">


                    <div class="form-group">
                        <label class="sr-only">البنك</label>


                        <select class="select2 wdt300"  name="bankid" id="bankid" onchange="this.form.submit();">
                            <option value="-1">اختر بنك</option>

                            {foreach $bankData as $bank}

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

                            {/foreach}

                        </select>

                    </div>





                </form>




            </div>

            <hr/>
            <!-- Table -->
            {literal}
            <form method="post" action="bankaccountController.php?do=executeOperation" onsubmit="if (Spry.Widget.Form.validate(this)) {
                     return countChoosenProducts('bankController');
                 } else {
                     return false;
                 }">
                {/literal}
                <table class="table table-black">
                    <thead>
                        <tr>
                            <th class="hidden-print "><input type="checkbox" name="checkAll" id="checkAll"/></th>
                            <th>اسم البنك</th>
                            <th>اسم الحساب</th>
                            <th>رقم الحساب</th>
                            <th>القيمة الحالية</th>
                            <th>نوع العملة</th>
                            <th class="hidden-print ">تعديل</th>
                            <th class="hidden-print ">ايقاف</th>


                        </tr>
                    </thead>
                    <tbody>



                        {foreach $bankaccountData as $bankaccount}

                        {if {$bankaccount->conditions} eq 1}
                        <tr class="danger">
                            {elseif {$bankaccount->conditions} eq 0}
                        <tr>
                            {/if}





                            <td class="hidden-print ">
                                <input type="checkbox" name="choosedItem[]" id="checked{$i}" class="choosenItem" value="{$bankaccount->accountid}" />
                            </td>

                            <td>{$bankaccount->bankname}</td>
                            <td>{$bankaccount->accountname}</td>
                            <td>{$bankaccount->accountnumber}</td>
                            <td>{$bankaccount->accountbeginingbalance}</td>
                            <td>{$bankaccount->accountcurrencytype}</td>



                            <td class="hidden-print ">
                                <a href="bankaccountController.php?do=edit&accountid={$bankaccount->accountid}" type="button" class="btn btn-default btn-lg editicon"></a>
                            </td>



                            <td class="hidden-print ">

                                {if {$bankaccount->conditions} eq 1}
                                <a href="bankaccountController.php?do=returndelete&accountid={$bankaccount->accountid}" type="button" class="btn btn-default btn-lg correcticon"></a>

                                {elseif {$bankaccount->conditions} eq 0}

                                <a href="bankaccountController.php?do=deletetemp&accountid={$bankaccount->accountid}" type="button" class="btn btn-default btn-lg removeicon"></a>

                                {/if}


                            </td>





                        </tr>
                        {/foreach}


                    </tbody>
                </table>





                <div class="clearfix"></div>


                <hr />

                <div  class="noprint">
                    <div class="col-lg-12">
                        <div class="well well-sm">

                            <div class="form-group hidden-print " >
                                <div class="col-lg-4">
                                    <label for="operation"></label>
                                    <span id="spryselect1">
                                        <select name="operation" id="operation"  data-placeholder="اختر العملية" class="select2 wdt100">
                                            <option value="-1">اختر عملية</option>
                                            <option value="1">ايقاف</option>
                                            <option value="2">تشغيل </option>

                                        </select>
                                        <span class="selectInvalidMsg">*</span></span></div>
                            </div>

                            <div class="form-group hidden-print ">
                                <div class="col-lg-4">
                                    <input name=""  class="noprint btn btn-primary" type="submit" value="تنفيذ"/>
                                </div>
                            </div>

                            <div class="clearfix"></div>

                            <div id="noElementsError" class="alert alert-danger fade in" style="display:none;">
                                <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button>
                                <p>يجب اختيار العناصر أولاً</p>
                                <div class="clearfix"></div>
                            </div>


                            <div class="clearfix hidden-print " >

                                <div class="col-lg-4">
                                    <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right">طباعة</button>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
        </div>


        <div class="form-group">


            </form>

        </div>











    </div>

</div>



{literal}
<script type="text/javascript">
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired: false, invalidValue: "-1"});
</script>
{/literal}

