Verknüpfte Dokumente: Auch SEPA-Überweisungen/-Einzüge anzeigen
[kivitendo-erp.git] / SL / DB / SepaExportItem.pm
1 package SL::DB::SepaExportItem;
2
3 use strict;
4
5 use SL::DB::MetaSetup::SepaExportItem;
6
7 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
8 __PACKAGE__->meta->make_manager_class;
9
10 sub compare_to {
11   my ($self, $other) = @_;
12
13   return  1 if  $self->execution_date && !$other->execution_date;
14   return -1 if !$self->execution_date &&  $other->execution_date;
15
16   my $result = 0;
17   $result    = $self->execution_date <=> $other->execution_date if $self->execution_date;
18   return $result || ($self->sepa_export_id <=> $other->sepa_export_id) || ($self->id <=> $other->id);
19 }
20
21 1;