Revision 5a1dbe03
Von Jan Büren vor etwa 3 Jahren hinzugefügt
SL/DB/Invoice.pm | ||
---|---|---|
539 | 539 |
my ($self) = @_; |
540 | 540 |
|
541 | 541 |
return 'ar_transaction' if !$self->invoice; |
542 |
return 'credit_note' if $self->type eq 'credit_note' && $self->amount < 0 && !$self->storno; |
|
542 |
# stornoed credit_notes are still credit notes and not invoices |
|
543 |
return 'credit_note' if $self->type eq 'credit_note' && $self->amount < 0; |
|
543 | 544 |
return 'invoice_storno' if $self->type ne 'credit_note' && $self->amount < 0 && $self->storno; |
544 | 545 |
return 'credit_note_storno' if $self->type eq 'credit_note' && $self->amount > 0 && $self->storno; |
545 | 546 |
return 'invoice'; |
Auch abrufbar als: Unified diff
invoice_type: Gutschriften bleiben Gutschriften auch wenn die storniert wurden
Andernfalls liefert invoice_type den Typ 'Rechnung' was definitiv falsch ist.