From: Thomas Heck Date: Tue, 26 Nov 2013 16:22:43 +0000 (+0100) Subject: Kunden Lieferungen-Tab: bei "Alle" nach der Kundenid suchen X-Git-Tag: release-3.1.0beta1~22^2~112 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4e35d4c08e7527a7e8261b40f43937af5fe1f1fc;p=kivitendo-erp.git Kunden Lieferungen-Tab: bei "Alle" nach der Kundenid suchen fixt #2393 --- diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index f2e4ff609..0ffa2f589 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -407,21 +407,24 @@ sub action_get_delivery { $qty_sign = ''; } - my $where = ' WHERE 1=1 '; + my $where = ' WHERE 1=1'; my @values; if ( !$self->is_vendor() && $::form->{shipto_id} && $::form->{shipto_id} ne 'all' ) { - $where .= "AND ${arap}.shipto_id = ?"; + $where .= " AND ${arap}.shipto_id = ?"; push(@values, $::form->{shipto_id}); + } else { + $where .= " AND ${arap}.${db}_id = ?"; + push(@values, $::form->{id}); } if ( $::form->{delivery_from} ) { - $where .= "AND ${arap}.transdate >= ?"; + $where .= " AND ${arap}.transdate >= ?"; push(@values, conv_date($::form->{delivery_from})); } if ( $::form->{delivery_to} ) { - $where .= "AND ${arap}.transdate <= ?"; + $where .= " AND ${arap}.transdate <= ?"; push(@values, conv_date($::form->{delivery_to})); }