X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=502525782e9220b9f863467ca5c0b7cd4ff85be9;hb=25d67207329617a104fab716c301895cf0ae116d;hp=7f5ad5e40d42a01a5ede99d7376df4d6d3316d49;hpb=8f31109aa649d5d287e8c06e0793c890f18d28d9;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 7f5ad5e40..502525782 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -382,7 +382,7 @@ sub form_header { # hiddens $TMPL_VAR{HIDDENS} = [qw( - id action type media format queued printed emailed title vc discount + id type media format queued printed emailed title vc discount title creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id max_dunning_level dunning_amount dunning_description shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptogln shiptocontact shiptophone shiptofax @@ -472,7 +472,7 @@ sub form_footer { # follow ups if ($form->{id}) { - $form->{follow_ups} = FU->follow_ups('trans_id' => $form->{id}) || []; + $form->{follow_ups} = FU->follow_ups('trans_id' => $form->{id}, 'not_done' => 1) || []; $form->{follow_ups_unfinished} = ( sum map { $_->{due} * 1 } @{ $form->{follow_ups} } ) || 0; } @@ -966,6 +966,8 @@ sub storno { $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 }; + # record link invoice to storno + $form->{convert_from_ar_ids} = $form->{id}; $form->{storno_id} = $form->{id}; $form->{storno} = 1; $form->{id} = ""; @@ -973,7 +975,8 @@ sub storno { $form->{invdate} = DateTime->today->to_lxoffice; $form->{rowcount}++; # set new ids for storno invoice - delete $form->{"invoice_id_$_"} for 1 .. $form->{"rowcount"}; + # set new persistent ids for storno invoice items + $form->{"converted_from_invoice_id_$_"} = delete $form->{"invoice_id_$_"} for 1 .. $form->{"rowcount"}; post(); $main::lxdebug->leave_sub();