-our @EXPORT = qw(part_picker part select_classification classification_abbreviation type_abbreviation separate_abbreviation typeclass_abbreviation);
+our @EXPORT_OK = qw(
+ part_picker part select_classification classification_abbreviation
+ type_abbreviation separate_abbreviation typeclass_abbreviation
+);
+our %EXPORT_TAGS = (ALL => \@EXPORT_OK);
$params{display} ||= 'inline';
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
my $text = join '', (
$params{display} ||= 'inline';
croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
my $text = join '', (
- $params{no_link} ? '' : '<a href="controller.pl?action=Part/edit&part.id=' . $self->escape($part->id) . '">',
- $self->escape($part->partnumber),
+ $params{no_link} ? '' : '<a href="controller.pl?action=Part/edit&part.id=' . escape($part->id) . '">',
+ escape($part->partnumber),
my @classes = $params{class} ? ($params{class}) : ();
push @classes, 'part_autocomplete';
my $ret =
my @classes = $params{class} ? ($params{class}) : ();
push @classes, 'part_autocomplete';
my $ret =
- $self->input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id,
+ input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id,
- $self->input_tag("", ref $value ? $value->displayable_name : '', id => "${id}_name", %params);
+ input_tag("", ref $value ? $value->displayable_name : '', id => "${id}_name", %params);
$::request->layout->add_javascripts('kivi.Part.js');
$::request->presenter->need_reinit_widgets($id);
$::request->layout->add_javascripts('kivi.Part.js');
$::request->presenter->need_reinit_widgets($id);
return $::locale->text('Assembly (typeabbreviation)') if $part_type eq 'assembly';
return $::locale->text('Part (typeabbreviation)') if $part_type eq 'part';
return $::locale->text('Assortment (typeabbreviation)') if $part_type eq 'assortment';
return $::locale->text('Assembly (typeabbreviation)') if $part_type eq 'assembly';
return $::locale->text('Part (typeabbreviation)') if $part_type eq 'part';
return $::locale->text('Assortment (typeabbreviation)') if $part_type eq 'assortment';
SL::DB::Manager::PartClassification->cache_all();
my $obj = SL::DB::PartClassification->load_cached($id);
$obj && $obj->abbreviation ? t8($obj->abbreviation) : '';
}
sub typeclass_abbreviation {
SL::DB::Manager::PartClassification->cache_all();
my $obj = SL::DB::PartClassification->load_cached($id);
$obj && $obj->abbreviation ? t8($obj->abbreviation) : '';
}
sub typeclass_abbreviation {
SL::DB::Manager::PartClassification->cache_all();
my $obj = SL::DB::PartClassification->load_cached($id);
$obj && $obj->abbreviation && $obj->report_separate ? t8($obj->abbreviation) : '';
SL::DB::Manager::PartClassification->cache_all();
my $obj = SL::DB::PartClassification->load_cached($id);
$obj && $obj->abbreviation && $obj->report_separate ? t8($obj->abbreviation) : '';
If C<%params> contains C<unit> only parts with this unit will be used
for autocompletion. You may comma separate multiple units as in
C<h,min>.
If C<%params> contains C<unit> only parts with this unit will be used
for autocompletion. You may comma separate multiple units as in
C<h,min>.
If C<%params> contains C<convertible_unit> only parts with a unit
that's convertible to unit will be used for autocompletion.
If C<%params> contains C<convertible_unit> only parts with a unit
that's convertible to unit will be used for autocompletion.
Obsolete parts will by default not be displayed for selection. However they are
accepted as default values and can persist during updates. As with other
selectors though, they are not selectable once overridden.
Obsolete parts will by default not be displayed for selection. However they are
accepted as default values and can persist during updates. As with other
selectors though, they are not selectable once overridden.