]> wagnertech.de Git - kivitendo-erp.git/blobdiff - bin/mozilla/ir.pl
Beim Stornieren von Einkaufs- und Verkaufsrechnungen dürfen die bisherigen Zahlungsau...
[kivitendo-erp.git] / bin / mozilla / ir.pl
index 39b4b88a14edb0517cd58119f4714d4a8501076d..9dd0076c526d1178e98fecbc3394e4bf9b34dbfd 100644 (file)
@@ -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 "") {