X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FSepaExportItem.pm;h=b75e0537699f8e571bd75c928fe5802da2a02147;hb=6418adee39dc8d7331df12b716096f0a8611ef5d;hp=3c46ee39b41fac1ab3015c638c4684fe2a56ad06;hpb=f9676efea9ccfa01df2a57dca9c45cc8fde0d09e;p=kivitendo-erp.git diff --git a/SL/DB/SepaExportItem.pm b/SL/DB/SepaExportItem.pm index 3c46ee39b..b75e05376 100644 --- a/SL/DB/SepaExportItem.pm +++ b/SL/DB/SepaExportItem.pm @@ -1,13 +1,23 @@ -# This file has been auto-generated only because it didn't exist. -# Feel free to modify it at will; it will not be overwritten automatically. - package SL::DB::SepaExportItem; use strict; use SL::DB::MetaSetup::SepaExportItem; +__PACKAGE__->meta->initialize; + # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; +sub compare_to { + my ($self, $other) = @_; + + return 1 if $self->execution_date && !$other->execution_date; + return -1 if !$self->execution_date && $other->execution_date; + + my $result = 0; + $result = $self->execution_date <=> $other->execution_date if $self->execution_date; + return $result || ($self->sepa_export_id <=> $other->sepa_export_id) || ($self->id <=> $other->id); +} + 1;