From cb4ccd7ed0bac4752dc4f7cf549a447e4bb07463 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 20 Dec 2005 16:23:35 +0000 Subject: [PATCH] Fix fuer Bug 224 (Rechnung -> Auftrag) Bugfix Verkauf -> Berichte -> Angebote -> Workflow Angebot -> Auftrag (fuer mehr als ein item) Bugfix Verkauf -> Berichte -> Angebote -> Workflow Angebot -> Auftrag" (fuer genau ein item) --- SL/OE.pm | 6 +++--- bin/mozilla/oe.pl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SL/OE.pm b/SL/OE.pm index dad8e7540..4f54150f7 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -586,7 +586,7 @@ sub retrieve { my $query, @ids; # translate the ids (given by id_# and trans_id_#) into one array of ids, so we can join them later - map { push @ids, $form->{"trans_id_$_"} if ($form->{"id_$_"}) } (1 .. $form->{"rowcount"}); + map { push @ids, $form->{"trans_id_$_"} if ($form->{"id_$_"} and $form->{"trans_id_$_"}) } (1 .. $form->{"rowcount"}); # if called in multi id mode, and still only got one id, switch back to single id if ($form->{"rowcount"} and $#ids == 0) { @@ -662,9 +662,9 @@ sub retrieve { $ref = $sth->fetchrow_hashref(NAME_lc); map { $form->{$_} = $ref->{$_} } keys %$ref; - # destroy all entries for multiple ids that yield different information + # set all entries for multiple ids blank that yield different information while ($ref = $sth->fetchrow_hashref(NAME_lc)) { - map { undef $form->{$_} if ($ref->{$_} ne $form->{$_}) } keys %$ref; + map { $form->{$_} = '' if ($ref->{$_} ne $form->{$_}) } keys %$ref; } # if not given, fill transdate with current_date diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index b4760b284..0760f4afa 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -140,7 +140,7 @@ sub order_links { # if multiple rowcounts (== collective order) then check if the # there were more than one customer (in that case OE::retrieve removes # the content from the field) - if ($form->{rowcount} && $form->{type} eq 'sales_order' && $form->{customer} eq '') { + if ($form->{rowcount} && $form->{type} eq 'sales_order' && defined $form->{customer} && $form->{customer} eq '') { # $main::lxdebug->message(0, "Detected Edit order with concurrent customers"); $form->error($locale->text('Collective Orders only work for orders from one customer!')); } -- 2.20.1