From: Jan Büren Date: Mon, 25 Oct 2010 14:18:12 +0000 (+0200) Subject: Geschlecht fuer Ansprechpartner bei abweichender Lieferadresse als Auswahlfeld in... X-Git-Tag: release-2.6.2beta1~93 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7f683e50d6d550b307a1c97d071e894889039ff0;p=kivitendo-erp.git Geschlecht fuer Ansprechpartner bei abweichender Lieferadresse als Auswahlfeld in do.pl anzeigen und als hidden feld entsprechend weitergeben --- diff --git a/SL/Form.pm b/SL/Form.pm index 56e46f798..101576bec 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2018,7 +2018,7 @@ sub add_shipto { my @values; foreach my $item (qw(name department_1 department_2 street zipcode city country - contact phone fax email)) { + contact cp_gender phone fax email)) { if ($self->{"shipto$item"}) { $shipto = 1 if ($self->{$item} ne $self->{"shipto$item"}); } @@ -2036,6 +2036,7 @@ sub add_shipto { shiptocity = ?, shiptocountry = ?, shiptocontact = ?, + shiptocp_gender = ?, shiptophone = ?, shiptofax = ?, shiptoemail = ? @@ -2051,6 +2052,7 @@ sub add_shipto { shiptocity = ? AND shiptocountry = ? AND shiptocontact = ? AND + shiptocp_gender = ? AND shiptophone = ? AND shiptofax = ? AND shiptoemail = ? AND @@ -2061,8 +2063,8 @@ sub add_shipto { $query = qq|INSERT INTO shipto (trans_id, shiptoname, shiptodepartment_1, shiptodepartment_2, shiptostreet, shiptozipcode, shiptocity, shiptocountry, - shiptocontact, shiptophone, shiptofax, shiptoemail, module) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; + shiptocontact, shiptocp_gender, shiptophone, shiptofax, shiptoemail, module) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; do_query($self, $dbh, $query, $id, @values, $module); } } diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 83da8b5a9..fed2ff74c 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1780,7 +1780,7 @@ sub ship_to { my @shipto_vars = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry - shiptocontact shiptophone shiptofax shiptoemail + shiptocontact shiptocp_gender shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2); my @addr_vars = @@ -1795,6 +1795,19 @@ sub ship_to { ? $locale->text('Customer Number') : $locale->text('Vendor Number'); + # sieht nicht nett aus, funktioniert aber + # das vorausgewählte select-feld wird über shiptocp_gender + # entsprechend vorbelegt + my $selected_m=''; + my $selected_f=''; + if ($form->{shiptocp_gender} eq 'm') { + $selected_m='selected'; + $selected_f=''; + } elsif ($form->{shiptocp_gender} eq 'f') { + $selected_m=''; + $selected_f='selected'; + } + # get pricegroups for parts IS->get_pricegroups_for_parts(\%myconfig, \%$form); @@ -1867,6 +1880,15 @@ sub ship_to { $form->{contact} + + | . $locale->text('Gender') . qq| + + + + | . $locale->text('Phone') . qq| $form->{phone} diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index 2f98575f0..2410439c3 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -80,6 +80,7 @@ +