add reception account transfer/mixed

This commit is contained in:
2016-03-04 21:46:31 +01:00
parent da96c64348
commit ead52ae09b
18 changed files with 357 additions and 17 deletions

View File

@@ -135,6 +135,17 @@ class DailyListing
return $days_between > $days_visiblity;
}
/**
* cutler győr-ben a nap záráshoz ezt nyomtatjuk ki
* Ez a metódus csak akkor használható, ha csak ez a statisztika kell
* */
public function readMixed(){
$this->readProductsByCategory();
$this->readTicketStas();
$this->readMoneyMovements();
}
public function readTotalEasy(){
$this->readTicketMoney();
$this->readProductsMoney();

View File

@@ -254,6 +254,13 @@ class Helper {
public static function fixAsciiChars($in) {
$out = str_replace ( "ö", "0", $in );
$out = str_replace ( "Ö", "0", $out );
/*
$out = str_replace ( "Y", "%", $out );
$out = str_replace ( "y", "%", $out );
$out = str_replace ( "Z", "y", $out );
$out = str_replace ( "z", "y", $out );
$out = str_replace ( "%", "y", $out );
*/
return $out;
}
public static function isUserCartVisibilityUser() {
@@ -361,7 +368,7 @@ class Helper {
return $result;
}
public static function generateRandomString($length = 6,$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' ) {
public static function generateRandomString($length = 6,$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWX' ) {
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {

View File

@@ -40,7 +40,8 @@ class AccountStateWidget extends Widget{
'user.username',
[
'attribute' => 'created_at',
'label' => 'Nyitás ideje'
'label' => 'Nyitás ideje',
'format' => 'datetime'
],
];
}else{
@@ -61,11 +62,13 @@ class AccountStateWidget extends Widget{
'user.username',
[
'attribute' => 'start_date',
'label' => 'Előző nyitás ideje'
'label' => 'Előző nyitás ideje' ,
'format' => 'datetime'
],
[
'attribute' => 'created_at',
'label' => 'Zárás ideje'
'label' => 'Zárás ideje',
'format' => 'datetime'
],
];
}
@@ -74,6 +77,7 @@ class AccountStateWidget extends Widget{
echo DetailView::widget([
'options' => ['class' => 'table table-striped table-bordered detail-view table-account-view'] ,
'model' => $this->model,
'attributes' =>$attributes,
]) ;

View File

@@ -27,6 +27,7 @@ class TotalDifferenceWidget extends Widget{
$ft = " Ft";
$s .= DetailView::widget([
'options' => ['class' => 'table table-striped table-bordered detail-view table-account-diff'],
'model' => $this->model,
'template' =>"<tr><th>{label}</th><td style='text-align: right;'>{value} </td></tr>",
'attributes' => [

View File

@@ -0,0 +1,9 @@
<?php
namespace common\components\total;
class TotalProductsByCategoryWidget extends TotalBaseWidget{
public $viewFile = 'total_product_by_category.php';
}

View File

@@ -4,7 +4,7 @@ return [
'supportEmail' => 'rocho02@gmail.com',
'infoEmail' => 'info@rocho-net.hu',
'user.passwordResetTokenExpire' => 3600,
'version' => 'v0.0.48',
'version' => 'v0.0.49',
'company' => 'movar',//gyor
'company_name' => "Freimann Kft.",
'product_visiblity' => 'account',// on reception which products to display. account or global

View File

@@ -1,5 +1,4 @@
<h3>Pénzmozgások</h3>
<table class="table table-bordered table-striped table-summary">
<table class="table table-bordered table-striped table-summary table-money-movements-detailed">
<thead>
<tr>
<th>Dátum</th>
@@ -7,20 +6,20 @@
<th>Felhasználó</th>
<th>Név</th>
<th>Típus</th>
<th>Összeg</th>
<th>Megjegyzés</th>
<th>Összeg</th>
</tr>
</thead>
<tbody>
<?php foreach ($model->moneyMovements as $p ){?>
<tr>
<td><?php echo $p['money_movement_created_at']?> </td>
<td><?php echo $p['account_name']?> </td>
<td><?php echo $p['user_name']?> </td>
<td><?php echo $p['money_movement_name'] ?></td>
<td><?php echo $p['money_movement_type_name'] ?></td>
<td class="created-at"><?php echo $p['money_movement_created_at']?> </td>
<td class="account"><?php echo $p['account_name']?> </td>
<td class="username"><?php echo $p['user_name']?> </td>
<td class="name"><?php echo $p['money_movement_name'] ?></td>
<td class="type"><?php echo $p['money_movement_type_name'] ?></td>
<td class="comment"><?php echo $p['money_movement_comment'] ?></td>
<td class='money'><?php echo \Yii::$app->formatter->asInteger( $p['signed_money'])?> Ft</td>
<td><?php echo $p['money_movement_comment'] ?></td>
</tr>
<?php } ?>

View File

@@ -1,4 +1,4 @@
<table class="table table-bordered table-striped table-summary">
<table class="table table-bordered table-striped table-summary total-medium-ticket">
<thead>
<tr>
<th>Bérlet típus</th>

View File

@@ -0,0 +1,37 @@
<?php
$categories = $model->productMoneies;
?>
<table
class="table table-bordered table-striped table-summary total-product-by-category">
<thead>
<tr>
<th>Kategória</th>
<th>Mennyiség</th>
<th>Összeg</th>
</tr>
</thead>
<tbody>
<?php foreach ( $categories as $p){?>
<tr>
<td class='name'><?php echo $p['category_name'] ?></td>
<td class='count'><?php echo $p['category_count'] ?> Db</td>
<td class='money'><?php echo \Yii::$app->formatter->asInteger( $p['product_money'])?> FT</td>
</tr>
<?php }?>
</tbody>
</table>
<?php
?>
<div class="row">
<div class="col-md-12 text-right" style="text-decoration: underline;">
Összesen:
<?php
echo \Yii::$app->formatter->asInteger( $model->productsByCategory ['total']);
?> Ft
</div>
</div>