From: Moritz Bunkus Date: Mon, 1 Sep 2008 08:50:59 +0000 (+0000) Subject: Bei Lieferanschrift-Drop-Down auch die Straße und den Ort anzeigen. X-Git-Tag: release-2.6.0beta2~268 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=26ba876e4863567ba21fddd5ec8f909aacfbdfde;p=kivitendo-erp.git Bei Lieferanschrift-Drop-Down auch die Straße und den Ort anzeigen. --- diff --git a/SL/CT.pm b/SL/CT.pm index a82620d22..3252fe8a0 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -155,8 +155,9 @@ sub populate_drop_down_boxes { # get shipto address $query = - qq|SELECT shipto_id, shiptoname, shiptodepartment_1 | . - qq|FROM shipto WHERE (trans_id = ?) AND (module = 'CT')|; + qq|SELECT shipto_id, shiptoname, shiptodepartment_1, shiptostreet, shiptocity + FROM shipto + WHERE (trans_id = ?) AND (module = 'CT')|; $form->{SHIPTO} = selectall_hashref_query($form, $dbh, $query, $form->{id}); # get contacts diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 3b8a459b0..928a6efc8 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -273,7 +273,7 @@ sub form_header { $form->{is_admin} = $myconfig{role} eq 'admin'; $form->{is_customer} = $form->{db} eq 'customer'; $form->{salesman_label} = sub { $_[0]->{name} ne "" ? $_[0]->{name} : $_[0]->{login} }; - $form->{shipto_label} = sub { "$_[0]->{shiptoname} $_[0]->{shiptodepartment_1}" }; + $form->{shipto_label} = sub { my $s = shift(@_); join('; ', grep { $_ } map { $s->{"shipto$_"} } qw(name department_1 street city)) || ' ' }; $form->{contacts_label} = sub { join ", ", grep { $_ } $_[0]->{cp_name}, $_[0]->{cp_givenname} }; $form->{taxzone_id} = 0 if !$form->{id}; $form->{jsscript} = 1;