<?php /* Smarty version Smarty-3.1.11, created on 2025-02-22 22:21:35
         compiled from "../views/default/clientReportsview/clientShowbure.html" */ ?>
<?php /*%%SmartyHeaderCode:140533411967ba31cf166424-97226988%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '3c33bd3aab7491da9ec2eb871028176c45375bbf' => 
    array (
      0 => '../views/default/clientReportsview/clientShowbure.html',
      1 => 1740000156,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '140533411967ba31cf166424-97226988',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'message' => 0,
    'youtubes' => 0,
    'clientData' => 0,
    'client' => 0,
    'shownData' => 0,
    'data' => 0,
    'totalsum' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67ba31cf2b2c41_72212609',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67ba31cf2b2c41_72212609')) {function content_67ba31cf2b2c41_72212609($_smarty_tpl) {?><?php if (!is_callable('smarty_function_math')) include '/home/gt4it/public_html/motawee/public/libs/plugins/function.math.php';
?><div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">التقارير</a></li>
            <li class="active">كشف حساب عميل</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading ">
                <div class=" hidden-print">كشف حساب عميل </div>
                <?php if ($_smarty_tpl->tpl_vars['message']->value!=''){?>
                <?php echo $_smarty_tpl->tpl_vars['message']->value;?>

                <?php }?>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[129]->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-inline hidden-print" action="clientReportsnewController.php?do=clientShowbure"
                    method="post">
                    <div class="form-group">
                        <label class="sr-only">العميل</label>
                        <select class="select2 wdt300" name="clientid" id="clientid">
                            <option value="-1">اختر عميل</option>


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


                            <option value="<?php echo $_smarty_tpl->tpl_vars['client']->value->clientid;?>
"><?php echo $_smarty_tpl->tpl_vars['client']->value->clientname;?>
</option>


                            <?php } ?>



                        </select>

                    </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 class="table billtable table-bordered table-black">
                <thead>

                    <tr>
                        <th>التاريخ</th>
                        <th>رقم الفاتوره</th>
                        <th>اسم العملية </th>

                        <th class="hidden-print">التفاصيل </th>
                        <th>الرصيد السابق</th>
                        <th>قيمة المنتجات المباعة بالفاتورة </th>

                        <th> باقى الدين</th>
                        <th>قيمة المرتجع </th>
                        <th>الخصم </th>
                        <th>المدفوع</th>
                        <!--th>قيمه التغير</th-->
                        <th>المتبقى </th>




                    </tr>
                </thead>
                <tbody>
                    <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(0, null, 0);?>
                    <?php $_smarty_tpl->tpl_vars['k'] = new Smarty_variable(0, null, 0);?>
                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['shownData']->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;
?>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->clientdebtchangeid;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1>0){?>



                    <tr>
                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->clientdebtchangedate;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->billid;?>
</td>
                        <!--                        <td><?php if ($_smarty_tpl->tpl_vars['data']->value->tablename=="sellbillandruternController.php"||$_smarty_tpl->tpl_vars['data']->value->tablename=="sellbillController.php"||$_smarty_tpl->tpl_vars['data']->value->tablename=="returnsellbillController.php"){?>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->clientdebtchangemodelid;?>

                            <?php }else{ ?> <?php echo $_smarty_tpl->tpl_vars['data']->value->processname;?>

                            <?php }?> </td>-->
                        <td> <?php echo $_smarty_tpl->tpl_vars['data']->value->processname;?>
 </td>
                        <td class="hidden-print"> <a class="hidden-print" href="<?php echo $_smarty_tpl->tpl_vars['data']->value->link;?>
"
                                target="_blank">التفاصيل</a></td>

                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->clientdebtchangebefore;?>
</td>

                        <td>
                            <?php echo $_smarty_tpl->tpl_vars['data']->value->totalbill;?>


                        </td>


                        <td>

                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->clientdebtchangebefore;?>
<?php $_tmp2=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->totalbill;?>
<?php $_tmp3=ob_get_clean();?><?php echo smarty_function_math(array('equation'=>"( x + y )",'x'=>$_tmp2,'y'=>$_tmp3),$_smarty_tpl);?>

                            </td>
                        <td><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->discards;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4!=0){?>

                                <?php echo $_smarty_tpl->tpl_vars['data']->value->discards;?>

                                <?php }?></td>
                        <td><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->discount;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5!=0){?>
                                <?php echo $_smarty_tpl->tpl_vars['data']->value->discount;?>

                                <?php }?></td>

                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->payedamount;?>
</td>

                        <!--td><?php echo $_smarty_tpl->tpl_vars['data']->value->clientdebtchangeamount;?>
</td-->





                        <td>

                            <?php echo $_smarty_tpl->tpl_vars['data']->value->clientdebtchangeafter;?>

                        </td>
                    </tr>

                    <?php }?>

                    <?php } ?>

                    <!--   <tr>
                        <td></td>
                        <td></td>

                          <td></td>

                       <td> </td>


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

                        <td></td>

                            <td></td>





                               <td></td>
                      </tr> -->


                </tbody>
            </table>

            <hr />
            <?php ob_start();?><?php echo count($_smarty_tpl->tpl_vars['shownData']->value);?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6>0){?>
            <div class="noprint">
                <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 hidden-print">طباعة</button>
                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <?php }?>
            <div class="clearfix"></div>
        </div>
    </div>
</div><?php }} ?>