my @hashes = map {
+{
- value => $_->name,
+ value => $_->displayable_name,
label => $_->displayable_name,
id => $_->id,
$number => $_->$number,
model => 'Customer',
sorted => {
_default => {
- by => 'name',
+ by => 'customernumber',
dir => 1,
},
- name => t8('Name'),
+ customernumber => t8('Customer Number'),
},
);
}
model => 'Vendor',
sorted => {
_default => {
- by => 'name',
+ by => 'vendornumber',
dir => 1,
},
- name => t8('Name'),
+ vendornumber => t8('Vendor Number'),
},
);
}
my $ret =
$self->input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id) .
join('', map { $params{$_} ? $self->input_tag("", delete $params{$_}, id => "${id}_${_}", type => 'hidden') : '' } qw(type)) .
- $self->input_tag("", (ref $value && $value->can('name')) ? $value->name : '', id => "${id}_name", %params);
+ $self->input_tag("", ref $value ? $value->displayable_name : '', id => "${id}_name", %params);
$::request->layout->add_javascripts('autocomplete_customer.js');
$::request->presenter->need_reinit_widgets($id);