X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=e5b698db83cfb9b08f0fff5336e10ce0a6487736;hb=12c4c658bc579890462f96832d918337c2b2d484;hp=39b4b88a14edb0517cd58119f4714d4a8501076d;hpb=408a65ca75b941501bc630b144288dd466676248;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 39b4b88a1..e5b698db8 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 "") { @@ -1095,6 +1099,9 @@ sub post { $form->isblank("invdate", $locale->text('Invoice Date missing!')); $form->isblank("vendor", $locale->text('Vendor missing!')); + $form->{invnumber} =~ s/^\s*//g; + $form->{invnumber} =~ s/\s*$//g; + # if the vendor changed get new values if (&check_name(vendor)) { &update;