arrivals.php
1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
use common\models\User;
use frontend\models\Report;
use yii\helpers\Html;
use yii\web\View;
/**
* @var View $this
* @var Report[] $reports
* @var User $user
*/
$user = \Yii::$app->user->identity;
?>
<div class="style cab_content_list">
<div class="title_forms">Мої надходження</div>
<div class="style table-forms-wrapp">
<table class="table-1" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>№<br/>п/п</td>
<td>Користувач</td>
<td>Твір</td>
<td>Кількість сповіщень</td>
<td>Перерахована сума</td>
</tr>
<?php
foreach ($reports as $index => $report) {
if ($user->isAdmin()) {
$sum = $report->sum;
} else {
$sum = $report->sum * $report->intellectualProperty->creativeRoles[0]->part /100;
}
?>
<tr>
<?php
echo Html::tag('td', ++$index);
echo Html::tag('td', $report->user);
echo Html::tag('td', $report->intellectualProperty->title);
echo Html::tag('td', $report->count);
echo Html::tag('td', $sum);
?>
</tr>
<?php
}
?>
</table>
</div>
</div>