Revision c592c768
Von Jan Büren vor mehr als 3 Jahren hinzugefügt
SL/Helper/Inventory.pm | ||
---|---|---|
214 | 214 |
my $part = $params{part} or Carp::croak('allocate needs a part'); |
215 | 215 |
my $qty = $params{qty} or Carp::croak('allocate needs a qty'); |
216 | 216 |
my $wh = $params{warehouse}; |
217 |
my $wh_strict = $::instance_conf->get_produce_assembly_same_warehouse; |
|
217 |
my $wh_strict = $::instance_conf->get_produce_assembly_same_warehouse; |
|
218 |
my $consume_service = $::instance_conf->get_produce_assembly_transfer_service; |
|
218 | 219 |
|
219 | 220 |
Carp::croak('not an assembly') unless $part->is_assembly; |
220 | 221 |
Carp::croak('No warehouse selected') if $wh_strict && !$wh; |
... | ... | |
222 | 223 |
my %parts_to_allocate; |
223 | 224 |
|
224 | 225 |
for my $assembly ($part->assemblies) { |
225 |
next if $assembly->part->type eq 'service' && 1;
|
|
226 |
next if $assembly->part->type eq 'service' && !$consume_service;
|
|
226 | 227 |
$parts_to_allocate{ $assembly->part->id } //= 0; |
227 | 228 |
$parts_to_allocate{ $assembly->part->id } += $assembly->qty * $qty; |
228 | 229 |
} |
Auch abrufbar als: Unified diff
Erzeugnisse fertigen, kann auch Dienstleistungen verbrauchen
Einstellbar in der Mandantenkonfiguration