From cd812c6bfa13b827806e526d22327b6aee07bc8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 4 Feb 2015 18:05:57 +0100 Subject: [PATCH] =?utf8?q?Nicht-editierbare=20CVars=20bei=20neuem=20Auftra?= =?utf8?q?g=20aus=20Mehrfachauswahl=20richtig=20=C3=BCbernehemen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Mehrauswahl im Auftragsbericht. --- SL/OE.pm | 5 +++-- bin/mozilla/oe.pl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SL/OE.pm b/SL/OE.pm index c2cde7306..6a46fecfd 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -571,7 +571,7 @@ SQL # link previous items with orderitems foreach (qw(orderitems invoice)) { - if (!$form->{saveasnew} && $form->{"converted_from_${_}_id_$i"}) { + if (!$form->{saveasnew} && !$form->{useasnew} && $form->{"converted_from_${_}_id_$i"}) { RecordLinks->create_links('dbh' => $dbh, 'mode' => 'ids', 'from_table' => $_, @@ -840,6 +840,7 @@ sub retrieve { # and remember for the rest of the function my $is_collective_order = scalar @ids; + $form->{useasnew} = !!$is_collective_order; if (!$form->{id}) { my $extra_days = $form->{type} eq 'sales_quotation' ? $::instance_conf->get_reqdate_interval : 1; @@ -1044,7 +1045,7 @@ sub retrieve { } # delete orderitems_id in collective orders, so that they get cloned no matter what - delete $ref->{orderitems_id} if $is_collective_order; + $ref->{converted_from_orderitems_id} = delete $ref->{orderitems_id} if $is_collective_order; # get tax rates and description my $accno_id = ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno}; diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 8a14425d5..8e47d512a 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -478,7 +478,7 @@ sub form_header { CFDD_shipto CFDD_shipto_id shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptodepartment_1 shiptodepartment_2 shiptoemail shiptocp_gender message email subject cc bcc taxpart taxservice taxaccounts cursor_fokus - show_details), + show_details useasnew), @custom_hiddens, map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} ]; # deleted: discount -- 2.20.1