Revision 0f19ca7e
Von Sven Schöling vor fast 4 Jahren hinzugefügt
SL/Helper/Inventory.pm | ||
---|---|---|
187 | 187 |
# sort results so that reserve_for is first, then chargenumbers, then wanted bins, then wanted warehouses |
188 | 188 |
my @sorted_results = sort { |
189 | 189 |
(!!$b->{reserve_for_id}) <=> (!!$a->{reserve_for_id}) # sort by existing reserve_for_id first. |
190 |
|| $chargenumbers{$b->{chargenumber}} <=> $chargenumbers{$a->{chargenumber}} # then prefer wanted chargenumbers
|
|
191 |
|| $bin_whitelist{$b->{bin_id}} <=> $bin_whitelist{$a->{bin_id}} # then prefer wanted bins
|
|
192 |
|| $wh_whitelist{$b->{warehouse_id}} <=> $wh_whitelist{$a->{warehouse_id}} # then prefer wanted bins
|
|
190 |
|| exists $chargenumbers{$b->{chargenumber}} <=> exists $chargenumbers{$a->{chargenumber}} # then prefer wanted chargenumbers
|
|
191 |
|| exists $bin_whitelist{$b->{bin_id}} <=> exists $bin_whitelist{$a->{bin_id}} # then prefer wanted bins
|
|
192 |
|| exists $wh_whitelist{$b->{warehouse_id}} <=> exists $wh_whitelist{$a->{warehouse_id}} # then prefer wanted bins
|
|
193 | 193 |
} @filtered_results; |
194 | 194 |
my @allocations; |
195 | 195 |
my $rest_qty = $qty; |
Auch abrufbar als: Unified diff
Helper::Inventory: warnings