Bug 1960 - Datenverlust beim CSV-Warenimport bei Preisen
authorG. Richardson <information@lx-office-hosting.de>
Wed, 1 Aug 2012 09:59:28 +0000 (11:59 +0200)
committerG. Richardson <information@lx-office-hosting.de>
Wed, 1 Aug 2012 09:59:28 +0000 (11:59 +0200)
wenn sellprice, listprice oder lastcost in der Importdatei nicht
explizit mit eigener Spalte gesetzt wurden, wurden die ursprünglichen
Preise beim Preisupdate mit 0 überschrieben.

Fix von Sven.

SL/Controller/CsvImport/Part.pm

index 387bdb5..d707aaa 100644 (file)
@@ -198,7 +198,7 @@ sub check_existing {
 
   if ($self->settings->{article_number_policy} eq 'update_prices') {
     if ($entry->{part}) {
-      map { $entry->{part}->$_( $object->$_ ) } qw(sellprice listprice lastcost);
+      map { $entry->{part}->$_( $object->$_ ) if defined $object->$_ } qw(sellprice listprice lastcost);   
 
       # merge prices
       my %prices_by_pricegroup_id = map { $_->pricegroup->id => $_ } $entry->{part}->prices, $object->prices;