</body> entfernt
[kivitendo-erp.git] / templates / webpages / oe / sales_price_information.html
1 [% USE HTML %]
2 [% USE LxERP %]
3 [% USE T8 %]
4 [%- IF !TABDIALOG %]
5 <body>
6
7  <p><div class="listtop">[% 'Price information' | $T8 %]</div></p>
8
9  <p>
10   <input type="button" class="submit" onclick="window.close()" value="[% 'Close window' | $T8 %]">
11  </p>
12
13  <p>
14   <table>
15    <tr>
16     <td>[% 'Part Number' | $T8 %]:</td>
17     <td>[% HTML.escape(part_info.partnumber) %]</td>
18    </tr>
19
20    <tr>
21     <td>[% 'Description' | $T8 %]:</td>
22     <td>[% HTML.escape(part_info.description) %]</td>
23    </tr>
24
25    [%- UNLESS part_info.type == 'service' %]
26     <tr>
27      <td>[% 'Stocked' | $T8 %]:</td>
28      <td>[% HTML.escape(LxERP.format_amount_units(stocked, part_info.unit, part_info.unit)) %]</td>
29     </tr>
30    [%- END %]
31   </table>
32  </p>
33
34 [%- END %]
35
36  <p>
37   <table>
38    [%- SET custom_texts = {
39           sales_order       => {
40             head   => LxERP.t8('Sales Orders'),
41             empty  => LxERP.t8('This part has not been used in a sales order yet.'),
42             date   => LxERP.t8('Order Date'),
43             number => LxERP.t8('Order Number'),
44             vc     => LxERP.t8('Customer'),
45           },
46           sales_quotation   => {
47             head   => LxERP.t8('Quotations'),
48             empty  => LxERP.t8('This part has not been used in a quotation yet.'),
49             date   => LxERP.t8('Quotation Date'),
50             number => LxERP.t8('Quotation Number'),
51             vc     => LxERP.t8('Customer'),
52           },
53           purchase_order    => {
54             head   => LxERP.t8('Purchase Orders'),
55             empty  => LxERP.t8('This part has not been used in a purchase order yet.'),
56             date   => LxERP.t8('Order Date'),
57             number => LxERP.t8('Order Number'),
58             vc     => LxERP.t8('Vendor'),
59           },
60           request_quotation => {
61             head   => LxERP.t8('RFQs'),
62             empty  => LxERP.t8('This part has not been used in a request quotation yet.'),
63             date   => LxERP.t8('Quotation Date'),
64             number => LxERP.t8('Quotation Number'),
65             vc     => LxERP.t8('Vendor'),
66           },
67         }
68    %]
69    [%- FOREACH type = ['sales_order', 'sales_quotation', 'purchase_order', 'request_quotation'] %]
70
71     <tr>
72      <th class="listtop" colspan="8">[% custom_texts.$type.head %]</th>
73     </tr>
74
75     [%- IF !PRICE_INFO.$type.size %]
76     <tr>
77      <td colspan="7">[% custom_texts.$type.empty %]</td>
78     </tr>
79
80     [%- ELSE %]
81
82      <tr>
83       <th class="listheading">[% custom_texts.$type.date %]</th>
84       <th class="listheading">[% custom_texts.$type.number %]</th>
85       <th class="listheading">[% custom_texts.$type.vc %]</th>
86       <th class="listheading">[% 'Delivered' | $T8 %]</th>
87       <th class="listheading" align="right">[% 'Quantity' | $T8 %]</th>
88       <th class="listheading" align="right">[% 'Unit price' | $T8 %]</th>
89       <th class="listheading" align="right">[% 'Discount' | $T8 %]</th>
90       <th class="listheading" align="right">[% 'Line total' | $T8 %]</th>
91      </tr>
92
93      [%- FOREACH row = PRICE_INFO.$type %]
94       <tr class="listrow[% loop.count % 2 %]">
95        <td>[% HTML.escape(row.date) %]</td>
96        <td><a href="oe.pl?action=edit&type=[% type | html %]&id=[% row.id | html %]">[% HTML.escape(row.number) %]</a></td>
97        <td>[% HTML.escape(row.vc) %]</td>
98        <td align="right">[% HTML.escape(LxERP.format_amount(row.ship)) %] [% HTML.escape(row.unit) %]</td>
99        <td align="right">[% HTML.escape(LxERP.format_amount(row.qty)) %] [% HTML.escape(row.unit) %]</td>
100        <td align="right">[% HTML.escape(LxERP.format_amount(row.sellprice, 2)) %]</td>
101        <td align="right">[% HTML.escape(LxERP.format_amount(row.discount * 100)) %]</td>
102        <td align="right">[% HTML.escape(LxERP.format_amount(row.linetotal, 2)) %]</td>
103       </tr>
104      [%- END %]
105     [%- END %]
106    [%- END %]
107   </table>
108  </p>
109
110 [%- IF !TABDIALOG %]
111 [%- END %]