<script src="{$path}/SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="{$path}/SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="programsettingsController.php">اعدادات البرنامج</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>
                <a href="{$youtubes[11]->url}" target="_blank" class="hidden-print"><img
                        src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube"
                        style="width: 2%;"></a>
            </div>
            <div class="panel-body">
                <form class="form-horizontal" action="programsettingsController.php?do=update" method="post"
                    enctype="multipart/form-data">

                    <!-- Nav tabs -->
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#info" data-toggle="tab">اعدادات البرنامج</a></li>
                        <li><a href="#props" data-toggle="tab">خصائص عامه</a></li>
                        <li><a href="#print" data-toggle="tab">الطباعه </a></li>
                        <li><a href="#bill" data-toggle="tab">الفواتير </a></li>
                        <li><a href="#optics" data-toggle="tab">البصريات </a></li>
                        <li><a href="#restur" data-toggle="tab">المطاعم </a></li>
                        <li><a href="#product" data-toggle="tab">المنتجات </a></li>
                        <li><a href="#store" data-toggle="tab">المخازن </a></li>
                        <li><a href="#parcodePrint" data-toggle="tab">طباعة الباركود </a></li>
                        <li><a href="#objyRoyal" data-toggle="tab">البرنامج الطبى </a></li>

                        {if $userID == -1}
                        <li><a href="#EBill" data-toggle="tab">الفاتورة الالكترونيه</a></li>
                        {/if}
                        <li><a href="#transfersell" data-toggle="tab"> نقل الفواتير</a></li>
                        <li><a href="#specialProjects" data-toggle="tab">المشروعات الخاصه</a></li>

                    </ul>

                    <div class="tab-content">

                        <div class="tab-pane active" id="info"><!-- start the 1st tab -->
                            <div class="form-group">
                                <label for="companyname" class="col-lg-2 control-label">اسم الشركة</label>
                                <div class="col-lg-4"> <span id="name">
                                        <input type="text" name="companyname" id="companyname" class="form-control"
                                            placeholder="اسم الشركة" value="{$programsettingsdata->companyname}" />
                                        <span class="textfieldRequiredMsg">*</span></span></div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="specializtion" class="col-lg-2 control-label">التوقيت"Time zone"</label>
                                <div class="col-lg-4">
                                    <select class="select2" name="timezone" id="timezone">
                                        <option value="Africa/Cairo" {if $programsettingsdata->timezone ==
                                            "Africa/Cairo"}selected="selected"{/if}>مصر
                                        </option>
                                        <option value="Asia/Riyadh" {if $programsettingsdata->timezone ==
                                            "Asia/Riyadh"}selected="selected"{/if}>المملكة العربية السعودية
                                        </option>
                                        <option value="Africa/El_Aaiun" {if $programsettingsdata->timezone ==
                                            "Africa/El_Aaiun"}selected="selected"{/if}>العيون - المغرب
                                        </option>
                                        <option value="Africa/Casablanca" {if $programsettingsdata->timezone ==
                                            "Africa/Casablanca"}selected="selected"{/if}>الدار البيضاء -المغرب
                                        </option>
                                        <option value="Africa/Ceuta" {if $programsettingsdata->timezone ==
                                            "Africa/Ceuta"}selected="selected"{/if}>سبته-المغرب
                                        </option>
                                        <option value="Africa/Juba" {if $programsettingsdata->timezone ==
                                            "Africa/Juba"}selected="selected"{/if}>جنوب السودان
                                        </option>
                                        <option value="Africa/Tunis" {if $programsettingsdata->timezone ==
                                            "Africa/Tunis"}selected="selected"{/if}>تونس
                                        </option>
                                        <option value="Africa/Algiers" {if $programsettingsdata->timezone ==
                                            "Africa/Algiers"}selected="selected"{/if}>الجزائر
                                        </option>
                                        <option value="Asia/Aden" {if $programsettingsdata->timezone ==
                                            "Asia/Aden"}selected="selected"{/if}>اليمن
                                        </option>
                                        <option value="Asia/Baghdad" {if $programsettingsdata->timezone ==
                                            "Asia/Baghdad"}selected="selected"{/if}>العراق
                                        </option>
                                        <option value="Asia/Muscat" {if $programsettingsdata->timezone ==
                                            "Asia/Muscat"}selected="selected"{/if}>سلطنة عمان
                                        </option>
                                        <option value="Asia/Bahrain" {if $programsettingsdata->timezone ==
                                            "Asia/Bahrain"}selected="selected"{/if}>البحرين
                                        </option>
                                        <option value="Asia/Beirut" {if $programsettingsdata->timezone ==
                                            "Asia/Beirut"}selected="selected"{/if}>لبنان
                                        </option>
                                        <option value="Asia/Gaza" {if $programsettingsdata->timezone ==
                                            "Asia/Gaza"}selected="selected"{/if}>غزة-فلسطين
                                        </option>
                                        <option value="Asia/Jerusalem" {if $programsettingsdata->timezone ==
                                            "Asia/Jerusalem"}selected="selected"{/if}>القدس-فلسطين
                                        </option>
                                        <option value="Asia/Qatar" {if $programsettingsdata->timezone ==
                                            "Asia/Qatar"}selected="selected"{/if}>قطر
                                        </option>
                                        <option value="Asia/Amman" {if $programsettingsdata->timezone ==
                                            "Asia/Amman"}selected="selected"{/if}>الأردن
                                        </option>
                                        <option value="Asia/Dubai" {if $programsettingsdata->timezone ==
                                            "Asia/Dubai"}selected="selected"{/if}>الإمارات العربية المتحدة
                                        </option>
                                        <option value="Asia/Damascus" {if $programsettingsdata->timezone ==
                                            "Asia/Damascus"}selected="selected"{/if}>سوريا
                                        </option>
                                        <option value="Asia/Kuwait" {if $programsettingsdata->timezone ==
                                            "Asia/Kuwait"}selected="selected"{/if}>الكويت
                                        </option>

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

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

                            <div class="form-group">
                                <label for="specializtion" class="col-lg-2 control-label">التخصص</label>
                                <div class="col-lg-4">
                                    <input type="text" name="specializtion" id="specializtion" class="form-control"
                                        placeholder="التخصص" value="{$programsettingsdata->specializtion}" />
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="address" class="col-lg-2 control-label">العنوان</label>
                                <div class="col-lg-4">
                                    <input type="text" name="address" id="address" class="form-control"
                                        placeholder="العنوان" value="{$programsettingsdata->address}" />
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="phone" class="col-lg-2 control-label">رقم التليفون</label>
                                <div class="col-lg-4">
                                    <span>
                                        <input type="text" name="phone" id="phone" class="form-control"
                                            placeholder="رقم التليفون" value="{$programsettingsdata->phone}" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="faxnumber" class="col-lg-2 control-label"> رقم الفاكس</label>
                                <div class="col-lg-4">
                                    <span>
                                        <input type="text" name="faxnumber" id="faxnumber" class="form-control"
                                            placeholder="رقم الفاكس" value="{$programsettingsdata->faxnumber}" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">الايميل</label>
                                <div class="col-lg-4">
                                    <input type="text" name="email" id="email" class="form-control"
                                        placeholder="الايميل" value="{$programsettingsdata->email}" />
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="website" class="col-lg-2 control-label">الموقع الالكترونى</label>
                                <div class="col-lg-4">
                                    <input type="text" name="website" id="website" class="form-control"
                                        placeholder="الايميل" value="{$programsettingsdata->website}" />
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">الشعار</label>
                                <div class="col-lg-4"><img
                                        src="../views/default/images/upload/{$programsettingsdata->logo}" alt=""
                                        width="122" height="75" />
                                    <input type="file" name="logo" id="logo" class="form-control"
                                        placeholder="الشعار" />
                                    <input type="hidden" name="oldlogo" id="oldlogo"
                                        value="{$programsettingsdata->logo}" />
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">بطاقة ضريبية</label>
                                <div class="col-lg-4">
                                    <input type="text" name="taxcard" id="taxcard" class="form-control"
                                        placeholder="بطاقة ضريبية" value="{$programsettingsdata->taxcard}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">سجل تجارى</label>
                                <div class="col-lg-4">
                                    <input type="text" name="commercialregistration" id="commercialregistration"
                                        class="form-control" placeholder="سجل تجارى"
                                        value="{$programsettingsdata->commercialregistration}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">رقم الترخيص</label>
                                <div class="col-lg-4">
                                    <input type="text" name="licenseNo" id="licenseNo" class="form-control"
                                        placeholder="رقم الترخيص" value="{$programsettingsdata->licenseNo}" />
                                </div>
                            </div>
                        </div>

                        <div class="tab-pane" id="props"><!-- start the 2nd tab -->
                            <div class="form-group">
                                <label for="qrcodesh" class="col-lg-2 control-label">تغير المنتج فى الطاوله </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="changeOrderproduct" value="1" {if
                                                {$programsettingsdata->
                                            changeOrderproduct} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="changeOrderproduct" value="0" {if
                                                {$programsettingsdata->
                                            changeOrderproduct} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="qrcodesh" class="col-lg-2 control-label">اظهار المورد فى المصروفات </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="expensesupplier" value="1" {if
                                                {$programsettingsdata->
                                            expensesupplier} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="expensesupplier" value="0" {if
                                                {$programsettingsdata->
                                            expensesupplier} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="qrcodesh" class="col-lg-2 control-label">نظام العقارات والوحدات </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="realestateunits" value="1" {if
                                                {$programsettingsdata->
                                            realestateunits} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="realestateunits" value="0" {if
                                                {$programsettingsdata->
                                            realestateunits} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="qrcodesh" class="col-lg-2 control-label">اظهار العميل و الفاتوره فى المصروف
                                </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientsell" value="1" {if {$programsettingsdata->
                                            clientsell} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientsell" value="0" {if {$programsettingsdata->
                                            clientsell} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="preorderperiod" class="col-lg-2 control-label">مدة اعادة الطلب</label>
                                <div class="col-lg-4"><span id="preorderperiod">
                                        <input name="preorderperiod" id="preorderperiod" type="text"
                                            value="{$programsettingsdata->preorderperiod}"
                                            class="form-control positiveNo" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="qrerp" class="col-lg-2 control-label">تفعيل QR </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="qrerp" value="3" {if {$programsettingsdata->
                                            qrerp} eq 3} checked {/if}>
                                            qre </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="qrerp" value="2" {if {$programsettingsdata->
                                            qrerp} eq 2} checked {/if}>
                                            qrs </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="qrerp" value="4" {if {$programsettingsdata->
                                            qrerp} eq 4} checked {/if}>
                                            qrs & qre</label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="qrerp" value="1" {if {$programsettingsdata->
                                            qrerp} eq 1} checked {/if}>
                                            غير مفعل </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="qrcodesh" class="col-lg-2 control-label">اظهار كود qr </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="qrcodesh" value="1" {if {$programsettingsdata->
                                            qrcodesh} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="qrcodesh" value="0" {if {$programsettingsdata->
                                            qrcodesh} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="noOfDecimalPlaces" class="col-lg-2 control-label">مصروفات خاصه</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="specialexpenses" value="0" {if
                                                {$programsettingsdata->
                                            specialexpenses} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="specialexpenses" value="1" {if
                                                {$programsettingsdata->
                                            specialexpenses} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="vatvalueqr" class="col-lg-2 control-label">نسبة القيمة المضافة في الاسعار
                                </label>
                                <div class="col-lg-4">
                                    <input name="vatvalueqr" type="text" class="form-control"
                                        value="{$programsettingsdata->vatvalueqr}" />
                                </div>
                            </div>



                            <div class="form-group">
                                <label for="noOfDecimalPlaces" class="col-lg-2 control-label">تفعيل خاصية تقريب
                                    الأرقام</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="roundnumbers" value="0" {if
                                                {$programsettingsdata->
                                            roundnumbers} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="roundnumbers" value="1" {if
                                                {$programsettingsdata->
                                            roundnumbers} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group" id="noOfDecimalPlaces_div" {if {$programsettingsdata->roundnumbers}
                                neq
                                1}style="display:none"{/if}>
                                <label for="noOfDecimalPlaces" class="col-lg-2 control-label">عدد الخانات
                                    العشرية</label>
                                <div class="col-lg-4"><span id="noOfDecimalPlacesSpary">
                                        <input name="noOfDecimalPlaces" id="noOfDecimalPlaces" type="text"
                                            value="{$programsettingsdata->noOfDecimalPlaces}"
                                            class="form-control positiveNo" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">عدد حروف البحث</label>
                                <div class="col-lg-4"><span id="sprytextfield1">
                                        <input name="searchvalue" type="text"
                                            value="{$programsettingsdata->searchvalue}"
                                            class="form-control positiveNo" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">عدد حروف البحث في العملاء</label>
                                <div class="col-lg-4"><span id="sprytextfield2">
                                        <input name="clientsearchvalue" type="text"
                                            value="{$programsettingsdata->clientsearchvalue}"
                                            class="form-control positiveNo" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">عدد نتائج البحث</label>
                                <div class="col-lg-4"><span id="sprytextfield9">
                                        <input name="searchlimit" type="text"
                                            value="{$programsettingsdata->searchlimit}"
                                            class="form-control positiveNo" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>
                            <!--==============================-->


                            <div class="form-group">
                                <label for="partition" class="col-lg-2 control-label">بارتيشن</label>
                                <div class="col-lg-4">
                                    <input type="text" name="partition" id="partition" class="form-control"
                                        placeholder="ادخل مكان البارتيشن" value="{$programsettingsdata->partition}" />
                                </div>
                                <div class="col-lg-6">
                                    <label class="control-label">
                                        <span style="color:red">ملحوظة :</span> فى حالة اللنكس ضع 0 فى الحقل
                                    </label>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> تقيم البضاعة باخر سعر شراء </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="lastprice" value="0" {if {$programsettingsdata->
                                            lastprice} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="lastprice" value="1" {if {$programsettingsdata->
                                            lastprice} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>


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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> مراكز التكلفه </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="costcenter" value="0" {if
                                                {$programsettingsdata->costcenter}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="costcenter" value="1" {if
                                                {$programsettingsdata->costcenter}
                                            eq 1} checked {/if} >
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> تفاصيل العميل </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientdetail" value="0" {if
                                                {$programsettingsdata->clientdetail}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientdetail" value="1" {if
                                                {$programsettingsdata->clientdetail}
                                            eq 1} checked {/if} >
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> اظهار العميل فى الايردات </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="incomeclient" value="0" {if
                                                {$programsettingsdata->incomeclient}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="incomeclient" value="1" {if
                                                {$programsettingsdata->incomeclient}
                                            eq 1} checked {/if} >
                                            لا </label>
                                    </div>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">تقيم المخزون بالسريال </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="inventoryvaluation" value="0" {if
                                                {$programsettingsdata->inventoryvaluation}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="inventoryvaluation" value="1" {if
                                                {$programsettingsdata->inventoryvaluation}
                                            eq 1} checked {/if} >
                                            لا </label>
                                    </div>
                                </div>
                            </div>

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


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


                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اضافه مصروف للمنتج </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="expensesproduct" value="0" {if
                                                {$programsettingsdata->expensesproduct}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="expensesproduct" value="1" {if
                                                {$programsettingsdata->expensesproduct}
                                            eq 1} checked {/if} >
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">السماح بتعديل التاريخ</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="allowdateedit" value="0" {if
                                                {$programsettingsdata->
                                            allowdateedit} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="allowdateedit" value="1" {if
                                                {$programsettingsdata->
                                            allowdateedit} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">يوجد عيادات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clinic" value="0" {if {$programsettingsdata->
                                            clinic} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clinic" value="1" {if {$programsettingsdata->
                                            clinic} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">يوجد ورش</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="workshop" value="0" {if {$programsettingsdata->
                                            workshop} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="workshop" value="1" {if {$programsettingsdata->
                                            workshop} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">يوجد نقل</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="transport" value="0" {if {$programsettingsdata->
                                            transport} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="transport" value="1" {if {$programsettingsdata->
                                            transport} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">يوجد تصنيع</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="manufacturing" value="0" {if
                                                {$programsettingsdata->
                                            manufacturing} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="manufacturing" value="1" {if
                                                {$programsettingsdata->
                                            manufacturing} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="tamweenBakery" class="col-lg-2 control-label">يوجد فرن عيش</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="tamweenBakery" value="1" {if
                                                {$programsettingsdata->
                                            tamweenBakery} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="tamweenBakery" value="0" {if
                                                {$programsettingsdata->
                                            tamweenBakery} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="unReviewBills" class="col-lg-2 control-label">الدفع الالكترونى</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="visaPay" value="0" {if {$programsettingsdata->
                                            visaPay} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="visaPay" value="1" {if {$programsettingsdata->
                                            visaPay} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group">
                                <label for="unReviewBills" class="col-lg-2 control-label"> الفاتورة الالكترونيه</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="ebill" value="0" {if {$programsettingsdata->
                                            ebill} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="ebill" value="1" {if {$programsettingsdata->
                                            ebill} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="unReviewBills" class="col-lg-2 control-label"> الفاتورة الالكترونيه
                                    للعميل</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="ebillclient" value="0" {if {$programsettingsdata->
                                            ebillclient} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="ebillclient" value="1" {if {$programsettingsdata->
                                            ebillclient} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                </div>
                            </div>


                            <div class="form-group">
                                <label for="unReviewBills" class="col-lg-2 control-label"> المنتجات الاستيراد</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="importproduct" value="0" {if
                                                {$programsettingsdata->
                                            importproduct} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="importproduct" value="1" {if
                                                {$programsettingsdata->
                                            importproduct} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group">
                                <label for="tamweenBakery" class="col-lg-2 control-label">نسب تحصيل المناديب</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="mandobCollectionRatio" value="1" {if
                                                {$programsettingsdata->
                                            mandobCollectionRatio} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="mandobCollectionRatio" value="0" {if
                                                {$programsettingsdata->
                                            mandobCollectionRatio} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">النسخة</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="masterCopy" value="0" {if {$programsettingsdata->
                                            masterCopy} eq 0} checked {/if}>
                                            فرعى </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="masterCopy" value="1" {if {$programsettingsdata->
                                            masterCopy} eq 1} checked {/if}>
                                            رئيسى </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">يوجد عامل توصيل للنقل بين
                                    المخازن</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="workerbetweenstores" value="0" {if
                                                {$programsettingsdata->
                                            workerbetweenstores} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="workerbetweenstores" value="1" {if
                                                {$programsettingsdata->
                                            workerbetweenstores} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="workshoptimeout" class="col-lg-2 control-label">مدة انجاز الورشة
                                    بالساعة</label>
                                <div class="col-lg-4">
                                    <span id="sprytextfield4">
                                        <input type="text" name="workshoptimeout" id="workshoptimeout"
                                            class="form-control positiveNo" placeholder="مدة انجاز الورشة بالساعة"
                                            value="{$programsettingsdata->workshoptimeout}" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="drivertimeout" class="col-lg-2 control-label">مدة انجاز السائق
                                    بالساعة</label>
                                <div class="col-lg-4">
                                    <span id="sprytextfield5">
                                        <input type="text" name="drivertimeout" id="drivertimeout"
                                            class="form-control positiveNo" placeholder="مدة انجاز السائق بالساعة"
                                            value="{$programsettingsdata->drivertimeout}" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="currancy" class="col-lg-2 control-label">العملة الرئيسية</label>
                                <div class="col-lg-4">
                                    <span id="sprytextfield6">
                                        <input type="text" name="currancy" id="currancy" class="form-control"
                                            value="{$programsettingsdata->currancy}" />
                                        <span class="textfieldRequiredMsg">***.</span></span>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="currancy" class="col-lg-2 control-label">اظهار العملات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showCurrency" value="1" {if
                                                {$programsettingsdata->
                                            showCurrency} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showCurrency" value="0" {if
                                                {$programsettingsdata->
                                            showCurrency} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>


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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">كود العميل</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientcode" value="1" {if {$programsettingsdata->
                                            clientcode} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientcode" value="0" {if {$programsettingsdata->
                                            clientcode} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> الباركود </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="parcode" value="0" {if
                                                {$programsettingsdata->parcode} eq
                                            0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="parcode" value="1" {if
                                                {$programsettingsdata->parcode} eq
                                            1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> وحدة القياس </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="measuringunit" value="0" {if
                                                {$programsettingsdata->measuringunit}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="measuringunit" value="1" {if
                                                {$programsettingsdata->measuringunit}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> مدة الصلاحية </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="expiredate" value="0" {if
                                                {$programsettingsdata->expiredate}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="expiredate" value="1" {if
                                                {$programsettingsdata->expiredate}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> التصنيع </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="production" value="0" {if
                                                {$programsettingsdata->production}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="production" value="1" {if
                                                {$programsettingsdata->production}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> الوصف </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="description" value="0" {if
                                                {$programsettingsdata->description}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="description" value="1" {if
                                                {$programsettingsdata->description}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> الخدمة </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="service" value="0" {if
                                                {$programsettingsdata->service} eq
                                            0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="service" value="1" {if
                                                {$programsettingsdata->service} eq
                                            1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>



                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> التاريخ </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="date" value="0" {if {$programsettingsdata->date}
                                            eq 0}
                                            checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="date" value="1" {if {$programsettingsdata->date}
                                            eq 1}
                                            checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> الحد الادنى للمنتج </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="limitamount" value="0" {if
                                                {$programsettingsdata->limitamount}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="limitamount" value="1" {if
                                                {$programsettingsdata->limitamount}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>


                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> اظهار نسب المنتجات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="precentages" value="0" {if
                                                {$programsettingsdata->precentages}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="precentages" value="1" {if
                                                {$programsettingsdata->precentages}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> اظهار سعر الشراء الفعلى</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="realprice" value="0" {if
                                                {$programsettingsdata->realprice}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="realprice" value="1" {if
                                                {$programsettingsdata->realprice}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>


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

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

                            <!--                    <div class="form-group">
                                                  <label for="email" class="col-lg-2 control-label"> اللون </label>
                                                  <div class="col-lg-offset-2 col-lg-4">
                                                    <div class="radio-inline">
                                                        <div class="white-theme" data-style="0">
                                                            <label id="white" class="dark-color">ابيض</label>
                                                        </div>

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


                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اللون</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="colortype" class="colortype" value="0" {if
                                                {$programsettingsdata->colortype} eq 0} checked {/if}>
                                            ابيض </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="colortype" class="colortype" value="1" {if
                                                {$programsettingsdata->colortype} eq 1} checked {/if}>
                                            اسود </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="colortype" class="colortype" value="2" {if
                                                {$programsettingsdata->colortype} eq 2} checked {/if}>
                                            سماوى </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <!--label for="email" class="col-lg-2 control-label">رقم التسلسلي للعميل</label-->
                                <label for="email" class="col-lg-2 control-label">رقم الايصال بالمخازن </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="storeserial" value="1" {if
                                                {$programsettingsdata->storeserial}
                                            eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="storeserial" value="0" {if
                                                {$programsettingsdata->storeserial}
                                            eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>


                            <!--==============================-->
                            <div class="form-group">
                                <label for="currancy" class="col-lg-2 control-label">بديل كود العميل </label>
                                <div class="col-lg-4">
                                    <span id="sprytextfield7">
                                        <input type="text" name="clientcodname" id="clientcodname" class="form-control"
                                            value="{$programsettingsdata->clientcodname}" />
                                        <span class="textfieldRequiredMsg">***.</span></span>
                                </div>
                            </div>


                            <!--==============================-->
                            <!--==============================-->
                            <div class="form-group">
                                <label for="currancy" class="col-lg-2 control-label">اسم الوحده الاخرى </label>
                                <div class="col-lg-4">

                                    <input type="text" name="scunitname" id="scunitname" class="form-control"
                                        value="{$programsettingsdata->scunitname}" />

                                </div>
                            </div>


                            <!--==============================-->
                            <div class="form-group">
                                <!--label for="email" class="col-lg-2 control-label">رقم التسلسلي للعميل</label-->
                                <label for="email" class="col-lg-2 control-label">ملئ جميع بيانات العميل </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientfieldrequired" value="1" {if
                                                {$programsettingsdata->clientfieldrequired}
                                            eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientfieldrequired" value="0" {if
                                                {$programsettingsdata->clientfieldrequired}
                                            eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>



                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> نوع الكشف للعميل نقدى </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="nakdyKashf" value="1" {if
                                                {$programsettingsdata->nakdyKashf}
                                            eq 1} checked {/if}>
                                            نقدى بكشف </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="nakdyKashf" value="0" {if
                                                {$programsettingsdata->nakdyKashf}
                                            eq 0} checked {/if}>
                                            نقدى بدون كشف </label>
                                    </div>
                                </div>
                            </div>





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

                            <div class="form-group">
                                <label for="vatValue" class="col-lg-2 control-label">نسبة القيمة المضافة</label>
                                <div class="col-lg-4">
                                    <input type="text" name="vatValue" id="vatValue" class="form-control positivefloat"
                                        value="{$programsettingsdata->vatValue}" />
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اظهار زر مزامنة قاعدة البيانات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="syncstructure" value="0" {if
                                                {$programsettingsdata->
                                            syncstructure} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="syncstructure" value="1" {if
                                                {$programsettingsdata->
                                            syncstructure} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>


                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">عدد الساعات المضافة للتقارير</label>
                                <div class="col-lg-4">
                                    <input type="text" name="reportsPlusHours" id="reportsPlusHours"
                                        class="form-control positiveNo"
                                        value="{$programsettingsdata->reportsPlusHours}" />
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اظهار المخزون فى الصفحة الرئيسية
                                </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showM5zon" value="0" {if
                                                {$programsettingsdata->showM5zon}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showM5zon" value="1" {if
                                                {$programsettingsdata->showM5zon}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->

                            <!--==============================-->
                            <div class="form-group">
                                <label for="sumSameProductForStore" class="col-lg-2 control-label">تجميع المنتجات
                                    المتشابه مع
                                    بعضها للمخازن</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="sumSameProductForStore" value="1" {if
                                                {$programsettingsdata->sumSameProductForStore} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="sumSameProductForStore" value="0" {if
                                                {$programsettingsdata->sumSameProductForStore} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <!--end new fatma==============================-->

                            <div class="form-group">
                                <label for="clientDefaultDebtLimit" class="col-lg-2 control-label">قيمة حد الدين
                                    الافتراضى
                                    للعميل</label>
                                <div class="col-lg-4">
                                    <input type="text" name="clientDefaultDebtLimit" id="clientDefaultDebtLimit"
                                        class="form-control positivefloat" placeholder=""
                                        value="{$programsettingsdata->clientDefaultDebtLimit}" />
                                </div>
                                <div class="col-lg-6">
                                    <label class="control-label">
                                        <button id="affectAllClientDebtLimit" type="button"
                                            class="btn btn-primary pull-left">
                                            تنفيذ قيمة حد الدين الافتراضى على جميع العملاء
                                        </button>
                                        <input type="hidden" name="affectAllClientDebtLimit_h"
                                            id="affectAllClientDebtLimit_h" value="0" />
                                    </label>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="clientDefaultDebtLimitControl" class="col-lg-2 control-label">حد الدين
                                    الافتراضى
                                    للعميل</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientDefaultDebtLimitControl" value="0" {if
                                                {$programsettingsdata->clientDefaultDebtLimitControl} eq 0} checked
                                            {/if}>
                                            تعطيل </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientDefaultDebtLimitControl" value="1" {if
                                                {$programsettingsdata->clientDefaultDebtLimitControl} eq 1} checked
                                            {/if}>
                                            تفعيل </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">صورة البحث عن المنتج بالباركود</label>
                                <div class="col-lg-4"><img
                                        src="../views/default/images/upload/productbycodeimage/{$programsettingsdata->productbycodeimage}"
                                        alt="" width="122" height="75" />
                                    <input type="file" name="productbycodeimage" id="productbycodeimage"
                                        class="form-control" placeholder="الشعار" />
                                    <input type="hidden" name="oldproductbycodeimage" id="oldproductbycodeimage"
                                        value="{$programsettingsdata->productbycodeimage}" />
                                </div>
                            </div>
                            <!--==============================-->

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

                            <div class="form-group">
                                <label class="col-lg-2 control-label">سعر التاثير فى القيود (تكلفة البيع و المخزون)
                                </label>
                                <div class="col-lg-offset col-lg-9">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="dailyEntryCostprice" value="first" {if
                                                {$programsettingsdata->dailyEntryCostprice} eq
                                            "first"||empty($programsettingsdata->dailyEntryCostprice)} checked {/if}>
                                            سعر الشراء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="dailyEntryCostprice" value="last" {if
                                                {$programsettingsdata->dailyEntryCostprice} eq "last"} checked {/if}>
                                            اخر سعر شراء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="dailyEntryCostprice" value="last_discount" {if
                                                {$programsettingsdata->dailyEntryCostprice} eq "last_discount"} checked
                                            {/if}>
                                            اخر سعر شراء بعد الخصم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="dailyEntryCostprice" value="mean" {if
                                                {$programsettingsdata->dailyEntryCostprice} eq "mean"} checked {/if}>
                                            متوسط سعر الشراء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="dailyEntryCostprice" value="mean_discount" {if
                                                {$programsettingsdata->dailyEntryCostprice} eq "mean_discount"} checked
                                            {/if}>
                                            متوسط سعر الشراء بعد الخصم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="dailyEntryCostprice" value="tax" {if
                                                {$programsettingsdata->dailyEntryCostprice} eq "tax"} checked {/if}>
                                            اخر سعر شراء شامل القيمة المضافة </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="dailyEntryCostprice" value="mean_tax" {if
                                                {$programsettingsdata->dailyEntryCostprice} eq "mean_tax"} checked
                                            {/if}>
                                            متوسط سعر الشراء شامل القيمة المضافة </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="dailyEntryCostprice" value="generalPrice" {if
                                                {$programsettingsdata->dailyEntryCostprice} eq "generalPrice"} checked
                                            {/if}>
                                            المتوسط العام </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="dailyEntryCostprice" value="realBuyPrice" {if
                                                {$programsettingsdata->dailyEntryCostprice} eq "realBuyPrice"} checked
                                            {/if}>
                                            سعر الشراء الحقيقى </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label class="col-lg-2 control-label">تقييم المخزون</label>
                                <div class="col-lg-offset col-lg-9">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Inventoryevaluation" value="first" {if
                                                {$programsettingsdata->Inventoryevaluation} eq
                                            "first"||empty($programsettingsdata->Inventoryevaluation)} checked {/if}>
                                            سعر الشراء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Inventoryevaluation" value="last" {if
                                                {$programsettingsdata->Inventoryevaluation} eq "last"} checked {/if}>
                                            اخر سعر شراء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Inventoryevaluation" value="last_discount" {if
                                                {$programsettingsdata->Inventoryevaluation} eq "last_discount"} checked
                                            {/if}>
                                            اخر سعر شراء بعد الخصم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Inventoryevaluation" value="mean" {if
                                                {$programsettingsdata->Inventoryevaluation} eq "mean"} checked {/if}>
                                            متوسط سعر الشراء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Inventoryevaluation" value="mean_discount" {if
                                                {$programsettingsdata->Inventoryevaluation} eq "mean_discount"} checked
                                            {/if}>
                                            متوسط سعر الشراء بعد الخصم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Inventoryevaluation" value="tax" {if
                                                {$programsettingsdata->Inventoryevaluation} eq "tax"} checked {/if}>
                                            اخر سعر شراء شامل القيمة المضافة </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Inventoryevaluation" value="mean_tax" {if
                                                {$programsettingsdata->Inventoryevaluation} eq "mean_tax"} checked
                                            {/if}>
                                            متوسط سعر الشراء شامل القيمة المضافة </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Inventoryevaluation" value="generalPrice" {if
                                                {$programsettingsdata->Inventoryevaluation} eq "generalPrice"} checked
                                            {/if}>
                                            المتوسط العام </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Inventoryevaluation" value="realBuyPrice" {if
                                                {$programsettingsdata->Inventoryevaluation} eq "realBuyPrice"} checked
                                            {/if}>
                                            سعر الشراء الحقيقى </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label class="col-lg-2 control-label">تقييم الارباح</label>
                                <div class="col-lg-offset col-lg-9">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Profitevaluation" value="first" {if
                                                {$programsettingsdata->Profitevaluation} eq "first" ||
                                            empty($programsettingsdata->Inventoryevaluation)} checked {/if}>
                                            سعر الشراء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Profitevaluation" value="last" {if
                                                {$programsettingsdata->Profitevaluation}
                                            eq "last"} checked {/if}>
                                            اخر سعر شراء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Profitevaluation" value="last_discount" {if
                                                {$programsettingsdata->Profitevaluation} eq "last_discount"} checked
                                            {/if}>
                                            اخر سعر شراء بعد الخصم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Profitevaluation" value="mean" {if
                                                {$programsettingsdata->Profitevaluation}
                                            eq "mean"} checked {/if}>
                                            متوسط سعر الشراء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Profitevaluation" value="mean_discount" {if
                                                {$programsettingsdata->Profitevaluation} eq "mean_discount"} checked
                                            {/if}>
                                            متوسط سعر الشراء بعد الخصم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Profitevaluation" value="tax" {if
                                                {$programsettingsdata->Profitevaluation} eq "tax"} checked {/if}>
                                            اخر سعر شراء شامل القيمة المضافة </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Profitevaluation" value="mean_tax" {if
                                                {$programsettingsdata->Profitevaluation} eq "mean_tax"} checked
                                            {/if}>
                                            متوسط سعر الشراء شامل القيمة المضافة </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="Profitevaluation" value="generalPrice" {if
                                                {$programsettingsdata->Profitevaluation} eq "generalPrice"} checked
                                            {/if}>
                                            المتوسط العام </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->



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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">الاقساط</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="premiums" value="0" {if
                                                {$programsettingsdata->premiums}
                                            eq 0} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="premiums" value="1" {if
                                                {$programsettingsdata->premiums}
                                            eq 1} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="operationnumEdit" class="col-lg-2 control-label">السماح بتعديل رقم ايصال
                                    التحويل</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="operationnumEdit" value="0" {if
                                                {$programsettingsdata->operationnumEdit}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="operationnumEdit" value="1" {if
                                                {$programsettingsdata->operationnumEdit}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->


                            <div class="form-group">
                                <label for="operationnumEdit" class="col-lg-2 control-label">نسبه القسط او الفايد
                                </label>
                                <div class="col-lg-offset-2 col-lg-9">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="text" name="Fayedh_3"
                                                value="{$programsettingsdata->three_months}" style="width: 35px;">
                                            كل 3 شهور </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="text" name="Fayedh_6"
                                                value="{$programsettingsdata->six_months}" style="width: 35px;">
                                            كل 6 شهور </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="text" name="Fayedh_12"
                                                value="{$programsettingsdata->twelve_months}" style="width: 35px;">
                                            كل 12 شهر </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="text" name="Fayedh_18"
                                                value="{$programsettingsdata->eighteen_months}" style="width: 35px;">
                                            كل 18 شهر </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="text" name="Fayedh_24"
                                                value="{$programsettingsdata->twentyfour_months}" style="width: 35px;">
                                            كل 24 شهر </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="text" name="Fayedh_30"
                                                value="{$programsettingsdata->thirty_months}" style="width: 35px;">
                                            كل 30 شهر </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="text" name="Fayedh_36"
                                                value="{$programsettingsdata->sixthirty_months}" style="width: 35px;">
                                            كل 36 شهر </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="text" name="Fayedh_42"
                                                value="{$programsettingsdata->fortytwo_months}" style="width: 35px;">
                                            كل 42 شهر </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="text" name="Fayedh_48"
                                                value="{$programsettingsdata->fortyeight_months}" style="width: 35px;">
                                            كل 48 شهر </label>
                                    </div>

                                </div>
                            </div>
                            <!--==============================-->

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

                            <div class="form-group">
                                <label for="earlyrepayment" class="col-lg-2 control-label"> خصم السداد المبكر</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="earlyrepayment" value="1" {if
                                                {$programsettingsdata->earlyrepayment} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="earlyrepayment" value="0" {if
                                                {$programsettingsdata->earlyrepayment} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="unReviewBills" class="col-lg-2 control-label">السماح بالغاء مراجعة
                                    الفواتير</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="unReviewBills" value="0" {if
                                                {$programsettingsdata->
                                            unReviewBills} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="unReviewBills" value="1" {if
                                                {$programsettingsdata->
                                            unReviewBills} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

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

                            <div class="form-group" id="unReviewBillsPass_div" {if {$programsettingsdata->unReviewBills}
                                eq
                                1}style="display:none"{/if}>
                                <label for="unReviewBillsPass" class="col-lg-2 control-label">باسورد الغاء مراجعة
                                    الفواتير</label>
                                <div class="col-lg-4">{if {$programsettingsdata->unReviewBills} neq 1}<span
                                        id="unReviewBillsPassSpary">{/if}
                                        <input name="unReviewBillsPass" id="unReviewBillsPass" type="password"
                                            value="{$programsettingsdata->unReviewBillsPass}" class="form-control" />
                                        {if {$programsettingsdata->unReviewBills} neq 1}<span
                                            class="textfieldRequiredMsg">***.</span></span>{/if}</div>
                            </div>

                            <!--==============================-->
                            <div class="form-group">
                                <label for="billReviewNote" class="col-lg-2 control-label">ملحوظة مراجعة
                                    الفواتير</label>
                                <div class="col-lg-4">
                                    <input type="text" name="billReviewNote" id="billReviewNote" class="form-control"
                                        value="{$programsettingsdata->billReviewNote}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <!--==============================-->

                            <div class="form-group">
                                <label for="printSand" class="col-lg-2 control-label">نماذج طباعه سداد دين</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="printSand" value="0" {if {$programsettingsdata->
                                            printSand} eq 0} checked {/if}>
                                            نموذج 1 </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="printSand" value="1" {if {$programsettingsdata->
                                            printSand} eq 1} checked {/if}>
                                            نموذج 2 </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="printSand" value="2" {if {$programsettingsdata->
                                            printSand} eq 2} checked {/if}>
                                            نموذج 3 </label>
                                    </div>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="unReviewBills" class="col-lg-2 control-label">قيود اليومية</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="makeDailyEntry" value="1" {if
                                                {$programsettingsdata->
                                            makeDailyEntry} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="makeDailyEntry" value="0" {if
                                                {$programsettingsdata->
                                            makeDailyEntry} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group">
                                <label for="unReviewBills" class="col-lg-2 control-label">نظام الصايه </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="maintenance" value="1" {if {$programsettingsdata->
                                            maintenance} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="maintenance" value="0" {if {$programsettingsdata->
                                            maintenance} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="unReviewBills" class="col-lg-2 control-label">المورد عميل ايضا</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="suppIsClientToo" value="1" {if
                                                {$programsettingsdata->
                                            suppIsClientToo} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="suppIsClientToo" value="0" {if
                                                {$programsettingsdata->
                                            suppIsClientToo} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

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

                        </div>

                        <div class="tab-pane" id="print"><!-- start the 3rd tab -->

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">طباعة المخزن</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="saveprinting" value="1" {if
                                                {$programsettingsdata->
                                            saveprinting} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="saveprinting" value="0" {if
                                                {$programsettingsdata->
                                            saveprinting} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">طباعة الدين</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="deptprinting" value="0" {if
                                                {$programsettingsdata->
                                            deptprinting} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="deptprinting" value="1" {if
                                                {$programsettingsdata->
                                            deptprinting} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> طباعة فاتورة المشتريات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <!--                        <div class="radio-inline">
                                                              <label>
                                                                  <input type="radio" name="printingpapersize"  value="1" {if {$programsettingsdata->
                                                                printingpapersize} eq 1}  checked {/if}>
                                                                 A5 </label>

                                                            </div>-->

                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="printingpapersize" value="1" {if
                                                {$programsettingsdata->printingpapersize}
                                            eq 1} checked {/if}>
                                            <!--A5-->
                                            A4/A5
                                        </label>
                                        </div->

                                        <div class="radio-inline">
                                            <label>


                                                <input type="radio" name="printingpapersize" value="0" {if
                                                    {$programsettingsdata->printingpapersize} eq 0} checked {/if}>
                                                <!--A4  -->
                                                ريسيت
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            </div>

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

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> اظهار الكمية / الباركود فى الطباعة
                                </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="print_amount" value="0" {if
                                                {$programsettingsdata->print_amount}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="print_amount" value="1" {if
                                                {$programsettingsdata->print_amount}
                                            eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

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

                        </div>

                        <div class="tab-pane" id="bill"><!-- start the 4rd tab -->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">الفاتوره متسطره </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="rulers" value="1" {if {$programsettingsdata->
                                            rulers} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="rulers" value="0" {if {$programsettingsdata->
                                            rulers} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <!--label for="email" class="col-lg-2 control-label">رقم التسلسلي للعميل</label-->
                                <label for="email" class="col-lg-2 control-label">رقم التسلسلى داخل الفاتورة </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientserial" value="1" {if
                                                {$programsettingsdata->
                                            clientserial} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientserial" value="0" {if
                                                {$programsettingsdata->
                                            clientserial} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <!--label for="email" class="col-lg-2 control-label">رقم التسلسلي للعميل</label-->
                                <label for="email" class="col-lg-2 control-label">نسبة الخصم فى الطباعه </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="ratioshow" value="1" {if {$programsettingsdata->
                                            ratioshow} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="ratioshow" value="0" {if {$programsettingsdata->
                                            ratioshow} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <!--label for="email" class="col-lg-2 control-label">رقم التسلسلي للعميل</label-->
                                <label for="email" class="col-lg-2 control-label">اظهار باركودالمنتجات فى
                                    فاتورةالمبيعات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showparcode" value="1" {if {$programsettingsdata->
                                            showparcode} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showparcode" value="0" {if {$programsettingsdata->
                                            showparcode} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="sellorder" class="col-lg-2 control-label">امر بيع </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="sellorder" value="1" {if {$programsettingsdata->
                                            sellorder} eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="sellorder" value="0" {if {$programsettingsdata->
                                            sellorder} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> اظهار رقم الفاتورة فى العرض
                                    والتقارير </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="billid" value="0" {if
                                                {$programsettingsdata->billid} eq 0}
                                            checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="billid" value="1" {if
                                                {$programsettingsdata->billid} eq 1}
                                            checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> بائع / مندوب/ طبيب </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="delegate_seller" value="0" {if
                                                {$programsettingsdata->delegate_seller}
                                            eq 0} checked {/if}>
                                            بائع </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="delegate_seller" value="1" {if
                                                {$programsettingsdata->delegate_seller}
                                            eq 1} checked {/if}>
                                            مندوب </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="delegate_seller" value="2" {if
                                                {$programsettingsdata->delegate_seller}
                                            eq 2} checked {/if}>
                                            طبيب </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="valueadded" class="col-lg-2 control-label">اسعار المنتجات شاملة القيمة
                                    المضافه</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="valueadded" value="1" {if {$programsettingsdata->
                                            valueadded} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="valueadded" value="0" {if {$programsettingsdata->
                                            valueadded} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="valueadded" class="col-lg-2 control-label">اسعار المنتجات شاملة القيمة
                                    المضافه لفواتير الشراء</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="valueaddedbuy" value="1" {if
                                                {$programsettingsdata->
                                            valueaddedbuy} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="valueaddedbuy" value="0" {if
                                                {$programsettingsdata->
                                            valueaddedbuy} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="valueadded" class="col-lg-2 control-label">حساب القيمه المضافه مع الخصم
                                </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="valueaddeddiscount" value="1" {if
                                                {$programsettingsdata->
                                            valueaddeddiscount} eq 1} checked {/if}>
                                            قبل الخصم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="valueaddeddiscount" value="0" {if
                                                {$programsettingsdata->
                                            valueaddeddiscount} eq 0} checked {/if}>
                                            بعد الخصم </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> المبيعات والمردودات فى تقرير ربحية
                                    فواتير </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="sells_return" value="1" {if
                                                {$programsettingsdata->sells_return}
                                            eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="sells_return" value="0" {if
                                                {$programsettingsdata->sells_return}
                                            eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="productDays" class="col-lg-2 control-label">مسمي التعليق على العميل فى
                                    الفاتوره</label>
                                <div class="col-lg-4">
                                    <input type="text" name="commentClient" id="commentClient" class="form-control"
                                        placeholder="" value="{$programsettingsdata->commentClient}" />
                                    <span class="textfieldRequiredMsg">***.</span></span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> شحن / توصيل </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="delivery" value="0" {if
                                                {$programsettingsdata->delivery}
                                            eq 0} checked {/if}>
                                            شحن </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="delivery" value="1" {if
                                                {$programsettingsdata->delivery}
                                            eq 1} checked {/if}>
                                            توصيل </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">header نموذج طباعه 9</label>
                                <div class="col-lg-4"><img
                                        src="../views/default/images/upload/{$programsettingsdata->headerPrint}" alt=""
                                        width="122" height="75" />
                                    <input type="file" name="headerPrint" id="headerPrint" class="form-control"
                                        placeholder="header نموذج طباعه 9" />
                                    <input type="hidden" name="headerPrint" id="headerPrint"
                                        value="{$programsettingsdata->headerPrint}" />
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="imgprinthide" class="col-lg-2 control-label"> header نموذج طباعه 9 </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="imgprinthide" value="1" {if
                                                {$programsettingsdata->imgprinthide}
                                            eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="imgprinthide" value="0" {if
                                                {$programsettingsdata->imgprinthide}
                                            eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">لوجو الايصالات</label>
                                <div class="col-lg-4"><img
                                        src="../views/default/images/upload/{$programsettingsdata->headerPrintSand}"
                                        alt="" width="122" height="75" />
                                    <input type="file" name="headerPrintSand" id="headerPrintSand" class="form-control"
                                        placeholder="لوجو الايصالات" />
                                    <input type="hidden" name="headerPrintSand" id="headerPrintSand"
                                        value="{$programsettingsdata->headerPrintSand}" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> فواتير سيارات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="isCarBill" value="1" {if
                                                {$programsettingsdata->isCarBill}
                                            eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="isCarBill" value="0" {if
                                                {$programsettingsdata->isCarBill}
                                            eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> تعديل سعر شراء المنتج عند الشراء
                                </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="updateproductprice" value="0" {if
                                                {$programsettingsdata->updateproductprice}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="updateproductprice" value="1" {if
                                                {$programsettingsdata->updateproductprice}
                                            eq 1} checked {/if} >
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">تعديل اسعار البيع مع سعر الشراء فى فاتورة الشراء
                                </label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="changeBuyPriceChangeSellInBuyBillCtrl"
                                                id="changeBuyPriceChangeSellInBuyBillCtrl0" value="0" {if
                                                {$programsettingsdata->changeBuyPriceChangeSellInBuyBillCtrl} eq 0}
                                            checked {/if}>
                                            لا </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="changeBuyPriceChangeSellInBuyBillCtrl"
                                                id="changeBuyPriceChangeSellInBuyBillCtrl1" value="1" {if
                                                {$programsettingsdata->changeBuyPriceChangeSellInBuyBillCtrl} eq 1}
                                            checked {/if}>
                                            تحديث بقيمة الفرق </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="changeBuyPriceChangeSellInBuyBillCtrl"
                                                id="changeBuyPriceChangeSellInBuyBillCtrl2" value="2" {if
                                                {$programsettingsdata->changeBuyPriceChangeSellInBuyBillCtrl} eq 2}
                                            checked {/if}>
                                            تحديث بنسبة الفرق </label>
                                    </div>

                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> بحث بنوع التحصيل و تاريخ الاستحقاق
                                </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showBillCollectionSearch" value="0" {if
                                                {$programsettingsdata->showBillCollectionSearch}
                                            eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showBillCollectionSearch" value="1" {if
                                                {$programsettingsdata->showBillCollectionSearch}
                                            eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اظهار الاسعار السابقه للعملاء</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showPrevPrices" value="0" {if
                                                {$programsettingsdata->
                                            showPrevPrices} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showPrevPrices" value="1" {if
                                                {$programsettingsdata->
                                            showPrevPrices} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اظهار الخصومات السابقه للعملاء</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showPrevDiscount" value="1" {if
                                                {$programsettingsdata->
                                            showPrevDiscount} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showPrevDiscount" value="0" {if
                                                {$programsettingsdata->
                                            showPrevDiscount} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اظهار الاسعار السابقه للعملاء -
                                    مردود</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showPrevPricesRet" value="0" {if
                                                {$programsettingsdata->
                                            showPrevPricesRet} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showPrevPricesRet" value="1" {if
                                                {$programsettingsdata->
                                            showPrevPricesRet} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اظهار الخصومات السابقه للعملاء -
                                    مردود</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showPrevDiscountRet" value="1" {if
                                                {$programsettingsdata->
                                            showPrevDiscountRet} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showPrevDiscountRet" value="0" {if
                                                {$programsettingsdata->
                                            showPrevDiscountRet} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اظهار سعر الشراء فى القائمة المنسدلة
                                    للمنتجات </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showBuyPriceAtProductddl" value="1" {if
                                                {$programsettingsdata->
                                            showBuyPriceAtProductddl} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showBuyPriceAtProductddl" value="0" {if
                                                {$programsettingsdata->
                                            showBuyPriceAtProductddl} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">اضافة عميل مبسط </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="simpleAddClientInBill" value="0" {if
                                                {$programsettingsdata->
                                            simpleAddClientInBill} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="simpleAddClientInBill" value="1" {if
                                                {$programsettingsdata->
                                            simpleAddClientInBill} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">بحث بالباركود </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="searchBarcodeInBill" value="0" {if
                                                {$programsettingsdata->
                                            searchBarcodeInBill} eq 0} checked {/if}>
                                            العادى اولا </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="searchBarcodeInBill" value="1" {if
                                                {$programsettingsdata->
                                            searchBarcodeInBill} eq 1} checked {/if}>
                                            مقاسات والوان اولا</label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">الفاتورة ترسل للمطعم </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="sendBillToRestaurant" value="0" {if
                                                {$programsettingsdata->
                                            sendBillToRestaurant} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="sendBillToRestaurant" value="1" {if
                                                {$programsettingsdata->
                                            sendBillToRestaurant} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">حساب سعر المنتج مع وحدات القياس </label>
                                <div class="col-lg-offset-2 col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="defaultUnitPriceAtBill" value="0" {if
                                                {$programsettingsdata->
                                            defaultUnitPriceAtBill} eq 0} checked {/if}>
                                            الوحدة الاساسية مضروبة فى عدد الوحدات </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="defaultUnitPriceAtBill" value="1" {if
                                                {$programsettingsdata->
                                            defaultUnitPriceAtBill} eq 1} checked {/if}>
                                            سعر وحدة القياس المختارة </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">استخدام سعر اللستة </label>
                                <div class="col-lg-offset-2 col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="useListPrice" value="0" {if
                                                {$programsettingsdata->
                                            useListPrice} eq 0} checked {/if}>
                                            لا</label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="useListPrice" value="1" {if
                                                {$programsettingsdata->
                                            useListPrice} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="noOfDecimalPlaces" class="col-lg-2 control-label">تقريب اجمالى الفاتورة
                                    لاقرب رقم صحيح</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="roundnumbersbilltotal" value="0" {if
                                                {$programsettingsdata->
                                            roundnumbersbilltotal} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="roundnumbersbilltotal" value="1" {if
                                                {$programsettingsdata->
                                            roundnumbersbilltotal} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group" id="noOfDecimalPlacesBillTotal_div" {if {$programsettingsdata->
                                roundnumbersbilltotal} neq
                                1}style="display:none"{/if}>
                                <label for="noOfDecimalPlaces" class="col-lg-2 control-label">عدد الخانات العشرية
                                    لاجمالى الفاتورة</label>
                                <div class="col-lg-4"><span id="noOfDecimalPlacesBillTotalSpray">
                                        <input name="noOfDecimalPlacesBillTotal" id="noOfDecimalPlacesBillTotal"
                                            type="text" value="{$programsettingsdata->noOfDecimalPlacesBillTotal}"
                                            class="form-control positiveNo" />
                                        <span class="textfieldRequiredMsg">***.</span><span
                                            class="textfieldInvalidFormatMsg">مسموح بارقام فقط</span></span>
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group">
                                <label for="noOfDecimalPlaces" class="col-lg-2 control-label">تليفون العميل
                                    اجبارى</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientPhoneReq" value="1" {if
                                                {$programsettingsdata->
                                            clientPhoneReq} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="clientPhoneReq" value="0" {if
                                                {$programsettingsdata->
                                            clientPhoneReq} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="noOfDecimalPlaces" class="col-lg-2 control-label">اضافة الخدمات الى فواتير
                                    المبيعات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="addServiceToBill" value="0" {if
                                                {$programsettingsdata->
                                            addServiceToBill} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="addServiceToBill" value="1" {if
                                                {$programsettingsdata->
                                            addServiceToBill} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="noOfDecimalPlaces" class="col-lg-2 control-label">عرض الحالة في عرض فواتير
                                    المبيعات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showbillstatus" value="1" {if $programsettingsdata->showbillstatus eq 1} checked {/if}/>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showbillstatus" value="0" {if
                                                {$programsettingsdata->showbillstatus} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="noOfDecimalPlaces" class="col-lg-2 control-label">عرض تاريخ التسليم في عرض فواتير
                                    المبيعات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showbilldeliverydate" value="1" {if
                                                {$programsettingsdata->showbilldeliverydate} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showbilldeliverydate" value="0" {if
                                                {$programsettingsdata->showbilldeliverydate} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="tab-pane" id="optics"><!-- start the 5rd tab -->
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> اختيار العميل فى فاتورة البصاريات /
                                    كشف </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="nakdyOnly" value="1" {if
                                                {$programsettingsdata->nakdyOnly}
                                            eq 1} checked {/if}>
                                            نقدى فقط </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="nakdyOnly" value="0" {if
                                                {$programsettingsdata->nakdyOnly}
                                            eq 0} checked {/if}>
                                            نقدى وعملاء </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> اختيار العميل فى فاتورة البصاريات /
                                    كشف </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="nakdyOnly" value="1" {if
                                                {$programsettingsdata->nakdyOnly}
                                            eq 1} checked {/if}>
                                            نقدى فقط </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="nakdyOnly" value="0" {if
                                                {$programsettingsdata->nakdyOnly}
                                            eq 0} checked {/if}>
                                            نقدى وعملاء </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> الخصم فى صف منتج البصاريات </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="discount_pres_direct" value="1" {if
                                                {$programsettingsdata->discount_pres_direct} eq 1} checked {/if}>
                                            نسبة </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="discount_pres_direct" value="0" {if
                                                {$programsettingsdata->discount_pres_direct} eq 0} checked {/if}>
                                            مباشر </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> الخصم العام بصاريات </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="general_discount" value="1" {if
                                                {$programsettingsdata->general_discount}
                                            eq 1} checked {/if}>
                                            اظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="general_discount" value="0" {if
                                                {$programsettingsdata->general_discount}
                                            eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">بصريات</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="isOpticProg" value="0" {if {$programsettingsdata->
                                            isOpticProg} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="isOpticProg" value="1" {if {$programsettingsdata->
                                            isOpticProg} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>


                        </div>

                        <div class="tab-pane" id="restur"><!-- start the 3rd tab -->
                            <div class="form-group">
                                <label for="printfoot" class="col-lg-2 control-label">حقوق النشر</label>
                                <div class="col-lg-4">
                                    <textarea class="form-control" name="printfoot" rows="2"
                                        cols="50">{$programsettingsdata->printfoot}</textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="Stores" class="col-lg-2 control-label">مخزن كافتريات - مطعم</label>
                                <div class="col-lg-4">
                                    <select class="select2" name="restaurantStoreId" id="restaurantStoreId">
                                        <option></option>
                                        {foreach $allStores as $data}
                                        <option value="{$data->storeId}" {if $programsettingsdata->restaurantStoreId ==
                                            $data->storeId}selected="selected"{/if}>{$data->storeName}
                                        </option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="restuarantPrintTimeout" class="col-lg-2 control-label">طباعة المطبخ كل "كم
                                    ثانية"</label>
                                <div class="col-lg-4">
                                    <input type="text" name="restuarantPrintTimeout" id="restuarantPrintTimeout"
                                        class="form-control positiveNo" placeholder=""
                                        value="{$programsettingsdata->restuarantPrintTimeout}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="isCafe" class="col-lg-2 control-label">البرنامج لـ</label>
                                <div class="col-lg-4">
                                    <label class="sr-only">
                                        <input type="checkbox" id="isCafe" name="isCafe" value="1" {if
                                            $programsettingsdata->isCafe}
                                        checked="checked" {/if}>
                                        كافيه
                                    </label>
                                    <label class="sr-only">
                                        <input type="checkbox" id="isRestaurent" name="isRestaurent" value="1" {if
                                            $programsettingsdata->isRestaurent} checked="checked" {/if}>
                                        مطعم
                                    </label>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="isCafe" class="col-lg-2 control-label"> حقل الكميه</label>
                                <div class="col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="quantitynew" value="1" {if {$programsettingsdata->
                                            quantitynew} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="quantitynew" value="0" {if {$programsettingsdata->
                                            quantitynew} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>

                            <!--==============================-->
                            <div class="form-group">
                                <label for="numberprint" class="col-lg-2 control-label">الطباعه</label>
                                <div class="col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="numberprint" value="0" {if {$programsettingsdata->
                                            numberprint} eq 0} checked {/if}>
                                            طباعه 1 </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="numberprint" value="1" {if {$programsettingsdata->
                                            numberprint} eq 1} checked {/if}>
                                            طباعه 2 </label>
                                    </div>
                                </div>
                            </div>



                            <div class="form-group">
                                <label for="thereIsRestTax" class="col-lg-2 control-label">يوجد ضريبة "مطاعم"</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline" style="float: right;">
                                        <label>
                                            <input type="radio" name="thereIsRestTax" class="thereIsRestTax" value="1"
                                                {if {$programsettingsdata->thereIsRestTax} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline" style="float: right;">
                                        <label>
                                            <input type="radio" name="thereIsRestTax" class="thereIsRestTax" value="0"
                                                {if {$programsettingsdata->thereIsRestTax} eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                    <div style="display: inline;" id="restTaxValDiv">
                                        <div class="col-lg-2" style="display: inline;">
                                            <span id="sprytextfield8">
                                                <input type="text" name="restTaxVal" id="restTaxVal"
                                                    class="form-control positivefloat" placeholder=""
                                                    value="{$programsettingsdata->restTaxVal}" />
                                                <span class="textfieldRequiredMsg">***.</span></span>
                                        </div>
                                        <div style="display: inline;">%</div>
                                    </div>
                                </div>

                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="taxNameFlag" class="col-lg-2 control-label">اسم الضريبة</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="taxNameFlag" value="1" {if
                                                {$programsettingsdata->taxNameFlag}
                                            eq 1} checked {/if}>
                                            خدمة </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="taxNameFlag" value="0" {if
                                                {$programsettingsdata->taxNameFlag}
                                            eq 0} checked {/if}>
                                            ضريبة </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="taxNameFlag" class="col-lg-2 control-label">تعديل الخدمه </label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="editservice" value="1" {if
                                                {$programsettingsdata->editservice}
                                            eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="editservice" value="0" {if
                                                {$programsettingsdata->editservice}
                                            eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="taxNameFlag" class="col-lg-2 control-label">اظهار السيريال</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showserial" value="1" {if
                                                {$programsettingsdata->showserial}
                                            eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showserial" value="0" {if
                                                {$programsettingsdata->showserial}
                                            eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="restPrintLang" class="col-lg-2 control-label">طباعة المطعم</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="restPrintLang" class="restPrintLang" value="1" {if
                                                {$programsettingsdata->restPrintLang} eq 1} checked {/if}>
                                            English </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="restPrintLang" class="restPrintLang" value="0" {if
                                                {$programsettingsdata->restPrintLang} eq 0} checked {/if}>
                                            عربى </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="restPrintLang" class="col-lg-2 control-label">فى حالة التيك اواى</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="takeAwayClient" class="takeAwayClient" value="0"
                                                {if {$programsettingsdata->takeAwayClient} eq 0} checked {/if}>
                                            اخفاء العميل </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="takeAwayClient" class="takeAwayClient" value="1"
                                                {if {$programsettingsdata->takeAwayClient} eq 1} checked {/if}>
                                            اظهار العميل </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">تطبق الخدمة على </label>
                                <div class="col-lg-4">
                                    <label class="sr-only">
                                        <input type="checkbox" id="delivery" name="delivery" value="-2" {if "-2"|in_array:$programsettingsdata->restaurantServiceOn}checked{/if}>
                                        دليفرى
                                    </label>

                                    <label class="sr-only">
                                        <input type="checkbox" id="takeAway" name="takeAway" value="-1" {if "-1"|in_array:$programsettingsdata->restaurantServiceOn}checked{/if}>
                                        تيك أواى
                                    </label>

                                    <label class="sr-only">
                                        <input type="checkbox" id="hall" name="hall" value="1" {if "1"|in_array:$programsettingsdata->restaurantServiceOn}checked{/if}>
                                        صالة
                                    </label>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="ClientShowTawla" class="col-lg-2 control-label">امكانيه اختيار العميل في
                                    فاتوره طوله</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="ClientShowTawla" value="0" {if
                                                {$programsettingsdata->
                                            clientShowTawla} eq 0} checked {/if}>
                                            اخفاء </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="ClientShowTawla" value="1" {if
                                                {$programsettingsdata->
                                            clientShowTawla} eq 1} checked {/if}>
                                            اظهار</label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="billRest" class="col-lg-2 control-label">اختيار نوع فاتوره المطاعم</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="billRest" value="1" {if {$programsettingsdata->
                                            billRest} eq 1} checked {/if}>
                                            فاتوره 1 </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="billRest" value="2" {if {$programsettingsdata->
                                            billRest} eq 2} checked {/if}>
                                            فاتوره 2</label>
                                    </div>
                                </div>
                            </div>


                        </div>
                        <div class="tab-pane" id="product"><!-- start the 3rd tab -->
                            <!--==============================-->

                            <div class="form-group">
                                <label for="productDays" class="col-lg-2 control-label">عدد الايام الافتراضى للبحث فى
                                    صلاحية
                                    المنتج</label>
                                <div class="col-lg-4">
                                    <input type="text" name="productDays" id="productDays"
                                        class="form-control positiveNo" placeholder=""
                                        value="{$programsettingsdata->productDays}" />
                                </div>
                            </div>
                            <!--==============================-->

                            <div class="form-group">
                                <label for="parcodeDigits" class="col-lg-2 control-label">عدد خانات الباركود</label>
                                <div class="col-lg-4">
                                    <input type="text" name="parcodeDigits" id="parcodeDigits"
                                        class="form-control positiveNo" placeholder=""
                                        value="{$programsettingsdata->parcodeDigits}" />
                                </div>
                                <!--                                <div class="col-lg-6">
                                                                    <label class="control-label">
                                                                        <span style="color:red">ملحوظة :</span> فى حالة تغيير عدد خانات الباركود سوف تتغير
                                                                        الباركود القديم
                                                                    </label>
                                                                     لان لو زودنا الخانات وكنا مستخدمين باركود مكنش موجود فى الفايل ممكن يحصل تكرار للباركود وكده كده الباركود بتغير يعنى مثلا 001 غير 000001
                                                                </div>-->
                            </div>
                            <div class="form-group">
                                <label for="parcodeDigits" class="col-lg-2 control-label">عدد خانات المقاس
                                    واللون</label>
                                <div class="col-lg-4">
                                    <input type="text" name="sizecolorDigits" id="sizecolorDigits"
                                        class="form-control positiveNo" placeholder=""
                                        value="{$programsettingsdata->sizecolorDigits}" />
                                </div>
                                <div class="col-lg-6">
                                    <label class="control-label">
                                        <span style="color:red">ملحوظة :</span> فى حالة تغيير عدد خانات الباركود سوف
                                        تتغير
                                        الباركود القديم لمنتج المقاسات و الالوان
                                    </label>
                                    <!-- لان لو زودنا الخانات وكنا مستخدمين باركود مكنش موجود فى الفايل ممكن يحصل تكرار للباركود وكده كده الباركود بتغير يعنى مثلا 001 غير 000001 -->
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="specializedParcodeDigits" class="col-lg-2 control-label">عدد خانات الباركود
                                    المتخصص</label>
                                <div class="col-lg-4">
                                    <input type="text" name="specializedParcodeDigits" id="specializedParcodeDigits"
                                        class="form-control positiveNo" placeholder=""
                                        value="{$programsettingsdata->specializedParcodeDigits}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="usedParcode" class="col-lg-2 control-label">الباركود المستخدم </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="usedParcode" value="0" {if
                                                {$programsettingsdata->usedParcode}
                                            eq 0} checked {/if}>
                                            العادى </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="usedParcode" value="1" {if
                                                {$programsettingsdata->usedParcode}
                                            eq 1} checked {/if}>
                                            المتخصص الجديد</label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">تعديل اسعار البيع مع سعر الشراء </label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="changeBuyPriceChangeSellInProductCtrl" value="0"
                                                {if {$programsettingsdata->changeBuyPriceChangeSellInProductCtrl} eq 0}
                                            checked {/if}>
                                            لا </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="changeBuyPriceChangeSellInProductCtrl" value="1"
                                                {if {$programsettingsdata->changeBuyPriceChangeSellInProductCtrl} eq 1}
                                            checked {/if}>
                                            تحديث بقيمة الفرق </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="changeBuyPriceChangeSellInProductCtrl" value="2"
                                                {if {$programsettingsdata->changeBuyPriceChangeSellInProductCtrl} eq 2}
                                            checked {/if}>
                                            تحديث بنسبة الفرق </label>
                                    </div>

                                </div>
                            </div>
                            <!-----------------------Eman----------------------------------->
                            <div class="form-group">
                                <label for="editAllPrice" class="col-lg-2 control-label">تعديل جميع اسعار المنتج مع
                                    تعديل سعر
                                    الجملة </label>
                                <div class="col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="editAllPrice" value="1" {if
                                                {$programsettingsdata->editAllPrice}
                                            eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="editAllPrice" value="0" {if
                                                {$programsettingsdata->editAllPrice}
                                            eq 0} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">تعديل اسعار وحدات المنتج مع تعديل اسعاره </label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="updateProUnitPricesOnPriceUpdate" value="0" {if
                                                {$programsettingsdata->updateProUnitPricesOnPriceUpdate} eq 0} checked
                                            {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="updateProUnitPricesOnPriceUpdate" value="1" {if
                                                {$programsettingsdata->updateProUnitPricesOnPriceUpdate} eq 1} checked
                                            {/if}>
                                            لا </label>
                                    </div>


                                </div>
                            </div>
                            
                            <!--==============Show more prices for products================-->
                            <div class="form-group">
                                <label for="showpriceall" class="col-lg-2 control-label">إظهار سعر جملة</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showpriceall" value="1" {if {$programsettingsdata->showpriceall} eq 1} checked {/if}>
                                            إظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showpriceall" value="0" {if {$programsettingsdata->showpriceall} eq 0} checked {/if}>
                                            إخفاء</label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="showpricehalf" class="col-lg-2 control-label">إظهار سعر نصف جملة</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showpricehalf" value="1" {if {$programsettingsdata->showpricehalf} eq 1} checked {/if}>
                                            إظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showpricehalf" value="0" {if {$programsettingsdata->showpricehalf} eq 0} checked {/if}>
                                            إخفاء</label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="showpriceunit" class="col-lg-2 control-label">إظهار سعر التجزئة</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showpriceunit" value="1" {if {$programsettingsdata->showpriceunit} eq 1} checked {/if}>
                                            إظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showpriceunit" value="0" {if {$programsettingsdata->showpriceunit} eq 0} checked {/if}>
                                            إخفاء</label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="showprice4" class="col-lg-2 control-label">إظهار سعر 4</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice4" value="1" {if {$programsettingsdata->
                                            showprice4} eq 1} checked {/if}>
                                            إظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice4" value="0" {if {$programsettingsdata->
                                            showprice4} eq 0} checked {/if}>
                                            إخفاء</label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="showprice5" class="col-lg-2 control-label">إظهار سعر 5</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice5" value="1" {if
                                                $programsettingsdata->showprice5 eq 1} checked {/if}>
                                            إظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice5" value="0" {if {$programsettingsdata->
                                            showprice5} eq 0} checked {/if}>
                                            إخفاء</label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="showprice6" class="col-lg-2 control-label">إظهار سعر 6</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice6" value="1" {if {$programsettingsdata->
                                            showprice6} eq 1} checked {/if}>
                                            إظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice6" value="0" {if {$programsettingsdata->
                                            showprice6} eq 0} checked {/if}>
                                            إخفاء</label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="showprice7" class="col-lg-2 control-label">إظهار سعر 7</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice7" value="1" {if {$programsettingsdata->
                                            showprice7} eq 1} checked {/if}>
                                            إظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice7" value="0" {if {$programsettingsdata->
                                            showprice7} eq 0} checked {/if}>
                                            إخفاء</label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="showprice8" class="col-lg-2 control-label">إظهار سعر 8</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice8" value="1" {if {$programsettingsdata->
                                            showprice8} eq 1} checked {/if}>
                                            إظهار </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showprice8" value="0" {if {$programsettingsdata->
                                            showprice8} eq 0} checked {/if}>
                                            إخفاء</label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->



                        </div>


                        <div class="tab-pane" id="store"><!-- start the 3rd tab -->
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-3 control-label">عرض تفاصيل مخزن الى فى التحويل بين المخازن
                                </label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showStoreToDetail" value="1" {if
                                                {$programsettingsdata->showStoreToDetail} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showStoreToDetail" value="0" {if
                                                {$programsettingsdata->showStoreToDetail} eq 0} checked {/if}>
                                            لا </label>
                                    </div>


                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="unReviewBills" class="col-lg-3 control-label">التحويل بين المخازن</label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="storeRecieveType" value="0" {if
                                                {$programsettingsdata->
                                            storeRecieveType} eq 0} checked {/if}>
                                            مباشر </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="storeRecieveType" value="1" {if
                                                {$programsettingsdata->
                                            storeRecieveType} eq 1} checked {/if}>
                                            عن طريق مخزن وسيط </label>
                                    </div>
                                </div>
                            </div>
                            <!--==============================-->
                        </div>
                        <div class="tab-pane" id="parcodePrint"><!-- start the 3rd tab -->

                            <div class="form-group">
                                <label class="col-lg-2 control-label">نوع الباركود</label>
                                <div class="col-lg-4">
                                    <select class="select2" name="parcodeprinttype" id="parcodeType">
                                        <option value="I25" {if $programsettingsdata->parcodeprinttype ==
                                            "I25"}selected="selected"{/if}>I25
                                        <option value="C39" {if $programsettingsdata->parcodeprinttype ==
                                            "C39"}selected="selected"{/if}>C39
                                        <option value="C128A" {if $programsettingsdata->parcodeprinttype == "C128A" ||
                                            empty($programsettingsdata->parcodeprinttype)}selected="selected"{/if}>C128A
                                        <option value="C128B" {if $programsettingsdata->parcodeprinttype ==
                                            "C128B"}selected="selected"{/if}>C128B
                                        <option value="C128C" {if $programsettingsdata->parcodeprinttype ==
                                            "C128C"}selected="selected"{/if}>C128C
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="parcodewidth" class="col-lg-2 control-label">عرض طباعة الباركود</label>
                                <div class="col-lg-4">
                                    <input type="text" name="parcodeprintwidth" id="parcodeprintwidth"
                                        class="form-control positiveNo"
                                        value="{$programsettingsdata->parcodeprintwidth}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="parcodewidth" class="col-lg-2 control-label">حجم الخط</label>
                                <div class="col-lg-4">
                                    <input type="text" name="parcodeprinttextsize" id="parcodeprinttextsize"
                                        class="form-control positiveNo"
                                        value="{$programsettingsdata->parcodeprinttextsize}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label for="parcodewidth" class="col-lg-2 control-label">العملة</label>
                                <div class="col-lg-4">
                                    <input type="text" name="parcodeprintCurr" id="parcodeprintCurr"
                                        class="form-control" value="{$programsettingsdata->parcodeprintCurr}" />
                                </div>
                            </div>
                            <!--==============================-->


                        </div>
                        <div class="tab-pane" id="objyRoyal"><!-- start the 3rd tab -->

                            <div class="form-group">
                                <label class="col-lg-2 control-label">مجموعات مستخدمين الصيدلية</label>
                                <div class="col-lg-4">
                                    <select multiple name="obgyPharmacyGroups[]" id="obgyPharmacyGroups"
                                        class="select2 wdt100">
                                        {foreach $userGroups as $group}
                                        <option value="{$group->usergroupid}" {if $group->
                                            usergroupid|in_array:$programsettingsdata->obgyPharmacyGroups}selected{/if}>{$group->usergroupname}
                                        </option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">البحث بنوع عملية الفاتورة فى تقرير الفواتير
                                </label>
                                <div class="col-lg-6">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showBillOperationSearch" value="1" {if
                                                {$programsettingsdata->showBillOperationSearch} eq 1} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="showBillOperationSearch" value="0" {if
                                                {$programsettingsdata->showBillOperationSearch} eq 0} checked {/if}>
                                            لا </label>
                                    </div>


                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">اسم الفولدر</label>
                                <div class="col-lg-4">
                                    <input type="text" name="obygyFolder" id="obygyFolder" class="form-control"
                                        value="{$programsettingsdata->obygyFolder}" />
                                </div>
                            </div>
                            <!--==============================-->

                        </div>

                        {if $userID == -1}
                        <div class="tab-pane" id="EBill"><!-- start the 3rd tab -->
                            <!--  <div class="form-group">
                                 <label class="col-lg-2 control-label">وحدة القياس الضريبية</label>
                                 <div class="col-lg-4">
                                     <input type="hidden" name="eunitInTax" id="unitInTax" >
                                     <input type="hidden" id="eunitInTaxval"  value="{$programsettingsdata->eunitInTax}">
                                 </div>
                             </div>
                            -->

                            <!--==============================-->
                            <div class="well well-sm modfywall">
                                <div class="form-group ">
                                    <label class="col-lg-3 control-label">معلومات</label>
                                </div>
                            </div>
                            <!--==============================-->


                            <div class="form-group">
                                <label class="col-lg-2 control-label"> اسم الشركة مثل البطاقة الضريبية</label>
                                <div class="col-lg-4">
                                    <input type="text" name="eCompanyNameInTaxCard" id="eCompanyNameInTaxCard"
                                        class="form-control" value="{$eBillSetting->eCompanyNameInTaxCard}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">الرقم الضريبى</label>
                                <div class="col-lg-4">
                                    <input type="text" name="eTaxNum" id="eTaxNum" class="form-control"
                                        value="{$eBillSetting->eTaxNum}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">نوع الفاتوره </label>
                                <div class="col-lg-4">
                                    <select class="select2" name="typebill" id="typebill">
                                        <option></option>
                                        <option value="P" {if $programsettingsdata->typebill ==
                                            "P"}selected="selected"{/if}>فردى (P)</option>
                                        <option value="B" {if $programsettingsdata->typebill ==
                                            "B"}selected="selected"{/if}>أعمال (B)</option>
                                        <option value="F" {if $programsettingsdata->typebill ==
                                            "F"}selected="selected"{/if}>أجنبى (F)</option>
                                    </select>
                                </div>
                            </div>
                            <!--      <div class="form-group">
                                    <label class="col-lg-2 control-label">النوع  الضرائب</label>
                                    <div class="col-lg-4">
                                        <input type="hidden" name="eTaxType" id="eTaxType">
                                        <input type="hidden" id="oldeTaxType" value="{$eBillSetting->eTaxType}">
                                    </div>
                                </div> -->
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label">رقم نوع النشاط فى الضرائب</label>
                                <div class="col-lg-4">
                                    <input type="hidden" name="eTaxTypeNum" id="eTaxTypeNum">
                                    <input type="hidden" id="oldETaxTypeNum" value="{$eBillSetting->eTaxTypeNum}">
                                </div>
                            </div>
                            <!--==============================-->





                            <!--==============================-->
                            <div class="well well-sm modfywall">
                                <div class="form-group ">
                                    <label class="col-lg-3 control-label">تفاصيل العنوان</label>
                                </div>
                            </div>
                            <!--==============================-->




                            <div class="form-group">
                                <label class="col-lg-2 control-label"> رقم الفرع فى الضرائب</label>
                                <div class="col-lg-4">
                                    <input type="text" name="eTaxNumBranch" id="eTaxNumBranch" class="form-control"
                                        value="{$eBillSetting->eTaxNumBranch}" />
                                </div>
                            </div>
                            <!--==============================-->
                            <div class="form-group">
                                <label class="col-lg-2 control-label"> المحافظة</label>
                                <div class="col-lg-4">
                                    <input type="text" name="eGovernorate" id="eGovernorate" class="form-control"
                                        value="{$eBillSetting->eGovernorate}" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label"> المنطقة / المدينة</label>
                                <div class="col-lg-4">
                                    <input type="text" name="eCity" id="eCity" class="form-control"
                                        value="{$eBillSetting->eCity}" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label"> الشارع</label>
                                <div class="col-lg-4">
                                    <input type="text" name="eStreet" id="eStreet" class="form-control"
                                        value="{$eBillSetting->eStreet}" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label"> رقم المبنى</label>
                                <div class="col-lg-4">
                                    <input type="text" name="eBuildingNum" id="eBuildingNum" class="form-control"
                                        value="{$eBillSetting->eBuildingNum}" />
                                </div>
                            </div>
                            <!--==============================-->




                        </div>
                        {/if}
                        <div class="tab-pane " id="transfersell">
                            <div class="form-group">
                                <label for="databasefrom" class="col-lg-2 control-label">تاريخ اخر فاتوره </label>
                                <div class="col-lg-4">
                                    {$transfersell->transfertoday}
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="databasefrom" class="col-lg-2 control-label">من قاعدة البيانات </label>
                                <div class="col-lg-4">
                                    <input type="text" name="databasefrom" id="databasefrom" class="form-control"
                                        placeholder="" value="{$transfersell->databasefrom}" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="faxnumber" class="col-lg-2 control-label"> الى قاعدة البيانات </label>
                                <div class="col-lg-4">
                                    <input type="text" name="databaseto" id="databaseto" class="form-control"
                                        placeholder="" value="{$transfersell->databaseto}" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="faxnumber" class="col-lg-2 control-label"> القيمة </label>
                                <div class="col-lg-4">
                                    <input type="text" name="transfervalue" id="transfervalue"
                                        class="form-control positivefloat" value="{$transfersell->transfervalue}" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="faxnumber" class="col-lg-2 control-label"> التاريخ</label>
                                <div class="col-lg-4">
                                    <input type="text" class="form-control awdatepicker" autocomplete="off"
                                        data-date-format="yyyy-mm-dd" id="transferdate" value="{$today}">
                                </div>
                            </div>
                            <button type="button" id="transfersellbtn" class="btn btn-primary">حفظ النقل</button>
                        </div>



                        <div class="tab-pane " id="specialProjects">
                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label">التطوير العقاري</label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="realestatedev" value="0" {if
                                                {$programsettingsdata->
                                            realestatedev} eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="realestatedev" value="1" {if
                                                {$programsettingsdata->
                                            realestatedev} eq 1} checked {/if}>
                                            لا </label>
                                    </div>
                                </div>
                            </div>


                            <div class="form-group">
                                <label for="email" class="col-lg-2 control-label"> انشاء المشروعات الخيريه </label>
                                <div class="col-lg-offset-2 col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="projectshownew" value="0" {if
                                                {$programsettingsdata->projectshownew}
                                            eq 0} checked {/if}>
                                            نعم </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input type="radio" name="projectshownew" value="1" {if
                                                {$programsettingsdata->projectshownew}
                                            eq 1} checked {/if} >
                                            لا </label>
                                    </div>
                                </div>
                            </div>



                        </div>




                        <!--<div class="form-group">
                          <label for="email" class="col-lg-2 control-label">عرض سعر البيع السابق للعميل</label>
                          <div class="col-lg-offset-2 col-lg-4">
                            <div class="radio-inline">
                              <label>
                                <input type="radio" name="previousPrice"  value="0" {if {$programsettingsdata->
                                showPreviousPrice} eq 0}  checked {/if}>
                                نعم </label>
                            </div>
                            <div class="radio-inline">
                              <label>
                                <input type="radio" name="previousPrice"  value="1" {if {$programsettingsdata->
                                showPreviousPrice} eq 1}  checked {/if}>
                                لا </label>
                            </div>
                          </div>
                        </div>



                        <div class="form-group">
                          <label for="email" class="col-lg-2 control-label"> البركود </label>
                          <div class="col-lg-offset-2 col-lg-4">
                            <div class="radio-inline">
                              <label>
                                <input type="radio" name="parcode"  value="0" {if {$programsettingsdata->
                                parcode} eq 0}  checked {/if}>
                                نعم </label>
                            </div>
                            <div class="radio-inline">
                              <label>
                                <input type="radio" name="parcode"  value="1" {if {$programsettingsdata->
                                parcode} eq 1}  checked {/if}>
                                لا </label>
                            </div>
                          </div>
                        </div>


                        <div class="form-group">
                          <label for="email" class="col-lg-2 control-label"> الاسعار </label>
                          <div class="col-lg-offset-2 col-lg-4">
                            <div class="radio-inline">
                              <label>
                                <input type="radio" name="priceing"  value="0" {if {$programsettingsdata->
                                priceing} eq 0}  checked {/if}>
                                نعم </label>
                            </div>
                            <div class="radio-inline">
                              <label>
                                <input type="radio" name="priceing"  value="1" {if {$programsettingsdata->
                                priceing} eq 1}  checked {/if}>
                                لا </label>
                            </div>
                          </div>
                        </div>


                        -->


                        <!--<div class="form-group">
                          <label for="email" class="col-lg-2 control-label"> اتاحه المسح النهائى </label>
                          <div class="col-lg-offset-2 col-lg-4">
                            <div class="radio-inline">
                              <label>
                          <input type="radio" name="allowfinsldelete"  value="0" {if {$programsettingsdata->allowfinsldelete} eq 0}  checked {/if}>
                                نعم </label>
                            </div>
                            <div class="radio-inline">
                              <label>
                <input type="radio" name="allowfinsldelete"  value="1" {if {$programsettingsdata->allowfinsldelete} eq 1}  checked {/if} >
                                لا </label>
                            </div>
                          </div>
                        </div>

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

                        <!--<div class="form-group">
                          <label for="email" class="col-lg-2 control-label">الغاء الاسعار الخاصه بعملاء عن تغير سعر شراء المنتج </label>
                          <div class="col-lg-offset-2 col-lg-4">
                            <div class="radio-inline">
                              <label>
                          <input type="radio" name="updateclientprice"  value="0" {if {$programsettingsdata->updateclientprice} eq 0}  checked {/if}>
                                نعم </label>
                            </div>
                            <div class="radio-inline">
                              <label>
                <input type="radio" name="updateclientprice"  value="1" {if {$programsettingsdata->updateclientprice} eq 1}  checked {/if} >
                                لا </label>
                            </div>
                          </div>
                        </div>


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

                        <!--<div class="form-group">
                          <label for="email" class="col-lg-2 control-label">  تفعيل نسخة طرفية </label>
                          <div class="col-lg-offset-2 col-lg-4">
                            <div class="radio-inline">
                              <label>
                          <input type="radio" name="copytype"  value="1" {if {$copytype} eq 1}  checked {/if}>
                                نعم </label>
                            </div>
                            <div class="radio-inline">
                              <label>
                <input type="radio" name="copytype"  value="0" {if {$copytype} eq 0}  checked {/if} >
                                لا </label>
                            </div>
                          </div>
                        </div>

                        <!--==============================-->
                        <!--<div class="form-group">
                          <label for="email" class="col-lg-2 control-label">اضافة رابط السرفر</label>
                          <div class="col-lg-4">
                            <input type="text" name="urlcopy" id="urlcopy" class="form-control" placeholder="اضافة رابط السرفر" value="{$programsettingsdata->urlcopy}" />
                          </div>
                        </div>

                        <!--==============================-->
                        <!--==============================-->
                        <!--<div class="form-group">
                          <label for="email" class="col-lg-2 control-label">اضافة رابط المحلي</label>
                          <div class="col-lg-4">
                            <input type="text" name="internalcopy" id="internalcopy" class="form-control" placeholder="اضافة رابط المحلي" value="{$programsettingsdata->internalcopy}" />
                          </div>
                        </div>






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


                        <input type="hidden" name="programsettingsid" id="programsettingsid"
                            value="{$programsettingsdata->programsettingsid}">

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

                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-4">
                                <button name="btnAdd" type="submit" id="btnAdd" class="btn btn-primary pull-left">حفظ
                                </button>
                            </div>
                        </div>
                </form>

            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript">
    var name = new Spry.Widget.ValidationTextField("name");

    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "integer");
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "integer");
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "integer");
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "integer");
    var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6");
    var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7");
    var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8");
    var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9");
    var noOfDecimalPlacesSpary = new Spry.Widget.ValidationTextField("noOfDecimalPlacesSpary", "integer");
    var noOfDecimalPlacesBillTotalSpray = new Spry.Widget.ValidationTextField("noOfDecimalPlacesSpary", "integer");
    var unReviewBillsPassSpary = new Spry.Widget.ValidationTextField("unReviewBillsPassSpary");
    $(".thereIsRestTax").live('change', function () {
        var val = $(this).val();
        if (val == "1") {
            $('#restTaxValDiv').show();
            sprytextfield8.destroy();
            sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8");
        } else {
            $('#restTaxValDiv').hide();
            $('#restTaxVal').val("");
            sprytextfield8.destroy();
        }
    });
    //
    $("[name='updateproductprice']").live('change', function () {
        var val = $("[name='updateproductprice']:checked").val();
        if (val == "1") {
            $('#changeBuyPriceChangeSellInBuyBillCtrl0').attr('checked', 'checked');
            $("[name='changeBuyPriceChangeSellInBuyBillCtrl']").attr('disabled', 'disabled');
        } else {
            $("[name='changeBuyPriceChangeSellInBuyBillCtrl']").removeAttr('disabled');
        }
    });
    $("[name='updateproductprice']").first().change();
    //
    $("[name='roundnumbers']").live('change', function () {
        var val = $(this).val();
        if (val == "1") {
            $('#noOfDecimalPlaces_div').show();
            noOfDecimalPlacesSpary.destroy();
            noOfDecimalPlacesSpary = new Spry.Widget.ValidationTextField("noOfDecimalPlacesSpary", "integer");
        } else {
            $('#noOfDecimalPlaces_div').hide();
            $('#noOfDecimalPlaces').val("0");
            noOfDecimalPlacesSpary.destroy();
        }
    });
    $("[name='roundnumbersbilltotal']").live('change', function () {
        var val = $(this).val();
        if (val == "1") {
            $('#noOfDecimalPlacesBillTotal_div').show();
            noOfDecimalPlacesBillTotalSpray.destroy();
            noOfDecimalPlacesBillTotalSpray = new Spry.Widget.ValidationTextField("noOfDecimalPlacesSpary", "integer");
        } else {
            $('#noOfDecimalPlacesBillTotal_div').hide();
            $('#noOfDecimalPlacesBillTotal').val("0");
            noOfDecimalPlacesBillTotalSpray.destroy();
        }
    });
    $("[name='unReviewBills']").live('change', function () {
        var val = $(this).val();
        if (val == "0") {
            $('#unReviewBillsPass_div').show();
            unReviewBillsPassSpary.destroy();
            unReviewBillsPassSpary = new Spry.Widget.ValidationTextField("unReviewBillsPassSpary");
        } else {
            $('#unReviewBillsPass_div').hide();
            $('#unReviewBillsPass').val("");
            unReviewBillsPassSpary.destroy();
        }
    });
    $("#noOfDecimalPlaces").live('keyup', function () {
        var val = Number($(this).val());
        if (val > 5) {
            $('#noOfDecimalPlaces').val("5");
        }
    });
    $(document).ready(function () {

        $(".thereIsRestTax:checked").trigger('change');

        $('#affectAllClientDebtLimit').on('click', function () {
            var txt;
            var r = confirm("سيتم حفظ البيانات والتنفيذ الان .هل انت متأكد ؟");
            if (r == true) {
                $('#affectAllClientDebtLimit_h').val(1);
                $('#btnAdd').click();
            }
        });
    });


    $(function () {
        $("#unitInTax").select2({
            placeholder: "اختر",
            minimumInputLength: 0, // document.getElementById("searchvalue").value,
            multiple: false,
            quietMillis: 100,
            ajax: {
                url: "eBillRequests.php?do=unit-types",
                dataType: 'json',
                data: function (term) {
                    return {
                        term: term, //search term
                    };
                },
                results: function (data) {
                    return { results: data };
                }
            },
            formatResult: function (data) {
                return data.text;
            },
            initSelection: function (element, callback) {
                var item = element.val().split(':');
                //  var data = {id: item[0], text: item[1]};
                var data = { id: item[0], text: item[1] };
                callback(data);
            },
            //dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
        });
        //this is needed for ajax =>to obtain id from it  and use in ajax
        $('#unitInTax').select2('data', { id: $('#eunitInTaxval').val(), text: $('#eunitInTaxval').val() });
    });


    $(function () {
        $("#eTaxTypeNum").select2({
            placeholder: "اختر",
            minimumInputLength: 0, // document.getElementById("searchvalue").value,
            multiple: false,
            quietMillis: 100,
            ajax: {
                url: "eBillRequests.php?do=activity",
                dataType: 'json',
                data: function (term, page) {
                    return {
                        term: term, //search term
                    };
                },
                results: function (data) {
                    return { results: data };
                }
            },
            formatResult: function (data) {
                return data.text;
            },
            initSelection: function (element, callback) {
                var item = element.val().split(':');
                //  var data = {id: item[0], text: item[1]};
                var data = { id: item[0], text: item[1] };
                callback(data);
            },
            //dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
        });
        //this is needed for ajax =>to obtain id from it  and use in ajax
        $('#eTaxTypeNum').select2('data', { id: $('#oldETaxTypeNum').val(), text: $('#oldETaxTypeNum').val() });



        $("#eTaxType").select2({
            placeholder: "اختر",
            minimumInputLength: 0, // document.getElementById("searchvalue").value,
            multiple: false,
            quietMillis: 100,
            ajax: {
                url: "eBillRequests.php?do=tax-types",
                dataType: 'json',
                data: function (term, page) {
                    return {
                        term: term, //search term
                    };
                },
                results: function (data) {
                    return { results: data };
                }
            },
            formatResult: function (data) {
                return data.text;
            },
            initSelection: function (element, callback) {
                var item = element.val().split(':');
                //  var data = {id: item[0], text: item[1]};
                var data = { id: item[0], text: item[1] };
                callback(data);
            },
            //dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
        });
        //this is needed for ajax =>to obtain id from it  and use in ajax
        $('#eTaxType').select2('data', { id: $('#oldeTaxType').val(), text: $('#oldeTaxType').val() });
    });

    $('body').on('click', '#transfersellbtn', function () {

        $("#transfersellbtn").prop('disabled', true);
        var databasefrom = $("#databasefrom").val().trim();
        var databaseto = $("#databaseto").val().trim();
        var transfervalue = $("#transfervalue").val().trim();
        if (databasefrom.length > 0 && databaseto.length > 0 && transfervalue > 0) {

            $.post('transfersellAjaxController.php?do=transfersell', { databasefrom: databasefrom, databaseto: databaseto, transfervalue: transfervalue }, function (data) {
                // if (data == 1) {
                //   alert('تم النقل بنجاح');
                // } else {
                //    alert('هناك مشكله اثناء التنفيذ');
                // }
                $("#transfersellbtn").prop('disabled', false);
            });
        } else {
            $("#transfersellbtn").prop('disabled', false);
            alert('يجب ادخل كل البيانات');
        }
    });
</script>
{/literal}