
<style>
    @media (min-width: 768px){
        .form-horizontal .form-group {
            margin-right: -10px;
            margin-left:-10px;
        }

        .m10{
            margin: 10px
        }
        h4{
            font-size: 17px;
            font-weight: bold;
            color: #000000;
            margin: 10px 0 15px;
            font-family: sans-serif;
        }
        hr {
            margin: 20px ;
            border: 0;
            border-top: 2px solid #d7d7d7;

        }
        .card{
            box-shadow: 0 4px 16px rgba(0,0,0,.12);
            padding: 10px;
            margin: 40px 0;
            border-radius: 5px
        }

    }
    .wdt230{
        width:230px
    }
    .billtable thead>tr>th {
        color: #eeecda;
        background-color: #0081a8;
    }
    .add i{
        font-size: 20px;
        color: #607D8B;
    }
    .wdt50{
        width:50px
    }
    .mt-10{
        margin-top: 10px
    }
    .data-search{
        margin: 10px 15px 0;
    }
    .btn-dark {
        color: #fff;
        background-color: #636262;
        border-color: #646464;
    }
    .data-search .form-control{
        border-radius:3px
    }

    #feedback {
        position: absolute;
        right: 0;
        bottom: 0;
        height: 250px;
        margin-right: -3px;
        margin-bottom: -3px;
    }

</style>






<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">
            <div class="panel-heading">
                <h3 class="panel-title"> اضافة أقساط عميل</h3>
            </div>

            <div class="panel-body">

                <form action="premiumController.php?do=add" method="post" id="form1" class="form-horizontal nameToBeChecked">


                    <!-- المكونات -->
                    <div class="card">
                        <div class="col-lg-6">
                            <h4>بيانات العميل</h4>
                        </div>
                        <div class="col-lg-3 ">
                            <div class="form-group mt-10">
                                <label class="col-lg-3"> العميل</label>
                                <div class="col-lg-9">
                                    <span id="spryselect1">
                                    <select class=" select2" id="clientID" name="clientID">
                                        <option value="-1">اختر العميل</option>
                                        {foreach $clientsData as $item}
                                        <option value="{$item->clientid}">{$item->clientname}</option>
                                        {/foreach}
                                    </select>
                                        <span class="selectInvalidMsg">اختر العميل اولا </span>
                                    </span>

                                </div>

                            </div>
                        </div>

                        <div class="table-responsive">
                            <table class="table billtable table-bordered table-black " id="table">
                                <thead>
                                <tr>
                                    <th class="wdt300">اسم العميل</th>
                                    <th class="wdt120 ">رقم  الموبيل</th>
                                    <th class="wdt120">المنطقه</th>
                                    <th  class="wdt120" >نوع العميل</th>
                                    <th  class="wdt120">مديونيه العميل</th>
                                    <th class="wdt120">التعليق</th>
                                </tr>
                                </thead>
                                <tbody>

                                <tr>
                                    <td id="name"></td>
                                    <td id="mobile"></td>
                                    <td id="area"></td>
                                    <td id="type"></td>
                                    <td id="debt"></td>
                                    <td id="comment"></td>
                                </tr>

                                </tbody>
                            </table>
                        </div>

                    </div>
                    <!-- end of title row-->

                    <!-- المخرجات -->
                    <div class="card">

                        <div class="col-lg-6">
                            <h4>اقساط العميل</h4>
                        </div>

                        <input type="hidden" name="premiumItr" id="premiumItr" value="1"/>

                        <div class="table-responsive">
                            <table class="table billtable table-bordered table-black " id="wasteTable">
                                <thead>
                                <tr>
                                    <th class="wdt300">تاريخ الاقساط </th>
                                    <th class="wdt300">القيمه</th>
                                    <th class="wdt50"></th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr data-itr="1">
                                    <td>
                                        <input type="text" class="form-control date" autocomplete="off" data-date-format="yyyy-mm-dd" name="date1" id="date1">
                                    </td>
                                    <td>
                                        <input type="number" name="Amount1" id="Amount1" min="0" class="form-control countAmount positiveNo" value=""/>
                                    </td>
                                    <td class="noprint"><a href="javascript:;" type="button" class="btn add addWastePro" id="addWastePro1"><i class="glyphicon glyphicon-plus-sign"></i></a></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>

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

                        <div class="row">
                            <div class="col-lg-12">
                                <button type="button" class="btn btn-dark pull-left ft-nor">
                                    اجمالى الاقساط <span class="badge wht-clo">
                                    <div id='allCost'>0</div>
                                </span>
                                </button>
                            </div>
                        </div>

                    </div>
                    <!-- end of title row-->


                    <div class="row  hidden-print m10" >
                        <div class="col-lg-12 text-center">
                            <button type="submit"  id="saveBtn" class="btn btn-primary">
                                <i class="glyphicon glyphicon-ok "></i>  حفظ</button>

                            <a href="premiumController.php?do=show" style="color: white" id="rtnBtn" class="btn btn-dark">
                                <i class="glyphicon glyphicon-backward"></i>  رجوع</a>
                        </div>



                    </div>
                    <!-- end of fifth row-->

                </form>


            </div> <!-- end of panel-body-->

        </div>  <!-- end of panel panel-default-->

    </div> <!-- end of container-->

</div>  <!-- end of row-->


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