<?php /* Smarty version Smarty-3.1.11, created on 2024-09-16 16:58:28
         compiled from "../views/default/returnBillreportview/show.html" */ ?>
<?php /*%%SmartyHeaderCode:120879704266e839844b78d3-39488325%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4f0a77162963d03c5e2c72956aa9c879dc24743a' => 
    array (
      0 => '../views/default/returnBillreportview/show.html',
      1 => 1693253994,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '120879704266e839844b78d3-39488325',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'message' => 0,
    'youtubes' => 0,
    'outputString' => 0,
    'suppliersData' => 0,
    'mysuppliersData' => 0,
    'Programsettingdata' => 0,
    'totaldiscount' => 0,
    'totaltax' => 0,
    'totalBills' => 0,
    'totalqty' => 0,
    'returnbuyBillData' => 0,
    'myreturnbuyBillData' => 0,
    'mybuyBillData' => 0,
    'returnBuyBillData1' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66e83984625b09_12480251',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66e83984625b09_12480251')) {function content_66e83984625b09_12480251($_smarty_tpl) {?>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">ادارة الفواتير</a></li>
            <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[26]->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">
                <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>
                <!-- onchange="this.form.submit();"-->
                <form class="form-inline hidden-print" action="returnBillreportController.php?do=show" method="post">
                    <div class="form-group">
                        <label class="sr-only">المورد</label>
                        <select class="select2 wdt100"  name="supplierId" id="supplierId" >
                            <option value="-1">اختر مورد</option>



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



                            <option value="<?php echo $_smarty_tpl->tpl_vars['mysuppliersData']->value->supplierid;?>
"><?php echo $_smarty_tpl->tpl_vars['mysuppliersData']->value->suppliername;?>
</option>


                            <?php } ?>



                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">رقم تسلسل الفاتورة</label>
                        <input type="text" class="form-control" placeholder="رقم تسلسل الفاتورة"  name="buybillid" id="buybillid">
                    </div>
                    <div class="form-group" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->billid;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==1){?>  style="display:none" <?php }?>>
                        <label class="sr-only">رقم الفاتورة</label>
                        <input type="text" class="form-control" placeholder="رقم الفاتورة" name="serial" id="serial" >
                    </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/>
            <div class="col-lg-offset-16 col-lg-3 ">
                <div class="well well-sm">
                    <h4 class="text-center">إجمالي الخصومات:  <?php echo $_smarty_tpl->tpl_vars['totaldiscount']->value;?>
</h4>
                </div>
            </div>

            <div class="col-lg-offset-16 col-lg-3">
                <div class="well well-sm">
                    <h4 class="text-center"> اجمالى الضرائب:  <?php echo $_smarty_tpl->tpl_vars['totaltax']->value;?>
</h4>
                </div>
            </div>

            <div class="col-lg-offset-16 col-lg-3 ">
                <div class="well well-sm">
                    <h4 class="text-center">إجمالي المردودات:  <?php echo $_smarty_tpl->tpl_vars['totalBills']->value;?>
</h4>
                </div>
            </div>

            <div class="col-lg-offset-16 col-lg-3">
                <div class="well well-sm">
                    <h4 class="text-center"> القطع عدد:  <?php echo $_smarty_tpl->tpl_vars['totalqty']->value;?>
</h4>
                </div>
            </div>
            <table class="table table-black">
                <thead>
                    <tr>
                        <th>رقم تسلسل الفاتورة</th>
                        <th>اجمالى الفاتورة</th>
                        <th>اجمالى الخصم</th>
                        <th>اجمالى الضرائب</th>
                        <th>تاريخ الفاتورة</th>
                        <th>العميل</th>
                        <th><?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==0){?> بائع <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==1){?>مندوب <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==2){?>طبيب <?php }?></th>
                        <th class="hidden-print">تفاصيل الفاتورة</th>
                    </tr>
                </thead>
                <tbody>

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

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->conditions;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2!=1){?>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->conditions;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==1){?>
                    <tr class="danger"> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['mybuyBillData']->value->conditions;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==0){?>

                    <tr> <?php }}?>

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

                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->buybillaftertotalbill;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->buybilldiscount;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->tax;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->buybilldate;?>
</td>
                        <td> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->suppliername;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==''){?>
                            نقدى
                            <?php }else{ ?>
                            <?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->suppliername;?>

                            <?php }?> </td>
                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->username;?>
</td>
                        <td class="hidden-print">

                            <a href="buyAndReturnBillController.php?do=details&id=<?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->buybillid;?>
" type="button" class="btn btn-default btn-lg editicon"></a> </td>

                    </tr>
                    <?php }?>
                    <?php } ?>


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

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->conditions;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6!=1){?>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->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['mybuyBillData']->value->conditions;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?>

                    <tr> <?php }}?>

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

                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->returnbuybillaftertotalbill;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->returnbuybilldiscount;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->tax;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->returnbuybilldate;?>
</td>
                        <td> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->suppliername;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==''){?>
                            نقدى
                            <?php }else{ ?>
                            <?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->suppliername;?>

                            <?php }?> </td>
                        <td><?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->username;?>
</td>
                        <td class="hidden-print">
                            <a href="returnBuyBillController.php?do=details&id=<?php echo $_smarty_tpl->tpl_vars['myreturnbuyBillData']->value->returnbuybillid;?>
" type="button" class="btn btn-default btn-lg editicon"></a> </td>

                    </tr>
                    <?php }?>
                    <?php } ?>




                </tbody>

            </table>
            <div class="clearfix"></div>
            <hr />
            <div class="col-lg-offset-8 col-lg-4 ">
                <div class="well well-sm">
                    <h4 class="text-center">إجمالي المشتريات:  <?php echo $_smarty_tpl->tpl_vars['totalBills']->value;?>
</h4>
                </div>
            </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['totalqty']->value;?>
</h4>
                </div>
            </div>
            <div class="clearfix"></div>
            </form>
        </div>
    </div>
</div>
<?php }} ?>