Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b6622ee9

Von Bernd Bleßmann vor 4 Monaten hinzugefügt

  • ID b6622ee9e15cdb348680adaa9f453f0a8c40068e
  • Vorgänger 34f13160
  • Nachfolger 21437d97

Zwischeninventur-Abgleich: Filtern mit leerem Array abfangen

Unterschiede anzeigen:

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