Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f559550f

Von Sven Schöling vor mehr als 7 Jahren hinzugefügt

  • ID f559550ffb82e23f3712c11be4161d9c53a4b904
  • Vorgänger bae8f672
  • Nachfolger 0f743db7

ShippedQty: Algorithmusdetails konfigurierbar machen

Unterschiede anzeigen:

SL/Helper/ShippedQty.pm
9 9
use List::Util qw(min);
10 10
use List::MoreUtils qw(any all);
11 11
use List::UtilsBy qw(partition_by);
12
use SL::Locale::String qw(t8);
12 13

  
13 14
use Rose::Object::MakeMethods::Generic (
14 15
  'scalar'                => [ qw(objects objects_or_ids shipped_qty ) ],
......
86 87
    AND from_table = 'oe'
87 88
    AND to_table = 'delivery_orders'
88 89

  
90
my @known_item_identity_fields = qw(parts_id description reqdate serialnumber);
91
my %item_identity_fields = (
92
  parts_id     => t8('Part'),
93
  description  => t8('Description'),
94
  reqdate      => t8('Reqdate'),
95
  serialnumber => t8('Serial Number'),
96
);
97

  
89 98
sub calculate {
90 99
  my ($self, $data) = @_;
91 100

  
......
244 253
  $self->shipped_qty({});
245 254
}
246 255

  
256
sub available_item_identity_fields {
257
  map { [ $_ => $item_identity_fields{$_} ] } @known_item_identity_fields;
258
}
259

  
247 260
sub init_oe_ids {
248 261
  my ($self) = @_;
249 262

  
......
268 281
  $d;
269 282
}
270 283

  
271
sub init_require_stock_out { 0 }
272
sub init_item_identity_fields { [ qw(parts_id description reqdate serialnumber) ] }
273
sub init_fill_up { 1 }
284
sub init_require_stock_out    { $::instance_conf->get_shipped_qty_require_stock_out }
285
sub init_item_identity_fields { [ grep $item_identity_fields{$_}, @{ $::instance_conf->get_shipped_qty_item_identity_fields } ] }
286
sub init_fill_up              { $::instance_conf->get_shipped_qty_fill_up  }
274 287

  
275 288
1;
276 289

  

Auch abrufbar als: Unified diff