X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=95185519eaeb1284aead6ed4443d1d3fd8759618;hb=8cce015eb15e1c919948b27441b9a7dfd905fe39;hp=c44351d0027f97285dc79d01642b7600a550d1f0;hpb=991d16bbbc32c05e2e30e00711a42ba20207a8db;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index c44351d00..95185519e 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -380,7 +380,7 @@ sub form_header { max_dunning_level dunning_amount shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2 shiptocp_gender message email subject cc bcc taxaccounts cursor_fokus - convert_from_do_ids convert_from_oe_ids convert_from_ar_ids + convert_from_do_ids convert_from_oe_ids convert_from_ar_ids useasnew invoice_id show_details ), @custom_hiddens, @@ -834,8 +834,10 @@ sub use_as_new { $form->{employee_id} = SL::DB::Manager::Employee->current->id; $form->{forex} = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, 'buy'); $form->{exchangerate} = $form->{forex} if $form->{forex}; - delete $form->{"invoice_id_$_"} for 1 .. $form->{"rowcount"}; + $form->{"converted_from_invoice_id_$_"} = delete $form->{"invoice_id_$_"} for 1 .. $form->{"rowcount"}; + + $form->{useasnew} = 1; &display_form; $main::lxdebug->leave_sub(); @@ -861,6 +863,11 @@ sub storno { $form->error($locale->text('Cannot storno invoice for a closed period!')); } + # save the history of invoice being stornoed + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; + $form->{addition} = "STORNO"; + $form->save_history; + map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password type))); } keys(%{ $form })); invoice_links();