]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Invoice.pm
invoice_type: Gutschriften bleiben Gutschriften auch wenn die storniert wurden
[mfinanz.git] / SL / DB / Invoice.pm
index c5c29dd8ed8351665b3d491d01f8f1e78805a253..54f5483e861066bfd600101de1a001fae35e0e32 100644 (file)
@@ -539,7 +539,8 @@ sub invoice_type {
   my ($self) = @_;
 
   return 'ar_transaction'     if !$self->invoice;
-  return 'credit_note'        if $self->type eq 'credit_note' && $self->amount < 0 && !$self->storno;
+  # stornoed credit_notes are still credit notes and not invoices
+  return 'credit_note'        if $self->type eq 'credit_note' && $self->amount < 0;
   return 'invoice_storno'     if $self->type ne 'credit_note' && $self->amount < 0 &&  $self->storno;
   return 'credit_note_storno' if $self->type eq 'credit_note' && $self->amount > 0 &&  $self->storno;
   return 'invoice';