Revision 7bc44f0f
Von Kivitendo Admin vor fast 10 Jahren hinzugefügt
SL/Controller/CustomerVendor.pm | ||
---|---|---|
611 | 611 |
|
612 | 612 |
my @hashes = map { |
613 | 613 |
+{ |
614 |
value => $_->name, |
|
614 |
value => $_->displayable_name,
|
|
615 | 615 |
label => $_->displayable_name, |
616 | 616 |
id => $_->id, |
617 | 617 |
$number => $_->$number, |
... | ... | |
953 | 953 |
model => 'Customer', |
954 | 954 |
sorted => { |
955 | 955 |
_default => { |
956 |
by => 'name',
|
|
956 |
by => 'customernumber',
|
|
957 | 957 |
dir => 1, |
958 | 958 |
}, |
959 |
name => t8('Name'),
|
|
959 |
customernumber => t8('Customer Number'),
|
|
960 | 960 |
}, |
961 | 961 |
); |
962 | 962 |
} |
... | ... | |
969 | 969 |
model => 'Vendor', |
970 | 970 |
sorted => { |
971 | 971 |
_default => { |
972 |
by => 'name',
|
|
972 |
by => 'vendornumber',
|
|
973 | 973 |
dir => 1, |
974 | 974 |
}, |
975 |
name => t8('Name'),
|
|
975 |
vendornumber => t8('Vendor Number'),
|
|
976 | 976 |
}, |
977 | 977 |
); |
978 | 978 |
} |
SL/Presenter/CustomerVendor.pm | ||
---|---|---|
57 | 57 |
my $ret = |
58 | 58 |
$self->input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id) . |
59 | 59 |
join('', map { $params{$_} ? $self->input_tag("", delete $params{$_}, id => "${id}_${_}", type => 'hidden') : '' } qw(type)) . |
60 |
$self->input_tag("", (ref $value && $value->can('name')) ? $value->name : '', id => "${id}_name", %params);
|
|
60 |
$self->input_tag("", ref $value ? $value->displayable_name : '', id => "${id}_name", %params);
|
|
61 | 61 |
|
62 | 62 |
$::request->layout->add_javascripts('autocomplete_customer.js'); |
63 | 63 |
$::request->presenter->need_reinit_widgets($id); |
Auch abrufbar als: Unified diff
CustomerVendor Picker auf displayable_name umgestellt
Sowohl im Autocomplete als auch beim ausgewählten Kunden/Lieferanten
wird jetzt immer Kunden/Lieferantennummer und Name angezeigt.