MHD-Behandlung in Fehlermeldung bei unzureichender Lagermenge.
[kivitendo-erp.git] / templates / webpages / ct / get_delivery_de.html
index b6daa67..a8c0d97 100644 (file)
           <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 %]
+[%-
+    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='is.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=sales_order&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</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>
@@ -27,3 +35,6 @@
 [%- 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 %]