Revision b6622ee9
Von Bernd Bleßmann vor 4 Monaten hinzugefügt
SL/Controller/StockCountingReconciliation.pm | ||
---|---|---|
281 | 281 |
my $correction_inventory_ids = SL::DB::Manager::StockCountingItem->get_all(where => ['!correction_inventory_id' => undef], |
282 | 282 |
select => ['correction_inventory_id'], |
283 | 283 |
distcint => 1); |
284 |
my %filter_corrections = @$correction_inventory_ids ? ('!id' => [map { $_->correction_inventory_id } @$correction_inventory_ids]) |
|
285 |
: undef; |
|
284 | 286 |
foreach my $object (@$objects) { |
285 | 287 |
my $start = $object->counting->start_time_of_counting; |
286 | 288 |
my $inbetweens = SL::DB::Manager::Inventory->get_all(where => [itime => { ge => $start }, |
287 | 289 |
parts_id => $object->part_id, |
288 | 290 |
bin_id => $object->bin_id, |
289 |
'!id' => [map { $_->correction_inventory_id } @$correction_inventory_ids]],
|
|
291 |
%filter_corrections],
|
|
290 | 292 |
select => ['qty']); |
291 | 293 |
$object->{inbetweens} = sum map { $_->qty } @$inbetweens; |
292 | 294 |
} |
Auch abrufbar als: Unified diff
Zwischeninventur-Abgleich: Filtern mit leerem Array abfangen