From: Bernd Bleßmann Date: Mon, 30 Jun 2014 13:35:41 +0000 (+0200) Subject: Aufträge bei Anzeige der Lieferungen in Kundenstammdaten richtig zuordnen. X-Git-Tag: release-3.2.0beta~407 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=31a84730a77d2e2fdc07bfd99da38b9c193a58e5;p=kivitendo-erp.git Aufträge bei Anzeige der Lieferungen in Kundenstammdaten richtig zuordnen. Und richtigen Beleg (VK/EK) öffnen. Behebt #2467. --- diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index af109e967..91994a1c3 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -470,7 +470,8 @@ sub action_get_delivery { ON p.id = i.parts_id LEFT JOIN oe - ON (oe.ordnumber = ${arap}.ordnumber AND NOT ${arap}.ordnumber = '') + ON (oe.ordnumber = ${arap}.ordnumber AND NOT ${arap}.ordnumber = '' + AND ". ($arap eq 'ar' ? 'oe.customer_id IS NOT NULL' : 'oe_vendor_id IS NOT NULL') ." ) ${where} ORDER BY ${arap}.transdate DESC LIMIT 15"; diff --git a/templates/webpages/customer_vendor/get_delivery.html b/templates/webpages/customer_vendor/get_delivery.html index 7cfc76fe7..5250110b3 100644 --- a/templates/webpages/customer_vendor/get_delivery.html +++ b/templates/webpages/customer_vendor/get_delivery.html @@ -27,7 +27,7 @@ [% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %]  [% IF row.id %][% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %][% END %] - [% IF row.oe_id %][% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.oe_id %][% END %] + [% IF row.oe_id %][% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.oe_id %][% END %] [% HTML.escape(row.transdate) || ' ' %] [% HTML.escape(row.description) || ' ' %] [% HTML.escape(row.qty) || ' ' %]