1 [%- USE LxERP -%][%- USE L -%][%- USE HTML -%][%- USE P -%]
2 [%- DEFAULT id_prefix = 'time_and_cost_estimate_form' %]
3 [%- SET total_cost = 0 %]
5 <div id="time_cost_estimate"[% IF initially_hidden %] style="display: none;"[% END %]>
6 [%- IF !SELF.requirement_spec.sections.size %]
7 <p>[%- LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p>
11 [%- SET at_least_one_function_block = 0 %]
13 <table class="time-cost-estimate time-cost-estimate-context-menu">
15 [%- FOREACH section = SELF.requirement_spec.sections_sorted %]
16 <tr class="listheading">
17 <th>[%- LxERP.t8("Function block") %]</th>
18 <th>[%- LxERP.t8("Complexity") %]</th>
19 <th>[%- LxERP.t8("Risk") %]</th>
20 <th align="right">[%- LxERP.t8("Time estimate") %]</th>
21 [%- UNLESS SELF.requirement_spec.is_template %]
22 <th align="right">[%- LxERP.t8("Price") %]</th>
26 <tr class="listrow section">
27 <td colspan="5">[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</td>
30 [%- IF section.children.size %]
31 [%- SET at_least_one_function_block = 1 %]
32 [%- FOREACH child = section.children_sorted %]
33 [%- INCLUDE 'requirement_spec/_show_time_and_cost_estimate_item.html'
39 <tr class="listrow subtotal">
40 <td style="padding-left: 50px" colspan="3" class="sum">[%- LxERP.t8("Sum for section") -%]:</td>
41 <td align="right" nowrap>[%- P.format_man_days(section.time_estimation, 'skip_zero'=1) -%]</td>
42 [%- UNLESS SELF.requirement_spec.is_template %]
43 [%- SET section_cost = section.time_estimation * SELF.requirement_spec.hourly_rate * section.sellprice_factor;
44 total_cost = total_cost + section_cost %]
45 <td align="right" nowrap>[%- LxERP.format_amount(section_cost, 2) -%] EUR</td>
54 <td colspan="3">[%- LxERP.t8("Sum for #1", SELF.requirement_spec.type.description) -%]:</td>
55 <td align="right" nowrap>[%- P.format_man_days(SELF.requirement_spec.time_estimation) -%]</td>
56 [%- UNLESS SELF.requirement_spec.is_template %]
57 <td align="right" nowrap>[%- LxERP.format_amount(total_cost, 2) -%] EUR</td>