Revision 8cdf6b7e
Von Sven Schöling vor mehr als 3 Jahren hinzugefügt
SL/Controller/ImageUpload.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
use parent qw(SL::Controller::Base); |
5 | 5 |
|
6 |
use JSON qw(to_json); |
|
7 |
|
|
6 | 8 |
use SL::DB::Part; |
7 | 9 |
use SL::DB::Order; |
8 | 10 |
use SL::DB::DeliveryOrder; |
... | ... | |
34 | 36 |
$self->render('image_upload/local_list'); |
35 | 37 |
} |
36 | 38 |
|
39 |
sub action_resolve_object_by_number { |
|
40 |
my ($self) = @_; |
|
41 |
|
|
42 |
my $result = { |
|
43 |
id => $self->object->id, |
|
44 |
description => $self->object->displayable_name, |
|
45 |
}; |
|
46 |
|
|
47 |
$self->render(\ to_json($result), { process => 0, type => 'json' }); |
|
48 |
} |
|
49 |
|
|
37 | 50 |
################# internal ############### |
38 | 51 |
|
39 | 52 |
sub init_object_type { |
... | ... | |
50 | 63 |
|
51 | 64 |
return $manager->find_by(id => $::form->{object_id}*1) if $::form->{object_id}; |
52 | 65 |
|
53 |
return $manager->find_by(donumber => $::form->{object_number}, @{ $loader->[1] // [] }) if $::form->{object_number}; |
|
66 |
return $manager->find_by(donumber => $::form->{object_number}, closed => 0, @{ $loader->[1] // [] }) if $::form->{object_number};
|
|
54 | 67 |
} |
55 | 68 |
|
56 | 69 |
|
Auch abrufbar als: Unified diff
ImageUpload: resolve