Revision 8736e198
Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt
SL/Controller/Inventory.pm | ||
---|---|---|
498 | 498 |
sub action_save_stocktaking { |
499 | 499 |
my ($self) = @_; |
500 | 500 |
|
501 |
return $self->js->flash('error', t8('Please choose a part.'))->render() |
|
502 |
if !$::form->{part_id}; |
|
503 |
|
|
501 | 504 |
return $self->js->flash('error', t8('A target quantitiy has to be given'))->render() |
502 | 505 |
if $::form->{target_qty} eq ''; |
503 | 506 |
|
... | ... | |
607 | 610 |
sub action_stocktaking_get_warn_qty_threshold { |
608 | 611 |
my ($self) = @_; |
609 | 612 |
|
613 |
return $_[0]->render(\ !!0, { type => 'text' }) if !$::form->{part_id}; |
|
610 | 614 |
return $_[0]->render(\ !!0, { type => 'text' }) if $::form->{target_qty} eq ''; |
611 | 615 |
return $_[0]->render(\ !!0, { type => 'text' }) if 0 == $::instance_conf->get_stocktaking_qty_threshold; |
612 | 616 |
|
... | ... | |
724 | 728 |
} |
725 | 729 |
|
726 | 730 |
sub load_part_from_form { |
727 |
$_[0]->part(SL::DB::Manager::Part->find_by_or_create(id => $::form->{part_id})); |
|
731 |
$_[0]->part(SL::DB::Manager::Part->find_by_or_create(id => $::form->{part_id}||undef));
|
|
728 | 732 |
} |
729 | 733 |
|
730 | 734 |
sub load_unit_from_form { |
Auch abrufbar als: Unified diff
Inventur: Fehlermeldung an Benutzer, wenn kein Artikel ausgewählt wurde.