<?php /* Smarty version Smarty-3.1.11, created on 2023-10-21 15:28:38
         compiled from "../views/default/supplierReportsview/reportForAll.html" */ ?>
<?php /*%%SmartyHeaderCode:1359131056533c3f694f5e1-17815338%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b948b9e14185e25c8afaf389dea5349278da4ef5' => 
    array (
      0 => '../views/default/supplierReportsview/reportForAll.html',
      1 => 1693253996,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1359131056533c3f694f5e1-17815338',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'message' => 0,
    'youtubes' => 0,
    'supplierData' => 0,
    'supplier' => 0,
    'supplierDept' => 0,
    'currency' => 0,
    'buybillData' => 0,
    'data' => 0,
    'buytotalQTY' => 0,
    'buytotalBills' => 0,
    'SupplierShowData' => 0,
    'returnbuybillData' => 0,
    'totalPrice' => 0,
    'returntotalQTY' => 0,
    'returntotalBills' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6533c3f6acc133_07696988',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6533c3f6acc133_07696988')) {function content_6533c3f6acc133_07696988($_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">تقارير الموردين<br />
                <?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[123]->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="supplierReportsController.php?do=all" method="post">
                    <div class="form-group">
                        <label class="sr-only">اختر مورد</label>
                        <select data-placeholder="اختر مورد" class="select2 wdt300" name="supplierid" id="supplierid">
                            <option value="-1"></option>


                            <?php  $_smarty_tpl->tpl_vars['supplier'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['supplier']->_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['supplier']->key => $_smarty_tpl->tpl_vars['supplier']->value){
$_smarty_tpl->tpl_vars['supplier']->_loop = true;
?>


                            <option value="<?php echo $_smarty_tpl->tpl_vars['supplier']->value->supplierid;?>
"><?php echo $_smarty_tpl->tpl_vars['supplier']->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" id="datepicker_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" id="datepicker_to" >
                    </div>
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>
            </div>
            <hr/>
            <table class="table-black" width="200" border="1" align="center">
                <tr>
                    <td>رصيد المورد :</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['supplierDept']->value->suppliercurrentDebt;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>
            </table>
            <div class="col-lg-4">
                <div class="panel panel-default panel-m">
                    <!-- Default panel contents -->
                    <div class="panel-heading">فواتير المشتريات</div>
                    <div class="panel-body">
                        <table class="table table-black">
                            <thead>
                                <tr>
                                    <th>م</th>
                                    <!--                <th>رقم الفاتورة</th>
                                    -->                <th>تاريخ الفاتورة</th>
                                    <th>عدد الوحدات</th>
                                    <th>إجمالي الفاتورة</th>
                                </tr>
                            </thead>
                            <tbody>

                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['buybillData']->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;
?>
                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->buybillid;?>
</td>
                                    <!--              <td><?php echo $_smarty_tpl->tpl_vars['data']->value->buybillSerial;?>
</td>
                                    -->              <td><?php echo $_smarty_tpl->tpl_vars['data']->value->buybilldate;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->totalQty;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->buybillaftertotalbill;?>
</td>
                                </tr>
                                <?php } ?>

                                <tr class="success">
                                    <td colspan="2">الإجمالي</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['buytotalQTY']->value;?>
 قطعة</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['buytotalBills']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>

                                </tr>
                            </tbody>

                        </table>
                    </div>
                    <!--panel-body-->
                </div>
                <!--panel panel-default-->
            </div><!--col-lg-4-->

            <!--**********************************************************************-->
            <div class="col-lg-4">
                <div class="panel panel-default panel-m">
                    <!-- Default panel contents -->
                    <div class="panel-heading">الدفعات</div>
                    <div class="panel-body">
                        <table class="table table-black">
                            <thead>
                                <tr>
                                    <th>التاريخ</th>
                                    <th>القيمة</th>
                                    <th>النوع</th>
                                </tr>
                            </thead>
                            <tbody>

                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['SupplierShowData']->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 if ($_smarty_tpl->tpl_vars['data']->value->supplierdebtchangeamount!="0"){?>
                                <?php if ($_smarty_tpl->tpl_vars['data']->value->del==1){?>
                                <tr class="danger">
                                    <?php }else{ ?>
                                <tr>
                                    <?php }?>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->supplierdebtchangedate;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->supplierdebtchangeamount;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->processname;?>
<?php if ($_smarty_tpl->tpl_vars['data']->value->processname=="دفع شيك"){?>(<?php echo $_smarty_tpl->tpl_vars['data']->value->bankname;?>
)/(<?php echo $_smarty_tpl->tpl_vars['data']->value->accountname;?>
)<?php }?></td>
                                </tr>
                                <?php }?>
                                <?php } ?>
                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['buybillData']->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 if ($_smarty_tpl->tpl_vars['data']->value->buybilltotalpayed!=0){?>
                                
                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->buybilldate;?>
</td>
                                    <!--td><?php echo $_smarty_tpl->tpl_vars['data']->value->sellbilltotalpayed-$_smarty_tpl->tpl_vars['data']->value->sellbillaftertotalbill;?>
</td-->
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->buybilltotalpayed;?>
</td>
                                    <td>دفعة فى فاتورة مشتريات</td>
                                </tr>
                                
                                <?php }?>
                                <?php } ?>
                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['returnbuybillData']->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 if ($_smarty_tpl->tpl_vars['data']->value->buybilltotalpayed!=0){?>
                                
                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->buybilldate;?>
</td>
                                    <!--td><?php echo $_smarty_tpl->tpl_vars['data']->value->sellbilltotalpayed-$_smarty_tpl->tpl_vars['data']->value->sellbillaftertotalbill;?>
</td-->
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->buybilltotalpayed;?>
</td>
                                    <td>دفعة فى فاتورة المشتريات والمرتجعات</td>
                                </tr>
                                
                                <?php }?>
                                <?php } ?>

                                <tr class="success">
                                    <td>الإجمالي</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['totalPrice']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    <td></td>
                                </tr>
                            </tbody>

                        </table>
                    </div>
                    <!--panel-body-->
                </div>
                <!--panel panel-default-->
            </div><!--col-lg-4-->
            <!--**********************************************************************-->
            <div class="col-lg-4">
                <div class="panel panel-default panel-m">
                    <!-- Default panel contents -->
                    <div class="panel-heading">فواتير مردودات المشتريات</div>
                    <div class="panel-body">
                        <table class="table table-black">
                            <thead>
                                <tr>
                                    <th>م</th>
                                    <!--                <th>رقم الفاتورة</th>
                                    -->                <th>تاريخ الفاتورة</th>
                                    <th>عدد الوحدات</th>
                                    <th>إجمالي الفاتورة</th>
                                </tr>
                            </thead>
                            <tbody>

                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['returnbuybillData']->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;
?>
                                <tr>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->returnbuybillid;?>
</td>
                                    <!--              <td><?php echo $_smarty_tpl->tpl_vars['data']->value->returnbuybillSerial;?>
</td>
                                    -->              <td><?php echo $_smarty_tpl->tpl_vars['data']->value->returnbuybilldate;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->totalQty;?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->returnbuybillaftertotalbill;?>
</td>
                                </tr>
                                <?php } ?>


                                <tr class="success">
                                    <td colspan="2">الإجمالي</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['returntotalQTY']->value;?>
 قطعة</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['returntotalBills']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>

                                </tr>
                            </tbody>

                        </table>
                    </div>
                    <!--panel-body-->
                </div>
                <!--panel panel-default-->
            </div><!--col-lg-4-->
            <div class="clearfix"></div>
            <hr />
            <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 class="clearfix"></div>
        </div>
    </div>
</div>
<?php }} ?>