From: Sven Donath Date: Mon, 1 Nov 2010 09:38:12 +0000 (+0100) Subject: Merge branch 'master' of ssh://git-sdonath@lx-office.linet-services.de/~/lx-office-erp X-Git-Tag: release-2.6.2beta1~89^2~5^2 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/6522c45ab592513a42f45a059d14b270d062c612?hp=d3835e76df74c5bc7f014048303a2845a1d2277e Merge branch 'master' of ssh://git-sdonath@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/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 20bb0fd28..3867c1b41 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1935,3 +1935,17 @@ sub report_for_todo_list { return $content; } +sub dispatcher { + my $form = $main::form; + my $locale = $main::locale; + + foreach my $action (qw(delete delivery_order e_mail invoice print purchase_order purchase_order quotation + request_for_quotation sales_order sales_order save save_and_close save_as_new ship_to update)) { + if ($form->{"action_${action}"}) { + call_sub($action); + return; + } + } + + $form->error($locale->text('No action defined.')); +} diff --git a/doc/changelog b/doc/changelog index 55bda9235..3cc0c25ed 100644 --- a/doc/changelog +++ b/doc/changelog @@ -18,7 +18,7 @@ - Druckvorlage optional auf Excel erweitert, um Variablen die sich nicht in foreach-Schleifen befinden anzuzeigen (s.a.: doc/excel_templates.txt). - FiBu -> Bericht um Suchfeld Kontonummer erweitert - + - Ansprechpartner für abweichende Lieferadresse, um das Attribut Geschlecht erweitert API Änderungen: diff --git a/sql/Pg-upgrade2/auth_enable_sales_all_edit.pl b/sql/Pg-upgrade2/auth_enable_sales_all_edit.pl index e223cd859..e77fbee65 100644 --- a/sql/Pg-upgrade2/auth_enable_sales_all_edit.pl +++ b/sql/Pg-upgrade2/auth_enable_sales_all_edit.pl @@ -13,38 +13,35 @@ sub mydberror { "
$msg
" . $DBI::errstr); } -sub do_query { - my ($query, $may_fail) = @_; +sub do_update { + my $dbh = $main::auth->dbconnect(); + my $query = <do($query)) { - mydberror($query) unless ($may_fail); - $dbh->rollback(); - $dbh->begin_work(); + $sth->finish(); + $dbh->commit(); } -} -sub do_update { - my @queries; - -# do_query("ALTER TABLE project ADD PRIMARY KEY (id);", 1); -# map({ do_query($_, 0); } @queries); -# print "hieryy"; -# print (Dumper($main::form)); - my $dbh = $main::auth->dbconnect(); - my $query = qq|SELECT distinct group_id from auth.user_group|; - my $sth_all_groups = prepare_execute_query($form, $dbh, $query); - while (my $hash_ref = $sth_all_groups->fetchrow_hashref()) { # Schleife - push @queries, "INSERT INTO auth.group_rights (group_id, \"right\", granted) VALUES (" . $hash_ref->{group_id} . ", 'sales_all_edit', 't')"; -} -# if in doubt use brute force ;-) jb - foreach my $query (@queries){ -# print "hier:" . $query; - my $dbh = $main::auth->dbconnect(); - my $sth = prepare_query($form, $dbh, $query); - do_statement($form,$sth,$query); - $sth->finish(); - $dbh ->commit(); -} return 1; } 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 @@ + diff --git a/templates/webpages/oe/form_footer.html b/templates/webpages/oe/form_footer.html index de6d7b9bb..7beb4076f 100644 --- a/templates/webpages/oe/form_footer.html +++ b/templates/webpages/oe/form_footer.html @@ -114,48 +114,49 @@ [% label_edit %]
- - - - - - + + + + + + [%- IF id %]
[% label_workflow %]
- - + + [%- IF is_sales_quo %] - + [%- END %] [%- IF is_req_quo %] - + [%- END %] [%- IF is_sales_ord || is_pur_ord %] - + [%- END %] - + [%- IF is_sales_ord || is_pur_ord %]
[% heading %] als neue Vorlage verwenden für
[%- IF is_sales_ord %] - - + + [%- ELSE %] [%- IF is_pur_ord %] - - + + [%- END %] [%- END %] [%- END %] [%- END %] +