projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WebshopApi: UPGRADE Datei berichtigt wegen der Trigram Extension
[kivitendo-erp.git]
/
SL
/
DB
/
Warehouse.pm
diff --git
a/SL/DB/Warehouse.pm
b/SL/DB/Warehouse.pm
index
938c31e
..
8345709
100644
(file)
--- a/
SL/DB/Warehouse.pm
+++ b/
SL/DB/Warehouse.pm
@@
-1,13
+1,10
@@
-# 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::Warehouse;
use strict;
use SL::DB::MetaSetup::Warehouse;
package SL::DB::Warehouse;
use strict;
use SL::DB::MetaSetup::Warehouse;
-
-
__PACKAGE__->meta->make_manager_class
;
+use SL::DB::Manager::Warehouse;
+
use SL::DB::Helper::ActsAsList
;
__PACKAGE__->meta->add_relationship(
bins => {
__PACKAGE__->meta->add_relationship(
bins => {
@@
-17,13
+14,14
@@
__PACKAGE__->meta->add_relationship(
}
);
}
);
-# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
-#__PACKAGE__->meta->make_manager_class;
-
__PACKAGE__->meta->initialize;
__PACKAGE__->meta->initialize;
+sub bins_sorted {
+ return [ sort { $a->id <=> $b->id } @{ shift()->bins || [] } ];
+}
+
sub first_bin {
sub first_bin {
- return shift()->bins->[0];
+ return shift()->bins
_sorted
->[0];
}
1;
}
1;