d1c227891117b7ab8e29916159c4968d440e0711
[kivitendo-erp.git] / templates / webpages / requirement_spec_order / list.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%]
2 <div id="quotations_and_orders" class="quotations-and-orders-context-menu">
3  <h2>[% LxERP.t8("Assignment of articles to sections") %]</h2>
4
5  [% SET sections = SELF.requirement_spec.sections_sorted %]
6  [% IF !sections.size %]
7  <div>
8   [% LxERP.t8("No sections have been created yet.") %]
9  </div>
10  [% ELSE %]
11  <table id="quotations_and_orders_sections" style="width: 100%">
12   <thead>
13    <tr class="listheading">
14     <th>[% LxERP.t8("Number") %]</th>
15     <th>[% LxERP.t8("Title") %]</th>
16     <th>[% LxERP.t8("Description") %]</th>
17     <th>[% LxERP.t8("Article") %]</th>
18     <th>[% LxERP.t8("Unit") %]</th>
19     <th>[% LxERP.t8("Position type in quotation/order") %]</th>
20    </tr>
21   </thead>
22
23   <tbody>
24    [% FOREACH section = sections %]
25     <tr class="listrow">
26      <td>[% HTML.escape(section.fb_number) %]</td>
27      <td>[% HTML.escape(section.title) %]</td>
28      <td>[% HTML.escape(P.truncate(section.description_as_stripped_html)) %]</td>
29      <td>
30       [% IF section.order_part %]
31        [% HTML.escape(section.order_part.partnumber) %] [% HTML.escape(section.order_part.description) %]
32       [% ELSE %]
33        [% LxERP.t8("no article assigned yet") %]
34       [% END %]
35      </td>
36      <td>[% HTML.escape(section.order_part.unit) %]</td>
37      <td>
38       [% IF section.order_part_id && section.order_part.unit_obj.is_time_based %]
39        [% LxERP.t8("time and effort based position") %]
40       [% ELSIF section.order_part_id %]
41        [% LxERP.t8("flat-rate position") %]
42       [% END %]
43      </td>
44     </tr>
45    [% END %]
46   </tbody>
47  </table>
48  [% END %]
49
50  <h2>[% LxERP.t8("Quotations and orders") %]</h2>
51
52  [% SET orders = SELF.requirement_spec.orders_sorted %]
53  [% IF !orders.size %]
54   <div>[% LxERP.t8("No quotations or orders have been created yet.") %]</div>
55  [% ELSE %]
56
57   <table style="width:100%">
58    <thead>
59     <tr class="listheading">
60      <th>[% LxERP.t8("Type") %]</th>
61      <th>[% LxERP.t8("Requirement Spec Version") %]</th>
62      <th>[% LxERP.t8("Record number") %]</th>
63      <th>[% LxERP.t8("Transaction description") %]</th>
64      <th>[% LxERP.t8("Quotation/Order Date") %]</th>
65      <th>[% LxERP.t8("Creation Date") %]</th>
66     </tr>
67    </thead>
68
69    <tbody>
70     [% FOREACH rs_order = orders %]
71     <tr class="listrow quotations-and-orders-order-context-menu">
72      [% L.hidden_tag('order_id', rs_order.id, no_id=1) %]
73      <td>[% rs_order.order.type == 'sales_quotation' ? LxERP.t8('Sales quotation') : LxERP.t8('Sales Order') %]</td>
74      <td>
75       [% IF rs_order.version %]
76        [% HTML.escape(rs_order.version.version_number) %]
77       [% ELSE %]
78        [% LxERP.t8("working copy") %]
79       [% END %]
80      </td>
81      <td>
82       [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
83         <a href="controller.pl?action=Order/edit&id=[% HTML.url(rs_order.order_id) %]&type=[% HTML.url(rs_order.order.type) %]">
84       [%- ELSE -%]
85         <a href="oe.pl?action=edit&id=[% HTML.url(rs_order.order_id) %]&type=[% HTML.url(rs_order.order.type) %]">
86       [%- END -%]
87        [% HTML.escape(rs_order.order.quotation ? rs_order.order.quonumber : rs_order.order.ordnumber) %]
88       </a>
89      </td>
90      <td>[% HTML.escape(rs_order.order.transaction_description) %]</td>
91      <td>[% rs_order.order.transdate.to_kivitendo(precision='day') %]</td>
92      <td>[% rs_order.itime.to_kivitendo(precision='day') %]</td>
93     </tr>
94     [%- END %]
95    </tbody>
96   </table>
97  [% END %]
98 </div>