X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=4cd96ca9f9322cd318315884980ba7ad8e599a16;hb=8cce015eb15e1c919948b27441b9a7dfd905fe39;hp=b9ede695efd757592a5f95e9067d1d03cd81d127;hpb=ac6d3a20575e77752a9ed40fb1dd39f675a22c10;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index b9ede695e..4cd96ca9f 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -333,7 +333,7 @@ sub form_header { max_dunning_level dunning_amount shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2 message email subject cc bcc taxaccounts cursor_fokus - convert_from_do_ids convert_from_oe_ids show_details gldate + convert_from_do_ids convert_from_oe_ids show_details gldate useasnew ), @custom_hiddens, map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}]; @@ -586,6 +586,8 @@ sub storno { # Payments must not be recorded for the new storno invoice. $form->{paidaccounts} = 0; map { my $key = $_; delete $form->{$key} if grep { $key =~ /^$_/ } qw(datepaid_ gldate_ acc_trans_id_ source_ memo_ paid_ exchangerate_ AR_paid_) } keys %{ $form }; + # set new ids for storno invoice + delete $form->{"invoice_id_$_"} for 1 .. $form->{"rowcount"}; # saving the history if(!exists $form->{addition} && $form->{id} ne "") { @@ -618,6 +620,10 @@ sub use_as_new { $form->{paidaccounts} = 1; $form->{rowcount}--; $form->{invdate} = $form->current_date(\%myconfig); + + $form->{"converted_from_invoice_id_$_"} = delete $form->{"invoice_id_$_"} for 1 .. $form->{"rowcount"}; + + $form->{useasnew} = 1; &display_form; $main::lxdebug->leave_sub();