Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c25824ca

Von Tamino Steinert vor 10 Monaten hinzugefügt

  • ID c25824ca1bbf1662c39f827ba97d68f75fe75ec9
  • Vorgänger b16967fa
  • Nachfolger eb82b54d

Varianten: Varianten Eigenschaften im Namen anzeigen

Unterschiede anzeigen:

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

  
......
631 634
  return 1;
632 635
}
633 636

  
634
sub init_onhandqty{
637
sub variant_values {
638
  my ($self) = @_;
639
  return unless $self->is_variant;
640
  return join(" ",
641
    map {"[" . $_->variant_property->abbreviation . ":" . $_->abbreviation . "]"}
642
    $self->variant_property_values);
643
}
644

  
645
sub init_onhandqty {
635 646
  my ($self) = @_;
636 647
  my $qty = SL::Helper::Inventory::get_onhand(part => $self->id) || 0;
637 648
  return $qty;
638 649
}
639 650

  
640
sub init_stockqty{
651
sub init_stockqty {
641 652
  my ($self) = @_;
642 653
  my $qty = SL::Helper::Inventory::get_stock(part => $self->id) || 0;
643 654
  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