Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 43764f14

Von Sven Schöling vor fast 12 Jahren hinzugefügt

  • ID 43764f14ab26f3a41b280115c8094485b4a944d4
  • Vorgänger 6cec3677
  • Nachfolger 5ece5002

pricegroups nur anzeigen, wenn sie auch wirklich vorhanden sind.

Unterschiede anzeigen:

SL/Controller/CsvImport/Part.pm
110 110
  my $i;
111 111
  my $num_data = scalar @{ $self->controller->data };
112 112
  foreach my $entry (@{ $self->controller->data }) {
113
    $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0;
113
    $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 1000 == 0;
114 114

  
115 115
    $self->check_buchungsgruppe($entry);
116 116
    $self->check_type($entry);
......
135 135
  $self->add_columns(map { "${_}_id" } grep { exists $self->controller->data->[0]->{raw_data}->{$_} } qw (price_factor payment partsgroup));
136 136
  $self->add_columns(qw(shop)) if $self->settings->{shoparticle_if_missing};
137 137
  $self->add_cvar_raw_data_columns;
138
  map { $self->add_raw_data_columns("pricegroup_${_}") } (1..scalar(@{ $self->all_pricegroups }));
138
  map { $self->add_raw_data_columns("pricegroup_${_}") if exists $self->controller->data->[0]->{raw_data}->{"pricegroup_$_"} } (1..scalar(@{ $self->all_pricegroups }));
139 139
  map { $self->add_raw_data_columns($_) if exists $self->controller->data->[0]->{raw_data}->{$_} } @{ $self->translation_columns };
140 140
  map { $self->add_raw_data_columns("make_${_}", "model_${_}", "lastcost_${_}") } sort { $a <=> $b } keys %{ $self->makemodel_columns };
141 141
}
......
432 432
  my $profile = $self->SUPER::init_profile;
433 433
  delete @{$profile}{qw(alternate assembly bom expense_accno_id income_accno_id inventory_accno_id makemodel priceupdate stockable type)};
434 434

  
435
  $profile->{"pricegroup_$_"} = '' for 1 .. scalar @{ $_[0]->all_pricegroups };
436

  
435 437
  return $profile;
436 438
}
437 439

  

Auch abrufbar als: Unified diff