Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3e50ade5

Von Tamino Steinert vor 6 Tagen hinzugefügt

  • ID 3e50ade52369f6e2ad92665828799e9529bdf387
  • Vorgänger 65c0626e
  • Nachfolger 02fff93e

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

  
......
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
71 71
sub type_abbreviation {
72 72
  my ($part_type) = @_;
73 73

  
74
  return ''                                               if !$part_type;
75
  return $::locale->text('Assembly (typeabbreviation)')   if $part_type eq 'assembly';
76
  return $::locale->text('Part (typeabbreviation)')       if $part_type eq 'part';
77
  return $::locale->text('Assortment (typeabbreviation)') if $part_type eq 'assortment';
78
  return $::locale->text('Service (typeabbreviation)');
74
  my %part_type_abbr = (
75
    part           => t8('Part (typeabbreviation)'),
76
    assembly       => t8('Assembly (typeabbreviation)'),
77
    assortment     => t8('Assortment (typeabbreviation)'),
78
    service        => t8('Service (typeabbreviation)'),
79
    parent_variant => t8('Parent Variant (typeabbreviation)'),
80
    variant        => t8('Variant (typeabbreviation)'),
81
  );
82

  
83
  return $part_type_abbr{$part_type} || '';
79 84
}
80 85

  
81 86
#
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