<?php /* Smarty version Smarty-3.1.11, created on 2023-12-16 23:02:55
         compiled from "../views/default/profitreportview/show.html" */ ?>
<?php /*%%SmartyHeaderCode:228659022657e107f5f6557-90409283%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '5a615c19736a12c9dd8f3092d56415969baf4454' => 
    array (
      0 => '../views/default/profitreportview/show.html',
      1 => 1693979930,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '228659022657e107f5f6557-90409283',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'last' => 0,
    'programsettingsdata' => 0,
    'message' => 0,
    'totalSellPrice' => 0,
    'totalReturnSellPrice' => 0,
    'totalSellCost' => 0,
    'totalQuantityBuyPrice' => 0,
    'totalQuantityReturnBuyPrice' => 0,
    'totalBuyCost' => 0,
    'restaurantRawDestruction' => 0,
    'total_profit' => 0,
    'totalExpenses' => 0,
    'totalIncomes' => 0,
    'totalsalary' => 0,
    'totalDiscount' => 0,
    'profitFinal' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_657e107f728ab3_62830464',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_657e107f728ab3_62830464')) {function content_657e107f728ab3_62830464($_smarty_tpl) {?><style>
    .myresult {
        -webkit-print-color-adjust: exact;
    }
</style>

<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">تقرير ارباح مدة
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[120]->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="profitreportController.php?do=show" method="post">
                    <div style="display:inline;float: left;">
                        <div><a href="reCalcBillPricesFunctions.php?do=updateQuantityBeforeBuyBills" class="btn btn-success" data-toggle="tooltip" title="buy:<?php echo $_smarty_tpl->tpl_vars['last']->value->buyquantity;?>
 , buyandret:<?php echo $_smarty_tpl->tpl_vars['last']->value->buyandretquantity;?>
">تحديث كميات المنتجات فى الفواتير</a></div>
                        <br/>
                        <div><a href="reCalcBillPricesFunctions.php?do=updatePricesBuyBills" class="btn btn-success" data-toggle="tooltip" title="buy:<?php echo $_smarty_tpl->tpl_vars['last']->value->buybill;?>
 , buyandret:<?php echo $_smarty_tpl->tpl_vars['last']->value->buyandret;?>
">تحديث المتوسط فى فواتير الشراء</a></div>
                        <br/>
                        <div><a href="reCalcBillPricesFunctions.php?do=updatePricesSellBills" class="btn btn-primary" data-toggle="tooltip" title="sell:<?php echo $_smarty_tpl->tpl_vars['last']->value->sell;?>
 , sellandret:<?php echo $_smarty_tpl->tpl_vars['last']->value->sellandret;?>
 , retsell:<?php echo $_smarty_tpl->tpl_vars['last']->value->retsell;?>
">تحديث المتوسط فى فواتير البيع</a></div>
                        <br/>
                        <div style="display:inline;float: left;"><a href="reCalcBillPricesFunctions.php?do=updatePricesBuyBillsAllProducts" class="btn btn-warning">تحديث المتوسط العام لكل المنتجات</a></div>
                    </div>
                    <div class="form-group">
                        <label for="email" class="col-lg-3 control-label">الحساب بـ</label>
                        <div class="col-lg-6">
                            <label>
                                <input type="radio" name="buyPriceType"  value="first" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['programsettingsdata']->value->Profitevaluation;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1=="first"){?>  checked <?php }?>>
                                سعر الشراء الحقيقى </label><br>
                            <label>
                                <input type="radio" name="buyPriceType"  value="last" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['programsettingsdata']->value->Profitevaluation;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2=="last"){?>  checked <?php }?>>
                                اخر سعر شراء </label><br>
                            <label>
                                <input type="radio" name="buyPriceType"  value="last_discount" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['programsettingsdata']->value->Profitevaluation;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3=="last_discount"){?>  checked <?php }?>>
                                اخر سعر شراء بعد الخصم </label><br>
                            <label>
                                <input type="radio" name="buyPriceType"  value="mean" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['programsettingsdata']->value->Profitevaluation;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4=="mean"){?>  checked <?php }?>>
                                متوسط سعر الشراء</label>
                            <label>
                                <input type="radio" name="buyPriceType"  value="mean_discount" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['programsettingsdata']->value->Profitevaluation;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5=="mean_discount"){?>  checked <?php }?>>
                                متوسط سعر الشراء بعد الخصم</label>
                            <label>
                                <input type="radio" name="buyPriceType"  value="generalPrice" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['programsettingsdata']->value->Profitevaluation;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6=="generalPrice"){?>  checked <?php }?>>
                                المتوسط العام</label>
                            <label>
                                <input type="radio" name="buyPriceType"  value="tax" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['programsettingsdata']->value->Profitevaluation;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7=="tax"){?>  checked <?php }?>>
                                اخر سعر شراء شامل القيمة المضافة</label>
                            <label>
                                <input type="radio" name="buyPriceType"  value="mean_tax" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['programsettingsdata']->value->Profitevaluation;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8=="mean_tax"){?>  checked <?php }?>>
                                متوسط سعر الشراء شامل القيمة المضافة</label>
                        </div>
                    </div>
                    <div class="clearfix"></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>
            <div class="panel panel-default panel-m">
                <!-- Default panel contents -->
                <div class="panel-heading"><?php echo $_smarty_tpl->tpl_vars['message']->value;?>
</div>
                <div class="panel-body">
                    <hr/>
                    <table class="table" style="font-size:14px">
                        <thead>
                            <tr>
                                <td>
                        <center>
                            اجمالى المبيعات
                        </center>
                        </td>
                        <td>
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalSellPrice']->value;?>

                        </center>
                        </td>
                        <td>
                        <center>
                            اجمالى مردودات المبيعات
                        </center>
                        </td>
                        <td>
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalReturnSellPrice']->value;?>

                        </center>
                        </td>
                        </tr>
                        <tr class="active" style="background:#f5f5f5">
                            <td colspan="2" >
                        <center>
                            صافى ايرادات المبيعات
                        </center>
                        </td>
                        <td colspan="2">
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalSellCost']->value;?>

                        </center>
                        </td>
                        </tr>
                        <tr>
                            <td>
                        <center>
                            اجمالى المباع بسعر التكلفة
                        </center>
                        </td>
                        <td>
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalQuantityBuyPrice']->value;?>

                        </center>
                        </td>
                        <td>
                        <center>
                            اجمالى مردود البيع بسعر التكلفة
                        </center>
                        </td>
                        <td>
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalQuantityReturnBuyPrice']->value;?>

                        </center>
                        </td>
                        </tr>
                        <tr class="active"  style="background:#f5f5f5">
                            <td colspan="2">
                        <center>
                            تكلفة المبيعات
                        </center>
                        </td>
                        <td colspan="2">
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalBuyCost']->value;?>

                        </center>
                        </td>
                        </tr>
                        <tr class="active"  style="background:#f5f5f5;<?php if ($_smarty_tpl->tpl_vars['restaurantRawDestruction']->value==0){?>display:none<?php }?>">
                            <td colspan="2">
                        <center>
                            اهلاك خامات
                        </center>
                        </td>
                        <td colspan="2">
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['restaurantRawDestruction']->value;?>

                        </center>
                        </td>
                        </tr>
                        <tr class="active"  style="background:#f5f5f5">
                            <td colspan="2">
                        <center>
                            مجمل الربح
                        </center>
                        </td>
                        <td colspan="2">
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['total_profit']->value;?>

                        </center>
                        </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                        <center>
                            اجمالى المصروفات
                        </center>
                        </td>
                        <td colspan="2">
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalExpenses']->value;?>

                        </center>
                        </td>
                        </tr>


                        <tr>
                            <td colspan="2">
                        <center>
                            اجمالى الايرادات
                        </center>
                        </td>
                        <td colspan="2">
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalIncomes']->value;?>

                        </center>
                        </td>
                        </tr>

                        <tr>
                            <td colspan="2">
                        <center>
                            اجمالى المرتبات والسلف والمسحوبات
                        </center>
                        </td>
                        <td colspan="2">
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalsalary']->value;?>

                        </center>
                        </td>
                        </tr>

                        <tr>
                            <td colspan="2">
                        <center>
                            اجمالي الخصومات
                        </center>
                        </td>
                        <td colspan="2">
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['totalDiscount']->value;?>

                        </center>
                        </td>
                        </tr>

                        <tr class="active"  style="background:#f5f5f5">
                            <td colspan="2">
                        <center>
                            صافى الربح
                        </center>
                        </td>
                        <td colspan="2">
                        <center>
                            <?php echo $_smarty_tpl->tpl_vars['profitFinal']->value;?>

                        </center>
                        </td>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                    <div class="clearfix"></div>
                    <hr />
                    <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>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
<?php }} ?>