Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 15176cbb

Von Sven Schöling vor etwa 4 Jahren hinzugefügt

  • ID 15176cbb3b162a07a055dbe6cfc0f98f9d65d0df
  • Vorgänger 003e290c
  • Nachfolger 3b9f657c

Inventory: allocate bevorzugt jetzt früherere Lagerbewegung

Unterschiede anzeigen:

SL/Helper/Inventory.pm
24 24

  
25 25
  my $onhand_mode = !!$params{onhand};
26 26

  
27
  my @selects = ('SUM(qty) as qty');
27
  my @selects = (
28
    'SUM(qty) AS qty',
29
    'MIN(EXTRACT(epoch FROM inventory.itime)) AS itime',
30
  );
28 31
  my @values;
29 32
  my @where;
30 33
  my @groups;
......
192 195
    || exists $chargenumbers{$b->{chargenumber}}  <=> exists $chargenumbers{$a->{chargenumber}} # then prefer wanted chargenumbers
193 196
    || exists $bin_whitelist{$b->{bin_id}}        <=> exists $bin_whitelist{$a->{bin_id}}       # then prefer wanted bins
194 197
    || exists $wh_whitelist{$b->{warehouse_id}}   <=> exists $wh_whitelist{$a->{warehouse_id}}  # then prefer wanted bins
198
    || $a->{itime}                                <=> $b->{itime}                               # and finally prefer earlier charges
195 199
  } @filtered_results;
196 200
  my @allocations;
197 201
  my $rest_qty = $qty;

Auch abrufbar als: Unified diff