Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 25230b8c

Von Jan Büren vor etwa 5 Jahren hinzugefügt

  • ID 25230b8c8a406c836091f135445f1e1a97dad549
  • Vorgänger 2eaabab4
  • Nachfolger 66135d67

BankTransaction(closed_period) Prüft Valutadatum gegen closedto

Gibt 1 (wahr) zurück falls das Valutadatum der Bankbewegung
innerhalb einer geschloßenen Periode ist. Andernfalls 0.

POD, Test und 2 Stellen im Controller geändert.
Offen: Payment-Helper, der sollte allerdings nichts über den Zustand
der Bankbewegung wissen müssen ...

Unterschiede anzeigen:

SL/DB/BankTransaction.pm
297 297
  return $not_assigned_amount;
298 298

  
299 299
}
300
sub closed_period {
301
  my ($self) = @_;
302

  
303
  # check for closed period
304
  croak t8('Illegal date') unless ref $self->valutadate eq 'DateTime';
305

  
306

  
307
  my $closedto = $::locale->parse_date_to_object($::instance_conf->get_closedto);
308
  if ( ref $closedto && $self->valutadate < $closedto ) {
309
    return 1;
310
  } else {
311
    return 0;
312
  }
313
}
300 314
1;
301 315

  
302 316
__END__
......
354 368
Returns the not open amount of this bank transaction.
355 369
Dies if the return amount is higher than the original amount.
356 370

  
371
=item C<closed_period>
372

  
373
Returns 1 if the bank transaction valutadate is in a closed period, 0 if the
374
valutadate of the bank transaction is not in a closed period.
375

  
357 376
=back
358 377

  
359 378
=head1 AUTHOR

Auch abrufbar als: Unified diff