From: Jan Büren Date: Mon, 25 Oct 2010 14:18:21 +0000 (+0200) Subject: Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp X-Git-Tag: release-2.6.2beta1~92 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/7cf894f137fa5e4a2679b8a6e1aa00566041f9e4?hp=22ae0bf076b11483f200300b039ae284dd09b324 Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp --- diff --git a/SL/Form.pm b/SL/Form.pm index 77581a0c6..f3fe6e5d9 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/sql/Pg-upgrade2/shipto_add_cp_gender.sql b/sql/Pg-upgrade2/shipto_add_cp_gender.sql new file mode 100644 index 000000000..8991c4496 --- /dev/null +++ b/sql/Pg-upgrade2/shipto_add_cp_gender.sql @@ -0,0 +1,5 @@ +-- @tag: shipto_add_cp_gender +-- @description: Geschlecht fuer Ansprechpartner bei abweichender Lieferadresse +-- @depends: release_2_6_1 + +ALTER TABLE shipto add column shiptocp_gender text; 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 @@ +