Pflichtenheft-Angebot/Auftrag: Liste in Tab anzeigen
[kivitendo-erp.git] / templates / webpages / requirement_spec_order / list.html
diff --git a/templates/webpages/requirement_spec_order/list.html b/templates/webpages/requirement_spec_order/list.html
new file mode 100644 (file)
index 0000000..fb86baf
--- /dev/null
@@ -0,0 +1,77 @@
+[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%]
+<div id="quotations_and_orders" class="quotations-and-orders-context-menu">
+ <h2>[% LxERP.t8("Assignment of articles to sections") %]</h2>
+ [% SET sections = SELF.requirement_spec.sections_sorted %]
+ [% IF !sections.size %]
+ <div>
+  [% LxERP.t8("No sections have been created yet.") %]
+ </div>
+ [% ELSE %]
+ <table id="quotations_and_orders_sections" style="width: 100%">
+  <thead>
+   <tr class="listheading">
+    <th>[% LxERP.t8("Number") %]</th>
+    <th>[% LxERP.t8("Title") %]</th>
+    <th>[% LxERP.t8("Description") %]</th>
+    <th>[% LxERP.t8("Article") %]</th>
+   </tr>
+  </thead>
+
+  <tbody>
+   [% FOREACH section = sections %]
+    <tr class="listrow">
+     <td>[% HTML.escape(section.fb_number) %]</td>
+     <td>[% HTML.escape(section.title) %]</td>
+     <td>[% HTML.escape(P.truncate(section.description)) %]</td>
+     <td>
+      [% IF section.order_part %]
+       [% HTML.escape(section.order_part.partnumber) %] [% HTML.escape(section.order_part.description) %]
+      [% ELSE %]
+       [% LxERP.t8("no article assigned yet") %]
+      [% END %]
+     </td>
+    </tr>
+   [% END %]
+  </tbody>
+ </table>
+ [% END %]
+
+ <h2>[% LxERP.t8("Quotations and orders") %]</h2>
+
+ [% SET orders = SELF.requirement_spec.orders_sorted %]
+ [% IF !orders.size %]
+  <div>[% LxERP.t8("No quotations or orders have been created yet.") %]</div>
+ [% ELSE %]
+
+  <table style="width:100%">
+   <thead>
+    <tr class="listheading">
+     <th>[% LxERP.t8("Type") %]</th>
+     <th>[% LxERP.t8("Requirement Spec Version") %]</th>
+     <th>[% LxERP.t8("Record number") %]</th>
+     <th>[% LxERP.t8("Transaction Description") %]</th>
+     <th>[% LxERP.t8("Date") %]</th>
+    </tr>
+   </thead>
+
+   <tbody>
+    [% FOREACH rs_order = orders %]
+    <tr class="listrow quotations-and-orders-order-context-menu">
+     [% L.hidden_tag('order_id', rs_order.id, no_id=1) %]
+     <td>[% rs_order.order.type == 'sales_quotation' ? LxERP.t8('Sales quotation') : LxERP.t8('Sales order') %]</td>
+     <td>
+      [% IF rs_order.version %]
+       [% HTML.escape(rs_order.version.version_number) %]
+      [% ELSE %]
+       [% LxERP.t8("working copy") %]
+      [% END %]
+     </td>
+     <td>[% HTML.escape(rs_order.order.quotation ? rs_order.order.quonumber : rs_order.order.ordnumber) %]</td>
+     <td>[% HTML.escape(rs_order.order.transaction_description) %]</td>
+     <td>[% rs_order.itime.to_kivitendo(precision='day') %]</td>
+    </tr>
+    [%- END %]
+   </tbody>
+  </table>
+ [% END %]
+</div>