<?php /* Smarty version Smarty-3.1.11, created on 2025-12-30 20:00:51
         compiled from "..\views\default\partnerwithdrawalview\show.html" */ ?>
<?php /*%%SmartyHeaderCode:15941695413537f2cb7-96386743%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f81b6642311babae808c11304cddf4b7d8b52a95' => 
    array (
      0 => '..\\views\\default\\partnerwithdrawalview\\show.html',
      1 => 1752437506,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '15941695413537f2cb7-96386743',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'message' => 0,
    'youtubes' => 0,
    'outputString' => 0,
    'partnerData' => 0,
    'partner' => 0,
    'saveData' => 0,
    'save' => 0,
    'bank' => 0,
    'data' => 0,
    'totalall' => 0,
    'currency' => 0,
    'partnerwithdrawalData' => 0,
    'partnerwithdrawal' => 0,
    'i' => 0,
    'partnertransferbetweenData' => 0,
    'partnertransferbetween' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_69541353b44095_39625269',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_69541353b44095_39625269')) {function content_69541353b44095_39625269($_smarty_tpl) {?>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="partnerController.php?do=show">الشركاء</a></li>
            <li class="active">عرض الشركاء</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->

            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;">عرض الشركاء <br />
                    <?php if ($_smarty_tpl->tpl_vars['message']->value!=''){?>
                    <?php echo $_smarty_tpl->tpl_vars['message']->value;?>

                    <?php }?></h3>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[6]->url;?>
" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="partnerwithdrawalController.php" class="hidden-print"><input type="button"  id="submit" style="margin-left: 12px" class="btn btn-primary pull-left " value="إضافة جديد"/></a>
            </div>


            <div class="panel-body">
                <div id="outputString" class="alert alert-block alert-success fade in hidden-print" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p id="outputStringValue"><?php echo $_smarty_tpl->tpl_vars['outputString']->value;?>
</p>
                    <div class="clearfix"></div>
                </div>
                <form class="form-inline hidden-print" action="partnerwithdrawalController.php?do=show" method="post">
                    <div class="form-group">
                        <label class="sr-only">الشريك</label>
                        <select class="select2 wdt100"  name="partnerid" id="partnerid">
                            <option value="-1">اختر شريك</option>


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


                            <option value="<?php echo $_smarty_tpl->tpl_vars['partner']->value->partnerid;?>
"><?php echo $_smarty_tpl->tpl_vars['partner']->value->partnername;?>
</option>


                            <?php } ?>


                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">الخزنة</label>
                        <select class="select2 wdt100" name="saveid" id="saveid" >
                            <option value="-1">اختر خزنة</option>


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


                            <option value="<?php echo $_smarty_tpl->tpl_vars['save']->value->saveid;?>
"><?php echo $_smarty_tpl->tpl_vars['save']->value->savename;?>
</option>


                            <?php } ?>


                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">البنك</label>
                        <select class="select2 wdt100" name="bankid" id="bankid" >
                            <option value="-1">اختر البنك</option>


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


                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->bankid;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->bankname;?>
</option>


                            <?php } ?>


                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">الحساب</label>
                        <select class="select2 wdt100" name="bankaccountid"  id="bankaccountid">
                            <option></option>
                        </select>
                    </div>

                    <div class="form-group">
                        <div class="radio-inline">
                            <label>
                                <input type="radio" name="partenrwithdrawaltype" id="partenrwithdrawaltype1" value="0" checked="checked" >
                                ايداع </label>
                        </div>
                        <div class="radio-inline">
                            <label>
                                <input type="radio" name="partenrwithdrawaltype" id="partenrwithdrawaltype2" value="1"  checked="checked"  >
                                سحب </label>
                        </div>

                        <div class="radio-inline">
                            <label>
                                <input type="radio" name="partenrwithdrawaltype" id="totalvalue" value="2"  checked="checked" >
                                ايداع / سحب </label>
                        </div>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label class="sr-only">من التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="from" >
                    </div>
                    <div class="form-group">
                        <label class="sr-only">إلى التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd" name="to" >
                    </div>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
            </div>
            <hr/>

            <!-- Table -->
            
            <form method="post" action="partnerwithdrawalController.php?do=executeOperation" onsubmit="if (Spry.Widget.Form.validate(this)) {
                        return countChoosenProducts('partnerwithdrawalController');
                    } else {
                        return false;
                    }">
                
                <div class="clearfix"></div>
                <div class="col-lg-offset-8 col-lg-4">

                    <div class="well well-sm">
                        <h4 class="text-center">الاجمالى <?php echo $_smarty_tpl->tpl_vars['totalall']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</h4>
                    </div>


                </div>
                <div class="clearfix"></div>
                <table class="table table-black">
                    <thead>
                        <tr>
                            <th class="hidden-print">
                                <input type="checkbox" name="checkAll" id="checkAll" />
                            </th>
                            <th>اسم الشريك</th>
                            <th>الخزنة / البنك</th>
                            <th> قيمه السحب / الايداع</th>
                            <th> نوع العمليه</th>
                            <th> قيمة الشريك قبل</th>
                            <th> قيمةالشريك بعد</th>
                            <th>التاريخ</th>
                            <th>التعليق</th>
                            <th class="hidden-print">قيد اليومية</th>
                            <th class="hidden-print">تعديل</th>
                            <th class="hidden-print">ايقاف</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php  $_smarty_tpl->tpl_vars['partnerwithdrawal'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['partnerwithdrawal']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['partnerwithdrawalData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['partnerwithdrawal']->key => $_smarty_tpl->tpl_vars['partnerwithdrawal']->value){
$_smarty_tpl->tpl_vars['partnerwithdrawal']->_loop = true;
?>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->conditions;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==1){?>
                        <tr class="danger"> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->conditions;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==0){?>

                        <tr><?php }}?>
                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partenrwithdrawaltype;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==1){?>
                        <tr style="background-color: aliceblue;" ><?php }?>
                            <td class="hidden-print">
                                <input type="checkbox" name="choosedItem[]" id="checked<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" class="choosenItem" value="<?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partnerwithdrawalid;?>
" />

                            </td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partnername;?>
</td>
                            <td>
                                <?php if ($_smarty_tpl->tpl_vars['partnerwithdrawal']->value->saveid>0){?>
                                <?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->savename;?>

                                <?php }else{ ?>
                                <?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->bankname;?>
 / <?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->accountname;?>

                                <?php }?>
                            </td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partnerwithdrawalvalue;?>
</td>
                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partenrwithdrawaltype;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==1){?>
                            <td>سحب</td>
                            <?php }else{ ?>
                            <td>ايداع</td>
                            <?php }?>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partnerbefore;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partnerafter;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partnerwithdrawaldate;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->comment;?>
</td>
                            <td class="hidden-print"> <a href="dailyentry.php?id=<?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->dailyentryid;?>
" target="_blank" type="button" class="btn btn-default btn-lg editicon"></a> </td>
                            <td class="hidden-print"> <a href="partnerwithdrawalController.php?do=edit&partnerwithdrawalid=<?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partnerwithdrawalid;?>
" type="button" class="btn btn-default btn-lg editicon"></a> </td>
                            <td class="hidden-print"> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->conditions;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0){?> <a href="partnerwithdrawalController.php?do=tempdelete&partnerwithdrawalid=<?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partnerwithdrawalid;?>
&action=<?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->dailyentryid;?>
" type="button" class="btn btn-default btn-lg removeicon"></a> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->conditions;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==1){?> <a href="partnerwithdrawalController.php?do=returndelete&partnerwithdrawalid=<?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->partnerwithdrawalid;?>
&action=<?php echo $_smarty_tpl->tpl_vars['partnerwithdrawal']->value->dailyentryid;?>
" type="button" class="btn btn-default btn-lg correcticon"></a> <?php }}?> </td>
                        </tr>
                        <?php } ?>




                    </tbody>

                    <thead style="background:#ccc">
                        <tr>
                            <th class="hidden-print">
                                <input type="checkbox" name="checkAll" id="checkAll" />
                            </th>
                            <th>من  شريك   </th>
                            <th>الى  شريك   </th>
                            <th> قيمه </th>
                            <th> نوع العمليه</th>
                            <th> قيمة الشريك قبل</th>
                            <th> قيمةالشريك بعد</th>
                            <th>التاريخ</th>
                            <th>التعليق</th>

                            <th class="hidden-print">قيد اليومية</th>
                            <th class="hidden-print">ايقاف</th>
                            <th class="hidden-print">اضافة</th>
                        </tr>
                    </thead>
                    <tbody>

                        <?php  $_smarty_tpl->tpl_vars['partnertransferbetween'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['partnertransferbetween']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['partnertransferbetweenData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['partnertransferbetween']->key => $_smarty_tpl->tpl_vars['partnertransferbetween']->value){
$_smarty_tpl->tpl_vars['partnertransferbetween']->_loop = true;
?>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->conditions;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==1){?>
                        <tr class="danger"> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->conditions;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?>

                        <tr ><?php }}?>
                            <td class="hidden-print">
                                <input type="checkbox" class="choosenItem" value="<?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partnertransferbetweenid;?>
" />

                            </td>

                            <td><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partneridformname;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partneridtoname;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partnervalue;?>
</td>
                            <td>تحويل بين الشركاء</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partnerfrombefore;?>
 / <?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partnertobefore;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partnerfromafter;?>
  / <?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partnertoafter;?>
 </td>

                            <td><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partnerdate;?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->comment;?>
</td>

                            <!-- <td class="hidden-print"> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->conditions;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==0){?> <a href="partnerTransferBetweenController.php?do=edit&partnertransferbetweenid=<?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partnertransferbetweenid;?>
" type="button" class="btn btn-default btn-lg editicon"></a><?php }else{ ?> محذوف <?php }?>  </td> -->
                            <td class="hidden-print"> <a href="dailyentry.php?id=<?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->dailyentryid;?>
" target="_blank" type="button" class="btn btn-default btn-lg editicon"></a> </td>
                            <td class="hidden-print"> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->conditions;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==0){?> <a href="partnerTransferBetweenController.php?do=tempdelete&partnertransferbetweenid=<?php echo $_smarty_tpl->tpl_vars['partnertransferbetween']->value->partnertransferbetweenid;?>
" type="button" class="btn btn-default btn-lg removeicon"></a> <?php }else{ ?> محذوف <?php }?> </td>

                            <td><a href="partnerTransferBetweenController.php" target="_blank" type="button" class="btn btn-default btn-lm ">+</a></td>
                        </tr>
                        <?php } ?>



                    </tbody>

                </table>

                <div class="clearfix"></div>
                <hr />
                <div  class="hidden-print">
                    <div class="col-lg-12">
                        <div class="well well-sm">
                            <div class="form-group">
                                <div class="col-lg-4">
                                    <label for="operation"></label>
                                    <span id="spryselect1">
                                        <select name="operation" id="operation"  data-placeholder="اختر العملية" 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">
                                <div class="col-lg-4">
                                    <input name=""  class="hidden-print btn btn-primary" type="submit" value="تنفيذ"/>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <div id="noElementsError" class="alert alert-danger fade in" style="display:none;">
                                <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button>
                                <p>يجب اختيار العناصر أولاً</p>
                                <div class="clearfix"></div>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </form>
        </div>

    </div>

    <div  class="hidden-print">
        <div class="col-lg-12">
            <div class="form-group">
                <div class="col-lg-4">
                    <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right">طباعة</button>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</div>

<script type="text/javascript">
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired: false, invalidValue: "-1"});
    $("#bankid").live('change', function () {
        var id = $(this).val();
        $.post("projectControllerAjax.php?do=getbankaccount", {id: id}, function (data) {
            $("#bankaccountid").html(data);
        });
    });
</script>
<?php }} ?>