Revision e8b00979
SL/DB/Inventory.pm | ||
---|---|---|
87 | 87 |
sub _before_save_check_valid_qty { |
88 | 88 |
my ($self) = @_; |
89 | 89 |
|
90 |
return 1 if $self->trans_type->direction eq 'in'; # also catches produce assembly
|
|
90 |
return 1 unless $self->trans_type->direction eq 'out'; # also catches produce assembly
|
|
91 | 91 |
return 1 if $::instance_conf->get_transfer_default_ignore_onhand; |
92 | 92 |
|
93 |
my $qty = SL::Helper::Inventory->get_stock($self, bin => $self->bin_id, part => $self->parts_id); |
|
93 |
my $qty = SL::Helper::Inventory->get_stock($self, bin => $self->bin_id, part => $self->parts_id) // 0;
|
|
94 | 94 |
|
95 | 95 |
die t8("Cannot transfer #1 qty for #2 from warehouse #3 at bin #4", |
96 | 96 |
$self->qty, $self->part->partnumber, $self->warehouse->description, $self->bin->description) |
Auch abrufbar als: Unified diff
warnung raus, transfer_type = 'transfer' erlauben