epic-ts
[kivitendo-erp.git] / templates / webpages / requirement_spec / _show_time_and_cost_estimate.html
1 [%- USE LxERP -%][%- USE L -%][%- USE HTML -%][%- USE P -%]
2 [%- DEFAULT id_prefix = 'time_and_cost_estimate_form' %]
3
4 <div id="time_cost_estimate"[% IF initially_hidden %] style="display: none;"[% END %]>
5  [%- IF !SELF.requirement_spec.sections.size %]
6   <p>[%- LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p>
7
8  [%- ELSE %]
9
10   [%- SET at_least_one_function_block = 0 %]
11
12   <table class="time-cost-estimate time-cost-estimate-context-menu">
13    <tbody>
14     [%- FOREACH section = SELF.requirement_spec.sections_sorted %]
15      <tr class="listheading">
16       <th>[%- LxERP.t8("Function block") %]</th>
17       <th>[%- LxERP.t8("Complexity") %]</th>
18       <th>[%- LxERP.t8("Risk") %]</th>
19       <th align="right">[%- LxERP.t8("Time estimate") %]</th>
20       [%- UNLESS SELF.requirement_spec.is_template %]
21        <th align="right">[%- LxERP.t8("Cost") %]</th>
22       [%- END %]
23      </tr>
24
25      <tr class="listrow section">
26       <td colspan="5">[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</td>
27      </tr>
28
29      [%- IF section.children.size %]
30       [%- SET at_least_one_function_block = 1 %]
31       [%- FOREACH child = section.children_sorted %]
32        [%- INCLUDE 'requirement_spec/_show_time_and_cost_estimate_item.html'
33                    item  = child
34                    level = 1 %]
35       [%- END %]
36
37       <tr class="listrow subtotal">
38        <td style="padding-left: 50px" colspan="3" class="sum">[%- LxERP.t8("Sum for section") -%]:</td>
39        <td align="right" nowrap>[%- P.format_man_days(section.time_estimation, 'skip_zero'=1) -%]</td>
40        [%- UNLESS SELF.requirement_spec.is_template %]
41         <td align="right" nowrap>[%- LxERP.format_amount(section.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
42        [%- END %]
43       </tr>
44      [%- END -%]
45     [%- END -%]
46    </tbody>
47
48    <tfoot>
49     <tr>
50      <td colspan="3">[%- LxERP.t8("Sum for #1", SELF.requirement_spec.type.description) -%]:</td>
51      <td align="right" nowrap>[%- P.format_man_days(SELF.requirement_spec.time_estimation) -%]</td>
52      [%- UNLESS SELF.requirement_spec.is_template %]
53       <td align="right" nowrap>[%- LxERP.format_amount(SELF.requirement_spec.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
54      [%- END %]
55     </tr>
56    </tfoot>
57   </table>
58  [%- END %]
59 </div>