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