Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5a1dbe03

Von Jan Büren vor mehr als 3 Jahren hinzugefügt

  • ID 5a1dbe037515fdd49a2bf2004dcf94f6463db646
  • Vorgänger 2d586b8b
  • Nachfolger 651d3343

invoice_type: Gutschriften bleiben Gutschriften auch wenn die storniert wurden

Andernfalls liefert invoice_type den Typ 'Rechnung' was definitiv falsch ist.

Unterschiede anzeigen:

SL/DB/Invoice.pm
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';

Auch abrufbar als: Unified diff