<?php /* Smarty version Smarty-3.1.11, created on 2023-10-21 21:19:56
         compiled from "../views/default/supplierReportsview/supplierShow2.html" */ ?>
<?php /*%%SmartyHeaderCode:312701736534164cc531c9-37609430%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '03ca3c95457a0b917bc33b19ca2180b64f10f6a4' => 
    array (
      0 => '../views/default/supplierReportsview/supplierShow2.html',
      1 => 1696193544,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '312701736534164cc531c9-37609430',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'message' => 0,
    'youtubes' => 0,
    'supplierData' => 0,
    'mysupplierData' => 0,
    'shownData' => 0,
    'data' => 0,
    'totalsum' => 0,
    'supplierDebt' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6534164cd05036_96908167',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6534164cd05036_96908167')) {function content_6534164cd05036_96908167($_smarty_tpl) {?><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[128]->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="supplierReportsnewController.php?do=supplierShow2"
                    method="post">
                    <div class="form-group">
                        <label class="sr-only">المورد</label>
                        <select class="select2 wdt300" name="supplierId" id="supplierId">
                            <option value="-1">اختر المورد</option>


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


                            <option value="<?php echo $_smarty_tpl->tpl_vars['mysupplierData']->value->supplierid;?>
"><?php echo $_smarty_tpl->tpl_vars['mysupplierData']->value->suppliername;?>
</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->supplierdebtchangeid;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1>0){?>



                    <tr <?php if ($_smarty_tpl->tpl_vars['data']->value->supplierdebtchangetype==0){?> class="danger" <?php }else{ ?> <?php }?>>

                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->supplierdebtchangedate;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->processname;?>
</td>
                        <td><?php if ($_smarty_tpl->tpl_vars['data']->value->tablename=="buyBillController.php"||$_smarty_tpl->tpl_vars['data']->value->tablename=="returnBuyBillController.php"||$_smarty_tpl->tpl_vars['data']->value->tablename=="buyAndReturnBillController.php"){?>
                            <a class="hidden-print" href="<?php echo $_smarty_tpl->tpl_vars['data']->value->link;?>
" target="_blank"
                                style="color: blue;"><u><?php echo $_smarty_tpl->tpl_vars['data']->value->supplierdebtchangemodelid;?>
</u></a>
                            <?php }else{ ?> -
                            <?php }?>
                        </td>
                        <td class="hidden-print">
                            <?php if ($_smarty_tpl->tpl_vars['data']->value->link!="#"&&$_smarty_tpl->tpl_vars['data']->value->link!=''){?>
                            <a class="hidden-print" href="<?php echo $_smarty_tpl->tpl_vars['data']->value->link;?>
" target="_blank"
                                style="color: blue;"><u>التفاصيل</u></a>
                            <?php }else{ ?>
                            -
                            <?php }?>
                        </td>

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

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


                        </td>


                        <td><?php echo $_smarty_tpl->tpl_vars['data']->value->totalOperationCost;?>
</td>
                        <td><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->discards;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2!=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 $_tmp3=ob_get_clean();?><?php if ($_tmp3!=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->supplierdebtchangeafter;?>
</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>
            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['supplierDebt']->value;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4){?>
            <div class="col-lg-offset-8 col-lg-4">
                <div class="well well-sm">
                    <h4 class="text-center"> الدين الحالي للمورد <?php echo $_smarty_tpl->tpl_vars['supplierDebt']->value;?>
</h4>
                </div>
            </div>
            <?php }?>
            <hr />
            <?php ob_start();?><?php echo count($_smarty_tpl->tpl_vars['shownData']->value);?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5>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 }} ?>