From 3740b5032e01a83f12912887e66d0824c47aebcc Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 7 May 2007 08:18:41 +0000 Subject: [PATCH] =?utf8?q?Beim=20Stornieren=20von=20Einkaufs-=20und=20Verk?= =?utf8?q?aufsrechnungen=20d=C3=BCrfen=20die=20bisherigen=20Zahlungsaus-?= =?utf8?q?=20und=20-eing=C3=A4nge=20nicht=20auch=20in=20der=20neuen=20Stor?= =?utf8?q?norechnung=20verzeichnet=20werden.=20Zus=C3=A4tzlich=20daf=C3=BC?= =?utf8?q?r=20gesorgt,=20dass=20beim=20Stornieren=20von=20Verkaufsrechnung?= =?utf8?q?en=20nicht=20noch=20einmal=20die=20Maske=20erscheint,=20bevor=20?= =?utf8?q?storniert=20wird,=20wenn=20die=20Rechnung=20nur=20eine=20Positio?= =?utf8?q?n=20umfasst.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ir.pl | 4 ++++ bin/mozilla/is.pl | 14 +++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 39b4b88a1..9dd0076c5 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -1017,6 +1017,10 @@ sub storno { invoice_links(); prepare_invoice(); relink_accounts(); + + # Payments must not be recorded for the new storno invoice. + $form->{paidaccounts} = 0; + map { my $key = $_; delete $form->{$key} if grep { $key =~ /^$_/ } qw(datepaid_ source_ memo_ paid_ exchangerate_ AR_paid_) } keys %{ $form }; # saving the history if(!exists $form->{addition} && $form->{id} ne "") { diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index e94bb386e..7eb339804 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1522,21 +1522,25 @@ sub storno { } map({ my $key = $_; delete($form->{$key}) - unless (grep({ $key eq $_ } qw(login password id type))); } + unless (grep({ $key eq $_ } qw(login password id stylesheet type))); } keys(%{ $form })); - &invoice_links; - &prepare_invoice; + invoice_links(); + prepare_invoice(); relink_accounts(); + # Payments must not be recorded for the new storno invoice. + $form->{paidaccounts} = 0; + map { my $key = $_; delete $form->{$key} if grep { $key =~ /^$_/ } qw(datepaid_ source_ memo_ paid_ exchangerate_ AR_paid_) } keys %{ $form }; + $form->{storno_id} = $form->{id}; $form->{storno} = 1; $form->{id} = ""; $form->{invnumber} = "Storno zu " . $form->{invnumber}; + $form->{rowcount}++; - &post(); + post(); $lxdebug->leave_sub(); - } sub preview { -- 2.20.1