Revision f3227c04
Von Tamino Steinert vor 10 Monaten hinzugefügt
SL/DB/Part.pm | ||
---|---|---|
21 | 21 |
); |
22 | 22 |
use SL::DB::Helper::DisplayableNamePreferences ( |
23 | 23 |
title => t8('Article'), |
24 |
options => [ {name => 'partnumber', title => t8('Part Number') }, |
|
25 |
{name => 'description', title => t8('Description') }, |
|
26 |
{name => 'notes', title => t8('Notes')}, |
|
27 |
{name => 'ean', title => t8('EAN') }, ], |
|
24 |
options => [ |
|
25 |
{name => 'partnumber', title => t8('Part Number')}, |
|
26 |
{name => 'description', title => t8('Description')}, |
|
27 |
{name => 'variant_values', title => t8('Varaint Values')}, |
|
28 |
{name => 'notes', title => t8('Notes')}, |
|
29 |
{name => 'ean', title => t8('EAN')}, |
|
30 |
], |
|
28 | 31 |
); |
29 | 32 |
|
30 | 33 |
|
... | ... | |
632 | 635 |
return 1; |
633 | 636 |
} |
634 | 637 |
|
635 |
sub init_onhandqty{ |
|
638 |
sub variant_values { |
|
639 |
my ($self) = @_; |
|
640 |
return unless $self->is_variant; |
|
641 |
return join(" ", |
|
642 |
map {"[" . $_->variant_property->abbreviation . ":" . $_->abbreviation . "]"} |
|
643 |
$self->variant_property_values); |
|
644 |
} |
|
645 |
|
|
646 |
sub init_onhandqty { |
|
636 | 647 |
my ($self) = @_; |
637 | 648 |
my $qty = SL::Helper::Inventory::get_onhand(part => $self->id) || 0; |
638 | 649 |
return $qty; |
639 | 650 |
} |
640 | 651 |
|
641 |
sub init_stockqty{ |
|
652 |
sub init_stockqty {
|
|
642 | 653 |
my ($self) = @_; |
643 | 654 |
my $qty = SL::Helper::Inventory::get_stock(part => $self->id) || 0; |
644 | 655 |
return $qty; |
SL/Presenter/Part.pm | ||
---|---|---|
64 | 64 |
sub type_abbreviation { |
65 | 65 |
my ($part_type) = @_; |
66 | 66 |
|
67 |
return '' if !$part_type; |
|
68 |
return $::locale->text('Assembly (typeabbreviation)') if $part_type eq 'assembly'; |
|
69 |
return $::locale->text('Part (typeabbreviation)') if $part_type eq 'part'; |
|
70 |
return $::locale->text('Assortment (typeabbreviation)') if $part_type eq 'assortment'; |
|
71 |
return $::locale->text('Service (typeabbreviation)'); |
|
67 |
my %part_type_abbr = ( |
|
68 |
part => t8('Part (typeabbreviation)'), |
|
69 |
assembly => t8('Assembly (typeabbreviation)'), |
|
70 |
assortment => t8('Assortment (typeabbreviation)'), |
|
71 |
service => t8('Service (typeabbreviation)'), |
|
72 |
parent_variant => t8('Parent Variant (typeabbreviation)'), |
|
73 |
variant => t8('Variant (typeabbreviation)'), |
|
74 |
); |
|
75 |
|
|
76 |
return $part_type_abbr{$part_type} || ''; |
|
72 | 77 |
} |
73 | 78 |
|
74 | 79 |
# |
templates/design40_webpages/part/_variant.html | ||
---|---|---|
14 | 14 |
[% LxERP.t8("Variant Property Values") %] |
15 | 15 |
</caption> |
16 | 16 |
<thead> |
17 |
<th>[% "Transled Value" | $T8 %]</th> |
|
18 |
<th>[% "Value" | $T8 %]</th> |
|
17 |
<th>[% "Name" | $T8 %]([% "Abbreviation" | $T8 %])</th> |
|
19 | 18 |
<th>[% "Abbreviation" | $T8 %]</th> |
19 |
<th>[% "Value" | $T8 %]</th> |
|
20 | 20 |
</thead> |
21 | 21 |
<tbody class="row_entry listrow"> |
22 |
[% FOREACH variant_property_value = SELF.part.variant_property_values %]
|
|
22 |
[% FOREACH value = SELF.part.variant_property_values %] |
|
23 | 23 |
<tr> |
24 |
[% # L.dump(variant_property_value) %] |
|
25 |
<td>[% variant_property_value.value_translated | html %]</td> |
|
26 |
<td>[% variant_property_value.value | html %]</td> |
|
27 |
<td>[% variant_property_value.abbreviation | html %]</td> |
|
24 |
<td>[% value.variant_property.name | html %]([% value.variant_property.abbreviation | html %])</td> |
|
25 |
<td>[% value.abbreviation | html %]</td> |
|
26 |
<td>[% value.value | html %]</td> |
|
28 | 27 |
</tr> |
29 | 28 |
[% END %] |
30 | 29 |
</tbody> |
Auch abrufbar als: Unified diff
Varianten: Varianten Eigenschaften im Namen anzeigen