<style>
    #playStationDiv img{
        width: 61px; height: 59px; margin-left: -19px;
    }
    #playStationText {
        background-color: #363636; color: white; padding: 8px; padding-right: 18px; border-radius: 10px; vertical-align: sub;
    }

    .glowing-border {
        outline: none; border-color: #363636; box-shadow: 0 0 12px #0000e4;//#000
    }
    .glowing-border-rounded {
        outline: none; border-color: #363636; box-shadow: 0 0 12px #0000e4;//#000
        border-radius: 40px;
    }

    .button-print{
        position: absolute;
    bottom: 0;
    margin: 20px 0 0;
    background-color: #fff;
    right: 0;
    height: 42px;
    width: 100%;
    padding-top: 11px;
   
    }
    .button-print a{
        margin-top: 20px;
    }

</style>
<div class="row">
    <div class="col-md-12">

        <input type="hidden" name="clientShowTawla" id="clientShowTawla" value="{$Programsettingdata->clientShowTawla}"/>
        <!-- BEGIN EXAMPLE TABLE PORTLET-->
        <div class="well well-lg wall-cgpadding resturant p0 m0 ">
            <!----Start Title Table------>

            <div class="portlet-title ">
                <div class="caption p5">
                    <img src="{$path}/assets/img/resturant/logo.png">
                    <span class="caption-subject font  ">الفاتورة </span>
                    <!--<a>
                     <img src="../views/default/assets/img/resturant/exit.png" class="exit-icon" >
                    </a>-->
                    <div class="logbutton pull-right">
                        {if $Usergroupdata->restaurantplaystationpalyBtn == 1}
                        <a  href="restaurantplaystationpaly.php" class=" btn-primary mgtp3 linkpad">حجز البلاى ستيشن </a> <span class="">&nbsp;</span>
                        {/if}
                        {if $Usergroupdata->homePageIcon == 1}
                        <a  href="orderdeliveryreport.php" class=" btn-primary mgtp3 linkpad">تقرير سائق دليفرى</a> <span class="">&nbsp;</span>
                        <a  href="orderstatusreport.php" class=" btn-primary mgtp3 linkpad">تقرير أوردرات الدليفرى</a> <span class="">&nbsp;</span>
                        {/if}
                        <a  href="savedailyController.php" class=" btn-primary mgtp3 linkpad">يومية الخزنة </a> <span class="">&nbsp;</span>
                        <!--a  href="#" class=" btn-primary mgtp3 linkpad">إضافة فاتورة </a> <span class="">&nbsp;</span-->
                        <a  href="logout.php" class=" btn-danger mgtp3 linkpad">خروج </a> <span class="">&nbsp;</span>
                        {if $Usergroupdata->homePageIcon == 1}
                        <a  href="index.php"><img src="{$path}/assets/img/whieHomePage.jpg" style="height: 22px;width: 22px"/></a> <span class="">&nbsp;</span>
                        {/if}
                    </div>
                </div>
            </div>
             <div class="">
                <div class="caption">
                    {foreach $restaurantorderlast20 as $last20}
                    <a href="sellbillController.php?do=showDetail&sellbillid={$last20.sellBillId}"  class="dropdown-item btn btn-danger" target="_blank">{$last20.sellBillId}</a>
                    {/foreach}
                </div>
            </div>

            <div class="portlet-body ">

                <!--======================Start table-screen=====================-->

                <div class="table-screen">
                    <div class="row">
                        <div class="col-xs-12">
                            <ul>
                                {if $tableId eq ''}
                                {foreach $restaurantTables as $resTable}
                                {if $resTable->del == 0 && ($userdata->userid|in_array:$resTable->hallUsers||$Usergroupdata->seeAllHalls == 1) || ($Usergroupdata->delivery == 1) || ($Usergroupdata->takeAway == 1) }
                                <!--table-->
                                <li class="table-block table-active {if $resTable->beingUsed == 1}changeTable statusIsOpen{else}openTable statusIsClosed{/if}" data-table="{$resTable->id}" data-table-name="{$resTable->name}" data-hall="{$resTable->hallid}" data-hall-price="{$resTable->hallPrice}">
                                    <a >
                                        {if $resTable->beingUsed == 1}
                                        <img src="../views/default/assets/img/resturant/table-active.png">
                                        {else}
                                        <img src="../views/default/assets/img/resturant/table-deactive.png">
                                        {/if}
                                        <h5>{if $resTable->beingUsed != 1&&$resTable->id >0}فتح{/if} {$resTable->name}</h5>
                                    </a>
                                </li>
                                {/if}
                                <!--table-->
                                {/foreach}
                                {else}
                                {foreach $restaurantTables as $resTable}
                                {if $resTable->del == 0 && ($userdata->userid|in_array:$resTable->hallUsers||$Usergroupdata->seeAllHalls == 1)}
                                {if $tableId eq $resTable->hallid}
                                <!--table-->
                                <li class="table-block table-active {if $resTable->beingUsed == 1}changeTable statusIsOpen{else}openTable statusIsClosed{/if}" data-table="{$resTable->id}" data-table-name="{$resTable->name}" data-hall="{$resTable->hallid}" data-hall-price="{$resTable->hallPrice}">
                                    <a >
                                        {if $resTable->beingUsed == 1}
                                        <img src="../views/default/assets/img/resturant/table-active.png">
                                        {else}
                                        <img src="../views/default/assets/img/resturant/table-deactive.png">
                                        {/if}
                                        <h5>{if $resTable->beingUsed != 1&&$resTable->id >0}فتح{/if} {$resTable->name}</h5>
                                    </a>
                                </li>
                                {/if}
                                {/if}
                                <!--table-->
                                {/foreach}

                                {/if}
                            </ul>
                        </div>
                    </div>

                </div>
                <!--======================End table-screen=====================-->

                <!--======================Start home-screen=====================-->
                <div class="body_res">
                    <div class="row">

                        <!---start product-menu-->
                        <div class=" col-md-4 col-xs-3 pL5">
                            <div class="menu-category">
                                <div class="row" >

                                    <div class="col-xs-12">
                                        <form class="search-form search-form-expanded search-menu">
                                            <div class="input-group">
                                                <input type="text" class="form-control input-sm" placeholder="بحث" name="query" id="query">

                                            </div>
                                            <input type="hidden" name="groupPerDiscount" id="groupPerDiscount" value="{$Usergroupdata->percentageDiscount}"/>
                                        </form>
                                    </div>
                                    <div class="col-xs-12">
                                        <div class="main-menu parent-menu">
                                            <h4 > القائمه الرئيسيه</h4>

                                            <ul id="catDiv">

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

                                    <div class="col-xs-12">
                                        <div class="category-menu">
                                            <img src="{$path}/assets/img/resturant/prev.png" class="prev-icon" style="margin-top: 10px;">
                                            <h4 class="head-icon prev-icon" style="display: inline-block;"> الاصناف  </h4>
                                            <div class="clearfix"></div>
                                            <div class="category-menu-scroll" id="foodDiv">

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

                        </div>
                        <!---End product-menu--->


                        <!---start product-menu-->

                        <div class="col-md-8 col-xs-9">
                            <div class="product-menu" >
                                <div class="row">

                                    <div class=" col-xs-10" style="padding-right: 0;padding-left: 0">
                                        <div class="detail-order">

                                            <!---start data-table-order-->
                                            <div class="data-tables-order">
                                                <div class='row'>
                                                    <div class='col-xs-4 pL5'>
                                                        <div class="table-name">
                                                            <h4 class="main-color">اسم المستخدم:
                                                                <span>{$employeename}</span>
                                                            </h4>
                                                        </div>
                                                    </div>
                                                    <div class='col-xs-4'>
                                                        <div class="table-name">
                                                            <h4 class="main-color">رقم الصالة :
                                                                <span id="hallNo"></span>
                                                            </h4>
                                                        </div>
                                                    </div>
                                                    <div class='col-xs-4'>
                                                        <div class="table-name">
                                                            <h4 class="main-color">طاولة :
                                                                <span id="tableNo"></span>
                                                            </h4>
                                                        </div>
                                                    </div>

                                                </div>



                                            </div>
                                            <form id="saveOrderForm" action="sellbillController.php?do=endKitchenBill" method="post">
                                                <input type="hidden" name="kitchenPayedVal" id="kitchenPayedVal" value="{$Usergroupdata->kitchenPayedVal}"/>
                                                <input type="hidden" name="kitchenPayedChange" id="kitchenPayedChange" value="{$Usergroupdata->kitchenPayedChange}"/>
                                                <input type="hidden" name="restaurantDefaultPage" id="restaurantDefaultPage" value="{$Usergroupdata->restaurantDefaultPage}"/>
                                                <div class="form-group"  {if $Programsettingdata->changeOrderproduct == 0} style="display: none" {/if}>
                                                    <label class="sr-only">تغير الطاوره</label>
                                                    <input type="text"  class="wdt100" id="restauranttable" data-placeholder="اختر " />
                                                     <input type="hidden" id="changeOrderProductid"  value="0" />
                                                </div>
                                                <div class="main-menu orderDetails" style="display: none">
                                                    <div class="order-head" style="width:100px">
                                                        <h4>تفاصيل الطلب</h4>
                                                    </div>
                                                    <div id="deliveryPart">
                                                        <div class="form-group col-md-12">
                                                            <label class="col-lg-3 control-label">اسم العميل </label>
                                                            <div class="col-lg-7" id="clientDiv">
                                                                <input type="hidden" id="client" name="client"  class="wdt100"  data-placeholder="اختر عميل " />
                                                            </div>
                                                            <div class="col-lg-2">
                                                                 <button type="button" id="getlastbill" > اخر طلب</button>
                                                            </div>
                                                        </div>
                                                        <div class="form-group col-md-12">
                                                            <label class="col-lg-3 control-label">الدين</label>
                                                            <div class="col-lg-8" id="activeUserDebt">

                                                            </div>
                                                        </div>
                                                        <div class="form-group col-md-12">
                                                            <label class="col-lg-3 control-label">العنوان</label>
                                                            <div class="col-lg-8" id="activeUserAddress">

                                                            </div>
                                                        </div>
                                                        <div class="form-group col-md-12">
                                                            <label class="col-lg-3 control-label">التليفون</label>
                                                            <div class="col-lg-8" id="activeUserMobile">

                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="table-order scroll">
                                                        <table class="table" width="100%">
                                                            <thead>
                                                                <tr>
                                                                    <th style="width:5%">#</th>
                                                                    <th style="width:35%">الصــــــــنف</th>
                                                                    <th>الكميه</th>
                                                                    <th>السعر</th>
                                                                    <th>اجمالى</th>
                                                                    <th style="width:20%"> ملاحظات</th>
                                                                    <th style="width:5%">&nbsp;</th>
                                                                    <th style="width:5%">&nbsp;</th>
                                                                </tr>
                                                            </thead>
                                                            <tbody id="orderTBody">

                                                            </tbody>

                                                            <tfoot>
                                                                <tr>
                                                                    <td  class="main-color">الاجمالى</td>
                                                                    <td id="totalBill">0</td>
                                                                    <td  class="main-color">الخصم </td>
                                                                    <td class="input-dis">
                                                                        <input name="discount" id="discount" type="text" value="" placeholder="0" >
                                                                    </td>

                                                                    {if $Programsettingdata->thereIsRestTax == 1}
                                                                    <!--show and hide it-->
                                                                    <td class="main-color shownServiceForTable">{if $Programsettingdata->taxNameFlag == 1}خدمة{else}الضريبة{/if}</td>
                                                                    <td class="shownServiceForTable"><input type="text" name="billTax" id="billTax" data-emam="" value="" {if $Programsettingdata->editservice == 0} readonly="" {/if} /></td>
                                                                    <!---->
                                                                    {/if}

                                                            <input type="hidden" name="thereIsRestTax" id="thereIsRestTax" value="{$Programsettingdata->thereIsRestTax}"/>

                                                            <td  class="main-color" >الصافى</td>
                                                            <td id="netBill">0</td>
                                                            {if $Programsettingdata->thereIsRestTax != 1}
                                                            <!--show and hide it-->
                                                            <td></td>
                                                            <td></td>
                                                            <!---->
                                                            {/if}

                                                            <td class="hiddenServiceForTable"></td>
                                                            <td class="hiddenServiceForTable"></td>

                                                            <input type="hidden" name="restTaxVal" id="restTaxVal" value="{$Programsettingdata->restTaxVal}"/>

                                                            </tr>

                                                            </tfoot>
                                                        </table>
                                                        <div class="form-group col-md-12">
                                                            <label class="col-lg-3 control-label">تعليق</label>
                                                            <div class="col-lg-8">
                                                                <textarea class="form-control" id="billComment" name="billComment"></textarea>
                                                            </div>
                                                            <br/>
                                                        </div>
                                                        <div class="form-group col-md-12" style="    margin-bottom: 61px;">
                                                            <label class="col-lg-3 control-label">المدفوع</label>
                                                            <div class="col-lg-8">
                                                                <input type="text" class="form-control positivefloat" id="payed" name="payed" value="0"  {if $Usergroupdata->kitchenPayedChange == 1}readonly{/if}/>
                                                            </div>
                                                            <br/>
                                                        </div>

                                                        <input type="hidden" name="totalBill_hidden" id="totalBill_hidden" value=""/>
                                                        <input type="hidden"  id="discount_hidden" value="0"/>
                                                        <input type="hidden"  id="clientidedit" value="{$Clientdata->clientid}"/>
                                                        <input type="hidden"  id="clienttextedit" value="{$Clientdata->clientname}"/>
                                                        <input type="hidden" name="restTaxVal_hidden" id="restTaxVal_hidden" value=""/>
                                                        <input type="hidden" name="netBill_hidden" id="netBill_hidden" value=""/>
                                                        <input type="hidden" name="totalQuantity" id="totalQuantity" value=""/>
                                                        <input type="hidden" name="printBill" id="printBill" value="0"/>
                                                        <input type="hidden" name="tableId" id="tableId" value="0"/>
                                                        <input type="hidden" id="tableidedit" value="{$tableId}"/>
                                                        <input type="hidden" name="sellBillIdold" value="{$sellBillId}" id="sellBillIdold" />
                                                        <input type="hidden" name="orderidold" value="{$OrdereditId}"/>
                                                        <input type="hidden" name="takeAwayClient" id="takeAwayClient" value="{$Programsettingdata->takeAwayClient}"/>

                                                    </div>
                                                    <div class="clearfix"></div>
                                                    <div class="button-print">
                                                        <a href="javascript:;" class="print-bill moveTableModalShow">نقل الطاولة</a>
                                                        {if $Usergroupdata->sendKitchen == 1}<a href="javascript:;" class="print-bill" id="sendKitchen">ارسال للمطبخ</a>{/if}
                                                        {if $Usergroupdata->printKitchen == 1}<a href="javascript:;" class="print-bill" id="printKitchen">طباعة للمطبخ</a>{/if}
                                                        {if $Usergroupdata->endPrintBill == 1}<a href="javascript:;" class="print-bill" id="endPrintBill">طباعة وانهاء الفاتورة</a>{/if}
                                                        {if $Usergroupdata->endBill == 1}<a href="javascript:;" class="print-bill" id="endBill">انهاء الفاتورة</a>{/if}
                                                        <a  class="print-bill" id="printonly" target="_blank">طباعه</a>
                                                    </div>
                                                    <div class="clearfix"></div>
                                                    <div id="playStationDiv" style="display: none;margin-top: 15px;">
                                                        <img src="../views/default/assets/img/resturant/logops.ico"/>
                                                        <span id="playStationText" class="glowing-border"></span>
                                                        <input type="hidden" id="psPrice" value=""/>
                                                        <input type="hidden" id="psPriceCardPayed" value=""/>
                                                    </div>
                                                    <div class="clearfix"></div>
                                                    <div id="totalOfTotalsDiv" style="display: none;margin: 15px;background-color: #777;color: white;font-size: 18px;">
                                                        الاجمالى العام : <span id="totalOfTotals"></span>
                                                    </div>
                                                    <div class="clearfix"></div>

                                                </div>
                                            </form>

                                            <div id="printOrderDiv" style="display: none">

                                            </div>
                                        </div>

                                    </div>


                                    <div class="col-xs-2 pR0">
                                        <div class="detail-control">
                                            <div class="glyph button-block">
                                                <a  class="add-table">
                                                    <img src="{$path}/assets/img/resturant/table.png">
                                                    <h4> فتح طاولة جديدة</h4>
                                                </a>
                                            </div>
                                            <div id="usedTables">
                                                {foreach $restaurantTables as $resTable}
                                                {if $resTable->beingUsed == 1 && $resTable->del == 0 && ($userdata->userid|in_array:$resTable->hallUsers||$Usergroupdata->seeAllHalls == 1)}
                                                <div class="glyph button-block changeTable" data-table="{$resTable->id}" data-table-name="{$resTable->name}" data-hall="{$resTable->hallid}" data-hall-price="{$resTable->hallPrice}">
                                                    <a href="javascript:;">
                                                        <div class="glyph-icon flaticon-padnote"></div>
                                                        <h4>{$resTable->name}</h4>
                                                    </a>
                                                </div>
                                                {/if}
                                                {/foreach}
                                            </div>
                                            <div id="lastbill"></div>
                                        </div>

                                        <!-----start content-wait------>


                                        <!-- Modal -->
                                        <div id="add-table" class="modal  fade in" tabindex="-1" data-width="300" >
                                            <div class="modal-dialog">
                                                <div class="modal-content">
                                                    <div class="modal-header">
                                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                                                        <h4 class="modal-title"> الطاولات
                                                            <button type="button" class="btn btn-primar showClosedOnly"> اظهر المغلق فقط</button>
                                                            <button type="button" class="btn btn-success shoAllTables"> اظهر كل الطاولات </button>
                                                        </h4>
                                                    </div>
                                                    <div class="modal-body">
                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <!--======================Start table-screen=====================-->
                                                                <div class="table-sceen">

                                                                    <ul id="notUsedTables">
                                                                        {foreach $restaurantTables as $resTable}
                                                                        {if $resTable->del == 0 && ($userdata->userid|in_array:$resTable->hallUsers||$Usergroupdata->seeAllHalls == 1)}
                                                                        <!--table  table-deactive-->
                                                                        <li class="table-block {if $resTable->beingUsed == 1}changeTable statusIsOpen{else}openTable statusIsClosed{/if}" data-table="{$resTable->id}" data-table-name="{$resTable->name}" data-hall="{$resTable->hallid}" data-hall-price="{$resTable->hallPrice}">
                                                                            <a href="javascript:;">
                                                                                {if $resTable->beingUsed == 1}
                                                                                <img src="../views/default/assets/img/resturant/table-active.png">
                                                                                {else}
                                                                                <img src="../views/default/assets/img/resturant/table-deactive.png">
                                                                                {/if}
                                                                                <h5>{if $resTable->beingUsed != 1&&$resTable->id >0}فتح{/if} {$resTable->name}</h5>
                                                                            </a>
                                                                        </li>
                                                                        <!--table-->
                                                                        {/if}
                                                                        {/foreach}
                                                                    </ul>

                                                                </div>
                                                                <!--======================End table-screen=====================-->
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="modal-footer">
                                                        <button type="button" data-dismiss="modal" class="btn dark btn-outline">اغلاق</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!-----End content-wait------>
                                        <!-- Modal -->
                                        <div id="move-table-modal" class="modal  fade in" tabindex="-1" data-width="300" >
                                            <div class="modal-dialog">
                                                <div class="modal-content">
                                                    <div class="modal-header">
                                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                                                        <h4 class="modal-title"> الطاولات
                                                            <button type="button" class="btn btn-primar showClosedOnly"> اظهر المغلق فقط</button>
                                                            <button type="button" class="btn btn-success shoAllTables"> اظهر كل الطاولات </button>
                                                        </h4>
                                                    </div>
                                                    <div class="modal-body">
                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <!--======================Start table-screen=====================-->
                                                                <div class="table-sceen">

                                                                    <ul id="notUsedTablesMove">
                                                                        {foreach $restaurantTables as $resTable}
                                                                        {if $resTable->del == 0 && ($userdata->userid|in_array:$resTable->hallUsers||$Usergroupdata->seeAllHalls == 1)}
                                                                        <!--table  table-deactive-->
                                                                        <li class="table-block {if $resTable->beingUsed == 1}statusIsOpen{else}statusIsClosed{/if} moveTable" data-table="{$resTable->id}" data-table-name="{$resTable->name}" data-hall="{$resTable->hallid}" data-hall-price="{$resTable->hallPrice}">
                                                                            <a href="javascript:;">
                                                                                {if $resTable->beingUsed == 1}
                                                                                <img src="../views/default/assets/img/resturant/table-active.png">
                                                                                {else}
                                                                                <img src="../views/default/assets/img/resturant/table-deactive.png">
                                                                                {/if}
                                                                                <h5>{if $resTable->beingUsed != 1&&$resTable->id >0}نقل إلى{/if} {$resTable->name}</h5>
                                                                            </a>
                                                                        </li>
                                                                        <!--table-->
                                                                        {/if}
                                                                        {/foreach}
                                                                    </ul>

                                                                </div>
                                                                <!--======================End table-screen=====================-->
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="modal-footer">
                                                        <button type="button" data-dismiss="modal" class="btn dark btn-outline">اغلاق</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!-----End content-wait------>


                                    </div>

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


                        <div class="clear"></div>
                    </div>
                </div>
                <!--======================End home-screen=====================-->

            </div>

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

<!-- ======================= accountstree Modal Box =========== -->
<!-- Modal -->
<div class="modal fade" id="drinkDetailsModal" tabindex="-1" role="dialog" aria-labelledby="drinkDetailsModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content bg-modal">
            <div class="modal-header">
                <button type="button" class="close pull-left" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">
                    <label>تفاصيل </label>
                </h4>
            </div>
            <div class="modal-body">
                <form id="drinkDetailsInfo" action="#" method="post" class="form-horizontal">

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default closeAccountsTreeForm" id="cancel" data-dismiss="modal">اغلاق</button>
                <button type="button" id="insert" class="btn btn-primary saveDrinkDetails">حفظ</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<!-- ============================================= -->
<div class="modal fade in" id="myclientModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none;">
    <div class="modal-dialog">
        <div class="modal-content bg-modal">
            <div class="modal-header">
                <button type="button" class="close pull-left savemodel2" onclick="closeClientForm()" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">اضافة عميل</h4>
            </div>
            <div class="modal-body" style="max-height: 370px;">
                <form id="clientInfomain" action="#" method="post" class="form-horizontal">
                    <div class="form-group">
                        <label for="newclientName" class="col-lg-2 control-label">اسم العميل</label>
                        <div class="col-lg-4">
                            <input class="form-control" placeholder="اسم العميل" id="newclientName" name="newclientName" type="text" required="required" autocomplete="off">


                            <div id="nameError"></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="clientphone" class="col-lg-2 control-label">رقم التليفون</label>
                        <div class="col-lg-4">
                            <input value="" class="form-control numberinput" placeholder="رقم التليفون" {if $Programsettingdata->clientfieldrequired eq 1} required="required"  {/if} id="clientphone" name="clientphone" type="text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="taxnumber" class="col-lg-2 control-label">الرقم الضريبى</label>
                        <div class="col-lg-4">
                            <input  class="form-control"  type="text" name="taxnumber"
                            placeholder="الرقم الضريبى" id="taxnumber">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="clientmobile" class="col-lg-2 control-label">رقم الموبايل</label>
                        <div class="col-lg-4">
                            <input class="form-control " placeholder="رقم الموبايل"  {if $Programsettingdata->clientfieldrequired eq 1} required="required"  {/if} id="clientmobile" name="clientmobile" type="text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="clientaddress" class="col-lg-2 control-label">العنوان</label>
                        <div class="col-lg-4">
                            <input class="form-control" placeholder="العنوان" id="clientaddress" {if $Programsettingdata->clientfieldrequired eq 1} required="required"  {/if} name="clientaddress" type="text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="clientdetails" class="col-lg-2 control-label">عنوان 2 </label>
                        <div class="col-lg-4">
                            <textarea class="form-control" rows="3" name="clientdetails" {if $Programsettingdata->clientfieldrequired eq 1} required="required"  {/if}  id="clientdetails"></textarea>
                        </div>
                    </div>


                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default savemodel2" onclick="closeClientForm()" data-dismiss="modal">لا</button>
                <button type="button" class="btn btn-primary savemodel1" >نعم</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<div class="modal fade in" id="myclientDataModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none;">
    <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">×</button>
                <h4 class="modal-title">بيانات العميل للفاتورة</h4>
            </div>
            <div class="modal-body">
                <form id="clientInfoDatamain" action="#" method="post" class="form-horizontal">
                    <table style="width: 100%">
                        <thead>
                            <tr>
                                <td>الدين الحالى</td>
                                <td style="width:10%"></td>
                            </tr>
                        </thead>
                        <tbody id="clientdebtTBody">
                            <tr>
                                <td id="clientdebtCell"></td>
                                <td></td>
                            </tr>
                        </tbody>
                    </table>
                    <table style="width: 100%">
                        <thead>
                            <tr>
                                <td>التليفونات</td>
                                <td style="width:10%"></td>
                            </tr>
                        </thead>
                        <tbody id="clientphoneTBody">

                        </tbody>
                    </table>
                    <table style="width: 100%">
                        <thead>
                            <tr>
                                <td>العناوين</td>
                                <td style="width:10%"></td>
                            </tr>
                        </thead>
                        <tbody id="clientAddressTBody">

                        </tbody>
                    </table>
                </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 savemodel1Data" >نعم</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<input type="hidden" name="printOrder" id="printOrder" value="{$printOrder}"/>


<!-- Modal -->
<div class="modal fade" id="lastbillmodel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"> تفاصيل اخر فاتوره للعميل  </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body lastbillmodel">
      </div>
     
    </div>
  </div>
</div>

<input type="hidden" id="passworduservalue"  class="form-control" value="{$usergroup.billDeletePassword}">
<input type="hidden" id="valueadded"  class="form-control" value="{$Programsettingdata->valueadded}">

<div class="modal fade" id="passwordmodel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">ادخل باسورد الحذف </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <input type="password" id="passworduser"  class="form-control">
        <input type="hidden" id="passwordpro"  class="form-control" value="">
        <input type="hidden" id="kindadd"  class="form-control" value="0">

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


