add reception account state view and pdf export
This commit is contained in:
21
common/components/total/TotalBaseWidget.php
Normal file
21
common/components/total/TotalBaseWidget.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace common\components\total;
|
||||
use yii\base\Widget;
|
||||
|
||||
class TotalBaseWidget extends Widget{
|
||||
|
||||
public $dailyListing;
|
||||
|
||||
public $viewPath = '@common/views/total';
|
||||
public $viewFile = 'totaleasy.php';
|
||||
public $view;
|
||||
|
||||
public function init(){
|
||||
$this->view = $this->viewPath . "/" . $this->viewFile;
|
||||
}
|
||||
|
||||
public function run(){
|
||||
echo $this->render($this->view,[ 'model' => $this->dailyListing ]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace common\components\total;
|
||||
|
||||
class TotalDetailedMoneyMovementWidget extends TotalBaseWidget{
|
||||
|
||||
public $viewFile = 'total_detailed_money_movement.php';
|
||||
|
||||
|
||||
}
|
||||
9
common/components/total/TotalDetailedProductsWidget.php
Normal file
9
common/components/total/TotalDetailedProductsWidget.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace common\components\total;
|
||||
|
||||
class TotalDetailedProductsWidget extends TotalBaseWidget{
|
||||
|
||||
public $viewFile = 'total_detailed_product.php';
|
||||
|
||||
|
||||
}
|
||||
9
common/components/total/TotalDetailedTicketsWidget.php
Normal file
9
common/components/total/TotalDetailedTicketsWidget.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace common\components\total;
|
||||
|
||||
class TotalDetailedTicketsWidget extends TotalBaseWidget{
|
||||
|
||||
public $viewFile = 'total_detailed_ticket.php';
|
||||
|
||||
|
||||
}
|
||||
68
common/components/total/TotalDifferenceWidget.php
Normal file
68
common/components/total/TotalDifferenceWidget.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
namespace common\components\total;
|
||||
|
||||
use yii\base\Widget;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/**
|
||||
* Display account state difference information widget
|
||||
*
|
||||
*
|
||||
* @property common\models\AccountState $model
|
||||
*
|
||||
* */
|
||||
class TotalDifferenceWidget extends Widget{
|
||||
|
||||
|
||||
public $model;
|
||||
|
||||
|
||||
public function run(){
|
||||
return $this->generateDifference();
|
||||
}
|
||||
|
||||
protected function generateDifference(){
|
||||
$s = "";
|
||||
if ( $this->model->hasDifferenceToPrevState()){
|
||||
|
||||
$ft = " Ft";
|
||||
$s .= DetailView::widget([
|
||||
'model' => $this->model,
|
||||
'template' =>"<tr><th>{label}</th><td style='text-align: right;'>{value} </td></tr>",
|
||||
'attributes' => [
|
||||
[
|
||||
'label' => "Előző nyitás ideje",
|
||||
'value' => $this->model->prevObject ? \Yii::$app->formatter->asDatetime( $this->model->prevObject->created_at) : "-",
|
||||
],
|
||||
[
|
||||
'label' => "Előzőleg nyitott",
|
||||
'value' => $this->model->prevObject ? $this->model->user->username : "-",
|
||||
],
|
||||
[
|
||||
'label' => "Előző nyitás összege",
|
||||
'value' => $this->model->prev_money.$ft
|
||||
],
|
||||
[
|
||||
'label' => "Bevételek összesen előző nyitás óta",
|
||||
'value' => $this->model->collection_money .$ft
|
||||
],
|
||||
[
|
||||
'label' => "Zárás összege",
|
||||
'value' => $this->model->money.$ft
|
||||
],
|
||||
[
|
||||
'label' => "Várt összeg",
|
||||
'value' => $this->model->expected.$ft
|
||||
],
|
||||
[
|
||||
'label' => "Különbözet",
|
||||
'value' => $this->model->signedDiff.$ft
|
||||
],
|
||||
]
|
||||
]);
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
22
common/components/total/TotalEasyWidget.php
Normal file
22
common/components/total/TotalEasyWidget.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace common\components\total;
|
||||
use yii\base\Widget;
|
||||
|
||||
class TotalEasyWidget extends Widget{
|
||||
|
||||
public $dailyListing;
|
||||
|
||||
public $viewPath = '@common/views/total';
|
||||
public $viewFile = 'totaleasy.php';
|
||||
public $view;
|
||||
|
||||
public function init(){
|
||||
$this->view = $this->viewPath . "/" . $this->viewFile;
|
||||
}
|
||||
|
||||
public function run(){
|
||||
echo $this->render($this->view,[ 'model' => $this->dailyListing ]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace common\components\total;
|
||||
|
||||
class TotalMediumMoneyMovementsWidget extends TotalBaseWidget{
|
||||
|
||||
public $viewFile = 'total_medium_money_movement.php';
|
||||
|
||||
|
||||
}
|
||||
9
common/components/total/TotalMediumProductsWidget.php
Normal file
9
common/components/total/TotalMediumProductsWidget.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace common\components\total;
|
||||
|
||||
class TotalMediumProductsWidget extends TotalBaseWidget{
|
||||
|
||||
public $viewFile = 'total_medium_product.php';
|
||||
|
||||
|
||||
}
|
||||
9
common/components/total/TotalMediumTicketsWidget.php
Normal file
9
common/components/total/TotalMediumTicketsWidget.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace common\components\total;
|
||||
|
||||
class TotalMediumTicketsWidget extends TotalBaseWidget{
|
||||
|
||||
public $viewFile = 'total_medium_ticket.php';
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user