fix account_state ( collection_money ), display product/ticket on reception only for selected account, add daily transfers (reception/admin)
This commit is contained in:
@@ -18,7 +18,11 @@ class AccountStateBanknoteCountWidget extends Widget{
|
||||
|
||||
$panelStyleClas = 'panel-default';
|
||||
if ( $this->model->hasDifferenceToPrevState()){
|
||||
$panelStyleClas = 'panel-danger';
|
||||
if ( $this->model->hasPlus()){
|
||||
$panelStyleClas = 'panel-success';
|
||||
}else if ( $this->model->hasMinus() ){
|
||||
$panelStyleClas = 'panel-danger';
|
||||
}
|
||||
}
|
||||
|
||||
$s = "";
|
||||
@@ -27,8 +31,51 @@ class AccountStateBanknoteCountWidget extends Widget{
|
||||
$s .= "Kassza művelet - " . $this->model->typeName;
|
||||
$s .= Html::endTag("div");
|
||||
$s .= Html::beginTag("div",['class' => 'panel-body '] );
|
||||
|
||||
|
||||
|
||||
$s .= $this->generateInfoRow();
|
||||
$s .= $this->generateNotes();
|
||||
|
||||
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 utolsó 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
|
||||
],
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
$s .= $this->generateComment();
|
||||
$s .= Html::endTag("div");
|
||||
$s .= Html::endTag("div");
|
||||
|
||||
Reference in New Issue
Block a user