
<style>
    .newoption {
        background-color:#CCCCCC !important;
        font-weight:bold !important;
    }
</style>
<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">فرن عيش </a></li>
            <li><a href="tamweenbill.php?do=show">فاتورة الصرف</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 class="form-horizontal nameToBeChecked" role="form" action="tamweenbill.php?do=update" method="post" id="tameenForm">


                    <div class="form-group">
                        <label class="col-lg-2 control-label">العميل</label>
                        <div class="col-lg-4">
                            <span id="sprytextfield1">
                                <input type="text" name="client" id="client" value=""/>
                                <span class="textfieldRequiredMsg">*</span></span>
                            <input type="hidden" name="oldclientid" id="oldclientid" value="{$bill->clientid}"/>
                            <input type="hidden" name="oldclientname" id="oldclientname" value="{$bill->clientname}"/>
                        </div>
                    </div>

                    <!-- =================================================   -->
                    <div class="form-group">
                        <label class="col-lg-2 control-label">عدد الافراد</label>
                        <div class="col-lg-4">
                            <input type="text" name="noOfPersonsDa3m_" id="noOfPersonsDa3m_" class="form-control positiveNo" readonly="readonly"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-2 control-label">الحصة</label>
                        <div class="col-lg-4">
                            <input type="text" name="cardSahre" id="cardSahre" class="form-control positiveNo" readonly="readonly"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-2 control-label">المنصرف</label>
                        <div class="col-lg-4">
                            <input type="text" name="cardTakenAmount" id="cardTakenAmount" class="form-control positiveNo" readonly="readonly"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-2 control-label">باقى الحصة</label>
                        <div class="col-lg-4">
                            <input type="text" name="remaining" id="remaining" class="form-control positiveNo" readonly="readonly"/>
                        </div>
                    </div>


                    <!-- =================================================   -->
                    <div class="form-group">
                        <label class="col-lg-2 control-label">كمية الصرف</label>
                        <div class="col-lg-4">
                            <span id="sprytextfield2">
                                <input type="text" name="quantity" id="quantity" class="form-control positiveNo" value="{$bill->quantity}"/>
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>


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

                    <div class="form-group">
                        <label for="textDetails" class="col-lg-2 control-label">التعليق</label>
                        <div class="col-lg-4">

                            <textarea   class="form-control" rows="3" name="comment" id="comment">{$bill->comment}</textarea>

                        </div>
                    </div>

                    <!-- =================================================   -->
                    <input name="id" type="hidden" id="id" value="{$bill->id}"/>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button"  class="btn btn-primary pull-left" id="saveTamwinBill">حفظ الامر</button>
                        </div>
                    </div>




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




    </div>
</div>






<!------------------------Client Model----------------------------->
<!-- Modal -->
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content bg-modal">
            <div class="modal-header">
                <button type="button" class="close pull-left savemodel2" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">اضافة عميل</h4>
            </div>
            <div class="modal-body">
                <form id="clientInfo" action="#" method="post" class="form-horizontal">
                    <div class="form-group">
                        <label for="newclientName" class="col-lg-3 control-label">اسم العميل</label>
                        <div class="col-lg-6"> <span id="sprytextfield2">
                                <input class="form-control" placeholder="اسم العميل" id="newclientName"   name="newclientName" type="text"  required="required"/>
                                <span class="textfieldRequiredMsg">*</span></span>
                            <div id="nameError" class="alert alert-block alert-danger fade in" style="display:none">
                                <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <h4>رسالة خطا</h4>
                                <p>هذا الاسم مستخدم من قبل</p>
                                <div class="clearfix"></div>
                            </div>
                        </div>
                    </div>




                    <div class="form-group">
                        <label for="clientaddress" class="col-lg-3 control-label">{$Programsettingdata->clientcodname}</label>
                        <div class="col-lg-6">
                            <input class="form-control" placeholder="{$Programsettingdata->clientcodname}" id="clientcode" name="clientcode" type="text"/>
                        </div>
                    </div>


                    <!-- =================================================   -->
                    <div class="form-group">
                        <label class="col-lg-3 control-label">افراد التموين</label>
                        <div class="col-lg-6">
                            <input type="text" name="noOfPersonsTamween" id="noOfPersonsTamween" class="form-control positiveNo" placeholder="افراد التموين" required="required"/>
                        </div>
                    </div>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label class="col-lg-3 control-label">افراد العيش</label>
                        <div class="col-lg-6">
                            <input type="text" name="noOfPersonsDa3m" id="noOfPersonsDa3m" class="form-control positiveNo" placeholder="افراد العيش" required="required"/>
                        </div>
                    </div>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label class="col-lg-3 control-label">رقم البطاقة</label>
                        <div class="col-lg-6">
                            <input type="text" name="cardNum" id="cardNum" class="form-control positiveNo" placeholder="رقم البطاقة" required="required"/>
                        </div>
                    </div>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label class="col-lg-3 control-label">الرقم السرى للبطاقة</label>
                        <div class="col-lg-6">
                            <input type="text" name="cardPassword" id="cardPassword" class="form-control positiveNo" placeholder="الرقم السرى للبطاقة" required="required"/>
                        </div>
                    </div>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="clientaddress" class="col-lg-3 control-label">العنوان</label>
                        <div class="col-lg-6">
                            <input class="form-control" placeholder="العنوان" id="clientaddress" name="clientaddress" type="text"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="clientphone" class="col-lg-3 control-label">رقم التليفون</label>
                        <div class="col-lg-6">
                            <input class="form-control numberinput" placeholder="رقم التليفون" id="clientphone" name="clientphone" type="text"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="clientmobile" class="col-lg-3 control-label">رقم الموبايل</label>
                        <div class="col-lg-6">
                            <input class="form-control numberinput" placeholder="رقم الموبايل" id="clientmobile"  name="clientmobile" type="text"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="clientdetails" class="col-lg-3 control-label">التعليق</label>
                        <div class="col-lg-6">
                            <textarea  class="form-control" rows="3" name="clientdetails" id="clientdetails"></textarea>
                        </div>
                    </div>

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

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default savemodel2" data-dismiss="modal">لا</button>
                <button type="button" class="btn btn-primary savemodel1" onClick="insertSupplier();">نعم</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->

<!------------------------Client Model----------------------------->

{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: "0", isRequired: false});
</script>
{/literal}


