From: Jan Büren Date: Thu, 9 Jun 2016 14:59:01 +0000 (+0200) Subject: Verkauf Storno-Rechnungen auch verknüpfen X-Git-Tag: release-3.4.1~70 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=210ea1a8d40b76912f71478f8f034fb5b515fa6f;p=kivitendo-erp.git Verkauf Storno-Rechnungen auch verknüpfen Ähnlich wie bei Gutschriften sollten Stornorechnungen auch mit der Ursprungsrechnung verknüpft sein. closes #132 --- diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 50f377686..c4d884984 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -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();