Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 706e28ed

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 706e28edac7682c48467f1d86e6e2953428f37ae
  • Vorgänger 86650875
  • Nachfolger a97fc370

Varianten: einfachen Artikel in Variante umwandeln

Unterschiede anzeigen:

SL/Controller/Part.pm
use File::Temp;
use List::Util qw(sum);
use List::UtilsBy qw(extract_by);
use List::MoreUtils qw(any pairwise);
use POSIX qw(strftime);
use Text::CSV_XS;
......
my $part = $self->part;
my $variant_properties = $part->variant_properties();
my @needed_variant_property_ids = sort map {$_->id} @$variant_properties;
if (@variant_property_ids != @needed_variant_property_ids) {
if (any {$_} grep {
!defined $::form->{variant_properties}->{$_->id}->{selected_property_value_ids}
} @$variant_properties
) {
return $self->js->error(
t8('No property value selected for variant properties: #1.',
join(", ",
map {$_->displayable_name}
grep {!defined $::form->{variant_properties}->{$_->id}->{selected_property_values}}
grep {!defined $::form->{variant_properties}->{$_->id}->{selected_property_value_ids}}
@$variant_properties
)
)
......
my @grouped_variant_property_values = ();
push @grouped_variant_property_values,
SL::DB::Manager::VariantPropertyValue->get_all(
where => [ id => $::form->{variant_properties}->{$_}->{selected_property_values} ]
where => [ id => $::form->{variant_properties}->{$_}->{selected_property_value_ids} ]
)
for @variant_property_ids;
my @variant_property_values_lists = ();