Revision 5a1dbe03
Von Jan Büren vor mehr als 3 Jahren hinzugefügt
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
invoice_type: Gutschriften bleiben Gutschriften auch wenn die storniert wurden
Andernfalls liefert invoice_type den Typ 'Rechnung' was definitiv falsch ist.