Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / customer_vendor_turnover / _list_open_orders.html
diff --git a/templates/webpages/customer_vendor_turnover/_list_open_orders.html b/templates/webpages/customer_vendor_turnover/_list_open_orders.html
new file mode 100644 (file)
index 0000000..d15933a
--- /dev/null
@@ -0,0 +1,48 @@
+[%- USE T8 %]
+[%- USE LxERP %]
+[%- USE L %]
+[%- USE HTML %]
+
+<div id="orders_report">
+  <table width="100%">
+    <caption class="listtop">[%- HTML.escape(title) %]</caption>
+    <tbody>
+      <tr>
+        <td class="listheading">[% 'Type' | $T8 %]</td>
+        <td class="listheading">[% 'Order/RFQ Number' | $T8 %]</td>
+        <td class="listheading">[% 'Date' | $T8 %]</td>
+        <td class="listheading">[% 'Amount' | $T8 %]</td>
+        <td class="listheading">[% 'Salesman' | $T8 %]</td>
+        <td class="listheading">[% 'Transaction description' | $T8 %]</td>
+      </tr>
+
+      [%- FOREACH row = orders %]
+      <tr class="listrow[% loop.count % 2 %]">
+        <td>[% IF row.quotation %]
+          [% IF FORM.db == 'customer' %][% 'Sales quotation' | $T8 %][% ELSE %][% 'RFQ' | $T8 %][% END %]</td>
+              [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
+                <td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_quotation[% ELSE %]request_quotation[% END %]&id=[% HTML.escape(row.id) %]'>
+                    [% END %][% HTML.escape(row.quonumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
+              [%- ELSE -%]
+                <td>[% IF row.id %]<a href='oe.pl?action=edit&type=[% IF FORM.db == "customer" %]sales_quotation[% ELSE %]request_quotation[% END %]&vc=[% FORM.db %]&id=[% HTML.escape(row.oe_id) %]'>
+                    [% END %][% HTML.escape(row.quonumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
+              [%- END -%]
+            [% ELSE %]
+            [% IF FORM.db == 'customer' %][% 'Sales Order' | $T8 %][% ELSE %][% 'Purchase Order' | $T8 %][% END %]</td>
+              [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
+                <td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_order[% ELSE %]purchase_order[% END %]&id=[% HTML.escape(row.id) %]'>
+                    [% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
+              [%- ELSE -%]
+                <td>[% IF row.id %]<a href='oe.pl?action=edit&type=[% IF FORM.db == "customer" %]sales_order[% ELSE %]purchase_order[% END %]&vc=[% FORM.db %]&id=[% HTML.escape(row.oe_id) %]'>
+                    [% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
+              [%- END -%]
+            [% END %]
+        <td>[% row.transdate.to_kivitendo | html %]</td>
+        <td class="numeric">[%- LxERP.format_amount(row.amount, 2) %]</td>
+        <td>[% row.employee.name | html %]</td>
+        <td>[% row.transaction_description | html %]</td>
+      </tr>
+      [% END %]
+    </tbody>
+  </table>
+</div>