MHD-Behandlung in Fehlermeldung bei unzureichender Lagermenge.
[kivitendo-erp.git] / templates / webpages / ct / get_delivery_de.html
index 9f723f7..a8c0d97 100644 (file)
@@ -1,30 +1,40 @@
-[% USE LxERP %]
-<table width=100%>
+[% USE HTML %][% USE LxERP %]
+<table width="100%">
   <tr>
     <td>
-      <table width=100%>
-        <tr class=listheading>
-          <th class=listheading>Lieferadresse</th>
-          <th class=listheading>Rechnung</th>
-          <th class=listheading>Auftrag</th>
-          <th class=listheading>Rechnungsdatum</th>
-          <th class=listheading>Beschreibung</th>
-          <th class=listheading>Menge</th>
-          <th class=listheading>Einheit</th>
-          <th class=listheading>Verkaufspreis</th>
+      <table width="100%">
+        <tr class="listheading">
+          <th class="listheading">Lieferadresse</th>
+          <th class="listheading">Rechnung</th>
+          <th class="listheading">Auftrag</th>
+          <th class="listheading">Rechnungsdatum</th>
+          <th class="listheading">Beschreibung</th>
+          <th class="listheading">Menge</th>
+          <th class="listheading">Einheit</th>
+[%- IF is_customer %]
+          <th class="listheading">Verkaufspreis</th>
+[%- ELSE %]
+          <th class="listheading">Einkaufspreis</th>
+[%- END %]
         </tr>
 [%- FOREACH row = DELIVERY %]
-        <tr class=listrow[% loop.count % 2 %]>
-          
-          <td>[% row.shiptoname UNLESS loop.prev.shiptoname == row.shiptoname %]&nbsp;</td>
-          <td>[% row.invnumber   %]&nbsp;</td>
-          <td>[% row.ordnumber   %]&nbsp;</td>
-          <td>[% row.transdate   %]&nbsp;</td>
-          <td>[% row.description %]&nbsp;</td>
-          <td>[% row.qty         %]&nbsp;</td>
-          <td>[% row.unit        %]&nbsp;</td>
-          <td>[% LxERP.format_amount(row.sellprice, 2) %]&nbsp;</td>
+[%-
+    row.script = is_customer ?  ( row.invoice ? 'is' : 'ar' )
+                             :  ( row.invoice ? 'ir' : 'ap' )
+-%]
+        <tr class="listrow[% loop.count % 2 %]">
+          <td>[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %]&nbsp;</td>
+          <td>[% IF row.id %]<a href='[% row.script %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
+          <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=[% IF is_customer %]sales_order[% ELSE %]purchase_order[% END %]&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</td>
+          <td>[% HTML.escape(row.transdate)   || '&nbsp;' %]</td>
+          <td>[% HTML.escape(row.description) || '&nbsp;' %]</td>
+          <td>[% HTML.escape(row.qty)         || '&nbsp;' %]</td>
+          <td>[% HTML.escape(row.unit)        || '&nbsp;' %]</td>
+          <td>[% LxERP.format_amount(row.sellprice, 2) || '&nbsp;' %]</td>
         </tr>
 [%- END %]
 
      </table>
+[%- IF DELIVERY.size == 15 %]
+     <p>Diese Liste ist auf 15 Zeilen begrenzt. Wenn Sie eine vollständige Liste benötigen, erstellen Sie bitte einen Bericht.</p>
+[%- END %]