xref: /plugin/bez/tpl/report.php (revision 7f853d3aad83f84840ef8acee3f63b9cccbf3885)
1<div  class="bds_block">
2<form action="<?php echo $template['uri'] ?>?id=bez:report" method="POST">
3<?php foreach ($template['hidden'] as $name => $val): ?>
4	<input type="hidden" name="<?php echo $name ?>" value="<?php echo $val ?>" />
5<?php endforeach ?>
6<fieldset class="bds_form">
7	<label><?php echo $bezlang['entity'] ?>:
8		<select name="entity">
9			<option <?php if ($value['entity'] == '-all') echo 'selected' ?>
10				value="-all">--- <?php echo $bezlang['all'] ?> ---</option>
11		<?php foreach ($template['entities'] as $entity): ?>
12			<option <?php if ($value['entity'] == $entity) echo 'selected' ?>
13				value="<?php echo $entity ?>"><?php echo $entity ?></option>
14		<?php endforeach ?>
15		</select>
16	</label>
17	<label><input type="submit" value="<?php echo $bezlang['filter'] ?>" />
18
19	<span id="bez_8d_send_button">[<a href="
20		<?php echo $helper->mailto($template['issue']['coordinator_email'],
21		$bezlang['8d_report'].': #'.$template['issue']['id'].' ['.$template['issue']['entity'].'] '.$template['issue']['title'],
22		$template['uri']) ?>">
23<?php echo $bezlang['send_mail'] ?>
24	</a>]</span>
25</fieldset>
26</form>
27</div>
28
29<h1 class="bez_report">
30<?php echo $bezlang['report'] ?>
31
32<?php if ($value['year'] != '-all'): ?>
33<?php echo $value['year'] ?><?php if ($value['month'] != '-all'): ?>/<?php echo $value['month'] > 10 ? $value['month'] : '0'.$value['month'] ?><?php endif ?>
34<?php endif ?>
35
36
37<span>dotyczy zamkniętych problemów</span>
38<?php if ($value['entity'] != '-all'): ?>
39<span>Klient: <strong><?php echo $value['entity'] ?></strong></span>
40<?php endif ?>
41</h1>
42
43<h2><?php echo $bezlang['report_issues'] ?></h2>
44<table class="bez_sumarise">
45	<tr>
46		<th><?php echo $bezlang['type'] ?></th>
47		<th><?php echo $bezlang['number'] ?></th>
48		<th><?php echo $bezlang['totalcost'] ?></th>
49	</tr>
50	<?php foreach ($template['report']['issues'] as $issue): ?>
51		<tr>
52			<td><?php echo $issue['type'] ?></td>
53			<td><?php echo $issue['number'] ?></td>
54			<td>
55				<?php if ($issue['totalcost'] == ''): ?>
56					<em><?php echo $bezlang['ns'] ?></em>
57				<?php else: ?>
58					<?php echo $issue['totalcost'] ?>
59				<?php endif ?>
60			</td>
61		</tr>
62	<?php endforeach ?>
63	<tr>
64		<th><?php echo $bezlang['report_total'] ?></th>
65		<td><?php echo $template['report']['issues_total'] ?></td>
66		<td><?php echo $template['report']['issues_totalcost'] ?></td>
67	</tr>
68</table>
69<h2><?php echo $bezlang['report_tasks'] ?></h2>
70<table class="bez_sumarise">
71	<tr>
72		<th><?php echo $bezlang['class'] ?></th>
73		<th><?php echo $bezlang['number'] ?></th>
74		<th><?php echo $bezlang['totalcost'] ?></th>
75	</tr>
76	<?php foreach ($template['report']['tasks'] as $task): ?>
77		<tr>
78			<td><?php echo $task['action'] ?></td>
79			<td><?php echo $task['number'] ?></td>
80			<td>
81				<?php if ($task['totalcost'] == ''): ?>
82					<em><?php echo $bezlang['ns'] ?></em>
83				<?php else: ?>
84					<?php echo $task['totalcost'] ?>
85				<?php endif ?>
86			</td>
87		</tr>
88	<?php endforeach ?>
89	<tr>
90		<th><?php echo $bezlang['report_total'] ?></th>
91		<td><?php echo $template['report']['tasks_total'] ?></td>
92		<td><?php echo $template['report']['tasks_totalcost'] ?></td>
93	</tr>
94</table>
95
96<h2><?php echo $bezlang['report_causes'] ?></h2>
97<table class="bez_sumarise">
98	<tr>
99		<th><?php echo $bezlang['root_cause'] ?></th>
100		<th><?php echo $bezlang['number'] ?></th>
101	</tr>
102	<?php foreach ($template['report']['causes'] as $cause): ?>
103		<tr>
104			<td><?php echo $cause['rootcause'] ?></td>
105			<td><?php echo $cause['number'] ?></td>
106		</tr>
107	<?php endforeach ?>
108	<tr>
109		<th><?php echo $bezlang['report_total'] ?></th>
110		<td><?php echo $template['report']['causes_total'] ?></td>
111	</tr>
112</table>
113
114<h2><?php echo $bezlang['report_priority'] ?></h2>
115<table class="bez bez_sumarise">
116	<tr>
117		<th><?php echo $bezlang['priority'] ?></th>
118		<th><?php echo $bezlang['number'] ?></th>
119		<th><?php echo $bezlang['average'] ?></th>
120	</tr>
121	<?php foreach ($template['report']['priorities'] as $priority): ?>
122		<tr class="pr<?php echo $priority['priority_nr'] ?>">
123			<td><?php echo $priority['priority'] ?></td>
124			<td><?php echo $priority['number'] ?></td>
125			<td><?php echo $priority['average'] ?></td>
126		</tr>
127	<?php endforeach ?>
128	<tr>
129		<th><?php echo $bezlang['report_total'] ?></th>
130		<td><?php echo $template['report']['priorities_total'] ?></td>
131		<td><?php echo $template['report']['priorities_average'] ?></td>
132	</tr>
133</table>
134