Revision 4a44a87b
Von Hans P. Schlaepfer vor fast 5 Jahren hinzugefügt
templates/webpages/requirement_spec/_show_time_and_cost_estimate.html | ||
---|---|---|
6 | 6 |
[% SET total_cost = 0 %] |
7 | 7 |
|
8 | 8 |
<div id="time_cost_estimate"[% IF initially_hidden %] style="display: none;"[% END %]> |
9 |
[%- IF !SELF.requirement_spec.sections.size %] |
|
10 |
<p>[%- LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p> |
|
9 |
<div class="wrapper"> |
|
11 | 10 |
|
12 |
[%- ELSE %] |
|
11 |
[% IF !SELF.requirement_spec.sections.size %] |
|
12 |
<p class="message message_info">[% LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p> |
|
13 | 13 |
|
14 |
[%- SET at_least_one_function_block = 0 %]
|
|
14 |
[% ELSE %]
|
|
15 | 15 |
|
16 |
<table class="time-cost-estimate time-cost-estimate-context-menu"> |
|
17 |
<tbody> |
|
18 |
[%- FOREACH section = SELF.requirement_spec.sections_sorted %] |
|
19 |
<tr class="listheading"> |
|
20 |
<th>[%- LxERP.t8("Function block") %]</th> |
|
21 |
<th>[%- LxERP.t8("Complexity") %]</th> |
|
22 |
<th>[%- LxERP.t8("Risk") %]</th> |
|
23 |
<th align="right">[%- LxERP.t8("Time estimate") %]</th> |
|
24 |
[%- UNLESS SELF.requirement_spec.is_template %] |
|
25 |
<th align="right">[%- LxERP.t8("Price") %]</th> |
|
26 |
[%- END %] |
|
27 |
</tr> |
|
16 |
[% SET at_least_one_function_block = 0 %] |
|
28 | 17 |
|
29 |
<tr class="listrow section"> |
|
30 |
<td colspan="5">[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</td> |
|
31 |
</tr> |
|
32 |
|
|
33 |
[%- IF section.children.size %] |
|
34 |
[%- SET at_least_one_function_block = 1 %] |
|
35 |
[%- FOREACH child = section.children_sorted %] |
|
36 |
[%- INCLUDE 'requirement_spec/_show_time_and_cost_estimate_item.html' |
|
37 |
section = section |
|
38 |
item = child |
|
39 |
level = 1 %] |
|
40 |
[%- END %] |
|
41 |
|
|
42 |
<tr class="listrow subtotal"> |
|
43 |
<td style="padding-left: 50px" colspan="3" class="sum">[%- LxERP.t8("Sum for section") -%]:</td> |
|
44 |
<td align="right" nowrap>[%- P.format_man_days(section.time_estimation, 'skip_zero'=1) -%]</td> |
|
45 |
[%- UNLESS SELF.requirement_spec.is_template %] |
|
46 |
[%- SET section_cost = section.time_estimation * SELF.requirement_spec.hourly_rate * section.sellprice_factor; |
|
47 |
total_cost = total_cost + section_cost %] |
|
48 |
<td align="right" nowrap>[%- LxERP.format_amount(section_cost, 2) -%] EUR</td> |
|
49 |
[%- END %] |
|
18 |
<table class="tbl-list time-cost-estimate time-cost-estimate-context-menu"> |
|
19 |
<thead> |
|
20 |
<tr> |
|
21 |
<th>[% LxERP.t8("Function block") %]</th> |
|
22 |
<th>[% LxERP.t8("Complexity") %]</th> |
|
23 |
<th>[% LxERP.t8("Risk") %]</th> |
|
24 |
<th class="right">[% LxERP.t8("Time estimate") %]</th> |
|
25 |
[% UNLESS SELF.requirement_spec.is_template %] |
|
26 |
<th class="right">[% LxERP.t8("Price") %]</th> |
|
27 |
[% END %] |
|
28 |
</tr> |
|
29 |
</thead> |
|
30 |
<tbody> |
|
31 |
[% FOREACH section = SELF.requirement_spec.sections_sorted %] |
|
32 |
<tr class="section"> |
|
33 |
<th colspan="5"><b>[% HTML.escape(section.fb_number) %]: [% HTML.escape(section.title) %]</b></th> |
|
34 |
</tr> |
|
35 |
[% IF section.children.size %] |
|
36 |
[% SET at_least_one_function_block = 1 %] |
|
37 |
[% FOREACH child = section.children_sorted %] |
|
38 |
[% INCLUDE 'requirement_spec/_show_time_and_cost_estimate_item.html' |
|
39 |
section = section |
|
40 |
item = child |
|
41 |
level = 1 %] |
|
42 |
[% END %] |
|
43 |
<tr class="subtotal"> |
|
44 |
<th colspan="3" class="right">[% LxERP.t8("Sum for section") %]:</th> |
|
45 |
<td class="numeric">[% P.format_man_days(section.time_estimation, 'skip_zero'=1) %]</td> |
|
46 |
[% UNLESS SELF.requirement_spec.is_template %] |
|
47 |
[% SET section_cost = section.time_estimation * SELF.requirement_spec.hourly_rate * section.sellprice_factor; |
|
48 |
total_cost = total_cost + section_cost %] |
|
49 |
<!-- PENDENT: hier ist EURO angegeben --> |
|
50 |
<td class="numeric">[% LxERP.format_amount(section_cost, 2) %] EUR</td> |
|
51 |
[% END %] |
|
50 | 52 |
</tr> |
51 |
[%- END -%] |
|
52 |
[%- END -%] |
|
53 |
</tbody> |
|
54 |
|
|
55 |
<tfoot> |
|
53 |
[% END %] |
|
54 |
[% END %] |
|
55 |
</tbody> |
|
56 |
<tfoot> |
|
56 | 57 |
<tr> |
57 |
<td colspan="3">[%- LxERP.t8("Sum for #1", SELF.requirement_spec.type.description) -%]:</td> |
|
58 |
<td align="right" nowrap>[%- P.format_man_days(SELF.requirement_spec.time_estimation) -%]</td> |
|
59 |
[%- UNLESS SELF.requirement_spec.is_template %] |
|
60 |
<td align="right" nowrap>[%- LxERP.format_amount(total_cost, 2) -%] EUR</td> |
|
61 |
[%- END %] |
|
58 |
<th class="right" colspan="3">[% LxERP.t8("Sum for #1", SELF.requirement_spec.type.description) %]:</th> |
|
59 |
<td class="right">[% P.format_man_days(SELF.requirement_spec.time_estimation) %]</td> |
|
60 |
[% UNLESS SELF.requirement_spec.is_template %] |
|
61 |
<!-- PENDENT: hier ist EURO angegeben --> |
|
62 |
<td class="right" >[% LxERP.format_amount(total_cost, 2) %] EUR</td> |
|
63 |
[% END %] |
|
62 | 64 |
</tr> |
63 | 65 |
</tfoot> |
64 |
</table> |
|
65 |
[%- END %] |
|
66 |
</div> |
|
66 |
</table> |
|
67 |
|
|
68 |
[% END %] |
|
69 |
|
|
70 |
</div><!-- /.wrapper --> |
|
71 |
</div><!-- /#time_cost_estimate --> |
Auch abrufbar als: Unified diff
Neues Design 2019 Standard-Code templates/webpages/requirement_spec/_show_time_and_cost_estimate.html\n\nWar ein bisschen schwierig zu splitten. Bitte aufpassen.