Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2746ccd0

Von Sven Schöling vor mehr als 12 Jahren hinzugefügt

Helfermethoden in Belegobjekten.

Unterschiede anzeigen:

SL/DB/Invoice.pm
236 236
  }
237 237
}
238 238

  
239
sub invoice_type {
240
  my ($self) = @_;
241

  
242
  return 'ar_transaction'     if !$self->invoice;
243
  return 'credit_note'        if $self->type eq 'credit_note' && $self->amount < 0 && !$self->storno;
244
  return 'invoice_storno'     if $self->type ne 'credit_note' && $self->amount < 0 &&  $self->storno;
245
  return 'credit_note_storno' if $self->type eq 'credit_note' && $self->amount > 0 &&  $self->storno;
246
  return 'invoice';
247
}
248

  
249
sub displayable_state {
250
  my $self = shift;
251

  
252
  return $self->closed ? $::locale->text('closed') : $::locale->text('open');
253
}
254

  
239 255
1;
240 256

  
241 257
__END__

Auch abrufbar als: Unified diff