Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f87214b2

Von Bernd Bleßmann vor fast 8 Jahren hinzugefügt

  • ID f87214b22e4bf7a54f314d8248468529ad7019e0
  • Vorgänger 8bf65cea
  • Nachfolger 9ca0da81

CsvImport Aufträge: Artikel auch nach EAN suchen

Unterschiede anzeigen:

SL/Controller/CsvImport/Order.pm
162 162
                                 { name => 'cusordnumber',    description => $::locale->text('Customer Order Number')      },
163 163
                                 { name => 'description',     description => $::locale->text('Description')                },
164 164
                                 { name => 'discount',        description => $::locale->text('Discount')                   },
165
                                 { name => 'ean',             description => $::locale->text('EAN')                        },
165 166
                                 { name => 'lastcost',        description => $::locale->text('Lastcost')                   },
166 167
                                 { name => 'longdescription', description => $::locale->text('Long Description')           },
167 168
                                 { name => 'marge_percent',   description => $::locale->text('Margepercent')               },
......
464 465
    $object->parts_id($part->id);
465 466
  }
466 467

  
468
  # Map ean to ID if given.
469
  if (!$object->parts_id && $entry->{raw_data}->{ean}) {
470
    my $part = $self->parts_by->{ean}->{ $entry->{raw_data}->{ean} };
471
    if (!$part) {
472
      push @{ $entry->{errors} }, $::locale->text('Error: Invalid part');
473
      return 0;
474
    }
475

  
476
    $object->parts_id($part->id);
477
  }
478

  
467 479
  if ($object->parts_id) {
468 480
    $entry->{info_data}->{partnumber} = $self->parts_by->{id}->{ $object->parts_id }->partnumber;
469 481
  } else {

Auch abrufbar als: Unified diff