<commit_before><?php
use miloschuman\highcharts\Highcharts;
use yii\web\JsExpression;
use yii\data\SqlDataProvider;
use yii\grid\GridView;
use app\models\Cashbook;

$this->title = 'Economizzer';
$this->title = Yii::t('app', 'Overview');
?>
<div class="dashboard-index">
  <div class="row">
    <div class="col-md-6"><?php  echo $this->render('_menu'); ?></div>
    <div class="col-md-6"></div>
  </div>
  <hr/>
  <div class="row">
        <div class="col-md-6">
        <div class="panel panel-default">
        <div class="panel-heading"><strong><?php echo Yii::t('app', 'Performance');?></strong></div>
        <div class="panel-body" style="height: 250px;">
            <?php
            $balance = ((round((int)$vtype1)-abs(round((int)$vtype2))) >=0 ? (round((int)$vtype1)-abs(round((int)$vtype2))) : 0);
            echo Highcharts::widget([
                'options' => [
                    'credits' => ['enabled' => false],
                    'chart'=> ['height'=> 200,],
                    'title' => [
                        'text' => Yii::t('app', 'Expense'),
                        'align' => 'center',
                        'verticalAlign' => 'middle',
                          'style' => [
                              'fontSize'=> '12px',
                              'color' => '#e74c3c',
                          ] 
                    ],
                    'colors'=> ['#cccccc','#e74c3c'],
                    'tooltip'=> ['pointFormat'=> Yii::t('app', 'Percentage').': <b>{point.percentage:.1f}%</b>'],
                    'plotOptions'=> [
                        'pie'=> [
                            'allowPointSelect'=> true,
                            'cursor'=> 'pointer',
                            'size'=> '100%',
                            'innerSize'=> '60%',
                            'dataLabels'=> ['enabled'=> false,],
                            'center'=> ['50%', '55%'],
                        ]
                    ],
                    'series'=> [[
                        'type'=> 'pie',
                        'name'=> 'Valor',
                        'data'=> [
                            [Yii::t('app', 'Balance'),  'y'=> $balance],
                            [Yii::t('app', 'Expense'),  'y'=> abs(round((int)$vtype2)), ['sliced'=> true]],
                        ]
                    ]]
                ]
                ]);
                ?>
            </div></div></div>
            <div class="col-md-6">
              <div class="panel panel-default">
              <div class="panel-heading"><strong><?php echo Yii::t('app', 'Evolution');?></strong></div>
              <div class="panel-body" style="height: 250px;">
              <?php 
              if(round((int)$vtype1) >= abs(round((int)$vtype2)))
              {
                $overbalance = "<div>". Yii::t('app', 'Monthly balance'). "<h3 class=\"label label-success pull-right\">".Yii::t('app', 'Positive')."</h3></div>";
              }else{
                $overbalance = "<div>". Yii::t('app', 'Monthly balance'). "<span class=\"label label-danger pull-right\">".Yii::t('app', 'Negative')."</span></div>";
              }
                echo $overbalance;
              ?>
              <table class="table table-bordered text-center">
                  <thead>
                      <tr>
                          <th class="text-center"><i class="fa fa-line-chart"></i></th>
                          <th class="text-center"><?php echo Yii::t('app', 'Previous Month');?></th>
                          <th class="text-center"><?php echo Yii::t('app', 'Current Month');?></th>
                      </tr>
                  </thead>
                  <tbody>
                      <tr class="text-success">
                          <td><?php echo Yii::t('app', 'Revenue');?></td>
                          <td><?php echo Yii::t('app', '$')." ".(int)$lastmonth_type1;?></td>
                          <td><?php echo Yii::t('app', '$')." ".(int)$vtype1;?></td>
                      </tr>
                      <tr class="text-danger">
                          <td><?php echo Yii::t('app', 'Expense');?></td>
                          <td><?php echo Yii::t('app', '$')." ".abs((int)$lastmonth_type2);?></td>
                          <td><?php echo Yii::t('app', '$')." ".abs((int)$vtype2);?></td>
                      </tr>
                      <tr class="text-primary">
                          <td><?php echo Yii::t('app', 'Balance');?></td>
                          <td><?php echo Yii::t('app', '$')." ".((int)$lastmonth_type1 - abs((int)$lastmonth_type2));?></td>
                          <td><?php echo Yii::t('app', '$')." ".((int)$vtype1 - abs((int)$vtype2));?></td>
                      </tr><commit_msg>Change echo variables from int to float<commit_after><?php
use miloschuman\highcharts\Highcharts;
use yii\web\JsExpression;
use yii\data\SqlDataProvider;
use yii\grid\GridView;
use app\models\Cashbook;

$this->title = 'Economizzer';
$this->title = Yii::t('app', 'Overview');
?>
<div class="dashboard-index">
  <div class="row">
    <div class="col-md-6"><?php  echo $this->render('_menu'); ?></div>
    <div class="col-md-6"></div>
  </div>
  <hr/>
  <div class="row">
        <div class="col-md-6">
        <div class="panel panel-default">
        <div class="panel-heading"><strong><?php echo Yii::t('app', 'Performance');?></strong></div>
        <div class="panel-body" style="height: 250px;">
            <?php
            $balance = ((round((int)$vtype1)-abs(round((int)$vtype2))) >=0 ? (round((int)$vtype1)-abs(round((int)$vtype2))) : 0);
            echo Highcharts::widget([
                'options' => [
                    'credits' => ['enabled' => false],
                    'chart'=> ['height'=> 200,],
                    'title' => [
                        'text' => Yii::t('app', 'Expense'),
                        'align' => 'center',
                        'verticalAlign' => 'middle',
                          'style' => [
                              'fontSize'=> '12px',
                              'color' => '#e74c3c',
                          ] 
                    ],
                    'colors'=> ['#cccccc','#e74c3c'],
                    'tooltip'=> ['pointFormat'=> Yii::t('app', 'Percentage').': <b>{point.percentage:.1f}%</b>'],
                    'plotOptions'=> [
                        'pie'=> [
                            'allowPointSelect'=> true,
                            'cursor'=> 'pointer',
                            'size'=> '100%',
                            'innerSize'=> '60%',
                            'dataLabels'=> ['enabled'=> false,],
                            'center'=> ['50%', '55%'],
                        ]
                    ],
                    'series'=> [[
                        'type'=> 'pie',
                        'name'=> 'Valor',
                        'data'=> [
                            [Yii::t('app', 'Balance'),  'y'=> $balance],
                            [Yii::t('app', 'Expense'),  'y'=> abs(round((int)$vtype2)), ['sliced'=> true]],
                        ]
                    ]]
                ]
                ]);
                ?>
            </div></div></div>
            <div class="col-md-6">
              <div class="panel panel-default">
              <div class="panel-heading"><strong><?php echo Yii::t('app', 'Evolution');?></strong></div>
              <div class="panel-body" style="height: 250px;">
              <?php 
              if(round((int)$vtype1) >= abs(round((int)$vtype2)))
              {
                $overbalance = "<div>". Yii::t('app', 'Monthly balance'). "<h3 class=\"label label-success pull-right\">".Yii::t('app', 'Positive')."</h3></div>";
              }else{
                $overbalance = "<div>". Yii::t('app', 'Monthly balance'). "<span class=\"label label-danger pull-right\">".Yii::t('app', 'Negative')."</span></div>";
              }
                echo $overbalance;
              ?>
              <table class="table table-bordered text-center">
                  <thead>
                      <tr>
                          <th class="text-center"><i class="fa fa-line-chart"></i></th>
                          <th class="text-center"><?php echo Yii::t('app', 'Previous Month');?></th>
                          <th class="text-center"><?php echo Yii::t('app', 'Current Month');?></th>
                      </tr>
                  </thead>
                  <tbody>
                      <tr class="text-success">
                          <td><?php echo Yii::t('app', 'Revenue');?></td>
                          <td><?php echo Yii::t('app', '$')." ".number_format((float)$lastmonth_type1,2);?></td>
                          <td><?php echo Yii::t('app', '$')." ".number_format((float)$vtype1,2);?></td>
                      </tr>
                      <tr class="text-danger">
                          <td><?php echo Yii::t('app', 'Expense');?></td>
                          <td><?php echo Yii::t('app', '$')." ".abs(number_format((float)$lastmonth_type2,2));?></td>
                          <td><?php echo Yii::t('app', '$')." ".abs(number_format((float)$vtype2,2));?></td>
                      </tr>
                      <tr class="text-primary">
                          <td><?php echo Yii::t('app', 'Balance');?></td>
                          <td><?php echo Yii::t('app', '$')." ".number_format(((float)$lastmonth_type1 - abs((float)$lastmonth_type2)),2);?></td>
                          <td><?php echo Yii::t('app', '$')." ".number_format(((float)$vtype1 - abs((float)$vtype2)),2);?></td>
                      </tr>
{'fraction_non_alphanumeric': 0.21084212704324437, 'fraction_numerical': 0.010966273536105938, 'mean_word_length': 1.3699436136307919, 'pattern_counts': {'":': 0, '<': 185, '<?xml version=': 0, '>': 257, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5297785', 'n_tokens_mistral': 2832, 'n_tokens_neox': 2733, 'n_words': 455}