Pflichtenheft-Angebot/Auftrag: Liste in Tab anzeigen
[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  [% SET sections = SELF.requirement_spec.sections_sorted %]
5  [% IF !sections.size %]
6  <div>
7   [% LxERP.t8("No sections have been created yet.") %]
8  </div>
9  [% ELSE %]
10  <table id="quotations_and_orders_sections" style="width: 100%">
11   <thead>
12    <tr class="listheading">
13     <th>[% LxERP.t8("Number") %]</th>
14     <th>[% LxERP.t8("Title") %]</th>
15     <th>[% LxERP.t8("Description") %]</th>
16     <th>[% LxERP.t8("Article") %]</th>
17    </tr>
18   </thead>
19
20   <tbody>
21    [% FOREACH section = sections %]
22     <tr class="listrow">
23      <td>[% HTML.escape(section.fb_number) %]</td>
24      <td>[% HTML.escape(section.title) %]</td>
25      <td>[% HTML.escape(P.truncate(section.description)) %]</td>
26      <td>
27       [% IF section.order_part %]
28        [% HTML.escape(section.order_part.partnumber) %] [% HTML.escape(section.order_part.description) %]
29       [% ELSE %]
30        [% LxERP.t8("no article assigned yet") %]
31       [% END %]
32      </td>
33     </tr>
34    [% END %]
35   </tbody>
36  </table>
37  [% END %]
38
39  <h2>[% LxERP.t8("Quotations and orders") %]</h2>
40
41  [% SET orders = SELF.requirement_spec.orders_sorted %]
42  [% IF !orders.size %]
43   <div>[% LxERP.t8("No quotations or orders have been created yet.") %]</div>
44  [% ELSE %]
45
46   <table style="width:100%">
47    <thead>
48     <tr class="listheading">
49      <th>[% LxERP.t8("Type") %]</th>
50      <th>[% LxERP.t8("Requirement Spec Version") %]</th>
51      <th>[% LxERP.t8("Record number") %]</th>
52      <th>[% LxERP.t8("Transaction Description") %]</th>
53      <th>[% LxERP.t8("Date") %]</th>
54     </tr>
55    </thead>
56
57    <tbody>
58     [% FOREACH rs_order = orders %]
59     <tr class="listrow quotations-and-orders-order-context-menu">
60      [% L.hidden_tag('order_id', rs_order.id, no_id=1) %]
61      <td>[% rs_order.order.type == 'sales_quotation' ? LxERP.t8('Sales quotation') : LxERP.t8('Sales order') %]</td>
62      <td>
63       [% IF rs_order.version %]
64        [% HTML.escape(rs_order.version.version_number) %]
65       [% ELSE %]
66        [% LxERP.t8("working copy") %]
67       [% END %]
68      </td>
69      <td>[% HTML.escape(rs_order.order.quotation ? rs_order.order.quonumber : rs_order.order.ordnumber) %]</td>
70      <td>[% HTML.escape(rs_order.order.transaction_description) %]</td>
71      <td>[% rs_order.itime.to_kivitendo(precision='day') %]</td>
72     </tr>
73     [%- END %]
74    </tbody>
75   </table>
76  [% END %]
77 </div>