<?php /* Smarty version Smarty-3.1.11, created on 2024-07-15 17:46:39
         compiled from "..\views\default\policyview\add.html" */ ?>
<?php /*%%SmartyHeaderCode:79756695445feea4b8-53322325%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'ae9bd9b67ceb068db5eb3c7eb64f94a99422d178' => 
    array (
      0 => '..\\views\\default\\policyview\\add.html',
      1 => 1717494942,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '79756695445feea4b8-53322325',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'today' => 0,
    'currency' => 0,
    'shippercompaniesData' => 0,
    'shippercompanies' => 0,
    'Programsettingdata' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6695445ff22618_69996265',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6695445ff22618_69996265')) {function content_6695445ff22618_69996265($_smarty_tpl) {?><div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="policyController.php?do=show">بوليصة الشحن</a></li>
            <li class="active">اضافة بوليصة</li>
        </ol>


        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">اضافة بوليصة</h3>
            </div>
            <div class="panel-body">

                <form class="form-horizontal" action="policyController.php?do=add" method="post">
                    <div class="form-group">
                        <label for="invoicenumber" class="col-lg-2 control-label"> رقم الفاتوره </label>
                        <div class="col-lg-4">
                            <input type="text" name="invoicenumber" id="invoicenumber" class="form-control"
                                placeholder="رقم الفاتوره " required="" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="policyName" class="col-lg-2 control-label"> عدد الطرود</label>
                        <div class="col-lg-4"><span id="sprytextfield1">
                                <input type="text" name="policyName" id="policyName" class="form-control"
                                    placeholder="عدد الطرود" />
                                <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">ادخل
                                    رقم مناسب.</span></span>


                        </div>
                    </div>

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


                    <div class="form-group">
                        <label for="policyNum" class="col-lg-2 control-label">رقم البوليصة</label>
                        <div class="col-lg-4">
                            <span id="sprytextfield2">
                                <input type="text" name="policyNum" id="policyNum" class="form-control numberinput"
                                    placeholder="رقم البوليصة" />
                                <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">ادخل
                                    الرقم صحيح</span></span>
                        </div>
                    </div>

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



                    <div class="form-group">
                        <label for="policyDate" class="col-lg-2 control-label">التاريخ</label>
                        <div class="col-lg-4">
                            <span id="sprytextfield3">
                                <input type="text" name="policyDate" id="policyDate" class="form-control awdatepicker"
                                    autocomplete="off" data-date-format="yyyy-mm-dd" value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
"
                                    placeholder="التاريخ" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>

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


                    <div class="form-group">
                        <label for="policyCost" class="col-lg-2 control-label">سعر البوليصة</label>
                        <div class="col-lg-4">


                            <div class="input-group">
                                <span id="sprytextfield4">
                                    <input type="text" name="policyCost" id="policyCost"
                                        class="form-control numberinput" placeholder="سعر البوليصة" />
                                    <span class="textfieldRequiredMsg">*</span><span
                                        class="textfieldInvalidFormatMsg">ادخل السعر صحيح</span></span>

                                <span class="input-group-addon"><?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</span>
                            </div>


                        </div>
                    </div>
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="type" class="col-lg-2 control-label">التاثير فى الخزنة الان</label>
                        <div class="col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" id="affectSave" name="affectSave" value="0" checked>
                                    نعم
                                </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" id="affectSave" name="affectSave" value="1">
                                    لا
                                </label>
                            </div>
                        </div>
                    </div>


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




                    <div class="form-group">
                        <label for="companyId" class="col-lg-2 control-label">شركة الشحن</label>
                        <div class="col-lg-4">

                            <span id="spryselect1">
                                <select class="select2 wdt100" name="companyId" id="companyId">
                                    <option value="-1">اختر شركة</option>

                                    <?php  $_smarty_tpl->tpl_vars['shippercompanies'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['shippercompanies']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['shippercompaniesData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['shippercompanies']->key => $_smarty_tpl->tpl_vars['shippercompanies']->value){
$_smarty_tpl->tpl_vars['shippercompanies']->_loop = true;
?>

                                    <option value="<?php echo $_smarty_tpl->tpl_vars['shippercompanies']->value->companyId;?>
"><?php echo $_smarty_tpl->tpl_vars['shippercompanies']->value->companyName;?>

                                    </option>
                                    <?php } ?>

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

                        </div>
                    </div>

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


                    <div class="form-group">
                        <label for="policyType" class="col-lg-2 control-label">نوع البوليصة</label>
                        <div class="col-lg-4">
                            <span id="spryselect2">
                                <select name="policyType" id="policyType" class="select2 wdt100">
                                    <option value="-1">اختر النوع</option>
                                    <option value="1">ذهاب</option>
                                    <option value="2">عودة</option>
                                </select>
                                <span class="selectInvalidMsg">*</span></span>
                        </div>
                    </div>
                    <!-- =================================================   -->

                    <div class="form-group">
                        <label for="type" class="col-lg-2 control-label">النوع</label>
                        <div class="col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" class="senderType" id="cusType" name="type" value="1">
                                    عملاء
                                </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" class="senderType" id="supType" name="type" value="2">
                                    موردين
                                </label>
                            </div>
                        </div>
                    </div>

                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="SenderName" class="col-lg-2 control-label">الاسم</label>
                        <div id="SenderNameDiv">
                            <div class="col-lg-4"><span id="spryselect3">
                                    <select id="" name="" data-placeholder="اختر اسم" class="select2 wdt100"
                                        tabindex="3">
                                        <option value="-1">اختر اسم</option>
                                    </select>
                                    <span class="selectInvalidMsg">*</span>
                                    <span class="selectRequiredMsg">*</span></span>
                                <!--<span id="sprytextfield5">
                            <input type="text" name="SenderName" id="SenderName" class="form-control" placeholder="اسم الراسل" />
                          <span class="textfieldRequiredMsg">*</span></span>-->
                            </div>
                        </div>
                        <input type="hidden" name="SenderId" id="SenderId" value="">
                        <input type="hidden" name="SenderName" id="SenderName" value="">
                        <div id="cDiv" class="hidden">
                            <input type="hidden" id="clientsearchvalue"
                                value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->clientsearchvalue;?>
" />
                            <div class="col-lg-4"><span id="sprytextfield6">
                                    <div id="clientDiv">
                                        <input type="hidden" name="clientid" id="clientid"
                                            class="select2Client wdt100 sender" />
                                    </div>
                                    <span class="textfieldRequiredMsg">*</span>
                                </span>
                                <input type="hidden" id="oldclientid" />
                                <input type="hidden" id="oldclientname" />
                            </div>
                        </div>
                        <div id="sDiv" class="hidden">
                            <input type="hidden" id="clientsearchvalue"
                                value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->clientsearchvalue;?>
" />
                            <div class="col-lg-4"><span id="sprytextfield7">
                                    <div id="suppDiv">
                                        <input type="hidden" name="suppid" id="suppid"
                                            class="select2Supp wdt100 sender" />
                                    </div>
                                    <span class="textfieldRequiredMsg">*</span>
                                </span>
                            </div>
                            <input type="hidden" id="oldsuppid" />
                            <input type="hidden" id="oldsuppname" />
                        </div>
                    </div>





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

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="submit" class="btn btn-primary pull-left" id="submtBtn">حفظ الامر</button>
                        </div>
                    </div>




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




    </div>
</div>





<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "real");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "integer");
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "real");
    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", { isRequired: false, invalidValue: "-1" });
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");

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

    var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3", { invalidValue: "-1" });

    $(".senderType").on('change', function () {
        var val = $('input[name="type"]:checked').val();
        if (val == 1 || val == 2) {
            spryselect3.destroy();
        }
        $('#SenderName').val();
        $('#SenderId').val();
    });
</script>

<?php }} ?>